tesser-api-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.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +148 -0
- data/bin/console +15 -0
- data/lib/tesser_apiv1/api_helper.rb +10 -0
- data/lib/tesser_apiv1/client.rb +118 -0
- data/lib/tesser_apiv1/configuration.rb +182 -0
- data/lib/tesser_apiv1/controllers/accounts_controller.rb +193 -0
- data/lib/tesser_apiv1/controllers/base_controller.rb +60 -0
- data/lib/tesser_apiv1/controllers/counterparties_controller.rb +171 -0
- data/lib/tesser_apiv1/controllers/currencies_controller.rb +39 -0
- data/lib/tesser_apiv1/controllers/experimental_controller.rb +49 -0
- data/lib/tesser_apiv1/controllers/health_controller.rb +24 -0
- data/lib/tesser_apiv1/controllers/networks_controller.rb +39 -0
- data/lib/tesser_apiv1/controllers/payments_controller.rb +202 -0
- data/lib/tesser_apiv1/controllers/tenants_controller.rb +156 -0
- data/lib/tesser_apiv1/controllers/treasury_controller.rb +77 -0
- data/lib/tesser_apiv1/exceptions/api_exception.rb +21 -0
- data/lib/tesser_apiv1/http/auth/o_auth2.rb +53 -0
- data/lib/tesser_apiv1/http/http_call_back.rb +10 -0
- data/lib/tesser_apiv1/http/http_method_enum.rb +10 -0
- data/lib/tesser_apiv1/http/http_request.rb +10 -0
- data/lib/tesser_apiv1/http/http_response.rb +10 -0
- data/lib/tesser_apiv1/http/proxy_settings.rb +22 -0
- data/lib/tesser_apiv1/models/account.rb +230 -0
- data/lib/tesser_apiv1/models/account_list_item.rb +230 -0
- data/lib/tesser_apiv1/models/account_list_response.rb +69 -0
- data/lib/tesser_apiv1/models/account_response.rb +60 -0
- data/lib/tesser_apiv1/models/account_safe.rb +218 -0
- data/lib/tesser_apiv1/models/balance_status1_enum.rb +40 -0
- data/lib/tesser_apiv1/models/balance_status_enum.rb +40 -0
- data/lib/tesser_apiv1/models/base_model.rb +110 -0
- data/lib/tesser_apiv1/models/classification7_enum.rb +36 -0
- data/lib/tesser_apiv1/models/classification_enum.rb +36 -0
- data/lib/tesser_apiv1/models/counterparty.rb +411 -0
- data/lib/tesser_apiv1/models/counterparty_list_response.rb +69 -0
- data/lib/tesser_apiv1/models/counterparty_response.rb +60 -0
- data/lib/tesser_apiv1/models/create_bank_request.rb +122 -0
- data/lib/tesser_apiv1/models/create_bank_response.rb +60 -0
- data/lib/tesser_apiv1/models/create_counterparty_request.rb +350 -0
- data/lib/tesser_apiv1/models/create_counterparty_response.rb +60 -0
- data/lib/tesser_apiv1/models/create_deposit_request.rb +119 -0
- data/lib/tesser_apiv1/models/create_payment_request.rb +168 -0
- data/lib/tesser_apiv1/models/create_tenant_request.rb +183 -0
- data/lib/tesser_apiv1/models/create_tenant_response.rb +60 -0
- data/lib/tesser_apiv1/models/create_wallet_request.rb +112 -0
- data/lib/tesser_apiv1/models/create_wallet_response.rb +60 -0
- data/lib/tesser_apiv1/models/create_withdrawal_request.rb +130 -0
- data/lib/tesser_apiv1/models/currencies_response.rb +69 -0
- data/lib/tesser_apiv1/models/currency.rb +119 -0
- data/lib/tesser_apiv1/models/data.rb +221 -0
- data/lib/tesser_apiv1/models/data6.rb +242 -0
- data/lib/tesser_apiv1/models/data7.rb +419 -0
- data/lib/tesser_apiv1/models/data8.rb +200 -0
- data/lib/tesser_apiv1/models/direction1_enum.rb +40 -0
- data/lib/tesser_apiv1/models/direction_enum.rb +40 -0
- data/lib/tesser_apiv1/models/execute_payment_request_dto.rb +71 -0
- data/lib/tesser_apiv1/models/fee.rb +117 -0
- data/lib/tesser_apiv1/models/fee1.rb +117 -0
- data/lib/tesser_apiv1/models/network.rb +68 -0
- data/lib/tesser_apiv1/models/networks_response.rb +69 -0
- data/lib/tesser_apiv1/models/pagination.rb +104 -0
- data/lib/tesser_apiv1/models/payment.rb +421 -0
- data/lib/tesser_apiv1/models/payment_list_response.rb +79 -0
- data/lib/tesser_apiv1/models/payment_response.rb +60 -0
- data/lib/tesser_apiv1/models/payment_type3_enum.rb +52 -0
- data/lib/tesser_apiv1/models/payment_type_enum.rb +54 -0
- data/lib/tesser_apiv1/models/provider_key1_enum.rb +36 -0
- data/lib/tesser_apiv1/models/provider_key_enum.rb +36 -0
- data/lib/tesser_apiv1/models/response.rb +81 -0
- data/lib/tesser_apiv1/models/review_payment_request.rb +60 -0
- data/lib/tesser_apiv1/models/risk_status_enum.rb +44 -0
- data/lib/tesser_apiv1/models/status1_enum.rb +52 -0
- data/lib/tesser_apiv1/models/status_enum.rb +48 -0
- data/lib/tesser_apiv1/models/step.rb +421 -0
- data/lib/tesser_apiv1/models/step_type_enum.rb +44 -0
- data/lib/tesser_apiv1/models/tenant.rb +275 -0
- data/lib/tesser_apiv1/models/tenant_api_credentials.rb +88 -0
- data/lib/tesser_apiv1/models/tenant_list_response.rb +69 -0
- data/lib/tesser_apiv1/models/tenant_response.rb +60 -0
- data/lib/tesser_apiv1/models/transfer_step.rb +422 -0
- data/lib/tesser_apiv1/models/turnkey_stamp.rb +81 -0
- data/lib/tesser_apiv1/models/type3_enum.rb +40 -0
- data/lib/tesser_apiv1/models/type4_enum.rb +44 -0
- data/lib/tesser_apiv1/models/type_enum.rb +44 -0
- data/lib/tesser_apiv1/models/update_account_request.rb +62 -0
- data/lib/tesser_apiv1/models/update_account_response.rb +60 -0
- data/lib/tesser_apiv1/models/update_counterparty_request.rb +166 -0
- data/lib/tesser_apiv1/models/update_counterparty_response.rb +60 -0
- data/lib/tesser_apiv1/models/update_payment_request.rb +100 -0
- data/lib/tesser_apiv1/models/update_tenant_request.rb +111 -0
- data/lib/tesser_apiv1/models/update_tenant_response.rb +60 -0
- data/lib/tesser_apiv1/utilities/date_time_helper.rb +11 -0
- data/lib/tesser_apiv1/utilities/file_wrapper.rb +28 -0
- data/lib/tesser_apiv1/utilities/union_type_lookup.rb +1234 -0
- data/lib/tesser_apiv1.rb +116 -0
- data/test/controllers/controller_test_base.rb +23 -0
- data/test/controllers/test_health_controller.rb +31 -0
- data/test/controllers/test_tenants_controller.rb +133 -0
- data/test/http_response_catcher.rb +19 -0
- metadata +212 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# tesser_apiv1
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TesserApiv1
|
|
7
|
+
# AccountsController
|
|
8
|
+
class AccountsController < BaseController
|
|
9
|
+
# Retrieve all accounts (both bank and wallet accounts) for your workspace.
|
|
10
|
+
# @param [String] authorization Required parameter: Bearer token for
|
|
11
|
+
# authentication. To obtain a token, make a request to Auth0: ```bash
|
|
12
|
+
# curl --request POST \ --url
|
|
13
|
+
# https://dev-awqy75wdabpsnsvu.us.auth0.com/oauth/token \ --header
|
|
14
|
+
# 'content-type: application/json' \ --data '{
|
|
15
|
+
# "client_id":"YOUR_CLIENT_ID", "client_secret":"YOUR_CLIENT_SECRET",
|
|
16
|
+
# "audience":"https://sandbox.tesserx.co",
|
|
17
|
+
# "grant_type":"client_credentials" }' ``` The response will contain an
|
|
18
|
+
# `access_token` field which should be used as the Bearer token.
|
|
19
|
+
# @param [Type4Enum] type Optional parameter: Filter by account type
|
|
20
|
+
# @param [String] tenant_id Optional parameter: Filter by tenant ID. At most
|
|
21
|
+
# one of tenant_id or counterparty_id may be provided.
|
|
22
|
+
# @param [String] counterparty_id Optional parameter: Filter by counterparty
|
|
23
|
+
# ID. At most one of tenant_id or counterparty_id may be provided.
|
|
24
|
+
# @param [TrueClass | FalseClass] include_sensitive Optional parameter: If
|
|
25
|
+
# true, includes sensitive fields like bank_account_number.
|
|
26
|
+
# @return [AccountListResponse] Response from the API call.
|
|
27
|
+
def find_all(authorization,
|
|
28
|
+
type: nil,
|
|
29
|
+
tenant_id: nil,
|
|
30
|
+
counterparty_id: nil,
|
|
31
|
+
include_sensitive: nil)
|
|
32
|
+
@api_call
|
|
33
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
34
|
+
'/accounts',
|
|
35
|
+
Server::DEFAULT)
|
|
36
|
+
.header_param(new_parameter(authorization, key: 'Authorization'))
|
|
37
|
+
.query_param(new_parameter(type, key: 'type'))
|
|
38
|
+
.query_param(new_parameter(tenant_id, key: 'tenant_id'))
|
|
39
|
+
.query_param(new_parameter(counterparty_id, key: 'counterparty_id'))
|
|
40
|
+
.query_param(new_parameter(include_sensitive, key: 'include_sensitive'))
|
|
41
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
42
|
+
.auth(Single.new('bearer')))
|
|
43
|
+
.response(new_response_handler
|
|
44
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
45
|
+
.deserialize_into(AccountListResponse.method(:from_hash))
|
|
46
|
+
.local_error('400',
|
|
47
|
+
'Details coming soon',
|
|
48
|
+
APIException))
|
|
49
|
+
.execute
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Create a new fiat bank account.
|
|
53
|
+
# @param [String] authorization Required parameter: Bearer token for
|
|
54
|
+
# authentication. To obtain a token, make a request to Auth0: ```bash
|
|
55
|
+
# curl --request POST \ --url
|
|
56
|
+
# https://dev-awqy75wdabpsnsvu.us.auth0.com/oauth/token \ --header
|
|
57
|
+
# 'content-type: application/json' \ --data '{
|
|
58
|
+
# "client_id":"YOUR_CLIENT_ID", "client_secret":"YOUR_CLIENT_SECRET",
|
|
59
|
+
# "audience":"https://sandbox.tesserx.co",
|
|
60
|
+
# "grant_type":"client_credentials" }' ``` The response will contain an
|
|
61
|
+
# `access_token` field which should be used as the Bearer token.
|
|
62
|
+
# @param [CreateBankRequest] body Required parameter: Bank account details
|
|
63
|
+
# @return [CreateBankResponse] Response from the API call.
|
|
64
|
+
def create_bank(authorization,
|
|
65
|
+
body)
|
|
66
|
+
@api_call
|
|
67
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
68
|
+
'/accounts/banks',
|
|
69
|
+
Server::DEFAULT)
|
|
70
|
+
.header_param(new_parameter(authorization, key: 'Authorization'))
|
|
71
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
72
|
+
.body_param(new_parameter(body))
|
|
73
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
74
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
75
|
+
.auth(Single.new('bearer')))
|
|
76
|
+
.response(new_response_handler
|
|
77
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
78
|
+
.deserialize_into(CreateBankResponse.method(:from_hash))
|
|
79
|
+
.local_error('400',
|
|
80
|
+
'Details coming soon',
|
|
81
|
+
APIException))
|
|
82
|
+
.execute
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Create a new stablecoin wallet account.
|
|
86
|
+
# @param [String] authorization Required parameter: Bearer token for
|
|
87
|
+
# authentication. To obtain a token, make a request to Auth0: ```bash
|
|
88
|
+
# curl --request POST \ --url
|
|
89
|
+
# https://dev-awqy75wdabpsnsvu.us.auth0.com/oauth/token \ --header
|
|
90
|
+
# 'content-type: application/json' \ --data '{
|
|
91
|
+
# "client_id":"YOUR_CLIENT_ID", "client_secret":"YOUR_CLIENT_SECRET",
|
|
92
|
+
# "audience":"https://sandbox.tesserx.co",
|
|
93
|
+
# "grant_type":"client_credentials" }' ``` The response will contain an
|
|
94
|
+
# `access_token` field which should be used as the Bearer token.
|
|
95
|
+
# @param [CreateWalletRequest] body Required parameter: Wallet account
|
|
96
|
+
# details
|
|
97
|
+
# @return [CreateWalletResponse] Response from the API call.
|
|
98
|
+
def create_wallet(authorization,
|
|
99
|
+
body)
|
|
100
|
+
@api_call
|
|
101
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
102
|
+
'/accounts/wallets',
|
|
103
|
+
Server::DEFAULT)
|
|
104
|
+
.header_param(new_parameter(authorization, key: 'Authorization'))
|
|
105
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
106
|
+
.body_param(new_parameter(body))
|
|
107
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
108
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
109
|
+
.auth(Single.new('bearer')))
|
|
110
|
+
.response(new_response_handler
|
|
111
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
112
|
+
.deserialize_into(CreateWalletResponse.method(:from_hash))
|
|
113
|
+
.local_error('400',
|
|
114
|
+
'Details coming soon',
|
|
115
|
+
APIException))
|
|
116
|
+
.execute
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Retrieve a specific account (wallet or bank) by its unique identifier
|
|
120
|
+
# @param [String] id Required parameter: Account ID (UUID)
|
|
121
|
+
# @param [String] authorization Required parameter: Bearer token for
|
|
122
|
+
# authentication. To obtain a token, make a request to Auth0: ```bash
|
|
123
|
+
# curl --request POST \ --url
|
|
124
|
+
# https://dev-awqy75wdabpsnsvu.us.auth0.com/oauth/token \ --header
|
|
125
|
+
# 'content-type: application/json' \ --data '{
|
|
126
|
+
# "client_id":"YOUR_CLIENT_ID", "client_secret":"YOUR_CLIENT_SECRET",
|
|
127
|
+
# "audience":"https://sandbox.tesserx.co",
|
|
128
|
+
# "grant_type":"client_credentials" }' ``` The response will contain an
|
|
129
|
+
# `access_token` field which should be used as the Bearer token.
|
|
130
|
+
# @param [TrueClass | FalseClass] include_sensitive Optional parameter: If
|
|
131
|
+
# true, includes sensitive fields like bank_account_number.
|
|
132
|
+
# @return [AccountResponse] Response from the API call.
|
|
133
|
+
def find_one2(id,
|
|
134
|
+
authorization,
|
|
135
|
+
include_sensitive: nil)
|
|
136
|
+
@api_call
|
|
137
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
138
|
+
'/accounts/{id}',
|
|
139
|
+
Server::DEFAULT)
|
|
140
|
+
.template_param(new_parameter(id, key: 'id')
|
|
141
|
+
.should_encode(true))
|
|
142
|
+
.header_param(new_parameter(authorization, key: 'Authorization'))
|
|
143
|
+
.query_param(new_parameter(include_sensitive, key: 'include_sensitive'))
|
|
144
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
145
|
+
.auth(Single.new('bearer')))
|
|
146
|
+
.response(new_response_handler
|
|
147
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
148
|
+
.deserialize_into(AccountResponse.method(:from_hash))
|
|
149
|
+
.local_error('400',
|
|
150
|
+
'Details coming soon',
|
|
151
|
+
APIException))
|
|
152
|
+
.execute
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Update an existing account's information.
|
|
156
|
+
# @param [String] id Required parameter: Account ID (UUID)
|
|
157
|
+
# @param [String] authorization Required parameter: Bearer token for
|
|
158
|
+
# authentication. To obtain a token, make a request to Auth0: ```bash
|
|
159
|
+
# curl --request POST \ --url
|
|
160
|
+
# https://dev-awqy75wdabpsnsvu.us.auth0.com/oauth/token \ --header
|
|
161
|
+
# 'content-type: application/json' \ --data '{
|
|
162
|
+
# "client_id":"YOUR_CLIENT_ID", "client_secret":"YOUR_CLIENT_SECRET",
|
|
163
|
+
# "audience":"https://sandbox.tesserx.co",
|
|
164
|
+
# "grant_type":"client_credentials" }' ``` The response will contain an
|
|
165
|
+
# `access_token` field which should be used as the Bearer token.
|
|
166
|
+
# @param [UpdateAccountRequest] body Required parameter: TODO: type
|
|
167
|
+
# description here
|
|
168
|
+
# @return [UpdateAccountResponse] Response from the API call.
|
|
169
|
+
def update(id,
|
|
170
|
+
authorization,
|
|
171
|
+
body)
|
|
172
|
+
@api_call
|
|
173
|
+
.request(new_request_builder(HttpMethodEnum::PATCH,
|
|
174
|
+
'/accounts/{id}',
|
|
175
|
+
Server::DEFAULT)
|
|
176
|
+
.template_param(new_parameter(id, key: 'id')
|
|
177
|
+
.should_encode(true))
|
|
178
|
+
.header_param(new_parameter(authorization, key: 'Authorization'))
|
|
179
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
180
|
+
.body_param(new_parameter(body))
|
|
181
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
182
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
183
|
+
.auth(Single.new('bearer')))
|
|
184
|
+
.response(new_response_handler
|
|
185
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
186
|
+
.deserialize_into(UpdateAccountResponse.method(:from_hash))
|
|
187
|
+
.local_error('400',
|
|
188
|
+
'Details coming soon',
|
|
189
|
+
APIException))
|
|
190
|
+
.execute
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
end
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# tesser_apiv1
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TesserApiv1
|
|
7
|
+
# BaseController.
|
|
8
|
+
class BaseController
|
|
9
|
+
include CoreLibrary
|
|
10
|
+
attr_accessor :config, :http_call_back
|
|
11
|
+
|
|
12
|
+
def self.user_agent
|
|
13
|
+
'APIMATIC 3.0'
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
GLOBAL_ERRORS = {
|
|
18
|
+
'default' => ErrorCase.new
|
|
19
|
+
.error_message('HTTP response not OK.')
|
|
20
|
+
.exception_type(APIException)
|
|
21
|
+
}.freeze
|
|
22
|
+
|
|
23
|
+
# Initialization constructor.
|
|
24
|
+
# @param [GlobalConfiguration] global_configuration The instance of GlobalConfiguration.
|
|
25
|
+
def initialize(global_configuration)
|
|
26
|
+
@global_configuration = global_configuration
|
|
27
|
+
@config = @global_configuration.client_configuration
|
|
28
|
+
@http_call_back = @config.http_callback
|
|
29
|
+
@api_call = ApiCall.new(@global_configuration)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Creates a new instance of the request builder.
|
|
33
|
+
# @param [String] http_method The HTTP method to use in the request.
|
|
34
|
+
# @param [String] path The endpoint path to use in the request.
|
|
35
|
+
# @param [String] server The server to extract the base uri for the request.
|
|
36
|
+
# @return [RequestBuilder] The instance of RequestBuilder.
|
|
37
|
+
def new_request_builder(http_method, path, server)
|
|
38
|
+
RequestBuilder.new
|
|
39
|
+
.http_method(http_method)
|
|
40
|
+
.path(path)
|
|
41
|
+
.server(server)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Creates a new instance of the response handler.
|
|
45
|
+
# @return [ResponseHandler] The instance of ResponseHandler.
|
|
46
|
+
def new_response_handler
|
|
47
|
+
ResponseHandler.new
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Creates a new instance of the parameter.
|
|
51
|
+
# @param [String|optional] key The key of the parameter.
|
|
52
|
+
# @param [Object] value The value of the parameter.
|
|
53
|
+
# @return [Parameter] The instance of Parameter.
|
|
54
|
+
def new_parameter(value, key: nil)
|
|
55
|
+
Parameter.new
|
|
56
|
+
.key(key)
|
|
57
|
+
.value(value)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# tesser_apiv1
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TesserApiv1
|
|
7
|
+
# CounterpartiesController
|
|
8
|
+
class CounterpartiesController < BaseController
|
|
9
|
+
# Create a new counterparty for your workspace.
|
|
10
|
+
# A counterparty is any external party that your organization transacts
|
|
11
|
+
# with,
|
|
12
|
+
# such as vendors, customers, or partners.
|
|
13
|
+
# **Classifications:**
|
|
14
|
+
# - **individual**: A natural person (requires first/last name)
|
|
15
|
+
# - **business**: A legal entity (requires legal name)
|
|
16
|
+
# @param [String] authorization Required parameter: Bearer token for
|
|
17
|
+
# authentication. To obtain a token, make a request to Auth0: ```bash
|
|
18
|
+
# curl --request POST \ --url
|
|
19
|
+
# https://dev-awqy75wdabpsnsvu.us.auth0.com/oauth/token \ --header
|
|
20
|
+
# 'content-type: application/json' \ --data '{
|
|
21
|
+
# "client_id":"YOUR_CLIENT_ID", "client_secret":"YOUR_CLIENT_SECRET",
|
|
22
|
+
# "audience":"https://sandbox.tesserx.co",
|
|
23
|
+
# "grant_type":"client_credentials" }' ``` The response will contain an
|
|
24
|
+
# `access_token` field which should be used as the Bearer token.
|
|
25
|
+
# @param [CreateCounterpartyRequest] body Required parameter: TODO: type
|
|
26
|
+
# description here
|
|
27
|
+
# @return [CreateCounterpartyResponse] Response from the API call.
|
|
28
|
+
def create(authorization,
|
|
29
|
+
body)
|
|
30
|
+
@api_call
|
|
31
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
32
|
+
'/entities/counterparties',
|
|
33
|
+
Server::DEFAULT)
|
|
34
|
+
.header_param(new_parameter(authorization, key: 'Authorization'))
|
|
35
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
36
|
+
.body_param(new_parameter(body))
|
|
37
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
38
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
39
|
+
.auth(Single.new('bearer')))
|
|
40
|
+
.response(new_response_handler
|
|
41
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
42
|
+
.deserialize_into(CreateCounterpartyResponse.method(:from_hash))
|
|
43
|
+
.local_error('400',
|
|
44
|
+
'Details coming soon',
|
|
45
|
+
APIException))
|
|
46
|
+
.execute
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Retrieve all counterparties for your workspace with optional filtering.
|
|
50
|
+
# Use query parameters to filter results:
|
|
51
|
+
# - **classification**: Filter by 'individual' or 'business'
|
|
52
|
+
# @param [String] authorization Required parameter: Bearer token for
|
|
53
|
+
# authentication. To obtain a token, make a request to Auth0: ```bash
|
|
54
|
+
# curl --request POST \ --url
|
|
55
|
+
# https://dev-awqy75wdabpsnsvu.us.auth0.com/oauth/token \ --header
|
|
56
|
+
# 'content-type: application/json' \ --data '{
|
|
57
|
+
# "client_id":"YOUR_CLIENT_ID", "client_secret":"YOUR_CLIENT_SECRET",
|
|
58
|
+
# "audience":"https://sandbox.tesserx.co",
|
|
59
|
+
# "grant_type":"client_credentials" }' ``` The response will contain an
|
|
60
|
+
# `access_token` field which should be used as the Bearer token.
|
|
61
|
+
# @param [Classification7Enum] classification Optional parameter: Filter by
|
|
62
|
+
# classification
|
|
63
|
+
# @param [TrueClass | FalseClass] include_secure Optional parameter: Include
|
|
64
|
+
# secure fields (PII)
|
|
65
|
+
# @return [CounterpartyListResponse] Response from the API call.
|
|
66
|
+
def find_all1(authorization,
|
|
67
|
+
classification: nil,
|
|
68
|
+
include_secure: nil)
|
|
69
|
+
@api_call
|
|
70
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
71
|
+
'/entities/counterparties',
|
|
72
|
+
Server::DEFAULT)
|
|
73
|
+
.header_param(new_parameter(authorization, key: 'Authorization'))
|
|
74
|
+
.query_param(new_parameter(classification, key: 'classification'))
|
|
75
|
+
.query_param(new_parameter(include_secure, key: 'include_secure'))
|
|
76
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
77
|
+
.auth(Single.new('bearer')))
|
|
78
|
+
.response(new_response_handler
|
|
79
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
80
|
+
.deserialize_into(CounterpartyListResponse.method(:from_hash))
|
|
81
|
+
.local_error('400',
|
|
82
|
+
'Details coming soon',
|
|
83
|
+
APIException))
|
|
84
|
+
.execute
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Retrieve a specific counterparty by its unique identifier
|
|
88
|
+
# @param [String] id Required parameter: Counterparty ID (UUID)
|
|
89
|
+
# @param [String] authorization Required parameter: Bearer token for
|
|
90
|
+
# authentication. To obtain a token, make a request to Auth0: ```bash
|
|
91
|
+
# curl --request POST \ --url
|
|
92
|
+
# https://dev-awqy75wdabpsnsvu.us.auth0.com/oauth/token \ --header
|
|
93
|
+
# 'content-type: application/json' \ --data '{
|
|
94
|
+
# "client_id":"YOUR_CLIENT_ID", "client_secret":"YOUR_CLIENT_SECRET",
|
|
95
|
+
# "audience":"https://sandbox.tesserx.co",
|
|
96
|
+
# "grant_type":"client_credentials" }' ``` The response will contain an
|
|
97
|
+
# `access_token` field which should be used as the Bearer token.
|
|
98
|
+
# @param [Classification7Enum] classification Optional parameter: Filter by
|
|
99
|
+
# classification ('individual' or 'business').
|
|
100
|
+
# @param [TrueClass | FalseClass] include_secure Optional parameter: Include
|
|
101
|
+
# secure fields (PII)
|
|
102
|
+
# @return [CounterpartyResponse] Response from the API call.
|
|
103
|
+
def find_one(id,
|
|
104
|
+
authorization,
|
|
105
|
+
classification: nil,
|
|
106
|
+
include_secure: nil)
|
|
107
|
+
@api_call
|
|
108
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
109
|
+
'/entities/counterparties/{id}',
|
|
110
|
+
Server::DEFAULT)
|
|
111
|
+
.template_param(new_parameter(id, key: 'id')
|
|
112
|
+
.should_encode(true))
|
|
113
|
+
.header_param(new_parameter(authorization, key: 'Authorization'))
|
|
114
|
+
.query_param(new_parameter(classification, key: 'classification'))
|
|
115
|
+
.query_param(new_parameter(include_secure, key: 'include_secure'))
|
|
116
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
117
|
+
.auth(Single.new('bearer')))
|
|
118
|
+
.response(new_response_handler
|
|
119
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
120
|
+
.deserialize_into(CounterpartyResponse.method(:from_hash))
|
|
121
|
+
.local_error('400',
|
|
122
|
+
'Details coming soon',
|
|
123
|
+
APIException))
|
|
124
|
+
.execute
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Update an existing counterparty's information.
|
|
128
|
+
# Only provide the fields you want to update. At least one field must be
|
|
129
|
+
# provided.
|
|
130
|
+
# **Note:** If changing classification from 'individual' to 'business' (or
|
|
131
|
+
# vice versa),
|
|
132
|
+
# make sure to also provide the appropriate fields for the new
|
|
133
|
+
# classification.
|
|
134
|
+
# @param [String] id Required parameter: Counterparty ID (UUID)
|
|
135
|
+
# @param [String] authorization Required parameter: Bearer token for
|
|
136
|
+
# authentication. To obtain a token, make a request to Auth0: ```bash
|
|
137
|
+
# curl --request POST \ --url
|
|
138
|
+
# https://dev-awqy75wdabpsnsvu.us.auth0.com/oauth/token \ --header
|
|
139
|
+
# 'content-type: application/json' \ --data '{
|
|
140
|
+
# "client_id":"YOUR_CLIENT_ID", "client_secret":"YOUR_CLIENT_SECRET",
|
|
141
|
+
# "audience":"https://sandbox.tesserx.co",
|
|
142
|
+
# "grant_type":"client_credentials" }' ``` The response will contain an
|
|
143
|
+
# `access_token` field which should be used as the Bearer token.
|
|
144
|
+
# @param [UpdateCounterpartyRequest] body Required parameter: TODO: type
|
|
145
|
+
# description here
|
|
146
|
+
# @return [UpdateCounterpartyResponse] Response from the API call.
|
|
147
|
+
def update1(id,
|
|
148
|
+
authorization,
|
|
149
|
+
body)
|
|
150
|
+
@api_call
|
|
151
|
+
.request(new_request_builder(HttpMethodEnum::PATCH,
|
|
152
|
+
'/entities/counterparties/{id}',
|
|
153
|
+
Server::DEFAULT)
|
|
154
|
+
.template_param(new_parameter(id, key: 'id')
|
|
155
|
+
.should_encode(true))
|
|
156
|
+
.header_param(new_parameter(authorization, key: 'Authorization'))
|
|
157
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
158
|
+
.body_param(new_parameter(body))
|
|
159
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
160
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
161
|
+
.auth(Single.new('bearer')))
|
|
162
|
+
.response(new_response_handler
|
|
163
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
164
|
+
.deserialize_into(UpdateCounterpartyResponse.method(:from_hash))
|
|
165
|
+
.local_error('400',
|
|
166
|
+
'Details coming soon',
|
|
167
|
+
APIException))
|
|
168
|
+
.execute
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# tesser_apiv1
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TesserApiv1
|
|
7
|
+
# CurrenciesController
|
|
8
|
+
class CurrenciesController < BaseController
|
|
9
|
+
# Retrieve list of all supported currencies (crypto and fiat). Returns an
|
|
10
|
+
# array with currency name, key, decimals, and network information.
|
|
11
|
+
# @param [String] authorization Required parameter: Bearer token for
|
|
12
|
+
# authentication. To obtain a token, make a request to Auth0: ```bash
|
|
13
|
+
# curl --request POST \ --url
|
|
14
|
+
# https://dev-awqy75wdabpsnsvu.us.auth0.com/oauth/token \ --header
|
|
15
|
+
# 'content-type: application/json' \ --data '{
|
|
16
|
+
# "client_id":"YOUR_CLIENT_ID", "client_secret":"YOUR_CLIENT_SECRET",
|
|
17
|
+
# "audience":"https://sandbox.tesserx.co",
|
|
18
|
+
# "grant_type":"client_credentials" }' ``` The response will contain an
|
|
19
|
+
# `access_token` field which should be used as the Bearer token.
|
|
20
|
+
# @return [Array[Currency]] Response from the API call.
|
|
21
|
+
def get_currencies(authorization)
|
|
22
|
+
@api_call
|
|
23
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
24
|
+
'/currencies',
|
|
25
|
+
Server::DEFAULT)
|
|
26
|
+
.header_param(new_parameter(authorization, key: 'Authorization'))
|
|
27
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
28
|
+
.auth(Single.new('bearer')))
|
|
29
|
+
.response(new_response_handler
|
|
30
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
31
|
+
.deserialize_into(Currency.method(:from_hash))
|
|
32
|
+
.is_response_array(true)
|
|
33
|
+
.local_error('400',
|
|
34
|
+
'Details coming soon',
|
|
35
|
+
APIException))
|
|
36
|
+
.execute
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# tesser_apiv1
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TesserApiv1
|
|
7
|
+
# ExperimentalController
|
|
8
|
+
class ExperimentalController < BaseController
|
|
9
|
+
# Accepts a signature for a payment step. Currently echoes the request,
|
|
10
|
+
# structured for future execution logic.
|
|
11
|
+
# @param [String] payment_id Required parameter: Payment ID to execute.
|
|
12
|
+
# @param [String] step_id Required parameter: Transfer step ID to execute.
|
|
13
|
+
# @param [String] authorization Required parameter: Bearer token for
|
|
14
|
+
# authentication. To obtain a token, make a request to Auth0: ```bash
|
|
15
|
+
# curl --request POST \ --url
|
|
16
|
+
# https://dev-awqy75wdabpsnsvu.us.auth0.com/oauth/token \ --header
|
|
17
|
+
# 'content-type: application/json' \ --data '{
|
|
18
|
+
# "client_id":"YOUR_CLIENT_ID", "client_secret":"YOUR_CLIENT_SECRET",
|
|
19
|
+
# "audience":"https://sandbox.tesserx.co",
|
|
20
|
+
# "grant_type":"client_credentials" }' ``` The response will contain an
|
|
21
|
+
# `access_token` field which should be used as the Bearer token.
|
|
22
|
+
# @param [ExecutePaymentRequestDto] body Required parameter: TODO: type
|
|
23
|
+
# description here
|
|
24
|
+
# @return [PaymentResponse] Response from the API call.
|
|
25
|
+
def execute_payment(payment_id,
|
|
26
|
+
step_id,
|
|
27
|
+
authorization,
|
|
28
|
+
body)
|
|
29
|
+
@api_call
|
|
30
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
|
31
|
+
'/payments/{payment_id}/steps/{step_id}',
|
|
32
|
+
Server::DEFAULT)
|
|
33
|
+
.template_param(new_parameter(payment_id, key: 'payment_id')
|
|
34
|
+
.should_encode(true))
|
|
35
|
+
.template_param(new_parameter(step_id, key: 'step_id')
|
|
36
|
+
.should_encode(true))
|
|
37
|
+
.header_param(new_parameter(authorization, key: 'Authorization'))
|
|
38
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
39
|
+
.body_param(new_parameter(body))
|
|
40
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
41
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
|
42
|
+
.auth(Single.new('bearer')))
|
|
43
|
+
.response(new_response_handler
|
|
44
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
45
|
+
.deserialize_into(PaymentResponse.method(:from_hash)))
|
|
46
|
+
.execute
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# tesser_apiv1
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TesserApiv1
|
|
7
|
+
# HealthController
|
|
8
|
+
class HealthController < BaseController
|
|
9
|
+
# TODO: type endpoint description here
|
|
10
|
+
# @return [Response] Response from the API call.
|
|
11
|
+
def get_health
|
|
12
|
+
@api_call
|
|
13
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
14
|
+
'/',
|
|
15
|
+
Server::DEFAULT)
|
|
16
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
17
|
+
.auth(Single.new('bearer')))
|
|
18
|
+
.response(new_response_handler
|
|
19
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
20
|
+
.deserialize_into(Response.method(:from_hash)))
|
|
21
|
+
.execute
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# tesser_apiv1
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TesserApiv1
|
|
7
|
+
# NetworksController
|
|
8
|
+
class NetworksController < BaseController
|
|
9
|
+
# Retrieve list of all supported blockchain networks. Returns an array with
|
|
10
|
+
# network key and display name.
|
|
11
|
+
# @param [String] authorization Required parameter: Bearer token for
|
|
12
|
+
# authentication. To obtain a token, make a request to Auth0: ```bash
|
|
13
|
+
# curl --request POST \ --url
|
|
14
|
+
# https://dev-awqy75wdabpsnsvu.us.auth0.com/oauth/token \ --header
|
|
15
|
+
# 'content-type: application/json' \ --data '{
|
|
16
|
+
# "client_id":"YOUR_CLIENT_ID", "client_secret":"YOUR_CLIENT_SECRET",
|
|
17
|
+
# "audience":"https://sandbox.tesserx.co",
|
|
18
|
+
# "grant_type":"client_credentials" }' ``` The response will contain an
|
|
19
|
+
# `access_token` field which should be used as the Bearer token.
|
|
20
|
+
# @return [Array[Network]] Response from the API call.
|
|
21
|
+
def get_networks(authorization)
|
|
22
|
+
@api_call
|
|
23
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
|
24
|
+
'/networks',
|
|
25
|
+
Server::DEFAULT)
|
|
26
|
+
.header_param(new_parameter(authorization, key: 'Authorization'))
|
|
27
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
|
28
|
+
.auth(Single.new('bearer')))
|
|
29
|
+
.response(new_response_handler
|
|
30
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
31
|
+
.deserialize_into(Network.method(:from_hash))
|
|
32
|
+
.is_response_array(true)
|
|
33
|
+
.local_error('400',
|
|
34
|
+
'Details coming soon',
|
|
35
|
+
APIException))
|
|
36
|
+
.execute
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|