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,230 @@
|
|
|
1
|
+
# tesser_apiv1
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TesserApiv1
|
|
7
|
+
# Account Model.
|
|
8
|
+
class Account < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Unique identifier for the account.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :id
|
|
15
|
+
|
|
16
|
+
# ID of the workspace.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :workspace_id
|
|
19
|
+
|
|
20
|
+
# Tenant ID (optional - if provided, this account is associated with a
|
|
21
|
+
# tenant). At most one of tenant_id or counterparty_id may be set.
|
|
22
|
+
# @return [Object]
|
|
23
|
+
attr_accessor :tenant_id
|
|
24
|
+
|
|
25
|
+
# Counterparty ID (optional - if provided, this account is associated with a
|
|
26
|
+
# counterparty). At most one of tenant_id or counterparty_id may be set.
|
|
27
|
+
# @return [Object]
|
|
28
|
+
attr_accessor :counterparty_id
|
|
29
|
+
|
|
30
|
+
# Account type.
|
|
31
|
+
# @return [TypeEnum]
|
|
32
|
+
attr_accessor :type
|
|
33
|
+
|
|
34
|
+
# Account name.
|
|
35
|
+
# @return [String]
|
|
36
|
+
attr_accessor :name
|
|
37
|
+
|
|
38
|
+
# Bank name (for fiat accounts).
|
|
39
|
+
# @return [Object]
|
|
40
|
+
attr_accessor :bank_name
|
|
41
|
+
|
|
42
|
+
# Bank code type (e.g., SWIFT, BIC).
|
|
43
|
+
# @return [Object]
|
|
44
|
+
attr_accessor :bank_code_type
|
|
45
|
+
|
|
46
|
+
# Bank identifier code value.
|
|
47
|
+
# @return [Object]
|
|
48
|
+
attr_accessor :bank_identifier_code
|
|
49
|
+
|
|
50
|
+
# Crypto wallet address (for wallet accounts).
|
|
51
|
+
# @return [Object]
|
|
52
|
+
attr_accessor :crypto_wallet_address
|
|
53
|
+
|
|
54
|
+
# Bank account number (IBAN, etc). Only returned if include_sensitive=true.
|
|
55
|
+
# @return [Object]
|
|
56
|
+
attr_accessor :bank_account_number
|
|
57
|
+
|
|
58
|
+
# Creation timestamp.
|
|
59
|
+
# @return [String]
|
|
60
|
+
attr_accessor :created_at
|
|
61
|
+
|
|
62
|
+
# Last update timestamp.
|
|
63
|
+
# @return [String]
|
|
64
|
+
attr_accessor :updated_at
|
|
65
|
+
|
|
66
|
+
# A mapping from model property names to API property names.
|
|
67
|
+
def self.names
|
|
68
|
+
@_hash = {} if @_hash.nil?
|
|
69
|
+
@_hash['id'] = 'id'
|
|
70
|
+
@_hash['workspace_id'] = 'workspace_id'
|
|
71
|
+
@_hash['tenant_id'] = 'tenant_id'
|
|
72
|
+
@_hash['counterparty_id'] = 'counterparty_id'
|
|
73
|
+
@_hash['type'] = 'type'
|
|
74
|
+
@_hash['name'] = 'name'
|
|
75
|
+
@_hash['bank_name'] = 'bank_name'
|
|
76
|
+
@_hash['bank_code_type'] = 'bank_code_type'
|
|
77
|
+
@_hash['bank_identifier_code'] = 'bank_identifier_code'
|
|
78
|
+
@_hash['crypto_wallet_address'] = 'crypto_wallet_address'
|
|
79
|
+
@_hash['bank_account_number'] = 'bank_account_number'
|
|
80
|
+
@_hash['created_at'] = 'created_at'
|
|
81
|
+
@_hash['updated_at'] = 'updated_at'
|
|
82
|
+
@_hash
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# An array for optional fields
|
|
86
|
+
def self.optionals
|
|
87
|
+
%w[
|
|
88
|
+
workspace_id
|
|
89
|
+
tenant_id
|
|
90
|
+
counterparty_id
|
|
91
|
+
bank_name
|
|
92
|
+
bank_code_type
|
|
93
|
+
bank_identifier_code
|
|
94
|
+
crypto_wallet_address
|
|
95
|
+
bank_account_number
|
|
96
|
+
]
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# An array for nullable fields
|
|
100
|
+
def self.nullables
|
|
101
|
+
[]
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
def initialize(id = nil, type = nil, name = nil, created_at = nil,
|
|
105
|
+
updated_at = nil, workspace_id = SKIP, tenant_id = SKIP,
|
|
106
|
+
counterparty_id = SKIP, bank_name = SKIP,
|
|
107
|
+
bank_code_type = SKIP, bank_identifier_code = SKIP,
|
|
108
|
+
crypto_wallet_address = SKIP, bank_account_number = SKIP)
|
|
109
|
+
@id = id
|
|
110
|
+
@workspace_id = workspace_id unless workspace_id == SKIP
|
|
111
|
+
@tenant_id = tenant_id unless tenant_id == SKIP
|
|
112
|
+
@counterparty_id = counterparty_id unless counterparty_id == SKIP
|
|
113
|
+
@type = type
|
|
114
|
+
@name = name
|
|
115
|
+
@bank_name = bank_name unless bank_name == SKIP
|
|
116
|
+
@bank_code_type = bank_code_type unless bank_code_type == SKIP
|
|
117
|
+
@bank_identifier_code = bank_identifier_code unless bank_identifier_code == SKIP
|
|
118
|
+
@crypto_wallet_address = crypto_wallet_address unless crypto_wallet_address == SKIP
|
|
119
|
+
@bank_account_number = bank_account_number unless bank_account_number == SKIP
|
|
120
|
+
@created_at = created_at
|
|
121
|
+
@updated_at = updated_at
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Creates an instance of the object from a hash.
|
|
125
|
+
def self.from_hash(hash)
|
|
126
|
+
return nil unless hash
|
|
127
|
+
|
|
128
|
+
# Extract variables from the hash.
|
|
129
|
+
id = hash.key?('id') ? hash['id'] : nil
|
|
130
|
+
type = hash.key?('type') ? hash['type'] : nil
|
|
131
|
+
name = hash.key?('name') ? hash['name'] : nil
|
|
132
|
+
created_at = hash.key?('created_at') ? hash['created_at'] : nil
|
|
133
|
+
updated_at = hash.key?('updated_at') ? hash['updated_at'] : nil
|
|
134
|
+
workspace_id = hash.key?('workspace_id') ? hash['workspace_id'] : SKIP
|
|
135
|
+
tenant_id = hash.key?('tenant_id') ? APIHelper.deserialize_union_type(
|
|
136
|
+
UnionTypeLookUp.get(:AccountTenantId), hash['tenant_id']
|
|
137
|
+
) : SKIP
|
|
138
|
+
counterparty_id = hash.key?('counterparty_id') ? APIHelper.deserialize_union_type(
|
|
139
|
+
UnionTypeLookUp.get(:AccountCounterpartyId), hash['counterparty_id']
|
|
140
|
+
) : SKIP
|
|
141
|
+
bank_name = hash.key?('bank_name') ? APIHelper.deserialize_union_type(
|
|
142
|
+
UnionTypeLookUp.get(:AccountBankName), hash['bank_name']
|
|
143
|
+
) : SKIP
|
|
144
|
+
bank_code_type = hash.key?('bank_code_type') ? APIHelper.deserialize_union_type(
|
|
145
|
+
UnionTypeLookUp.get(:AccountBankCodeType), hash['bank_code_type']
|
|
146
|
+
) : SKIP
|
|
147
|
+
bank_identifier_code = hash.key?('bank_identifier_code') ? APIHelper.deserialize_union_type(
|
|
148
|
+
UnionTypeLookUp.get(:AccountBankIdentifierCode), hash['bank_identifier_code']
|
|
149
|
+
) : SKIP
|
|
150
|
+
crypto_wallet_address = hash.key?('crypto_wallet_address') ? APIHelper.deserialize_union_type(
|
|
151
|
+
UnionTypeLookUp.get(:AccountCryptoWalletAddress), hash['crypto_wallet_address']
|
|
152
|
+
) : SKIP
|
|
153
|
+
bank_account_number = hash.key?('bank_account_number') ? APIHelper.deserialize_union_type(
|
|
154
|
+
UnionTypeLookUp.get(:AccountBankAccountNumber), hash['bank_account_number']
|
|
155
|
+
) : SKIP
|
|
156
|
+
|
|
157
|
+
# Create object from extracted values.
|
|
158
|
+
Account.new(id,
|
|
159
|
+
type,
|
|
160
|
+
name,
|
|
161
|
+
created_at,
|
|
162
|
+
updated_at,
|
|
163
|
+
workspace_id,
|
|
164
|
+
tenant_id,
|
|
165
|
+
counterparty_id,
|
|
166
|
+
bank_name,
|
|
167
|
+
bank_code_type,
|
|
168
|
+
bank_identifier_code,
|
|
169
|
+
crypto_wallet_address,
|
|
170
|
+
bank_account_number)
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Validates an instance of the object from a given value.
|
|
174
|
+
# @param [Account | Hash] The value against the validation is performed.
|
|
175
|
+
def self.validate(value)
|
|
176
|
+
if value.instance_of? self
|
|
177
|
+
return (
|
|
178
|
+
APIHelper.valid_type?(value.id,
|
|
179
|
+
->(val) { val.instance_of? String }) and
|
|
180
|
+
APIHelper.valid_type?(value.type,
|
|
181
|
+
->(val) { TypeEnum.validate(val) }) and
|
|
182
|
+
APIHelper.valid_type?(value.name,
|
|
183
|
+
->(val) { val.instance_of? String }) and
|
|
184
|
+
APIHelper.valid_type?(value.created_at,
|
|
185
|
+
->(val) { val.instance_of? String }) and
|
|
186
|
+
APIHelper.valid_type?(value.updated_at,
|
|
187
|
+
->(val) { val.instance_of? String })
|
|
188
|
+
)
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
return false unless value.instance_of? Hash
|
|
192
|
+
|
|
193
|
+
(
|
|
194
|
+
APIHelper.valid_type?(value['id'],
|
|
195
|
+
->(val) { val.instance_of? String }) and
|
|
196
|
+
APIHelper.valid_type?(value['type'],
|
|
197
|
+
->(val) { TypeEnum.validate(val) }) and
|
|
198
|
+
APIHelper.valid_type?(value['name'],
|
|
199
|
+
->(val) { val.instance_of? String }) and
|
|
200
|
+
APIHelper.valid_type?(value['created_at'],
|
|
201
|
+
->(val) { val.instance_of? String }) and
|
|
202
|
+
APIHelper.valid_type?(value['updated_at'],
|
|
203
|
+
->(val) { val.instance_of? String })
|
|
204
|
+
)
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Provides a human-readable string representation of the object.
|
|
208
|
+
def to_s
|
|
209
|
+
class_name = self.class.name.split('::').last
|
|
210
|
+
"<#{class_name} id: #{@id}, workspace_id: #{@workspace_id}, tenant_id: #{@tenant_id},"\
|
|
211
|
+
" counterparty_id: #{@counterparty_id}, type: #{@type}, name: #{@name}, bank_name:"\
|
|
212
|
+
" #{@bank_name}, bank_code_type: #{@bank_code_type}, bank_identifier_code:"\
|
|
213
|
+
" #{@bank_identifier_code}, crypto_wallet_address: #{@crypto_wallet_address},"\
|
|
214
|
+
" bank_account_number: #{@bank_account_number}, created_at: #{@created_at}, updated_at:"\
|
|
215
|
+
" #{@updated_at}>"
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
219
|
+
def inspect
|
|
220
|
+
class_name = self.class.name.split('::').last
|
|
221
|
+
"<#{class_name} id: #{@id.inspect}, workspace_id: #{@workspace_id.inspect}, tenant_id:"\
|
|
222
|
+
" #{@tenant_id.inspect}, counterparty_id: #{@counterparty_id.inspect}, type:"\
|
|
223
|
+
" #{@type.inspect}, name: #{@name.inspect}, bank_name: #{@bank_name.inspect},"\
|
|
224
|
+
" bank_code_type: #{@bank_code_type.inspect}, bank_identifier_code:"\
|
|
225
|
+
" #{@bank_identifier_code.inspect}, crypto_wallet_address:"\
|
|
226
|
+
" #{@crypto_wallet_address.inspect}, bank_account_number: #{@bank_account_number.inspect},"\
|
|
227
|
+
" created_at: #{@created_at.inspect}, updated_at: #{@updated_at.inspect}>"
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
end
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
# tesser_apiv1
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TesserApiv1
|
|
7
|
+
# AccountListItem Model.
|
|
8
|
+
class AccountListItem < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Unique identifier for the account.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :id
|
|
15
|
+
|
|
16
|
+
# ID of the workspace.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :workspace_id
|
|
19
|
+
|
|
20
|
+
# Tenant ID (optional - if provided, this account is associated with a
|
|
21
|
+
# tenant). At most one of tenant_id or counterparty_id may be set.
|
|
22
|
+
# @return [Object]
|
|
23
|
+
attr_accessor :tenant_id
|
|
24
|
+
|
|
25
|
+
# Counterparty ID (optional - if provided, this account is associated with a
|
|
26
|
+
# counterparty). At most one of tenant_id or counterparty_id may be set.
|
|
27
|
+
# @return [Object]
|
|
28
|
+
attr_accessor :counterparty_id
|
|
29
|
+
|
|
30
|
+
# Account type.
|
|
31
|
+
# @return [TypeEnum]
|
|
32
|
+
attr_accessor :type
|
|
33
|
+
|
|
34
|
+
# Account name.
|
|
35
|
+
# @return [String]
|
|
36
|
+
attr_accessor :name
|
|
37
|
+
|
|
38
|
+
# Bank name (for fiat accounts).
|
|
39
|
+
# @return [Object]
|
|
40
|
+
attr_accessor :bank_name
|
|
41
|
+
|
|
42
|
+
# Bank code type (e.g., SWIFT, BIC).
|
|
43
|
+
# @return [Object]
|
|
44
|
+
attr_accessor :bank_code_type
|
|
45
|
+
|
|
46
|
+
# Bank identifier code value.
|
|
47
|
+
# @return [Object]
|
|
48
|
+
attr_accessor :bank_identifier_code
|
|
49
|
+
|
|
50
|
+
# Crypto wallet address (for wallet accounts).
|
|
51
|
+
# @return [Object]
|
|
52
|
+
attr_accessor :crypto_wallet_address
|
|
53
|
+
|
|
54
|
+
# Bank account number (IBAN, etc). Only returned if include_sensitive=true.
|
|
55
|
+
# @return [Object]
|
|
56
|
+
attr_accessor :bank_account_number
|
|
57
|
+
|
|
58
|
+
# Creation timestamp.
|
|
59
|
+
# @return [String]
|
|
60
|
+
attr_accessor :created_at
|
|
61
|
+
|
|
62
|
+
# Last update timestamp.
|
|
63
|
+
# @return [String]
|
|
64
|
+
attr_accessor :updated_at
|
|
65
|
+
|
|
66
|
+
# A mapping from model property names to API property names.
|
|
67
|
+
def self.names
|
|
68
|
+
@_hash = {} if @_hash.nil?
|
|
69
|
+
@_hash['id'] = 'id'
|
|
70
|
+
@_hash['workspace_id'] = 'workspace_id'
|
|
71
|
+
@_hash['tenant_id'] = 'tenant_id'
|
|
72
|
+
@_hash['counterparty_id'] = 'counterparty_id'
|
|
73
|
+
@_hash['type'] = 'type'
|
|
74
|
+
@_hash['name'] = 'name'
|
|
75
|
+
@_hash['bank_name'] = 'bank_name'
|
|
76
|
+
@_hash['bank_code_type'] = 'bank_code_type'
|
|
77
|
+
@_hash['bank_identifier_code'] = 'bank_identifier_code'
|
|
78
|
+
@_hash['crypto_wallet_address'] = 'crypto_wallet_address'
|
|
79
|
+
@_hash['bank_account_number'] = 'bank_account_number'
|
|
80
|
+
@_hash['created_at'] = 'created_at'
|
|
81
|
+
@_hash['updated_at'] = 'updated_at'
|
|
82
|
+
@_hash
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# An array for optional fields
|
|
86
|
+
def self.optionals
|
|
87
|
+
%w[
|
|
88
|
+
workspace_id
|
|
89
|
+
tenant_id
|
|
90
|
+
counterparty_id
|
|
91
|
+
bank_name
|
|
92
|
+
bank_code_type
|
|
93
|
+
bank_identifier_code
|
|
94
|
+
crypto_wallet_address
|
|
95
|
+
bank_account_number
|
|
96
|
+
]
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# An array for nullable fields
|
|
100
|
+
def self.nullables
|
|
101
|
+
[]
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
def initialize(id = nil, type = nil, name = nil, created_at = nil,
|
|
105
|
+
updated_at = nil, workspace_id = SKIP, tenant_id = SKIP,
|
|
106
|
+
counterparty_id = SKIP, bank_name = SKIP,
|
|
107
|
+
bank_code_type = SKIP, bank_identifier_code = SKIP,
|
|
108
|
+
crypto_wallet_address = SKIP, bank_account_number = SKIP)
|
|
109
|
+
@id = id
|
|
110
|
+
@workspace_id = workspace_id unless workspace_id == SKIP
|
|
111
|
+
@tenant_id = tenant_id unless tenant_id == SKIP
|
|
112
|
+
@counterparty_id = counterparty_id unless counterparty_id == SKIP
|
|
113
|
+
@type = type
|
|
114
|
+
@name = name
|
|
115
|
+
@bank_name = bank_name unless bank_name == SKIP
|
|
116
|
+
@bank_code_type = bank_code_type unless bank_code_type == SKIP
|
|
117
|
+
@bank_identifier_code = bank_identifier_code unless bank_identifier_code == SKIP
|
|
118
|
+
@crypto_wallet_address = crypto_wallet_address unless crypto_wallet_address == SKIP
|
|
119
|
+
@bank_account_number = bank_account_number unless bank_account_number == SKIP
|
|
120
|
+
@created_at = created_at
|
|
121
|
+
@updated_at = updated_at
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Creates an instance of the object from a hash.
|
|
125
|
+
def self.from_hash(hash)
|
|
126
|
+
return nil unless hash
|
|
127
|
+
|
|
128
|
+
# Extract variables from the hash.
|
|
129
|
+
id = hash.key?('id') ? hash['id'] : nil
|
|
130
|
+
type = hash.key?('type') ? hash['type'] : nil
|
|
131
|
+
name = hash.key?('name') ? hash['name'] : nil
|
|
132
|
+
created_at = hash.key?('created_at') ? hash['created_at'] : nil
|
|
133
|
+
updated_at = hash.key?('updated_at') ? hash['updated_at'] : nil
|
|
134
|
+
workspace_id = hash.key?('workspace_id') ? hash['workspace_id'] : SKIP
|
|
135
|
+
tenant_id = hash.key?('tenant_id') ? APIHelper.deserialize_union_type(
|
|
136
|
+
UnionTypeLookUp.get(:AccountListItemTenantId), hash['tenant_id']
|
|
137
|
+
) : SKIP
|
|
138
|
+
counterparty_id = hash.key?('counterparty_id') ? APIHelper.deserialize_union_type(
|
|
139
|
+
UnionTypeLookUp.get(:AccountListItemCounterpartyId), hash['counterparty_id']
|
|
140
|
+
) : SKIP
|
|
141
|
+
bank_name = hash.key?('bank_name') ? APIHelper.deserialize_union_type(
|
|
142
|
+
UnionTypeLookUp.get(:AccountListItemBankName), hash['bank_name']
|
|
143
|
+
) : SKIP
|
|
144
|
+
bank_code_type = hash.key?('bank_code_type') ? APIHelper.deserialize_union_type(
|
|
145
|
+
UnionTypeLookUp.get(:AccountListItemBankCodeType), hash['bank_code_type']
|
|
146
|
+
) : SKIP
|
|
147
|
+
bank_identifier_code = hash.key?('bank_identifier_code') ? APIHelper.deserialize_union_type(
|
|
148
|
+
UnionTypeLookUp.get(:AccountListItemBankIdentifierCode), hash['bank_identifier_code']
|
|
149
|
+
) : SKIP
|
|
150
|
+
crypto_wallet_address = hash.key?('crypto_wallet_address') ? APIHelper.deserialize_union_type(
|
|
151
|
+
UnionTypeLookUp.get(:AccountListItemCryptoWalletAddress), hash['crypto_wallet_address']
|
|
152
|
+
) : SKIP
|
|
153
|
+
bank_account_number = hash.key?('bank_account_number') ? APIHelper.deserialize_union_type(
|
|
154
|
+
UnionTypeLookUp.get(:AccountListItemBankAccountNumber), hash['bank_account_number']
|
|
155
|
+
) : SKIP
|
|
156
|
+
|
|
157
|
+
# Create object from extracted values.
|
|
158
|
+
AccountListItem.new(id,
|
|
159
|
+
type,
|
|
160
|
+
name,
|
|
161
|
+
created_at,
|
|
162
|
+
updated_at,
|
|
163
|
+
workspace_id,
|
|
164
|
+
tenant_id,
|
|
165
|
+
counterparty_id,
|
|
166
|
+
bank_name,
|
|
167
|
+
bank_code_type,
|
|
168
|
+
bank_identifier_code,
|
|
169
|
+
crypto_wallet_address,
|
|
170
|
+
bank_account_number)
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Validates an instance of the object from a given value.
|
|
174
|
+
# @param [AccountListItem | Hash] The value against the validation is performed.
|
|
175
|
+
def self.validate(value)
|
|
176
|
+
if value.instance_of? self
|
|
177
|
+
return (
|
|
178
|
+
APIHelper.valid_type?(value.id,
|
|
179
|
+
->(val) { val.instance_of? String }) and
|
|
180
|
+
APIHelper.valid_type?(value.type,
|
|
181
|
+
->(val) { TypeEnum.validate(val) }) and
|
|
182
|
+
APIHelper.valid_type?(value.name,
|
|
183
|
+
->(val) { val.instance_of? String }) and
|
|
184
|
+
APIHelper.valid_type?(value.created_at,
|
|
185
|
+
->(val) { val.instance_of? String }) and
|
|
186
|
+
APIHelper.valid_type?(value.updated_at,
|
|
187
|
+
->(val) { val.instance_of? String })
|
|
188
|
+
)
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
return false unless value.instance_of? Hash
|
|
192
|
+
|
|
193
|
+
(
|
|
194
|
+
APIHelper.valid_type?(value['id'],
|
|
195
|
+
->(val) { val.instance_of? String }) and
|
|
196
|
+
APIHelper.valid_type?(value['type'],
|
|
197
|
+
->(val) { TypeEnum.validate(val) }) and
|
|
198
|
+
APIHelper.valid_type?(value['name'],
|
|
199
|
+
->(val) { val.instance_of? String }) and
|
|
200
|
+
APIHelper.valid_type?(value['created_at'],
|
|
201
|
+
->(val) { val.instance_of? String }) and
|
|
202
|
+
APIHelper.valid_type?(value['updated_at'],
|
|
203
|
+
->(val) { val.instance_of? String })
|
|
204
|
+
)
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Provides a human-readable string representation of the object.
|
|
208
|
+
def to_s
|
|
209
|
+
class_name = self.class.name.split('::').last
|
|
210
|
+
"<#{class_name} id: #{@id}, workspace_id: #{@workspace_id}, tenant_id: #{@tenant_id},"\
|
|
211
|
+
" counterparty_id: #{@counterparty_id}, type: #{@type}, name: #{@name}, bank_name:"\
|
|
212
|
+
" #{@bank_name}, bank_code_type: #{@bank_code_type}, bank_identifier_code:"\
|
|
213
|
+
" #{@bank_identifier_code}, crypto_wallet_address: #{@crypto_wallet_address},"\
|
|
214
|
+
" bank_account_number: #{@bank_account_number}, created_at: #{@created_at}, updated_at:"\
|
|
215
|
+
" #{@updated_at}>"
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
219
|
+
def inspect
|
|
220
|
+
class_name = self.class.name.split('::').last
|
|
221
|
+
"<#{class_name} id: #{@id.inspect}, workspace_id: #{@workspace_id.inspect}, tenant_id:"\
|
|
222
|
+
" #{@tenant_id.inspect}, counterparty_id: #{@counterparty_id.inspect}, type:"\
|
|
223
|
+
" #{@type.inspect}, name: #{@name.inspect}, bank_name: #{@bank_name.inspect},"\
|
|
224
|
+
" bank_code_type: #{@bank_code_type.inspect}, bank_identifier_code:"\
|
|
225
|
+
" #{@bank_identifier_code.inspect}, crypto_wallet_address:"\
|
|
226
|
+
" #{@crypto_wallet_address.inspect}, bank_account_number: #{@bank_account_number.inspect},"\
|
|
227
|
+
" created_at: #{@created_at.inspect}, updated_at: #{@updated_at.inspect}>"
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
end
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# tesser_apiv1
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TesserApiv1
|
|
7
|
+
# AccountListResponse Model.
|
|
8
|
+
class AccountListResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Array[AccountListItem]]
|
|
14
|
+
attr_accessor :data
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['data'] = 'data'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
[]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for nullable fields
|
|
29
|
+
def self.nullables
|
|
30
|
+
[]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def initialize(data = nil)
|
|
34
|
+
@data = data
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Creates an instance of the object from a hash.
|
|
38
|
+
def self.from_hash(hash)
|
|
39
|
+
return nil unless hash
|
|
40
|
+
|
|
41
|
+
# Extract variables from the hash.
|
|
42
|
+
# Parameter is an array, so we need to iterate through it
|
|
43
|
+
data = nil
|
|
44
|
+
unless hash['data'].nil?
|
|
45
|
+
data = []
|
|
46
|
+
hash['data'].each do |structure|
|
|
47
|
+
data << (AccountListItem.from_hash(structure) if structure)
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
data = nil unless hash.key?('data')
|
|
52
|
+
|
|
53
|
+
# Create object from extracted values.
|
|
54
|
+
AccountListResponse.new(data)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Provides a human-readable string representation of the object.
|
|
58
|
+
def to_s
|
|
59
|
+
class_name = self.class.name.split('::').last
|
|
60
|
+
"<#{class_name} data: #{@data}>"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
64
|
+
def inspect
|
|
65
|
+
class_name = self.class.name.split('::').last
|
|
66
|
+
"<#{class_name} data: #{@data.inspect}>"
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
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
|
+
# AccountResponse Model.
|
|
8
|
+
class AccountResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Account]
|
|
14
|
+
attr_accessor :data
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['data'] = 'data'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
[]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for nullable fields
|
|
29
|
+
def self.nullables
|
|
30
|
+
[]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def initialize(data = nil)
|
|
34
|
+
@data = data
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Creates an instance of the object from a hash.
|
|
38
|
+
def self.from_hash(hash)
|
|
39
|
+
return nil unless hash
|
|
40
|
+
|
|
41
|
+
# Extract variables from the hash.
|
|
42
|
+
data = Account.from_hash(hash['data']) if hash['data']
|
|
43
|
+
|
|
44
|
+
# Create object from extracted values.
|
|
45
|
+
AccountResponse.new(data)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Provides a human-readable string representation of the object.
|
|
49
|
+
def to_s
|
|
50
|
+
class_name = self.class.name.split('::').last
|
|
51
|
+
"<#{class_name} data: #{@data}>"
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
55
|
+
def inspect
|
|
56
|
+
class_name = self.class.name.split('::').last
|
|
57
|
+
"<#{class_name} data: #{@data.inspect}>"
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|