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,411 @@
|
|
|
1
|
+
# tesser_apiv1
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TesserApiv1
|
|
7
|
+
# Counterparty Model.
|
|
8
|
+
class Counterparty < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Unique identifier for the counterparty.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :id
|
|
15
|
+
|
|
16
|
+
# Workspace this counterparty belongs to.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :workspace_id
|
|
19
|
+
|
|
20
|
+
# Classification: 'individual' or 'business'.
|
|
21
|
+
# @return [ClassificationEnum]
|
|
22
|
+
attr_accessor :classification
|
|
23
|
+
|
|
24
|
+
# Optional reference to a tenant entity.
|
|
25
|
+
# @return [Object]
|
|
26
|
+
attr_accessor :tenant_id
|
|
27
|
+
|
|
28
|
+
# First name (for individuals). Secure field, returned based on
|
|
29
|
+
# include_secure.
|
|
30
|
+
# @return [Object]
|
|
31
|
+
attr_accessor :individual_first_name
|
|
32
|
+
|
|
33
|
+
# Last name (for individuals). Secure field, returned based on
|
|
34
|
+
# include_secure.
|
|
35
|
+
# @return [Object]
|
|
36
|
+
attr_accessor :individual_last_name
|
|
37
|
+
|
|
38
|
+
# Country code (for individuals).
|
|
39
|
+
# @return [Object]
|
|
40
|
+
attr_accessor :individual_address_country
|
|
41
|
+
|
|
42
|
+
# Date of birth (for individuals). Secure field, returned based on
|
|
43
|
+
# include_secure.
|
|
44
|
+
# @return [Object]
|
|
45
|
+
attr_accessor :individual_date_of_birth
|
|
46
|
+
|
|
47
|
+
# National identification number (for individuals). Secure field, returned
|
|
48
|
+
# based on include_secure.
|
|
49
|
+
# @return [Object]
|
|
50
|
+
attr_accessor :individual_national_identification_number
|
|
51
|
+
|
|
52
|
+
# Street address line 1 (for individuals). Secure field, returned based on
|
|
53
|
+
# include_secure.
|
|
54
|
+
# @return [Object]
|
|
55
|
+
attr_accessor :individual_street_address1
|
|
56
|
+
|
|
57
|
+
# Street address line 2 (for individuals). Secure field, returned based on
|
|
58
|
+
# include_secure.
|
|
59
|
+
# @return [Object]
|
|
60
|
+
attr_accessor :individual_street_address2
|
|
61
|
+
|
|
62
|
+
# City (for individuals). Secure field, returned based on include_secure.
|
|
63
|
+
# @return [Object]
|
|
64
|
+
attr_accessor :individual_city
|
|
65
|
+
|
|
66
|
+
# State/region (for individuals). Secure field, returned based on
|
|
67
|
+
# include_secure.
|
|
68
|
+
# @return [Object]
|
|
69
|
+
attr_accessor :individual_state
|
|
70
|
+
|
|
71
|
+
# Postal code (for individuals). Secure field, returned based on
|
|
72
|
+
# include_secure.
|
|
73
|
+
# @return [Object]
|
|
74
|
+
attr_accessor :individual_postal_code
|
|
75
|
+
|
|
76
|
+
# Legal business name (for businesses).
|
|
77
|
+
# @return [Object]
|
|
78
|
+
attr_accessor :business_legal_name
|
|
79
|
+
|
|
80
|
+
# DBA - Doing Business As name (for businesses).
|
|
81
|
+
# @return [Object]
|
|
82
|
+
attr_accessor :business_dba
|
|
83
|
+
|
|
84
|
+
# Country code (for businesses).
|
|
85
|
+
# @return [Object]
|
|
86
|
+
attr_accessor :business_address_country
|
|
87
|
+
|
|
88
|
+
# Street address line 1 (for businesses). Secure field, returned based on
|
|
89
|
+
# include_secure.
|
|
90
|
+
# @return [Object]
|
|
91
|
+
attr_accessor :business_street_address1
|
|
92
|
+
|
|
93
|
+
# Street address line 2 (for businesses). Secure field, returned based on
|
|
94
|
+
# include_secure.
|
|
95
|
+
# @return [Object]
|
|
96
|
+
attr_accessor :business_street_address2
|
|
97
|
+
|
|
98
|
+
# City (for businesses). Secure field, returned based on include_secure.
|
|
99
|
+
# @return [Object]
|
|
100
|
+
attr_accessor :business_city
|
|
101
|
+
|
|
102
|
+
# State/region (for businesses). Secure field, returned based on
|
|
103
|
+
# include_secure.
|
|
104
|
+
# @return [Object]
|
|
105
|
+
attr_accessor :business_state
|
|
106
|
+
|
|
107
|
+
# Legal Entity Identifier (for businesses). Secure field, returned based on
|
|
108
|
+
# include_secure.
|
|
109
|
+
# @return [Object]
|
|
110
|
+
attr_accessor :business_legal_entity_identifier
|
|
111
|
+
|
|
112
|
+
# Creation timestamp in ISO 8601 format.
|
|
113
|
+
# @return [String]
|
|
114
|
+
attr_accessor :created_at
|
|
115
|
+
|
|
116
|
+
# Last update timestamp in ISO 8601 format.
|
|
117
|
+
# @return [String]
|
|
118
|
+
attr_accessor :updated_at
|
|
119
|
+
|
|
120
|
+
# A mapping from model property names to API property names.
|
|
121
|
+
def self.names
|
|
122
|
+
@_hash = {} if @_hash.nil?
|
|
123
|
+
@_hash['id'] = 'id'
|
|
124
|
+
@_hash['workspace_id'] = 'workspace_id'
|
|
125
|
+
@_hash['classification'] = 'classification'
|
|
126
|
+
@_hash['tenant_id'] = 'tenant_id'
|
|
127
|
+
@_hash['individual_first_name'] = 'individual_first_name'
|
|
128
|
+
@_hash['individual_last_name'] = 'individual_last_name'
|
|
129
|
+
@_hash['individual_address_country'] = 'individual_address_country'
|
|
130
|
+
@_hash['individual_date_of_birth'] = 'individual_date_of_birth'
|
|
131
|
+
@_hash['individual_national_identification_number'] =
|
|
132
|
+
'individual_national_identification_number'
|
|
133
|
+
@_hash['individual_street_address1'] = 'individual_street_address1'
|
|
134
|
+
@_hash['individual_street_address2'] = 'individual_street_address2'
|
|
135
|
+
@_hash['individual_city'] = 'individual_city'
|
|
136
|
+
@_hash['individual_state'] = 'individual_state'
|
|
137
|
+
@_hash['individual_postal_code'] = 'individual_postal_code'
|
|
138
|
+
@_hash['business_legal_name'] = 'business_legal_name'
|
|
139
|
+
@_hash['business_dba'] = 'business_dba'
|
|
140
|
+
@_hash['business_address_country'] = 'business_address_country'
|
|
141
|
+
@_hash['business_street_address1'] = 'business_street_address1'
|
|
142
|
+
@_hash['business_street_address2'] = 'business_street_address2'
|
|
143
|
+
@_hash['business_city'] = 'business_city'
|
|
144
|
+
@_hash['business_state'] = 'business_state'
|
|
145
|
+
@_hash['business_legal_entity_identifier'] =
|
|
146
|
+
'business_legal_entity_identifier'
|
|
147
|
+
@_hash['created_at'] = 'created_at'
|
|
148
|
+
@_hash['updated_at'] = 'updated_at'
|
|
149
|
+
@_hash
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# An array for optional fields
|
|
153
|
+
def self.optionals
|
|
154
|
+
%w[
|
|
155
|
+
tenant_id
|
|
156
|
+
individual_first_name
|
|
157
|
+
individual_last_name
|
|
158
|
+
individual_address_country
|
|
159
|
+
individual_date_of_birth
|
|
160
|
+
individual_national_identification_number
|
|
161
|
+
individual_street_address1
|
|
162
|
+
individual_street_address2
|
|
163
|
+
individual_city
|
|
164
|
+
individual_state
|
|
165
|
+
individual_postal_code
|
|
166
|
+
business_legal_name
|
|
167
|
+
business_dba
|
|
168
|
+
business_address_country
|
|
169
|
+
business_street_address1
|
|
170
|
+
business_street_address2
|
|
171
|
+
business_city
|
|
172
|
+
business_state
|
|
173
|
+
business_legal_entity_identifier
|
|
174
|
+
]
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# An array for nullable fields
|
|
178
|
+
def self.nullables
|
|
179
|
+
[]
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
def initialize(id = nil, workspace_id = nil, classification = nil,
|
|
183
|
+
created_at = nil, updated_at = nil, tenant_id = SKIP,
|
|
184
|
+
individual_first_name = SKIP, individual_last_name = SKIP,
|
|
185
|
+
individual_address_country = SKIP,
|
|
186
|
+
individual_date_of_birth = SKIP,
|
|
187
|
+
individual_national_identification_number = SKIP,
|
|
188
|
+
individual_street_address1 = SKIP,
|
|
189
|
+
individual_street_address2 = SKIP, individual_city = SKIP,
|
|
190
|
+
individual_state = SKIP, individual_postal_code = SKIP,
|
|
191
|
+
business_legal_name = SKIP, business_dba = SKIP,
|
|
192
|
+
business_address_country = SKIP,
|
|
193
|
+
business_street_address1 = SKIP,
|
|
194
|
+
business_street_address2 = SKIP, business_city = SKIP,
|
|
195
|
+
business_state = SKIP,
|
|
196
|
+
business_legal_entity_identifier = SKIP)
|
|
197
|
+
@id = id
|
|
198
|
+
@workspace_id = workspace_id
|
|
199
|
+
@classification = classification
|
|
200
|
+
@tenant_id = tenant_id unless tenant_id == SKIP
|
|
201
|
+
@individual_first_name = individual_first_name unless individual_first_name == SKIP
|
|
202
|
+
@individual_last_name = individual_last_name unless individual_last_name == SKIP
|
|
203
|
+
unless individual_address_country == SKIP
|
|
204
|
+
@individual_address_country =
|
|
205
|
+
individual_address_country
|
|
206
|
+
end
|
|
207
|
+
@individual_date_of_birth = individual_date_of_birth unless individual_date_of_birth == SKIP
|
|
208
|
+
unless individual_national_identification_number == SKIP
|
|
209
|
+
@individual_national_identification_number =
|
|
210
|
+
individual_national_identification_number
|
|
211
|
+
end
|
|
212
|
+
unless individual_street_address1 == SKIP
|
|
213
|
+
@individual_street_address1 =
|
|
214
|
+
individual_street_address1
|
|
215
|
+
end
|
|
216
|
+
unless individual_street_address2 == SKIP
|
|
217
|
+
@individual_street_address2 =
|
|
218
|
+
individual_street_address2
|
|
219
|
+
end
|
|
220
|
+
@individual_city = individual_city unless individual_city == SKIP
|
|
221
|
+
@individual_state = individual_state unless individual_state == SKIP
|
|
222
|
+
@individual_postal_code = individual_postal_code unless individual_postal_code == SKIP
|
|
223
|
+
@business_legal_name = business_legal_name unless business_legal_name == SKIP
|
|
224
|
+
@business_dba = business_dba unless business_dba == SKIP
|
|
225
|
+
@business_address_country = business_address_country unless business_address_country == SKIP
|
|
226
|
+
@business_street_address1 = business_street_address1 unless business_street_address1 == SKIP
|
|
227
|
+
@business_street_address2 = business_street_address2 unless business_street_address2 == SKIP
|
|
228
|
+
@business_city = business_city unless business_city == SKIP
|
|
229
|
+
@business_state = business_state unless business_state == SKIP
|
|
230
|
+
unless business_legal_entity_identifier == SKIP
|
|
231
|
+
@business_legal_entity_identifier =
|
|
232
|
+
business_legal_entity_identifier
|
|
233
|
+
end
|
|
234
|
+
@created_at = created_at
|
|
235
|
+
@updated_at = updated_at
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Creates an instance of the object from a hash.
|
|
239
|
+
def self.from_hash(hash)
|
|
240
|
+
return nil unless hash
|
|
241
|
+
|
|
242
|
+
# Extract variables from the hash.
|
|
243
|
+
id = hash.key?('id') ? hash['id'] : nil
|
|
244
|
+
workspace_id = hash.key?('workspace_id') ? hash['workspace_id'] : nil
|
|
245
|
+
classification =
|
|
246
|
+
hash.key?('classification') ? hash['classification'] : nil
|
|
247
|
+
created_at = hash.key?('created_at') ? hash['created_at'] : nil
|
|
248
|
+
updated_at = hash.key?('updated_at') ? hash['updated_at'] : nil
|
|
249
|
+
tenant_id = hash.key?('tenant_id') ? APIHelper.deserialize_union_type(
|
|
250
|
+
UnionTypeLookUp.get(:CounterpartyTenantId), hash['tenant_id']
|
|
251
|
+
) : SKIP
|
|
252
|
+
individual_first_name = hash.key?('individual_first_name') ? APIHelper.deserialize_union_type(
|
|
253
|
+
UnionTypeLookUp.get(:CounterpartyIndividualFirstName), hash['individual_first_name']
|
|
254
|
+
) : SKIP
|
|
255
|
+
individual_last_name = hash.key?('individual_last_name') ? APIHelper.deserialize_union_type(
|
|
256
|
+
UnionTypeLookUp.get(:CounterpartyIndividualLastName), hash['individual_last_name']
|
|
257
|
+
) : SKIP
|
|
258
|
+
individual_address_country = hash.key?('individual_address_country') ? APIHelper.deserialize_union_type(
|
|
259
|
+
UnionTypeLookUp.get(:CounterpartyIndividualAddressCountry), hash['individual_address_country']
|
|
260
|
+
) : SKIP
|
|
261
|
+
individual_date_of_birth = hash.key?('individual_date_of_birth') ? APIHelper.deserialize_union_type(
|
|
262
|
+
UnionTypeLookUp.get(:CounterpartyIndividualDateOfBirth), hash['individual_date_of_birth']
|
|
263
|
+
) : SKIP
|
|
264
|
+
individual_national_identification_number = hash.key?('individual_national_identification_number') ? APIHelper.deserialize_union_type(
|
|
265
|
+
UnionTypeLookUp.get(:CounterpartyIndividualNationalIdentificationNumber), hash['individual_national_identification_number']
|
|
266
|
+
) : SKIP
|
|
267
|
+
individual_street_address1 = hash.key?('individual_street_address1') ? APIHelper.deserialize_union_type(
|
|
268
|
+
UnionTypeLookUp.get(:CounterpartyIndividualStreetAddress1), hash['individual_street_address1']
|
|
269
|
+
) : SKIP
|
|
270
|
+
individual_street_address2 = hash.key?('individual_street_address2') ? APIHelper.deserialize_union_type(
|
|
271
|
+
UnionTypeLookUp.get(:CounterpartyIndividualStreetAddress2), hash['individual_street_address2']
|
|
272
|
+
) : SKIP
|
|
273
|
+
individual_city = hash.key?('individual_city') ? APIHelper.deserialize_union_type(
|
|
274
|
+
UnionTypeLookUp.get(:CounterpartyIndividualCity), hash['individual_city']
|
|
275
|
+
) : SKIP
|
|
276
|
+
individual_state = hash.key?('individual_state') ? APIHelper.deserialize_union_type(
|
|
277
|
+
UnionTypeLookUp.get(:CounterpartyIndividualState), hash['individual_state']
|
|
278
|
+
) : SKIP
|
|
279
|
+
individual_postal_code = hash.key?('individual_postal_code') ? APIHelper.deserialize_union_type(
|
|
280
|
+
UnionTypeLookUp.get(:CounterpartyIndividualPostalCode), hash['individual_postal_code']
|
|
281
|
+
) : SKIP
|
|
282
|
+
business_legal_name = hash.key?('business_legal_name') ? APIHelper.deserialize_union_type(
|
|
283
|
+
UnionTypeLookUp.get(:CounterpartyBusinessLegalName), hash['business_legal_name']
|
|
284
|
+
) : SKIP
|
|
285
|
+
business_dba = hash.key?('business_dba') ? APIHelper.deserialize_union_type(
|
|
286
|
+
UnionTypeLookUp.get(:CounterpartyBusinessDba), hash['business_dba']
|
|
287
|
+
) : SKIP
|
|
288
|
+
business_address_country = hash.key?('business_address_country') ? APIHelper.deserialize_union_type(
|
|
289
|
+
UnionTypeLookUp.get(:CounterpartyBusinessAddressCountry), hash['business_address_country']
|
|
290
|
+
) : SKIP
|
|
291
|
+
business_street_address1 = hash.key?('business_street_address1') ? APIHelper.deserialize_union_type(
|
|
292
|
+
UnionTypeLookUp.get(:CounterpartyBusinessStreetAddress1), hash['business_street_address1']
|
|
293
|
+
) : SKIP
|
|
294
|
+
business_street_address2 = hash.key?('business_street_address2') ? APIHelper.deserialize_union_type(
|
|
295
|
+
UnionTypeLookUp.get(:CounterpartyBusinessStreetAddress2), hash['business_street_address2']
|
|
296
|
+
) : SKIP
|
|
297
|
+
business_city = hash.key?('business_city') ? APIHelper.deserialize_union_type(
|
|
298
|
+
UnionTypeLookUp.get(:CounterpartyBusinessCity), hash['business_city']
|
|
299
|
+
) : SKIP
|
|
300
|
+
business_state = hash.key?('business_state') ? APIHelper.deserialize_union_type(
|
|
301
|
+
UnionTypeLookUp.get(:CounterpartyBusinessState), hash['business_state']
|
|
302
|
+
) : SKIP
|
|
303
|
+
business_legal_entity_identifier = hash.key?('business_legal_entity_identifier') ? APIHelper.deserialize_union_type(
|
|
304
|
+
UnionTypeLookUp.get(:CounterpartyBusinessLegalEntityIdentifier), hash['business_legal_entity_identifier']
|
|
305
|
+
) : SKIP
|
|
306
|
+
|
|
307
|
+
# Create object from extracted values.
|
|
308
|
+
Counterparty.new(id,
|
|
309
|
+
workspace_id,
|
|
310
|
+
classification,
|
|
311
|
+
created_at,
|
|
312
|
+
updated_at,
|
|
313
|
+
tenant_id,
|
|
314
|
+
individual_first_name,
|
|
315
|
+
individual_last_name,
|
|
316
|
+
individual_address_country,
|
|
317
|
+
individual_date_of_birth,
|
|
318
|
+
individual_national_identification_number,
|
|
319
|
+
individual_street_address1,
|
|
320
|
+
individual_street_address2,
|
|
321
|
+
individual_city,
|
|
322
|
+
individual_state,
|
|
323
|
+
individual_postal_code,
|
|
324
|
+
business_legal_name,
|
|
325
|
+
business_dba,
|
|
326
|
+
business_address_country,
|
|
327
|
+
business_street_address1,
|
|
328
|
+
business_street_address2,
|
|
329
|
+
business_city,
|
|
330
|
+
business_state,
|
|
331
|
+
business_legal_entity_identifier)
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
# Validates an instance of the object from a given value.
|
|
335
|
+
# @param [Counterparty | Hash] The value against the validation is performed.
|
|
336
|
+
def self.validate(value)
|
|
337
|
+
if value.instance_of? self
|
|
338
|
+
return (
|
|
339
|
+
APIHelper.valid_type?(value.id,
|
|
340
|
+
->(val) { val.instance_of? String }) and
|
|
341
|
+
APIHelper.valid_type?(value.workspace_id,
|
|
342
|
+
->(val) { val.instance_of? String }) and
|
|
343
|
+
APIHelper.valid_type?(value.classification,
|
|
344
|
+
->(val) { ClassificationEnum.validate(val) }) and
|
|
345
|
+
APIHelper.valid_type?(value.created_at,
|
|
346
|
+
->(val) { val.instance_of? String }) and
|
|
347
|
+
APIHelper.valid_type?(value.updated_at,
|
|
348
|
+
->(val) { val.instance_of? String })
|
|
349
|
+
)
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
return false unless value.instance_of? Hash
|
|
353
|
+
|
|
354
|
+
(
|
|
355
|
+
APIHelper.valid_type?(value['id'],
|
|
356
|
+
->(val) { val.instance_of? String }) and
|
|
357
|
+
APIHelper.valid_type?(value['workspace_id'],
|
|
358
|
+
->(val) { val.instance_of? String }) and
|
|
359
|
+
APIHelper.valid_type?(value['classification'],
|
|
360
|
+
->(val) { ClassificationEnum.validate(val) }) and
|
|
361
|
+
APIHelper.valid_type?(value['created_at'],
|
|
362
|
+
->(val) { val.instance_of? String }) and
|
|
363
|
+
APIHelper.valid_type?(value['updated_at'],
|
|
364
|
+
->(val) { val.instance_of? String })
|
|
365
|
+
)
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
# Provides a human-readable string representation of the object.
|
|
369
|
+
def to_s
|
|
370
|
+
class_name = self.class.name.split('::').last
|
|
371
|
+
"<#{class_name} id: #{@id}, workspace_id: #{@workspace_id}, classification:"\
|
|
372
|
+
" #{@classification}, tenant_id: #{@tenant_id}, individual_first_name:"\
|
|
373
|
+
" #{@individual_first_name}, individual_last_name: #{@individual_last_name},"\
|
|
374
|
+
" individual_address_country: #{@individual_address_country}, individual_date_of_birth:"\
|
|
375
|
+
" #{@individual_date_of_birth}, individual_national_identification_number:"\
|
|
376
|
+
" #{@individual_national_identification_number}, individual_street_address1:"\
|
|
377
|
+
" #{@individual_street_address1}, individual_street_address2:"\
|
|
378
|
+
" #{@individual_street_address2}, individual_city: #{@individual_city}, individual_state:"\
|
|
379
|
+
" #{@individual_state}, individual_postal_code: #{@individual_postal_code},"\
|
|
380
|
+
" business_legal_name: #{@business_legal_name}, business_dba: #{@business_dba},"\
|
|
381
|
+
" business_address_country: #{@business_address_country}, business_street_address1:"\
|
|
382
|
+
" #{@business_street_address1}, business_street_address2: #{@business_street_address2},"\
|
|
383
|
+
" business_city: #{@business_city}, business_state: #{@business_state},"\
|
|
384
|
+
" business_legal_entity_identifier: #{@business_legal_entity_identifier}, created_at:"\
|
|
385
|
+
" #{@created_at}, updated_at: #{@updated_at}>"
|
|
386
|
+
end
|
|
387
|
+
|
|
388
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
389
|
+
def inspect
|
|
390
|
+
class_name = self.class.name.split('::').last
|
|
391
|
+
"<#{class_name} id: #{@id.inspect}, workspace_id: #{@workspace_id.inspect}, classification:"\
|
|
392
|
+
" #{@classification.inspect}, tenant_id: #{@tenant_id.inspect}, individual_first_name:"\
|
|
393
|
+
" #{@individual_first_name.inspect}, individual_last_name: #{@individual_last_name.inspect},"\
|
|
394
|
+
" individual_address_country: #{@individual_address_country.inspect},"\
|
|
395
|
+
" individual_date_of_birth: #{@individual_date_of_birth.inspect},"\
|
|
396
|
+
' individual_national_identification_number:'\
|
|
397
|
+
" #{@individual_national_identification_number.inspect}, individual_street_address1:"\
|
|
398
|
+
" #{@individual_street_address1.inspect}, individual_street_address2:"\
|
|
399
|
+
" #{@individual_street_address2.inspect}, individual_city: #{@individual_city.inspect},"\
|
|
400
|
+
" individual_state: #{@individual_state.inspect}, individual_postal_code:"\
|
|
401
|
+
" #{@individual_postal_code.inspect}, business_legal_name: #{@business_legal_name.inspect},"\
|
|
402
|
+
" business_dba: #{@business_dba.inspect}, business_address_country:"\
|
|
403
|
+
" #{@business_address_country.inspect}, business_street_address1:"\
|
|
404
|
+
" #{@business_street_address1.inspect}, business_street_address2:"\
|
|
405
|
+
" #{@business_street_address2.inspect}, business_city: #{@business_city.inspect},"\
|
|
406
|
+
" business_state: #{@business_state.inspect}, business_legal_entity_identifier:"\
|
|
407
|
+
" #{@business_legal_entity_identifier.inspect}, created_at: #{@created_at.inspect},"\
|
|
408
|
+
" updated_at: #{@updated_at.inspect}>"
|
|
409
|
+
end
|
|
410
|
+
end
|
|
411
|
+
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
|
+
# CounterpartyListResponse Model.
|
|
8
|
+
class CounterpartyListResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# List of counterparties
|
|
13
|
+
# @return [Array[Counterparty]]
|
|
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 << (Counterparty.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
|
+
CounterpartyListResponse.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
|
+
# CounterpartyResponse Model.
|
|
8
|
+
class CounterpartyResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Data]
|
|
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 = Data.from_hash(hash['data']) if hash['data']
|
|
43
|
+
|
|
44
|
+
# Create object from extracted values.
|
|
45
|
+
CounterpartyResponse.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
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# tesser_apiv1
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TesserApiv1
|
|
7
|
+
# CreateBankRequest Model.
|
|
8
|
+
class CreateBankRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# ID of the workspace.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :workspace_id
|
|
15
|
+
|
|
16
|
+
# Name of the bank account.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :name
|
|
19
|
+
|
|
20
|
+
# Name of the bank.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :bank_name
|
|
23
|
+
|
|
24
|
+
# Type of bank code (e.g., 'SWIFT').
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :bank_code_type
|
|
27
|
+
|
|
28
|
+
# Bank identifier code value.
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :bank_identifier_code
|
|
31
|
+
|
|
32
|
+
# Bank account number (IBAN, etc).
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :bank_account_number
|
|
35
|
+
|
|
36
|
+
# ID of the counterparty owner.
|
|
37
|
+
# @return [String]
|
|
38
|
+
attr_accessor :counterparty_id
|
|
39
|
+
|
|
40
|
+
# A mapping from model property names to API property names.
|
|
41
|
+
def self.names
|
|
42
|
+
@_hash = {} if @_hash.nil?
|
|
43
|
+
@_hash['workspace_id'] = 'workspace_id'
|
|
44
|
+
@_hash['name'] = 'name'
|
|
45
|
+
@_hash['bank_name'] = 'bank_name'
|
|
46
|
+
@_hash['bank_code_type'] = 'bank_code_type'
|
|
47
|
+
@_hash['bank_identifier_code'] = 'bank_identifier_code'
|
|
48
|
+
@_hash['bank_account_number'] = 'bank_account_number'
|
|
49
|
+
@_hash['counterparty_id'] = 'counterparty_id'
|
|
50
|
+
@_hash
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# An array for optional fields
|
|
54
|
+
def self.optionals
|
|
55
|
+
%w[
|
|
56
|
+
workspace_id
|
|
57
|
+
counterparty_id
|
|
58
|
+
]
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# An array for nullable fields
|
|
62
|
+
def self.nullables
|
|
63
|
+
[]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def initialize(name = nil, bank_name = nil, bank_code_type = nil,
|
|
67
|
+
bank_identifier_code = nil, bank_account_number = nil,
|
|
68
|
+
workspace_id = SKIP, counterparty_id = SKIP)
|
|
69
|
+
@workspace_id = workspace_id unless workspace_id == SKIP
|
|
70
|
+
@name = name
|
|
71
|
+
@bank_name = bank_name
|
|
72
|
+
@bank_code_type = bank_code_type
|
|
73
|
+
@bank_identifier_code = bank_identifier_code
|
|
74
|
+
@bank_account_number = bank_account_number
|
|
75
|
+
@counterparty_id = counterparty_id unless counterparty_id == SKIP
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Creates an instance of the object from a hash.
|
|
79
|
+
def self.from_hash(hash)
|
|
80
|
+
return nil unless hash
|
|
81
|
+
|
|
82
|
+
# Extract variables from the hash.
|
|
83
|
+
name = hash.key?('name') ? hash['name'] : nil
|
|
84
|
+
bank_name = hash.key?('bank_name') ? hash['bank_name'] : nil
|
|
85
|
+
bank_code_type =
|
|
86
|
+
hash.key?('bank_code_type') ? hash['bank_code_type'] : nil
|
|
87
|
+
bank_identifier_code =
|
|
88
|
+
hash.key?('bank_identifier_code') ? hash['bank_identifier_code'] : nil
|
|
89
|
+
bank_account_number =
|
|
90
|
+
hash.key?('bank_account_number') ? hash['bank_account_number'] : nil
|
|
91
|
+
workspace_id = hash.key?('workspace_id') ? hash['workspace_id'] : SKIP
|
|
92
|
+
counterparty_id =
|
|
93
|
+
hash.key?('counterparty_id') ? hash['counterparty_id'] : SKIP
|
|
94
|
+
|
|
95
|
+
# Create object from extracted values.
|
|
96
|
+
CreateBankRequest.new(name,
|
|
97
|
+
bank_name,
|
|
98
|
+
bank_code_type,
|
|
99
|
+
bank_identifier_code,
|
|
100
|
+
bank_account_number,
|
|
101
|
+
workspace_id,
|
|
102
|
+
counterparty_id)
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Provides a human-readable string representation of the object.
|
|
106
|
+
def to_s
|
|
107
|
+
class_name = self.class.name.split('::').last
|
|
108
|
+
"<#{class_name} workspace_id: #{@workspace_id}, name: #{@name}, bank_name: #{@bank_name},"\
|
|
109
|
+
" bank_code_type: #{@bank_code_type}, bank_identifier_code: #{@bank_identifier_code},"\
|
|
110
|
+
" bank_account_number: #{@bank_account_number}, counterparty_id: #{@counterparty_id}>"
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
114
|
+
def inspect
|
|
115
|
+
class_name = self.class.name.split('::').last
|
|
116
|
+
"<#{class_name} workspace_id: #{@workspace_id.inspect}, name: #{@name.inspect}, bank_name:"\
|
|
117
|
+
" #{@bank_name.inspect}, bank_code_type: #{@bank_code_type.inspect}, bank_identifier_code:"\
|
|
118
|
+
" #{@bank_identifier_code.inspect}, bank_account_number: #{@bank_account_number.inspect},"\
|
|
119
|
+
" counterparty_id: #{@counterparty_id.inspect}>"
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
end
|