masspay_ruby_sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +8 -0
  3. data/CONTRIBUTING.md +13 -0
  4. data/Gemfile +9 -0
  5. data/README.md +197 -0
  6. data/Rakefile +10 -0
  7. data/docs/AccountApi.md +150 -0
  8. data/docs/ApiResponse.md +22 -0
  9. data/docs/AttrTxn.md +20 -0
  10. data/docs/AttrValue.md +20 -0
  11. data/docs/AttrVelocityRequestInner.md +20 -0
  12. data/docs/AttributeApi.md +168 -0
  13. data/docs/AttrsRequirement.md +36 -0
  14. data/docs/AutopayResp.md +22 -0
  15. data/docs/AutopayRule.md +20 -0
  16. data/docs/AvailableBalanceTxnResp.md +22 -0
  17. data/docs/CardApi.md +160 -0
  18. data/docs/CatalogApi.md +469 -0
  19. data/docs/CompaniesResp.md +18 -0
  20. data/docs/Company.md +26 -0
  21. data/docs/Country.md +22 -0
  22. data/docs/Exception.md +20 -0
  23. data/docs/FoundUser.md +24 -0
  24. data/docs/GetAccountStatement200Response.md +18 -0
  25. data/docs/GetTransactionConfirmationDetails200Response.md +18 -0
  26. data/docs/GetUserAgreement200Response.md +26 -0
  27. data/docs/GetUserAgreementsNames200ResponseInner.md +24 -0
  28. data/docs/GetUserUserTokenKycAu10tix200Response.md +18 -0
  29. data/docs/GetUserUserTokenKycVeriff200Response.md +18 -0
  30. data/docs/GetWalletCardInfo200Response.md +30 -0
  31. data/docs/IDUpload.md +20 -0
  32. data/docs/KYCApi.md +305 -0
  33. data/docs/LoadApi.md +621 -0
  34. data/docs/LoadTxn.md +32 -0
  35. data/docs/LoadTxnResp.md +20 -0
  36. data/docs/Loads.md +36 -0
  37. data/docs/PayoutApi.md +403 -0
  38. data/docs/PayoutTxn.md +36 -0
  39. data/docs/PayoutTxnCommitResp.md +24 -0
  40. data/docs/PayoutTxnResp.md +60 -0
  41. data/docs/ResendBalanceNotification200Response.md +18 -0
  42. data/docs/Service.md +22 -0
  43. data/docs/ServicePayersInner.md +38 -0
  44. data/docs/ServicePayersInnerExchangeRateInner.md +20 -0
  45. data/docs/SpendBackApi.md +161 -0
  46. data/docs/SpendBackTxn.md +28 -0
  47. data/docs/SpendBackTxnResp.md +22 -0
  48. data/docs/SpendBacks.md +34 -0
  49. data/docs/StoredUser.md +56 -0
  50. data/docs/TaxApi.md +81 -0
  51. data/docs/TaxYearUserResp.md +48 -0
  52. data/docs/TxnHistoryResp.md +52 -0
  53. data/docs/UpdateUser.md +52 -0
  54. data/docs/User.md +50 -0
  55. data/docs/UserApi.md +403 -0
  56. data/docs/WalletApi.md +463 -0
  57. data/docs/WalletTxnResp.md +34 -0
  58. data/docs/logo.webp +0 -0
  59. data/lib/masspay_ruby_sdk/api/account_api.rb +149 -0
  60. data/lib/masspay_ruby_sdk/api/attribute_api.rb +214 -0
  61. data/lib/masspay_ruby_sdk/api/card_api.rb +174 -0
  62. data/lib/masspay_ruby_sdk/api/catalog_api.rb +443 -0
  63. data/lib/masspay_ruby_sdk/api/kyc_api.rb +290 -0
  64. data/lib/masspay_ruby_sdk/api/load_api.rb +598 -0
  65. data/lib/masspay_ruby_sdk/api/payout_api.rb +397 -0
  66. data/lib/masspay_ruby_sdk/api/spend_back_api.rb +160 -0
  67. data/lib/masspay_ruby_sdk/api/tax_api.rb +82 -0
  68. data/lib/masspay_ruby_sdk/api/user_api.rb +418 -0
  69. data/lib/masspay_ruby_sdk/api/wallet_api.rb +461 -0
  70. data/lib/masspay_ruby_sdk/api_client.rb +391 -0
  71. data/lib/masspay_ruby_sdk/api_error.rb +57 -0
  72. data/lib/masspay_ruby_sdk/configuration.rb +315 -0
  73. data/lib/masspay_ruby_sdk/models/api_response.rb +236 -0
  74. data/lib/masspay_ruby_sdk/models/attr_txn.rb +235 -0
  75. data/lib/masspay_ruby_sdk/models/attr_value.rb +239 -0
  76. data/lib/masspay_ruby_sdk/models/attr_velocity_request_inner.rb +273 -0
  77. data/lib/masspay_ruby_sdk/models/attrs_requirement.rb +372 -0
  78. data/lib/masspay_ruby_sdk/models/autopay_resp.rb +256 -0
  79. data/lib/masspay_ruby_sdk/models/autopay_rule.rb +241 -0
  80. data/lib/masspay_ruby_sdk/models/available_balance_txn_resp.rb +254 -0
  81. data/lib/masspay_ruby_sdk/models/companies_resp.rb +225 -0
  82. data/lib/masspay_ruby_sdk/models/company.rb +285 -0
  83. data/lib/masspay_ruby_sdk/models/country.rb +296 -0
  84. data/lib/masspay_ruby_sdk/models/exception.rb +241 -0
  85. data/lib/masspay_ruby_sdk/models/found_user.rb +270 -0
  86. data/lib/masspay_ruby_sdk/models/get_account_statement200_response.rb +225 -0
  87. data/lib/masspay_ruby_sdk/models/get_transaction_confirmation_details200_response.rb +218 -0
  88. data/lib/masspay_ruby_sdk/models/get_user_agreement200_response.rb +280 -0
  89. data/lib/masspay_ruby_sdk/models/get_user_agreements_names200_response_inner.rb +270 -0
  90. data/lib/masspay_ruby_sdk/models/get_user_user_token_kyc_au10tix200_response.rb +224 -0
  91. data/lib/masspay_ruby_sdk/models/get_user_user_token_kyc_veriff200_response.rb +224 -0
  92. data/lib/masspay_ruby_sdk/models/get_wallet_card_info200_response.rb +460 -0
  93. data/lib/masspay_ruby_sdk/models/id_upload.rb +273 -0
  94. data/lib/masspay_ruby_sdk/models/load_txn.rb +321 -0
  95. data/lib/masspay_ruby_sdk/models/load_txn_resp.rb +273 -0
  96. data/lib/masspay_ruby_sdk/models/loads.rb +388 -0
  97. data/lib/masspay_ruby_sdk/models/payout_txn.rb +328 -0
  98. data/lib/masspay_ruby_sdk/models/payout_txn_commit_resp.rb +293 -0
  99. data/lib/masspay_ruby_sdk/models/payout_txn_resp.rb +613 -0
  100. data/lib/masspay_ruby_sdk/models/resend_balance_notification200_response.rb +225 -0
  101. data/lib/masspay_ruby_sdk/models/service.rb +318 -0
  102. data/lib/masspay_ruby_sdk/models/service_payers_inner.rb +373 -0
  103. data/lib/masspay_ruby_sdk/models/service_payers_inner_exchange_rate_inner.rb +239 -0
  104. data/lib/masspay_ruby_sdk/models/spend_back_txn.rb +325 -0
  105. data/lib/masspay_ruby_sdk/models/spend_back_txn_resp.rb +307 -0
  106. data/lib/masspay_ruby_sdk/models/spend_backs.rb +340 -0
  107. data/lib/masspay_ruby_sdk/models/stored_user.rb +500 -0
  108. data/lib/masspay_ruby_sdk/models/tax_year_user_resp.rb +388 -0
  109. data/lib/masspay_ruby_sdk/models/txn_history_resp.rb +571 -0
  110. data/lib/masspay_ruby_sdk/models/update_user.rb +490 -0
  111. data/lib/masspay_ruby_sdk/models/user.rb +423 -0
  112. data/lib/masspay_ruby_sdk/models/wallet_txn_resp.rb +375 -0
  113. data/lib/masspay_ruby_sdk/version.rb +14 -0
  114. data/lib/masspay_ruby_sdk.rb +89 -0
  115. data/masspay_ruby_sdk.gemspec +37 -0
  116. data/spec/api_client_spec.rb +227 -0
  117. data/spec/configuration_spec.rb +41 -0
  118. data/spec/spec_helper.rb +110 -0
  119. metadata +203 -0
