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
@@ -0,0 +1,35 @@
|
|
1
|
+
=begin
|
2
|
+
MassPay API
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 1.0.0
|
5
|
+
Contact: info@masspay.io
|
6
|
+
|
7
|
+
NOTE: This file is auto generated. Do not edit the file manually.
|
8
|
+
=end
|
9
|
+
|
10
|
+
require 'cgi'
|
11
|
+
|
12
|
+
module MasspayRubySdk
|
13
|
+
class CardService
|
14
|
+
|
15
|
+
def initialize(client)
|
16
|
+
@client = client ||= Client.new
|
17
|
+
end
|
18
|
+
|
19
|
+
# Get MassPay card information
|
20
|
+
# GET /payout/wallet/{user_token}/{wallet_token}/card
|
21
|
+
def get_wallet_card_info user_token, wallet_token
|
22
|
+
@client.get("payout/wallet/#{user_token}/#{wallet_token}/card")
|
23
|
+
end
|
24
|
+
|
25
|
+
# Update MassPay card information
|
26
|
+
# PUT /payout/wallet/{user_token}/{wallet_token}/card
|
27
|
+
# @param query_params The query parameters
|
28
|
+
def update_wallet_card_info user_token, wallet_token, query_params={}
|
29
|
+
@client.put("payout/wallet/#{user_token}/#{wallet_token}/card") do |req|
|
30
|
+
req.params = query_params
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
=begin
|
2
|
+
MassPay API
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 1.0.0
|
5
|
+
Contact: info@masspay.io
|
6
|
+
|
7
|
+
NOTE: This file is auto generated. Do not edit the file manually.
|
8
|
+
=end
|
9
|
+
|
10
|
+
require 'cgi'
|
11
|
+
|
12
|
+
module MasspayRubySdk
|
13
|
+
class CatalogService
|
14
|
+
|
15
|
+
def initialize(client)
|
16
|
+
@client = client ||= Client.new
|
17
|
+
end
|
18
|
+
|
19
|
+
# Gets a list of countries where services offered.
|
20
|
+
# GET /payout/country/list
|
21
|
+
def get_country_list
|
22
|
+
@client.get("payout/country/list")
|
23
|
+
end
|
24
|
+
|
25
|
+
# Gets a list of Companies and their service offerings for the given country code.
|
26
|
+
# GET /payout/country/{country_code}
|
27
|
+
# @param query_params The query parameters
|
28
|
+
def get_country_services country_code, query_params={}
|
29
|
+
@client.get("payout/country/#{country_code}") do |req|
|
30
|
+
req.params = query_params
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# Gets a list of Companies and their cheapest service offerings for the given country code.
|
35
|
+
# GET /payout/country/{country_code}/cheapest
|
36
|
+
# @param query_params The query parameters
|
37
|
+
def get_cheapest_country_services country_code, query_params={}
|
38
|
+
@client.get("payout/country/#{country_code}/cheapest") do |req|
|
39
|
+
req.params = query_params
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# Returns list of alternative service to a provided service
|
44
|
+
# GET /payout/service/{destination_token}/alternatives
|
45
|
+
def get_destination_token_alternatives destination_token
|
46
|
+
@client.get("payout/service/#{destination_token}/alternatives")
|
47
|
+
end
|
48
|
+
|
49
|
+
# Returns provided service
|
50
|
+
# GET /payout/service/{destination_token}
|
51
|
+
# @param query_params The query parameters
|
52
|
+
def get_destination_token destination_token, query_params={}
|
53
|
+
@client.get("payout/service/#{destination_token}") do |req|
|
54
|
+
req.params = query_params
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# Get user agreement
|
59
|
+
# GET /payout/user-agreements
|
60
|
+
# @param query_params The query parameters
|
61
|
+
def get_user_agreement query_params={}
|
62
|
+
@client.get("payout/user-agreements") do |req|
|
63
|
+
req.params = query_params
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
# Get available user agreements
|
68
|
+
# OPTIONS /payout/user-agreements
|
69
|
+
def get_user_agreements_names
|
70
|
+
@client.options("payout/user-agreements")
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
=begin
|
2
|
+
MassPay API
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 1.0.0
|
5
|
+
Contact: info@masspay.io
|
6
|
+
|
7
|
+
NOTE: This file is auto generated. Do not edit the file manually.
|
8
|
+
=end
|
9
|
+
|
10
|
+
require 'cgi'
|
11
|
+
|
12
|
+
module MasspayRubySdk
|
13
|
+
class KycService
|
14
|
+
|
15
|
+
def initialize(client)
|
16
|
+
@client = client ||= Client.new
|
17
|
+
end
|
18
|
+
|
19
|
+
# Attributes velocity check
|
20
|
+
# POST /payout/attribute/{user_token}/velocity
|
21
|
+
# @param body The body of the request
|
22
|
+
def find_attributes_velocity user_token, body
|
23
|
+
@client.post("payout/attribute/#{user_token}/velocity") do |req|
|
24
|
+
req.body = body
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
# Get an Au10tix session link
|
29
|
+
# GET /payout/user/{user_token}/kyc/au10tix
|
30
|
+
def get_user_user_token_kyc_au_10_tix user_token
|
31
|
+
@client.get("payout/user/#{user_token}/kyc/au10tix")
|
32
|
+
end
|
33
|
+
|
34
|
+
# Upload ID photos
|
35
|
+
# POST /payout/user/{user_token}/kyc/id
|
36
|
+
# @param body The body of the request
|
37
|
+
def upload_id_photos user_token, body
|
38
|
+
@client.post("payout/user/#{user_token}/kyc/id") do |req|
|
39
|
+
req.body = body
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# Get all KYC sessions
|
44
|
+
# GET /payout/user/{user_token}/kyc/id
|
45
|
+
def get_user_user_token_kyc_attempts user_token
|
46
|
+
@client.get("payout/user/#{user_token}/kyc/id")
|
47
|
+
end
|
48
|
+
|
49
|
+
# Get a Veriff session link
|
50
|
+
# GET /payout/user/{user_token}/kyc/veriff
|
51
|
+
def get_user_user_token_kyc_veriff user_token
|
52
|
+
@client.get("payout/user/#{user_token}/kyc/veriff")
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
=begin
|
2
|
+
MassPay API
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 1.0.0
|
5
|
+
Contact: info@masspay.io
|
6
|
+
|
7
|
+
NOTE: This file is auto generated. Do not edit the file manually.
|
8
|
+
=end
|
9
|
+
|
10
|
+
require 'cgi'
|
11
|
+
|
12
|
+
module MasspayRubySdk
|
13
|
+
class LoadService
|
14
|
+
|
15
|
+
def initialize(client)
|
16
|
+
@client = client ||= Client.new
|
17
|
+
end
|
18
|
+
|
19
|
+
# Resend balance notification
|
20
|
+
# PUT /payout/wallet/{user_token}
|
21
|
+
# @param query_params The query parameters
|
22
|
+
def resend_balance_notification user_token, query_params={}
|
23
|
+
@client.put("payout/wallet/#{user_token}") do |req|
|
24
|
+
req.params = query_params
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
# Initiate a load transaction
|
29
|
+
# POST /payout/load/{user_token}
|
30
|
+
# @param body The body of the request
|
31
|
+
def load_user user_token, body
|
32
|
+
@client.post("payout/load/#{user_token}") do |req|
|
33
|
+
req.body = body
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# Get history of loads by user token
|
38
|
+
# GET /payout/load/{user_token}
|
39
|
+
def get_user_loads_by_token user_token
|
40
|
+
@client.get("payout/load/#{user_token}")
|
41
|
+
end
|
42
|
+
|
43
|
+
# Resend load notification
|
44
|
+
# PUT /payout/load/{user_token}
|
45
|
+
# @param query_params The query parameters
|
46
|
+
def resend_load_notification user_token, query_params={}
|
47
|
+
@client.put("payout/load/#{user_token}") do |req|
|
48
|
+
req.params = query_params
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
# Reverse a user load
|
53
|
+
# DELETE /payout/load/{user_token}
|
54
|
+
# @param query_params The query parameters
|
55
|
+
def cancel_user_load user_token, query_params={}
|
56
|
+
@client.delete("payout/load/#{user_token}") do |req|
|
57
|
+
req.params = query_params
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
=begin
|
2
|
+
MassPay API
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 1.0.0
|
5
|
+
Contact: info@masspay.io
|
6
|
+
|
7
|
+
NOTE: This file is auto generated. Do not edit the file manually.
|
8
|
+
=end
|
9
|
+
|
10
|
+
require 'cgi'
|
11
|
+
|
12
|
+
module MasspayRubySdk
|
13
|
+
class PayoutService
|
14
|
+
|
15
|
+
def initialize(client)
|
16
|
+
@client = client ||= Client.new
|
17
|
+
end
|
18
|
+
|
19
|
+
# Initiate a payout transaction
|
20
|
+
# POST /payout/{user_token}
|
21
|
+
# @param body The body of the request
|
22
|
+
# @param query_params The query parameters
|
23
|
+
def initiate_payout user_token, body, query_params={}
|
24
|
+
@client.post("payout/#{user_token}") do |req|
|
25
|
+
req.body = body
|
26
|
+
req.params = query_params
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
# Get history of payouts by user token
|
31
|
+
# GET /payout/{user_token}
|
32
|
+
# @param query_params The query parameters
|
33
|
+
def get_user_payouts_by_token user_token, query_params={}
|
34
|
+
@client.get("payout/#{user_token}") do |req|
|
35
|
+
req.params = query_params
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# Commit payout transaction
|
40
|
+
# PUT /payout/{user_token}/{payout_token}
|
41
|
+
def commit_payout_txn user_token, payout_token
|
42
|
+
@client.put("payout/#{user_token}/#{payout_token}")
|
43
|
+
end
|
44
|
+
|
45
|
+
# Get status of a payout by payout token
|
46
|
+
# GET /payout/{user_token}/{payout_token}
|
47
|
+
# @param query_params The query parameters
|
48
|
+
def get_payout_status user_token, payout_token, query_params={}
|
49
|
+
@client.get("payout/#{user_token}/#{payout_token}") do |req|
|
50
|
+
req.params = query_params
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# Get transaction confirmation details
|
55
|
+
# PATCH /payout/{user_token}/{payout_token}
|
56
|
+
def get_transaction_confirmation_details user_token, payout_token
|
57
|
+
@client.patch("payout/#{user_token}/#{payout_token}")
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
=begin
|
2
|
+
MassPay API
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 1.0.0
|
5
|
+
Contact: info@masspay.io
|
6
|
+
|
7
|
+
NOTE: This file is auto generated. Do not edit the file manually.
|
8
|
+
=end
|
9
|
+
|
10
|
+
require 'cgi'
|
11
|
+
|
12
|
+
module MasspayRubySdk
|
13
|
+
class SpendBackService
|
14
|
+
|
15
|
+
def initialize(client)
|
16
|
+
@client = client ||= Client.new
|
17
|
+
end
|
18
|
+
|
19
|
+
# Get history of spend backs by user token
|
20
|
+
# GET /payout/spendback/{user_token}
|
21
|
+
def get_user_spendbacks_by_token user_token
|
22
|
+
@client.get("payout/spendback/#{user_token}")
|
23
|
+
end
|
24
|
+
|
25
|
+
# Initiate a spend back transaction
|
26
|
+
# POST /payout/spendback/{user_token}
|
27
|
+
# @param body The body of the request
|
28
|
+
def initiate_spendback user_token, body
|
29
|
+
@client.post("payout/spendback/#{user_token}") do |req|
|
30
|
+
req.body = body
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
=begin
|
2
|
+
MassPay API
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 1.0.0
|
5
|
+
Contact: info@masspay.io
|
6
|
+
|
7
|
+
NOTE: This file is auto generated. Do not edit the file manually.
|
8
|
+
=end
|
9
|
+
|
10
|
+
require 'cgi'
|
11
|
+
|
12
|
+
module MasspayRubySdk
|
13
|
+
class SubaccountService
|
14
|
+
|
15
|
+
def initialize(client)
|
16
|
+
@client = client ||= Client.new
|
17
|
+
end
|
18
|
+
|
19
|
+
# Create a subaccount
|
20
|
+
# POST /subaccount
|
21
|
+
# @param body The body of the request
|
22
|
+
def create_subaccount body
|
23
|
+
@client.post("subaccount") do |req|
|
24
|
+
req.body = body
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
# Add UBOs to subaccount
|
29
|
+
# POST /subaccount/{subaccount_token}/ubo
|
30
|
+
# @param body The body of the request
|
31
|
+
def get_subaccount_subaccount_token_ubo subaccount_token, body
|
32
|
+
@client.post("subaccount/#{subaccount_token}/ubo") do |req|
|
33
|
+
req.body = body
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# Upload UBO ID photos
|
38
|
+
# POST /subaccount/{subaccount_token}/ubo/{ubo_token}/id
|
39
|
+
# @param body The body of the request
|
40
|
+
def upload_subaccount_ubo_id subaccount_token, ubo_token, body
|
41
|
+
@client.post("subaccount/#{subaccount_token}/ubo/#{ubo_token}/id") do |req|
|
42
|
+
req.body = body
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
=begin
|
2
|
+
MassPay API
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 1.0.0
|
5
|
+
Contact: info@masspay.io
|
6
|
+
|
7
|
+
NOTE: This file is auto generated. Do not edit the file manually.
|
8
|
+
=end
|
9
|
+
|
10
|
+
require 'cgi'
|
11
|
+
|
12
|
+
module MasspayRubySdk
|
13
|
+
class TaxService
|
14
|
+
|
15
|
+
def initialize(client)
|
16
|
+
@client = client ||= Client.new
|
17
|
+
end
|
18
|
+
|
19
|
+
# Get list of users' annual balance
|
20
|
+
# GET /payout/tax
|
21
|
+
# @param query_params The query parameters
|
22
|
+
def get_tax_users query_params={}
|
23
|
+
@client.get("payout/tax") do |req|
|
24
|
+
req.params = query_params
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
# Get link for tax interview
|
29
|
+
# GET /payout/{user_token}/tax
|
30
|
+
# @param query_params The query parameters
|
31
|
+
def get_tax_interview_link user_token, query_params={}
|
32
|
+
@client.get("payout/#{user_token}/tax") do |req|
|
33
|
+
req.params = query_params
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
=begin
|
2
|
+
MassPay API
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 1.0.0
|
5
|
+
Contact: info@masspay.io
|
6
|
+
|
7
|
+
NOTE: This file is auto generated. Do not edit the file manually.
|
8
|
+
=end
|
9
|
+
|
10
|
+
require 'cgi'
|
11
|
+
|
12
|
+
module MasspayRubySdk
|
13
|
+
class UserService
|
14
|
+
|
15
|
+
def initialize(client)
|
16
|
+
@client = client ||= Client.new
|
17
|
+
end
|
18
|
+
|
19
|
+
# Create a user
|
20
|
+
# POST /payout/user
|
21
|
+
# @param body The body of the request
|
22
|
+
def create_user body
|
23
|
+
@client.post("payout/user") do |req|
|
24
|
+
req.body = body
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
# Get user by user token
|
29
|
+
# GET /payout/user/{user_token}
|
30
|
+
def get_user_by_token user_token
|
31
|
+
@client.get("payout/user/#{user_token}")
|
32
|
+
end
|
33
|
+
|
34
|
+
# Updated user
|
35
|
+
# PUT /payout/user/{user_token}
|
36
|
+
# @param body The body of the request
|
37
|
+
def update_user user_token, body
|
38
|
+
@client.put("payout/user/#{user_token}") do |req|
|
39
|
+
req.body = body
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# Lookup an existing user
|
44
|
+
# GET /payout/user/lookup
|
45
|
+
# @param query_params The query parameters
|
46
|
+
def user_lookup query_params={}
|
47
|
+
@client.get("payout/user/lookup") do |req|
|
48
|
+
req.params = query_params
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
# Transactions history
|
53
|
+
# GET /payout/user/{user_token}/history
|
54
|
+
# @param query_params The query parameters
|
55
|
+
def get_user_history user_token, query_params={}
|
56
|
+
@client.get("payout/user/#{user_token}/history") do |req|
|
57
|
+
req.params = query_params
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# All Users' Transactions history
|
62
|
+
# GET /payout/user/history
|
63
|
+
# @param query_params The query parameters
|
64
|
+
def get_all_users_history query_params={}
|
65
|
+
@client.get("payout/user/history") do |req|
|
66
|
+
req.params = query_params
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
=begin
|
2
|
+
MassPay API
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 1.0.0
|
5
|
+
Contact: info@masspay.io
|
6
|
+
|
7
|
+
NOTE: This file is auto generated. Do not edit the file manually.
|
8
|
+
=end
|
9
|
+
|
10
|
+
require 'cgi'
|
11
|
+
|
12
|
+
module MasspayRubySdk
|
13
|
+
class WalletService
|
14
|
+
|
15
|
+
def initialize(client)
|
16
|
+
@client = client ||= Client.new
|
17
|
+
end
|
18
|
+
|
19
|
+
# Retrieve all available wallets for a user
|
20
|
+
# GET /payout/wallet/{user_token}
|
21
|
+
def get_wallet user_token
|
22
|
+
@client.get("payout/wallet/#{user_token}")
|
23
|
+
end
|
24
|
+
|
25
|
+
# Get all AutoPayout rules
|
26
|
+
# GET /payout/wallet/{user_token}/{wallet_token}/autopayout
|
27
|
+
def get_autopayout_rules user_token, wallet_token
|
28
|
+
@client.get("payout/wallet/#{user_token}/#{wallet_token}/autopayout")
|
29
|
+
end
|
30
|
+
|
31
|
+
# Add AutoPayout rule
|
32
|
+
# POST /payout/wallet/{user_token}/{wallet_token}/autopayout
|
33
|
+
# @param body The body of the request
|
34
|
+
def create_autopayout_rule user_token, wallet_token, body
|
35
|
+
@client.post("payout/wallet/#{user_token}/#{wallet_token}/autopayout") do |req|
|
36
|
+
req.body = body
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# Delete AutoPayout rule
|
41
|
+
# DELETE /payout/wallet/{user_token}/{wallet_token}/autopayout
|
42
|
+
# @param query_params The query parameters
|
43
|
+
def delete_autopayout_rule user_token, wallet_token, query_params={}
|
44
|
+
@client.delete("payout/wallet/#{user_token}/#{wallet_token}/autopayout") do |req|
|
45
|
+
req.params = query_params
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
=begin
|
2
|
+
MassPay API
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 1.0.0
|
5
|
+
Contact: info@masspay.io
|
6
|
+
|
7
|
+
NOTE: This file is auto generated. Do not edit the file manually.
|
8
|
+
=end
|
9
|
+
|
10
|
+
require 'faraday'
|
11
|
+
require_relative './constants'
|
12
|
+
|
13
|
+
module MasspayRubySdk
|
14
|
+
class Client
|
15
|
+
|
16
|
+
# @param [Hash] options A customizable set of options.
|
17
|
+
# @option options [String] :basic_auth A basic auth string of the form "username:password" (default: nil)
|
18
|
+
# @option options [String] :bearer_auth A bearer auth token (default: nil)
|
19
|
+
# @option options [String] :url The base URL for the API (default: nil, which will use the production API)
|
20
|
+
# @param [Hash] faraday_options A customizable set of options to be passed to Faraday. (default: {}) (see: [Faraday::Connection#initialize](https://www.rubydoc.info/github/lostisland/faraday/Faraday%2FConnection:initialize))
|
21
|
+
def initialize(options = {}, faraday_options = {})
|
22
|
+
|
23
|
+
faraday_options[:url] ||= options[:url] || "https://api.masspay.io/v1.0.0"
|
24
|
+
|
25
|
+
@client = Faraday.new(faraday_options) do |builder|
|
26
|
+
builder.request :json
|
27
|
+
builder.response :json, parser_options: { object_class: OpenStruct }
|
28
|
+
builder.adapter Faraday.default_adapter
|
29
|
+
|
30
|
+
builder.headers[USER_AGENT_HEADER_NAME] = USER_AGENT
|
31
|
+
|
32
|
+
if options[:basic_auth] || options[:bearer_auth]
|
33
|
+
if(!options[:bearer_auth].nil?)
|
34
|
+
builder.request :authorization, 'Bearer', options[:bearer_auth]
|
35
|
+
elsif !options[:basic_auth]
|
36
|
+
builder.request :authorization, :basic, options[:basic_auth].split(":").first, options[:basic_auth].split(":").last
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def account_service
|
44
|
+
MasspayRubySdk::AccountService.new(@client)
|
45
|
+
end
|
46
|
+
|
47
|
+
def attribute_service
|
48
|
+
MasspayRubySdk::AttributeService.new(@client)
|
49
|
+
end
|
50
|
+
|
51
|
+
def card_service
|
52
|
+
MasspayRubySdk::CardService.new(@client)
|
53
|
+
end
|
54
|
+
|
55
|
+
def catalog_service
|
56
|
+
MasspayRubySdk::CatalogService.new(@client)
|
57
|
+
end
|
58
|
+
|
59
|
+
def kyc_service
|
60
|
+
MasspayRubySdk::KycService.new(@client)
|
61
|
+
end
|
62
|
+
|
63
|
+
def load_service
|
64
|
+
MasspayRubySdk::LoadService.new(@client)
|
65
|
+
end
|
66
|
+
|
67
|
+
def payout_service
|
68
|
+
MasspayRubySdk::PayoutService.new(@client)
|
69
|
+
end
|
70
|
+
|
71
|
+
def spend_back_service
|
72
|
+
MasspayRubySdk::SpendBackService.new(@client)
|
73
|
+
end
|
74
|
+
|
75
|
+
def subaccount_service
|
76
|
+
MasspayRubySdk::SubaccountService.new(@client)
|
77
|
+
end
|
78
|
+
|
79
|
+
def tax_service
|
80
|
+
MasspayRubySdk::TaxService.new(@client)
|
81
|
+
end
|
82
|
+
|
83
|
+
def user_service
|
84
|
+
MasspayRubySdk::UserService.new(@client)
|
85
|
+
end
|
86
|
+
|
87
|
+
def wallet_service
|
88
|
+
MasspayRubySdk::WalletService.new(@client)
|
89
|
+
end
|
90
|
+
|
91
|
+
|
92
|
+
end
|
93
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
=begin
|
2
|
+
MassPay API
|
3
|
+
|
4
|
+
The version of the OpenAPI document: 1.0.0
|
5
|
+
Contact: info@masspay.io
|
6
|
+
|
7
|
+
NOTE: This file is auto generated. Do not edit the file manually.
|
8
|
+
=end
|
9
|
+
require_relative './version'
|
10
|
+
|
11
|
+
module MasspayRubySdk
|
12
|
+
USER_AGENT = "MasspayRubySdk/v#{VERSION}"
|
13
|
+
|
14
|
+
CONTENT_TYPE_HEADER_NAME = 'Content-Type'
|
15
|
+
USER_AGENT_HEADER_NAME = 'User-Agent'
|
16
|
+
|
17
|
+
DEFAULT_CONTENT_TYPE = 'application/json; charset=UTF-8'
|
18
|
+
POST_CONTENT_TYPE = 'application/x-www-form-urlencoded'
|
19
|
+
MULTIPART_CONTENT_TYPE = 'multipart/form-data'
|
20
|
+
end
|
@@ -1,14 +1,12 @@
|
|
1
1
|
=begin
|
2
|
-
|
2
|
+
MassPay API
|
3
3
|
|
4
|
-
|
4
|
+
The version of the OpenAPI document: 1.0.0
|
5
|
+
Contact: info@masspay.io
|
5
6
|
|
6
|
-
|
7
|
-
Contact: support@masspay.io
|
8
|
-
Generated by: MassPay Inc.
|
9
|
-
OpenAPI Generator version: 6.5.0
|
7
|
+
NOTE: This file is auto generated. Do not edit the file manually.
|
10
8
|
=end
|
11
9
|
|
12
|
-
module
|
13
|
-
VERSION = '
|
10
|
+
module MasspayRubySdk
|
11
|
+
VERSION = '2.0.0'
|
14
12
|
end
|