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,36 @@
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
+
@@ -0,0 +1,22 @@
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
+
@@ -0,0 +1,20 @@
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
+
@@ -0,0 +1,22 @@
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 ADDED
@@ -0,0 +1,160 @@
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
+