@@ -0,0 +1,161 @@
1
+ # MassPayRubySdk::SpendBackApi
2
+
3
+ All URIs are relative to *https://api.masspay.io/v0.1.4*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_user_spendbacks_by_token**](SpendBackApi.md#get_user_spendbacks_by_token) | **GET** /spendback/{user_token} | Get history of spend backs by user token |
8
+ | [**initiate_spendback**](SpendBackApi.md#initiate_spendback) | **POST** /spendback/{user_token} | Initiate a spend back transaction |
9
+
10
+
11
+ ## get_user_spendbacks_by_token
12
+
13
+ > <Array<SpendBacks>> get_user_spendbacks_by_token(user_token, opts)
14
+
15
+ Get history of spend backs by user token
16
+
17
+ This **GET** endpoint is used to retrieve the history of spendbacks for a specific user token. <br> You can use this endpoint to help manage your payment operations and track the usage of funds by your users. <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 list of all the historical spendbacks for the provided user token. The response will contain a JSON array with details for each spendback transaction.
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::SpendBackApi.new
33
+ user_token = 'usr_3f5d3fe8-a9c0-48c7-90ad-a72948730f56' # String | Token representing the user to fetch/initiate spend back
34
+ opts = {
35
+ idempotency_key: 'idempotency_key_example' # String | Unique key to prevent duplicate processing
36
+ }
37
+
38
+ begin
39
+ # Get history of spend backs by user token
40
+ result = api_instance.get_user_spendbacks_by_token(user_token, opts)
41
+ p result
42
+ rescue MassPayRubySdk::ApiError => e
43
+ puts "Error when calling SpendBackApi->get_user_spendbacks_by_token: #{e}"
44
+ end
45
+ ```
46
+
47
+ #### Using the get_user_spendbacks_by_token_with_http_info variant
48
+
49
+ This returns an Array which contains the response data, status code and headers.
50
+
51
+ > <Array(<Array<SpendBacks>>, Integer, Hash)> get_user_spendbacks_by_token_with_http_info(user_token, opts)
52
+
53
+ ```ruby
54
+ begin
55
+ # Get history of spend backs by user token
56
+ data, status_code, headers = api_instance.get_user_spendbacks_by_token_with_http_info(user_token, opts)
57
+ p status_code # => 2xx
58
+ p headers # => { ... }
59
+ p data # => <Array<SpendBacks>>
60
+ rescue MassPayRubySdk::ApiError => e
61
+ puts "Error when calling SpendBackApi->get_user_spendbacks_by_token_with_http_info: #{e}"
62
+ end
63
+ ```
64
+
65
+ ### Parameters
66
+
67
+ | Name | Type | Description | Notes |
68
+ | ---- | ---- | ----------- | ----- |
69
+ | **user_token** | **String** | Token representing the user to fetch/initiate spend back | |
70
+ | **idempotency_key** | **String** | Unique key to prevent duplicate processing | [optional] |
71
+
72
+ ### Return type
73
+
74
+ [**Array&lt;SpendBacks&gt;**](SpendBacks.md)
75
+
76
+ ### Authorization
77
+
78
+ [AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
79
+
80
+ ### HTTP request headers
81
+
82
+ - **Content-Type**: Not defined
83
+ - **Accept**: application/json
84
+
85
+
86
+ ## initiate_spendback
87
+
88
+ > <SpendBackTxnResp> initiate_spendback(user_token, opts)
89
+
90
+ Initiate a spend back transaction
91
+
92
+ This **POST** endpoint is used to initiate a spendback transaction to a provided user token. <br> You can use this endpoint to enable spendback transactions for your users and help them manage their funds more effectively. <br> To use this endpoint, you need to provide the `user_token` as a parameter in the URL Path, along with the required parameters in the request Body, including `client_spendback_id`, `source_token`, `source_currency_code` and `amount`. <br> The endpoint will then initiate the spendback transaction, transferring funds from the source token to the user token. The response will contain a JSON object indicating the status of the request and any relevant transaction details.
93
+
94
+ ### Examples
95
+
96
+ ```ruby
97
+ require 'time'
98
+ require 'masspay_ruby_sdk'
99
+ # setup authorization
100
+ MassPayRubySdk.configure do |config|
101
+ # Configure API key authorization: AUTHORIZER_NAME
102
+ config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
103
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
104
+ # config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
105
+ end
106
+
107
+ api_instance = MassPayRubySdk::SpendBackApi.new
108
+ user_token = 'usr_3f5d3fe8-a9c0-48c7-90ad-a72948730f56' # String | Token representing the user to fetch/initiate spend back
109
+ opts = {
110
+ idempotency_key: 'idempotency_key_example', # String | Unique key to prevent duplicate processing
111
+ spend_back_txn: MassPayRubySdk::SpendBackTxn.new({client_spendback_id: 'aEjn345', source_token: 'source_token_example', source_currency_code: 'USD', amount: 100.5}) # SpendBackTxn | Spend back information
112
+ }
113
+
114
+ begin
115
+ # Initiate a spend back transaction
116
+ result = api_instance.initiate_spendback(user_token, opts)
117
+ p result
118
+ rescue MassPayRubySdk::ApiError => e
119
+ puts "Error when calling SpendBackApi->initiate_spendback: #{e}"
120
+ end
121
+ ```
122
+
123
+ #### Using the initiate_spendback_with_http_info variant
124
+
125
+ This returns an Array which contains the response data, status code and headers.
126
+
127
+ > <Array(<SpendBackTxnResp>, Integer, Hash)> initiate_spendback_with_http_info(user_token, opts)
128
+
129
+ ```ruby
130
+ begin
131
+ # Initiate a spend back transaction
132
+ data, status_code, headers = api_instance.initiate_spendback_with_http_info(user_token, opts)
133
+ p status_code # => 2xx
134
+ p headers # => { ... }
135
+ p data # => <SpendBackTxnResp>
136
+ rescue MassPayRubySdk::ApiError => e
137
+ puts "Error when calling SpendBackApi->initiate_spendback_with_http_info: #{e}"
138
+ end
139
+ ```
140
+
141
+ ### Parameters
142
+
143
+ | Name | Type | Description | Notes |
144
+ | ---- | ---- | ----------- | ----- |
145
+ | **user_token** | **String** | Token representing the user to fetch/initiate spend back | |
146
+ | **idempotency_key** | **String** | Unique key to prevent duplicate processing | [optional] |
147
+ | **spend_back_txn** | [**SpendBackTxn**](SpendBackTxn.md) | Spend back information | [optional] |
148
+
149
+ ### Return type
150
+
151
+ [**SpendBackTxnResp**](SpendBackTxnResp.md)
152
+
153
+ ### Authorization
154
+
155
+ [AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
156
+
157
+ ### HTTP request headers
158
+
159
+ - **Content-Type**: application/json
160
+ - **Accept**: application/json
161
+
@@ -0,0 +1,28 @@
1
+ # MassPayRubySdk::SpendBackTxn
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **client_spendback_id** | **String** | A client defined spend back 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
+ | **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 | [default to &#39;USD&#39;] |
10
+ | **amount** | **Float** | The amount to debit the user&#39;s wallet in source currency | |
11
+ | **notes** | **String** | A description for the spend back | [optional] |
12
+ | **metadata** | **Object** | Optional JSON object with attributes that can later be searched to locate this spendback. Do not include PII as this object is not encrypted. | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'masspay_ruby_sdk'
18
+
19
+ instance = MassPayRubySdk::SpendBackTxn.new(
20
+ client_spendback_id: aEjn345,
21
+ source_token: null,
22
+ source_currency_code: USD,
23
+ amount: 100.5,
24
+ notes: Purchase of Candles. Order #14930,
25
+ metadata: {&quot;group_id&quot;:541}
26
+ )
27
+ ```
28
+
@@ -0,0 +1,22 @@
1
+ # MassPayRubySdk::SpendBackTxnResp
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **spendback_token** | **String** | Token that represents the spend back that was just created. | |
8
+ | **client_spendback_id** | **String** | A client defined spend back identifier. This is the unique ID assigned to the load on your system. Max 50 characters. | |
9
+ | **status** | **String** | Status that indicates whether the transaction was successfully processed. If &#x60;success&#x60;, everything was processed correctly. &#x60;failure&#x60; indicates a generic error. | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'masspay_ruby_sdk'
15
+
16
+ instance = MassPayRubySdk::SpendBackTxnResp.new(
17
+ spendback_token: null,
18
+ client_spendback_id: aEjn345,
19
+ status: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,34 @@
1
+ # MassPayRubySdk::SpendBacks
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **spendback_token** | **String** | Token representing the load token | |
8
+ | **time_of_spendback** | **String** | The timestamp the spend back was created in the system. Using UTC timestamp.[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) | |
9
+ | **client_spendback_id** | **String** | A client defined spend back identifier. This is the unique ID assigned to the spend back on your system. Max 50 characters. | |
10
+ | **source_token** | **String** | Token that represents the funding source i.e. bank account, wallet. 36 characters long | |
11
+ | **wallet_token** | **String** | Token that represents the wallet that received the funds. 36 characters long | |
12
+ | **amount** | **Float** | The amount to credit the user&#39;s wallet in source currency | |
13
+ | **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 | |
14
+ | **notes** | **String** | A description for the load. Will be visible to the user receiving the load | |
15
+ | **metadata** | **Object** | Optional JSON object with attributes that can later be searched to locate this spendback. Do not include PII as this object is not encrypted. | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'masspay_ruby_sdk'
21
+
22
+ instance = MassPayRubySdk::SpendBacks.new(
23
+ spendback_token: spnd_bk_4275f2-bae1-488d-9d6f-20af1cd83574,
24
+ time_of_spendback: 2019-07-07T23:03:05,
25
+ client_spendback_id: aEjn345,
26
+ source_token: null,
27
+ wallet_token: null,
28
+ amount: 100.5,
29
+ source_currency_code: USD,
30
+ notes: Commission payment for July,
31
+ metadata: {&quot;group_id&quot;:541}
32
+ )
33
+ ```
34
+
@@ -0,0 +1,56 @@
1
+ # MassPayRubySdk::StoredUser
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **user_token** | **String** | Token representing the user that was just created | |
8
+ | **status** | **String** | The status of the user | |
9
+ | **created_on** | **String** | The timestamp the user was created in the system. Using UTC timestamp.[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) | |
10
+ | **internal_user_id** | **String** | A client-defined identifier for the user. This is the unique ID assigned to the user on your system. Max 75 characters. Allows letters, numbers, and + , - . / _ ~ | | |
11
+ | **address1** | **String** | The user&#39;s street address. | [optional] |
12
+ | **address2** | **String** | The user&#39;s street address, line 2. | [optional] |
13
+ | **city** | **String** | The user&#39;s city. | [optional] |
14
+ | **state_province** | **String** | The user&#39;s state/province. | [optional] |
15
+ | **postal_code** | **String** | The user&#39;s postal code. | [optional] |
16
+ | **country** | **String** | The user&#39;s country code. ISO_3166-1_alpha-3 code | [optional] |
17
+ | **first_name** | **String** | The user&#39;s first name. (If Business account, the first name of the representative) | |
18
+ | **middle_name** | **String** | The user&#39;s middle name. (If Business account, the middle name of the representative) | [optional] |
19
+ | **last_name** | **String** | The user&#39;s last name. (If Business account, the last name of the representative) | |
20
+ | **email** | **String** | The user&#39;s e-mail address. Must be unique. Cannot have two users with the same e-mail address. | |
21
+ | **language** | **String** | The user&#39;s preferred language of communication. If not provided, defaults to English (en) | [optional] |
22
+ | **mobile_number** | **String** | (Optional) Mobile number of user. Allows for SMS notifications upon availability of funds | [optional] |
23
+ | **business_name** | **String** | Company legal name (Only if Business account) | [optional] |
24
+ | **timezone** | **String** | User&#39;s computed timezone | |
25
+ | **date_of_birth** | **Date** | Date of birth. (optional). Minimum 18 years old | [optional] |
26
+ | **metadata** | **Object** | Optional JSON object with attributes that can later be searched to locate this user. Do not include PII as this object is not encrypted. | [optional] |
27
+
28
+ ## Example
29
+
30
+ ```ruby
31
+ require 'masspay_ruby_sdk'
32
+
33
+ instance = MassPayRubySdk::StoredUser.new(
34
+ user_token: null,
35
+ status: null,
36
+ created_on: 2019-07-07T23:03:05,
37
+ internal_user_id: 4324-rOzk,
38
+ address1: 2000 main st,
39
+ address2: apt D,
40
+ city: Santa Monica,
41
+ state_province: CA,
42
+ postal_code: 90405,
43
+ country: USA,
44
+ first_name: John,
45
+ middle_name: ,
46
+ last_name: Doe,
47
+ email: jdoe@gmail.com,
48
+ language: en,
49
+ mobile_number: 16502000226,
50
+ business_name: ABC Company,
51
+ timezone: America/Los_Angeles,
52
+ date_of_birth: Mon Mar 24 01:00:00 CET 1975,
53
+ metadata: {&quot;group_id&quot;:541}
54
+ )
55
+ ```
56
+
data/docs/TaxApi.md ADDED
@@ -0,0 +1,81 @@
1
+ # MassPayRubySdk::TaxApi
2
+
3
+ All URIs are relative to *https://api.masspay.io/v0.1.4*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_tax_users**](TaxApi.md#get_tax_users) | **GET** /tax | Get List Of Users Annual Balance |
8
+
9
+
10
+ ## get_tax_users
11
+
12
+ > <Array<TaxYearUserResp>> get_tax_users(opts)
13
+
14
+ Get List Of Users Annual Balance
15
+
16
+ ### Examples
17
+
18
+ ```ruby
19
+ require 'time'
20
+ require 'masspay_ruby_sdk'
21
+ # setup authorization
22
+ MassPayRubySdk.configure do |config|
23
+ # Configure API key authorization: AUTHORIZER_NAME
24
+ config.api_key['AUTHORIZER_NAME'] = 'YOUR API KEY'
25
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
26
+ # config.api_key_prefix['AUTHORIZER_NAME'] = 'Bearer'
27
+ end
28
+
29
+ api_instance = MassPayRubySdk::TaxApi.new
30
+ opts = {
31
+ amount_threshold: 8.14, # Float | If specified, only show users whose total balance exceeds the provided amount
32
+ tax_year: 56 # Integer | The year for which we would like to obtain tax information for. If none provided, defaults to previous year.
33
+ }
34
+
35
+ begin
36
+ # Get List Of Users Annual Balance
37
+ result = api_instance.get_tax_users(opts)
38
+ p result
39
+ rescue MassPayRubySdk::ApiError => e
40
+ puts "Error when calling TaxApi->get_tax_users: #{e}"
41
+ end
42
+ ```
43
+
44
+ #### Using the get_tax_users_with_http_info variant
45
+
46
+ This returns an Array which contains the response data, status code and headers.
47
+
48
+ > <Array(<Array<TaxYearUserResp>>, Integer, Hash)> get_tax_users_with_http_info(opts)
49
+
50
+ ```ruby
51
+ begin
52
+ # Get List Of Users Annual Balance
53
+ data, status_code, headers = api_instance.get_tax_users_with_http_info(opts)
54
+ p status_code # => 2xx
55
+ p headers # => { ... }
56
+ p data # => <Array<TaxYearUserResp>>
57
+ rescue MassPayRubySdk::ApiError => e
58
+ puts "Error when calling TaxApi->get_tax_users_with_http_info: #{e}"
59
+ end
60
+ ```
61
+
62
+ ### Parameters
63
+
64
+ | Name | Type | Description | Notes |
65
+ | ---- | ---- | ----------- | ----- |
66
+ | **amount_threshold** | **Float** | If specified, only show users whose total balance exceeds the provided amount | [optional] |
67
+ | **tax_year** | **Integer** | The year for which we would like to obtain tax information for. If none provided, defaults to previous year. | [optional] |
68
+
69
+ ### Return type
70
+
71
+ [**Array&lt;TaxYearUserResp&gt;**](TaxYearUserResp.md)
72
+
73
+ ### Authorization
74
+
75
+ [AUTHORIZER_NAME](../README.md#AUTHORIZER_NAME)
76
+
77
+ ### HTTP request headers
78
+
79
+ - **Content-Type**: Not defined
80
+ - **Accept**: application/json
81
+
@@ -0,0 +1,48 @@
1
+ # MassPayRubySdk::TaxYearUserResp
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **user_token** | **String** | | [optional] |
8
+ | **address1** | **String** | | |
9
+ | **address2** | **String** | | [optional] |
10
+ | **city** | **String** | | |
11
+ | **state_province** | **String** | | [optional] |
12
+ | **postal_code** | **String** | | [optional] |
13
+ | **country** | **String** | | |
14
+ | **first_name** | **String** | | |
15
+ | **middle_name** | **String** | | [optional] |
16
+ | **last_name** | **String** | | |
17
+ | **email** | **String** | | [optional] |
18
+ | **mobile_number** | **String** | | [optional] |
19
+ | **business_name** | **String** | | [optional] |
20
+ | **date_of_birth** | **String** | | |
21
+ | **balance** | **Float** | | |
22
+ | **tax_id** | **String** | | [optional] |
23
+
24
+ ## Example
25
+
26
+ ```ruby
27
+ require 'masspay_ruby_sdk'
28
+
29
+ instance = MassPayRubySdk::TaxYearUserResp.new(
30
+ user_token: null,
31
+ address1: null,
32
+ address2: null,
33
+ city: null,
34
+ state_province: null,
35
+ postal_code: null,
36
+ country: null,
37
+ first_name: null,
38
+ middle_name: null,
39
+ last_name: null,
40
+ email: null,
41
+ mobile_number: null,
42
+ business_name: null,
43
+ date_of_birth: null,
44
+ balance: null,
45
+ tax_id: null
46
+ )
47
+ ```
48
+
@@ -0,0 +1,52 @@
1
+ # MassPayRubySdk::TxnHistoryResp
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **token** | **String** | Token represnting the transaction | |
8
+ | **type** | **String** | Type of transaction | |
9
+ | **time_of_txn** | **Time** | Time the transaction was created. In UTC | |
10
+ | **source_amount** | **Float** | Source amount | |
11
+ | **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 | [default to &#39;USD&#39;] |
12
+ | **destination_amount** | **Float** | The amount that was received in &#x60;destination_currency_code&#x60; | |
13
+ | **destination_currency_code** | **String** | The currency of the funds received. Using [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format | |
14
+ | **fee** | **Float** | Fee of the transaction | |
15
+ | **status** | **String** | Status of the transaction | |
16
+ | **notes** | **String** | Notes of the transaction when load or spend back | [optional] |
17
+ | **payer_name** | **String** | Name of the payer when payout transaction | [optional] |
18
+ | **pickup_code** | **String** | Code/pin that is required when collecting the money when payout transaction | [optional] |
19
+ | **source_token** | **String** | Token that represents the funding source i.e. bank account, wallet. 36 characters long | [optional] |
20
+ | **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. If not provided, the last destination that was used for this user will be used. 36 characters long | |
21
+ | **delivery_type** | **String** | The type of service. I.e. cash pickup, home delivery, etc. Only provided for payouts | [optional] |
22
+ | **client_transfer_id** | **String** | A client defined transfer identifier. This is the unique ID assigned to the transfer on your system. Max 50 characters. | [optional] |
23
+ | **status_reason** | **String** | The reason for the status change. Usually would include reason for an ERROR or CANCEL status | [optional] |
24
+ | **client_id** | **Integer** | Optional client id | [optional] |
25
+
26
+ ## Example
27
+
28
+ ```ruby
29
+ require 'masspay_ruby_sdk'
30
+
31
+ instance = MassPayRubySdk::TxnHistoryResp.new(
32
+ token: null,
33
+ type: payout,
34
+ time_of_txn: null,
35
+ source_amount: 50.1,
36
+ source_currency_code: USD,
37
+ destination_amount: 44.99,
38
+ destination_currency_code: null,
39
+ fee: 2.98,
40
+ status: READY_FOR_PICKUP,
41
+ notes: Purchase of Candles. Order #14930,
42
+ payer_name: Elektra,
43
+ pickup_code: 343432,
44
+ source_token: null,
45
+ destination_token: null,
46
+ delivery_type: null,
47
+ client_transfer_id: null,
48
+ status_reason: null,
49
+ client_id: null
50
+ )
51
+ ```
52
+
@@ -0,0 +1,52 @@
1
+ # MassPayRubySdk::UpdateUser
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **status** | **String** | The status of the user, if set to ACTIVE when current status is DEACTIVE, reactivation fee will incur | |
8
+ | **created_on** | **String** | The timestamp the user was created in the system. Using UTC timestamp.[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) | [optional] |
9
+ | **internal_user_id** | **String** | A client-defined identifier for the user. This is the unique ID assigned to the user on your system. Max 75 characters. Allows letters, numbers, and + , - . / _ ~ | | |
10
+ | **address1** | **String** | The user&#39;s street address. | |
11
+ | **address2** | **String** | The user&#39;s street address, line 2. | [optional] |
12
+ | **city** | **String** | The user&#39;s city. | |
13
+ | **state_province** | **String** | The user&#39;s state/province. | |
14
+ | **postal_code** | **String** | The user&#39;s postal code. | |
15
+ | **country** | **String** | The user&#39;s country code. ISO_3166-1_alpha-3 code | |
16
+ | **first_name** | **String** | The user&#39;s first name. | |
17
+ | **middle_name** | **String** | The user&#39;s middle name. | [optional] |
18
+ | **last_name** | **String** | The user&#39;s last name. | |
19
+ | **email** | **String** | The user&#39;s e-mail address. Must be unique. Cannot have two users with the same e-mail address. | |
20
+ | **language** | **String** | The user&#39;s preferred language of communication. If not provided, defaults to English (en) | [optional] |
21
+ | **mobile_number** | **String** | (Optional) Mobile number of user. Allows for SMS notifications upon availability of funds | [optional] |
22
+ | **business_name** | **String** | Company legal name (Only if Business account) | [optional] |
23
+ | **date_of_birth** | **Date** | Date of birth. (optional). Minimum 18 years old | [optional] |
24
+ | **metadata** | **Object** | Optional JSON object with attributes that can later be searched to locate this user. Do not include PII as this object is not encrypted. | [optional] |
25
+
26
+ ## Example
27
+
28
+ ```ruby
29
+ require 'masspay_ruby_sdk'
30
+
31
+ instance = MassPayRubySdk::UpdateUser.new(
32
+ status: null,
33
+ created_on: 2019-07-07T23:03:05,
34
+ internal_user_id: 4324-rOzk,
35
+ address1: 2000 main st,
36
+ address2: apt D,
37
+ city: Santa Monica,
38
+ state_province: CA,
39
+ postal_code: 90405,
40
+ country: USA,
41
+ first_name: John,
42
+ middle_name: ,
43
+ last_name: Doe,
44
+ email: jdoe@gmail.com,
45
+ language: en,
46
+ mobile_number: 16502000226,
47
+ business_name: ABC Company,
48
+ date_of_birth: Mon Mar 24 01:00:00 CET 1975,
49
+ metadata: {&quot;group_id&quot;:541}
50
+ )
51
+ ```
52
+
data/docs/User.md ADDED
@@ -0,0 +1,50 @@
1
+ # MassPayRubySdk::User
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **internal_user_id** | **String** | A client-defined identifier for the user. This is the unique ID assigned to the user on your system. Max 75 characters. Allows letters, numbers, and + , - . / _ ~ | | |
8
+ | **address1** | **String** | The user&#39;s street address. Required in order to process a payout. | [optional] |
9
+ | **address2** | **String** | The user&#39;s street address, line 2. | [optional] |
10
+ | **city** | **String** | The user&#39;s city. Required in order to process a payout. | [optional] |
11
+ | **state_province** | **String** | The user&#39;s state/province. | [optional] |
12
+ | **postal_code** | **String** | The user&#39;s postal code. | [optional] |
13
+ | **country** | **String** | The user&#39;s country code. [ISO_3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) code. Required in order to process a payout. | |
14
+ | **first_name** | **String** | The user&#39;s first name. (If Business account, the first name of the representative) | |
15
+ | **middle_name** | **String** | The user&#39;s middle name. (If Business account, the middle name of the representative) | [optional] |
16
+ | **last_name** | **String** | The user&#39;s last name. (If Business account, the last name of the representative) | |
17
+ | **email** | **String** | The user&#39;s e-mail address. Must be unique. Cannot have two users with the same e-mail address. | |
18
+ | **language** | **String** | The user&#39;s preferred language of communication. If not provided, defaults to English (en) | [optional] |
19
+ | **mobile_number** | **String** | (Optional) Mobile number of user. Allows for SMS notifications upon availability of funds | [optional] |
20
+ | **business_name** | **String** | Company legal name (Only if Business account) | [optional] |
21
+ | **date_of_birth** | **Date** | Date of birth. (optional). Minimum 18 years old | [optional] |
22
+ | **metadata** | **Object** | Optional JSON object with attributes that can later be searched to locate this user. Do not include PII as this object is not encrypted. | [optional] |
23
+ | **notify_user** | **Boolean** | Should we notify the user via email that their user has been created in the system? They will receive instructions to establish such account. | [optional][default to false] |
24
+
25
+ ## Example
26
+
27
+ ```ruby
28
+ require 'masspay_ruby_sdk'
29
+
30
+ instance = MassPayRubySdk::User.new(
31
+ internal_user_id: 4324-rOzk,
32
+ address1: 2000 main st,
33
+ address2: apt D,
34
+ city: Santa Monica,
35
+ state_province: CA,
36
+ postal_code: 90405,
37
+ country: USA,
38
+ first_name: John,
39
+ middle_name: ,
40
+ last_name: Doe,
41
+ email: jdoe@gmail.com,
42
+ language: en,
43
+ mobile_number: 16502000226,
44
+ business_name: ABC Company,
45
+ date_of_birth: Mon Mar 24 01:00:00 CET 1975,
46
+ metadata: {&quot;group_id&quot;:541},
47
+ notify_user: null
48
+ )
49
+ ```
50
+