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.
Files changed (101) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +148 -0
  4. data/bin/console +15 -0
  5. data/lib/tesser_apiv1/api_helper.rb +10 -0
  6. data/lib/tesser_apiv1/client.rb +118 -0
  7. data/lib/tesser_apiv1/configuration.rb +182 -0
  8. data/lib/tesser_apiv1/controllers/accounts_controller.rb +193 -0
  9. data/lib/tesser_apiv1/controllers/base_controller.rb +60 -0
  10. data/lib/tesser_apiv1/controllers/counterparties_controller.rb +171 -0
  11. data/lib/tesser_apiv1/controllers/currencies_controller.rb +39 -0
  12. data/lib/tesser_apiv1/controllers/experimental_controller.rb +49 -0
  13. data/lib/tesser_apiv1/controllers/health_controller.rb +24 -0
  14. data/lib/tesser_apiv1/controllers/networks_controller.rb +39 -0
  15. data/lib/tesser_apiv1/controllers/payments_controller.rb +202 -0
  16. data/lib/tesser_apiv1/controllers/tenants_controller.rb +156 -0
  17. data/lib/tesser_apiv1/controllers/treasury_controller.rb +77 -0
  18. data/lib/tesser_apiv1/exceptions/api_exception.rb +21 -0
  19. data/lib/tesser_apiv1/http/auth/o_auth2.rb +53 -0
  20. data/lib/tesser_apiv1/http/http_call_back.rb +10 -0
  21. data/lib/tesser_apiv1/http/http_method_enum.rb +10 -0
  22. data/lib/tesser_apiv1/http/http_request.rb +10 -0
  23. data/lib/tesser_apiv1/http/http_response.rb +10 -0
  24. data/lib/tesser_apiv1/http/proxy_settings.rb +22 -0
  25. data/lib/tesser_apiv1/models/account.rb +230 -0
  26. data/lib/tesser_apiv1/models/account_list_item.rb +230 -0
  27. data/lib/tesser_apiv1/models/account_list_response.rb +69 -0
  28. data/lib/tesser_apiv1/models/account_response.rb +60 -0
  29. data/lib/tesser_apiv1/models/account_safe.rb +218 -0
  30. data/lib/tesser_apiv1/models/balance_status1_enum.rb +40 -0
  31. data/lib/tesser_apiv1/models/balance_status_enum.rb +40 -0
  32. data/lib/tesser_apiv1/models/base_model.rb +110 -0
  33. data/lib/tesser_apiv1/models/classification7_enum.rb +36 -0
  34. data/lib/tesser_apiv1/models/classification_enum.rb +36 -0
  35. data/lib/tesser_apiv1/models/counterparty.rb +411 -0
  36. data/lib/tesser_apiv1/models/counterparty_list_response.rb +69 -0
  37. data/lib/tesser_apiv1/models/counterparty_response.rb +60 -0
  38. data/lib/tesser_apiv1/models/create_bank_request.rb +122 -0
  39. data/lib/tesser_apiv1/models/create_bank_response.rb +60 -0
  40. data/lib/tesser_apiv1/models/create_counterparty_request.rb +350 -0
  41. data/lib/tesser_apiv1/models/create_counterparty_response.rb +60 -0
  42. data/lib/tesser_apiv1/models/create_deposit_request.rb +119 -0
  43. data/lib/tesser_apiv1/models/create_payment_request.rb +168 -0
  44. data/lib/tesser_apiv1/models/create_tenant_request.rb +183 -0
  45. data/lib/tesser_apiv1/models/create_tenant_response.rb +60 -0
  46. data/lib/tesser_apiv1/models/create_wallet_request.rb +112 -0
  47. data/lib/tesser_apiv1/models/create_wallet_response.rb +60 -0
  48. data/lib/tesser_apiv1/models/create_withdrawal_request.rb +130 -0
  49. data/lib/tesser_apiv1/models/currencies_response.rb +69 -0
  50. data/lib/tesser_apiv1/models/currency.rb +119 -0
  51. data/lib/tesser_apiv1/models/data.rb +221 -0
  52. data/lib/tesser_apiv1/models/data6.rb +242 -0
  53. data/lib/tesser_apiv1/models/data7.rb +419 -0
  54. data/lib/tesser_apiv1/models/data8.rb +200 -0
  55. data/lib/tesser_apiv1/models/direction1_enum.rb +40 -0
  56. data/lib/tesser_apiv1/models/direction_enum.rb +40 -0
  57. data/lib/tesser_apiv1/models/execute_payment_request_dto.rb +71 -0
  58. data/lib/tesser_apiv1/models/fee.rb +117 -0
  59. data/lib/tesser_apiv1/models/fee1.rb +117 -0
  60. data/lib/tesser_apiv1/models/network.rb +68 -0
  61. data/lib/tesser_apiv1/models/networks_response.rb +69 -0
  62. data/lib/tesser_apiv1/models/pagination.rb +104 -0
  63. data/lib/tesser_apiv1/models/payment.rb +421 -0
  64. data/lib/tesser_apiv1/models/payment_list_response.rb +79 -0
  65. data/lib/tesser_apiv1/models/payment_response.rb +60 -0
  66. data/lib/tesser_apiv1/models/payment_type3_enum.rb +52 -0
  67. data/lib/tesser_apiv1/models/payment_type_enum.rb +54 -0
  68. data/lib/tesser_apiv1/models/provider_key1_enum.rb +36 -0
  69. data/lib/tesser_apiv1/models/provider_key_enum.rb +36 -0
  70. data/lib/tesser_apiv1/models/response.rb +81 -0
  71. data/lib/tesser_apiv1/models/review_payment_request.rb +60 -0
  72. data/lib/tesser_apiv1/models/risk_status_enum.rb +44 -0
  73. data/lib/tesser_apiv1/models/status1_enum.rb +52 -0
  74. data/lib/tesser_apiv1/models/status_enum.rb +48 -0
  75. data/lib/tesser_apiv1/models/step.rb +421 -0
  76. data/lib/tesser_apiv1/models/step_type_enum.rb +44 -0
  77. data/lib/tesser_apiv1/models/tenant.rb +275 -0
  78. data/lib/tesser_apiv1/models/tenant_api_credentials.rb +88 -0
  79. data/lib/tesser_apiv1/models/tenant_list_response.rb +69 -0
  80. data/lib/tesser_apiv1/models/tenant_response.rb +60 -0
  81. data/lib/tesser_apiv1/models/transfer_step.rb +422 -0
  82. data/lib/tesser_apiv1/models/turnkey_stamp.rb +81 -0
  83. data/lib/tesser_apiv1/models/type3_enum.rb +40 -0
  84. data/lib/tesser_apiv1/models/type4_enum.rb +44 -0
  85. data/lib/tesser_apiv1/models/type_enum.rb +44 -0
  86. data/lib/tesser_apiv1/models/update_account_request.rb +62 -0
  87. data/lib/tesser_apiv1/models/update_account_response.rb +60 -0
  88. data/lib/tesser_apiv1/models/update_counterparty_request.rb +166 -0
  89. data/lib/tesser_apiv1/models/update_counterparty_response.rb +60 -0
  90. data/lib/tesser_apiv1/models/update_payment_request.rb +100 -0
  91. data/lib/tesser_apiv1/models/update_tenant_request.rb +111 -0
  92. data/lib/tesser_apiv1/models/update_tenant_response.rb +60 -0
  93. data/lib/tesser_apiv1/utilities/date_time_helper.rb +11 -0
  94. data/lib/tesser_apiv1/utilities/file_wrapper.rb +28 -0
  95. data/lib/tesser_apiv1/utilities/union_type_lookup.rb +1234 -0
  96. data/lib/tesser_apiv1.rb +116 -0
  97. data/test/controllers/controller_test_base.rb +23 -0
  98. data/test/controllers/test_health_controller.rb +31 -0
  99. data/test/controllers/test_tenants_controller.rb +133 -0
  100. data/test/http_response_catcher.rb +19 -0
  101. metadata +212 -0
@@ -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
+ # CreateBankResponse Model.
8
+ class CreateBankResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [AccountSafe]
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 = AccountSafe.from_hash(hash['data']) if hash['data']
43
+
44
+ # Create object from extracted values.
45
+ CreateBankResponse.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,350 @@
1
+ # tesser_apiv1
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module TesserApiv1
7
+ # CreateCounterpartyRequest Model.
8
+ class CreateCounterpartyRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Classification: 'individual' or 'business'.
13
+ # @return [ClassificationEnum]
14
+ attr_accessor :classification
15
+
16
+ # ID of the tenant entity (optional).
17
+ # @return [Object]
18
+ attr_accessor :tenant_id
19
+
20
+ # First name (required if classification is 'individual'). Secure field,
21
+ # returned based on include_secure.
22
+ # @return [Object]
23
+ attr_accessor :individual_first_name
24
+
25
+ # Last name (required if classification is 'individual'). Secure field,
26
+ # returned based on include_secure.
27
+ # @return [Object]
28
+ attr_accessor :individual_last_name
29
+
30
+ # ISO 3166-1 alpha-2 or alpha-3 country code.
31
+ # @return [Object]
32
+ attr_accessor :individual_address_country
33
+
34
+ # Date of birth (for individuals).
35
+ # @return [Object]
36
+ attr_accessor :individual_date_of_birth
37
+
38
+ # National identification number (for individuals). Secure field, returned
39
+ # based on include_secure.
40
+ # @return [Object]
41
+ attr_accessor :individual_national_identification_number
42
+
43
+ # Street address line 1 (for individuals). Secure field, returned based on
44
+ # include_secure.
45
+ # @return [Object]
46
+ attr_accessor :individual_street_address1
47
+
48
+ # Street address line 2 (for individuals). Secure field, returned based on
49
+ # include_secure.
50
+ # @return [Object]
51
+ attr_accessor :individual_street_address2
52
+
53
+ # City (for individuals). Secure field, returned based on include_secure.
54
+ # @return [Object]
55
+ attr_accessor :individual_city
56
+
57
+ # State/region (for individuals). Secure field, returned based on
58
+ # include_secure.
59
+ # @return [Object]
60
+ attr_accessor :individual_state
61
+
62
+ # Postal code (for individuals). Secure field, returned based on
63
+ # include_secure.
64
+ # @return [Object]
65
+ attr_accessor :individual_postal_code
66
+
67
+ # Legal business name (required if classification is 'business').
68
+ # @return [Object]
69
+ attr_accessor :business_legal_name
70
+
71
+ # Doing Business As name (optional).
72
+ # @return [Object]
73
+ attr_accessor :business_dba
74
+
75
+ # ISO 3166-1 alpha-2 or alpha-3 country code.
76
+ # @return [Object]
77
+ attr_accessor :business_address_country
78
+
79
+ # Street address line 1 (for businesses).
80
+ # @return [Object]
81
+ attr_accessor :business_street_address1
82
+
83
+ # Street address line 2 (for businesses).
84
+ # @return [Object]
85
+ attr_accessor :business_street_address2
86
+
87
+ # City (for businesses).
88
+ # @return [Object]
89
+ attr_accessor :business_city
90
+
91
+ # State/region (for businesses).
92
+ # @return [Object]
93
+ attr_accessor :business_state
94
+
95
+ # Legal Entity Identifier (for businesses). Secure field, returned based on
96
+ # include_secure.
97
+ # @return [Object]
98
+ attr_accessor :business_legal_entity_identifier
99
+
100
+ # A mapping from model property names to API property names.
101
+ def self.names
102
+ @_hash = {} if @_hash.nil?
103
+ @_hash['classification'] = 'classification'
104
+ @_hash['tenant_id'] = 'tenant_id'
105
+ @_hash['individual_first_name'] = 'individual_first_name'
106
+ @_hash['individual_last_name'] = 'individual_last_name'
107
+ @_hash['individual_address_country'] = 'individual_address_country'
108
+ @_hash['individual_date_of_birth'] = 'individual_date_of_birth'
109
+ @_hash['individual_national_identification_number'] =
110
+ 'individual_national_identification_number'
111
+ @_hash['individual_street_address1'] = 'individual_street_address1'
112
+ @_hash['individual_street_address2'] = 'individual_street_address2'
113
+ @_hash['individual_city'] = 'individual_city'
114
+ @_hash['individual_state'] = 'individual_state'
115
+ @_hash['individual_postal_code'] = 'individual_postal_code'
116
+ @_hash['business_legal_name'] = 'business_legal_name'
117
+ @_hash['business_dba'] = 'business_dba'
118
+ @_hash['business_address_country'] = 'business_address_country'
119
+ @_hash['business_street_address1'] = 'business_street_address1'
120
+ @_hash['business_street_address2'] = 'business_street_address2'
121
+ @_hash['business_city'] = 'business_city'
122
+ @_hash['business_state'] = 'business_state'
123
+ @_hash['business_legal_entity_identifier'] =
124
+ 'business_legal_entity_identifier'
125
+ @_hash
126
+ end
127
+
128
+ # An array for optional fields
129
+ def self.optionals
130
+ %w[
131
+ tenant_id
132
+ individual_first_name
133
+ individual_last_name
134
+ individual_address_country
135
+ individual_date_of_birth
136
+ individual_national_identification_number
137
+ individual_street_address1
138
+ individual_street_address2
139
+ individual_city
140
+ individual_state
141
+ individual_postal_code
142
+ business_legal_name
143
+ business_dba
144
+ business_address_country
145
+ business_street_address1
146
+ business_street_address2
147
+ business_city
148
+ business_state
149
+ business_legal_entity_identifier
150
+ ]
151
+ end
152
+
153
+ # An array for nullable fields
154
+ def self.nullables
155
+ []
156
+ end
157
+
158
+ def initialize(classification = nil, tenant_id = SKIP,
159
+ individual_first_name = SKIP, individual_last_name = SKIP,
160
+ individual_address_country = SKIP,
161
+ individual_date_of_birth = SKIP,
162
+ individual_national_identification_number = SKIP,
163
+ individual_street_address1 = SKIP,
164
+ individual_street_address2 = SKIP, individual_city = SKIP,
165
+ individual_state = SKIP, individual_postal_code = SKIP,
166
+ business_legal_name = SKIP, business_dba = SKIP,
167
+ business_address_country = SKIP,
168
+ business_street_address1 = SKIP,
169
+ business_street_address2 = SKIP, business_city = SKIP,
170
+ business_state = SKIP,
171
+ business_legal_entity_identifier = SKIP)
172
+ @classification = classification
173
+ @tenant_id = tenant_id unless tenant_id == SKIP
174
+ @individual_first_name = individual_first_name unless individual_first_name == SKIP
175
+ @individual_last_name = individual_last_name unless individual_last_name == SKIP
176
+ unless individual_address_country == SKIP
177
+ @individual_address_country =
178
+ individual_address_country
179
+ end
180
+ @individual_date_of_birth = individual_date_of_birth unless individual_date_of_birth == SKIP
181
+ unless individual_national_identification_number == SKIP
182
+ @individual_national_identification_number =
183
+ individual_national_identification_number
184
+ end
185
+ unless individual_street_address1 == SKIP
186
+ @individual_street_address1 =
187
+ individual_street_address1
188
+ end
189
+ unless individual_street_address2 == SKIP
190
+ @individual_street_address2 =
191
+ individual_street_address2
192
+ end
193
+ @individual_city = individual_city unless individual_city == SKIP
194
+ @individual_state = individual_state unless individual_state == SKIP
195
+ @individual_postal_code = individual_postal_code unless individual_postal_code == SKIP
196
+ @business_legal_name = business_legal_name unless business_legal_name == SKIP
197
+ @business_dba = business_dba unless business_dba == SKIP
198
+ @business_address_country = business_address_country unless business_address_country == SKIP
199
+ @business_street_address1 = business_street_address1 unless business_street_address1 == SKIP
200
+ @business_street_address2 = business_street_address2 unless business_street_address2 == SKIP
201
+ @business_city = business_city unless business_city == SKIP
202
+ @business_state = business_state unless business_state == SKIP
203
+ unless business_legal_entity_identifier == SKIP
204
+ @business_legal_entity_identifier =
205
+ business_legal_entity_identifier
206
+ end
207
+ end
208
+
209
+ # Creates an instance of the object from a hash.
210
+ def self.from_hash(hash)
211
+ return nil unless hash
212
+
213
+ # Extract variables from the hash.
214
+ classification =
215
+ hash.key?('classification') ? hash['classification'] : nil
216
+ tenant_id = hash.key?('tenant_id') ? APIHelper.deserialize_union_type(
217
+ UnionTypeLookUp.get(:CreateCounterpartyRequestTenantId), hash['tenant_id']
218
+ ) : SKIP
219
+ individual_first_name = hash.key?('individual_first_name') ? APIHelper.deserialize_union_type(
220
+ UnionTypeLookUp.get(:CreateCounterpartyRequestIndividualFirstName), hash['individual_first_name']
221
+ ) : SKIP
222
+ individual_last_name = hash.key?('individual_last_name') ? APIHelper.deserialize_union_type(
223
+ UnionTypeLookUp.get(:CreateCounterpartyRequestIndividualLastName), hash['individual_last_name']
224
+ ) : SKIP
225
+ individual_address_country = hash.key?('individual_address_country') ? APIHelper.deserialize_union_type(
226
+ UnionTypeLookUp.get(:CreateCounterpartyRequestIndividualAddressCountry), hash['individual_address_country']
227
+ ) : SKIP
228
+ individual_date_of_birth = hash.key?('individual_date_of_birth') ? APIHelper.deserialize_union_type(
229
+ UnionTypeLookUp.get(:CreateCounterpartyRequestIndividualDateOfBirth), hash['individual_date_of_birth']
230
+ ) : SKIP
231
+ individual_national_identification_number = hash.key?('individual_national_identification_number') ? APIHelper.deserialize_union_type(
232
+ UnionTypeLookUp.get(:CreateCounterpartyRequestIndividualNationalIdentificationNumber), hash['individual_national_identification_number']
233
+ ) : SKIP
234
+ individual_street_address1 = hash.key?('individual_street_address1') ? APIHelper.deserialize_union_type(
235
+ UnionTypeLookUp.get(:CreateCounterpartyRequestIndividualStreetAddress1), hash['individual_street_address1']
236
+ ) : SKIP
237
+ individual_street_address2 = hash.key?('individual_street_address2') ? APIHelper.deserialize_union_type(
238
+ UnionTypeLookUp.get(:CreateCounterpartyRequestIndividualStreetAddress2), hash['individual_street_address2']
239
+ ) : SKIP
240
+ individual_city = hash.key?('individual_city') ? APIHelper.deserialize_union_type(
241
+ UnionTypeLookUp.get(:CreateCounterpartyRequestIndividualCity), hash['individual_city']
242
+ ) : SKIP
243
+ individual_state = hash.key?('individual_state') ? APIHelper.deserialize_union_type(
244
+ UnionTypeLookUp.get(:CreateCounterpartyRequestIndividualState), hash['individual_state']
245
+ ) : SKIP
246
+ individual_postal_code = hash.key?('individual_postal_code') ? APIHelper.deserialize_union_type(
247
+ UnionTypeLookUp.get(:CreateCounterpartyRequestIndividualPostalCode), hash['individual_postal_code']
248
+ ) : SKIP
249
+ business_legal_name = hash.key?('business_legal_name') ? APIHelper.deserialize_union_type(
250
+ UnionTypeLookUp.get(:CreateCounterpartyRequestBusinessLegalName), hash['business_legal_name']
251
+ ) : SKIP
252
+ business_dba = hash.key?('business_dba') ? APIHelper.deserialize_union_type(
253
+ UnionTypeLookUp.get(:CreateCounterpartyRequestBusinessDba), hash['business_dba']
254
+ ) : SKIP
255
+ business_address_country = hash.key?('business_address_country') ? APIHelper.deserialize_union_type(
256
+ UnionTypeLookUp.get(:CreateCounterpartyRequestBusinessAddressCountry), hash['business_address_country']
257
+ ) : SKIP
258
+ business_street_address1 = hash.key?('business_street_address1') ? APIHelper.deserialize_union_type(
259
+ UnionTypeLookUp.get(:CreateCounterpartyRequestBusinessStreetAddress1), hash['business_street_address1']
260
+ ) : SKIP
261
+ business_street_address2 = hash.key?('business_street_address2') ? APIHelper.deserialize_union_type(
262
+ UnionTypeLookUp.get(:CreateCounterpartyRequestBusinessStreetAddress2), hash['business_street_address2']
263
+ ) : SKIP
264
+ business_city = hash.key?('business_city') ? APIHelper.deserialize_union_type(
265
+ UnionTypeLookUp.get(:CreateCounterpartyRequestBusinessCity), hash['business_city']
266
+ ) : SKIP
267
+ business_state = hash.key?('business_state') ? APIHelper.deserialize_union_type(
268
+ UnionTypeLookUp.get(:CreateCounterpartyRequestBusinessState), hash['business_state']
269
+ ) : SKIP
270
+ business_legal_entity_identifier = hash.key?('business_legal_entity_identifier') ? APIHelper.deserialize_union_type(
271
+ UnionTypeLookUp.get(:CreateCounterpartyRequestBusinessLegalEntityIdentifier), hash['business_legal_entity_identifier']
272
+ ) : SKIP
273
+
274
+ # Create object from extracted values.
275
+ CreateCounterpartyRequest.new(classification,
276
+ tenant_id,
277
+ individual_first_name,
278
+ individual_last_name,
279
+ individual_address_country,
280
+ individual_date_of_birth,
281
+ individual_national_identification_number,
282
+ individual_street_address1,
283
+ individual_street_address2,
284
+ individual_city,
285
+ individual_state,
286
+ individual_postal_code,
287
+ business_legal_name,
288
+ business_dba,
289
+ business_address_country,
290
+ business_street_address1,
291
+ business_street_address2,
292
+ business_city,
293
+ business_state,
294
+ business_legal_entity_identifier)
295
+ end
296
+
297
+ # Validates an instance of the object from a given value.
298
+ # @param [CreateCounterpartyRequest | Hash] The value against the validation is performed.
299
+ def self.validate(value)
300
+ if value.instance_of? self
301
+ return APIHelper.valid_type?(value.classification,
302
+ ->(val) { ClassificationEnum.validate(val) })
303
+ end
304
+
305
+ return false unless value.instance_of? Hash
306
+
307
+ APIHelper.valid_type?(value['classification'],
308
+ ->(val) { ClassificationEnum.validate(val) })
309
+ end
310
+
311
+ # Provides a human-readable string representation of the object.
312
+ def to_s
313
+ class_name = self.class.name.split('::').last
314
+ "<#{class_name} classification: #{@classification}, tenant_id: #{@tenant_id},"\
315
+ " individual_first_name: #{@individual_first_name}, individual_last_name:"\
316
+ " #{@individual_last_name}, individual_address_country: #{@individual_address_country},"\
317
+ " individual_date_of_birth: #{@individual_date_of_birth},"\
318
+ " individual_national_identification_number: #{@individual_national_identification_number},"\
319
+ " individual_street_address1: #{@individual_street_address1}, individual_street_address2:"\
320
+ " #{@individual_street_address2}, individual_city: #{@individual_city}, individual_state:"\
321
+ " #{@individual_state}, individual_postal_code: #{@individual_postal_code},"\
322
+ " business_legal_name: #{@business_legal_name}, business_dba: #{@business_dba},"\
323
+ " business_address_country: #{@business_address_country}, business_street_address1:"\
324
+ " #{@business_street_address1}, business_street_address2: #{@business_street_address2},"\
325
+ " business_city: #{@business_city}, business_state: #{@business_state},"\
326
+ " business_legal_entity_identifier: #{@business_legal_entity_identifier}>"
327
+ end
328
+
329
+ # Provides a debugging-friendly string with detailed object information.
330
+ def inspect
331
+ class_name = self.class.name.split('::').last
332
+ "<#{class_name} classification: #{@classification.inspect}, tenant_id:"\
333
+ " #{@tenant_id.inspect}, individual_first_name: #{@individual_first_name.inspect},"\
334
+ " individual_last_name: #{@individual_last_name.inspect}, individual_address_country:"\
335
+ " #{@individual_address_country.inspect}, individual_date_of_birth:"\
336
+ " #{@individual_date_of_birth.inspect}, individual_national_identification_number:"\
337
+ " #{@individual_national_identification_number.inspect}, individual_street_address1:"\
338
+ " #{@individual_street_address1.inspect}, individual_street_address2:"\
339
+ " #{@individual_street_address2.inspect}, individual_city: #{@individual_city.inspect},"\
340
+ " individual_state: #{@individual_state.inspect}, individual_postal_code:"\
341
+ " #{@individual_postal_code.inspect}, business_legal_name: #{@business_legal_name.inspect},"\
342
+ " business_dba: #{@business_dba.inspect}, business_address_country:"\
343
+ " #{@business_address_country.inspect}, business_street_address1:"\
344
+ " #{@business_street_address1.inspect}, business_street_address2:"\
345
+ " #{@business_street_address2.inspect}, business_city: #{@business_city.inspect},"\
346
+ " business_state: #{@business_state.inspect}, business_legal_entity_identifier:"\
347
+ " #{@business_legal_entity_identifier.inspect}>"
348
+ end
349
+ end
350
+ 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
+ # CreateCounterpartyResponse Model.
8
+ class CreateCounterpartyResponse < 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
+ CreateCounterpartyResponse.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,119 @@
1
+ # tesser_apiv1
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module TesserApiv1
7
+ # CreateDepositRequest Model.
8
+ class CreateDepositRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Source currency code.
13
+ # @return [String]
14
+ attr_accessor :from_currency
15
+
16
+ # Destination currency code.
17
+ # @return [String]
18
+ attr_accessor :to_currency
19
+
20
+ # Amount to send. Required if to_amount is missing.
21
+ # @return [String]
22
+ attr_accessor :from_amount
23
+
24
+ # Amount to receive. Required if from_amount is missing.
25
+ # @return [String]
26
+ attr_accessor :to_amount
27
+
28
+ # Optional tenant ID.
29
+ # @return [String]
30
+ attr_accessor :tenant_id
31
+
32
+ # Destination account ID.
33
+ # @return [String]
34
+ attr_accessor :to_account_id
35
+
36
+ # Network for the deposit.
37
+ # @return [String]
38
+ attr_accessor :to_network
39
+
40
+ # A mapping from model property names to API property names.
41
+ def self.names
42
+ @_hash = {} if @_hash.nil?
43
+ @_hash['from_currency'] = 'from_currency'
44
+ @_hash['to_currency'] = 'to_currency'
45
+ @_hash['from_amount'] = 'from_amount'
46
+ @_hash['to_amount'] = 'to_amount'
47
+ @_hash['tenant_id'] = 'tenant_id'
48
+ @_hash['to_account_id'] = 'to_account_id'
49
+ @_hash['to_network'] = 'to_network'
50
+ @_hash
51
+ end
52
+
53
+ # An array for optional fields
54
+ def self.optionals
55
+ %w[
56
+ from_amount
57
+ to_amount
58
+ tenant_id
59
+ ]
60
+ end
61
+
62
+ # An array for nullable fields
63
+ def self.nullables
64
+ []
65
+ end
66
+
67
+ def initialize(from_currency = nil, to_currency = nil, to_account_id = nil,
68
+ to_network = nil, from_amount = SKIP, to_amount = SKIP,
69
+ tenant_id = SKIP)
70
+ @from_currency = from_currency
71
+ @to_currency = to_currency
72
+ @from_amount = from_amount unless from_amount == SKIP
73
+ @to_amount = to_amount unless to_amount == SKIP
74
+ @tenant_id = tenant_id unless tenant_id == SKIP
75
+ @to_account_id = to_account_id
76
+ @to_network = to_network
77
+ end
78
+
79
+ # Creates an instance of the object from a hash.
80
+ def self.from_hash(hash)
81
+ return nil unless hash
82
+
83
+ # Extract variables from the hash.
84
+ from_currency = hash.key?('from_currency') ? hash['from_currency'] : nil
85
+ to_currency = hash.key?('to_currency') ? hash['to_currency'] : nil
86
+ to_account_id = hash.key?('to_account_id') ? hash['to_account_id'] : nil
87
+ to_network = hash.key?('to_network') ? hash['to_network'] : nil
88
+ from_amount = hash.key?('from_amount') ? hash['from_amount'] : SKIP
89
+ to_amount = hash.key?('to_amount') ? hash['to_amount'] : SKIP
90
+ tenant_id = hash.key?('tenant_id') ? hash['tenant_id'] : SKIP
91
+
92
+ # Create object from extracted values.
93
+ CreateDepositRequest.new(from_currency,
94
+ to_currency,
95
+ to_account_id,
96
+ to_network,
97
+ from_amount,
98
+ to_amount,
99
+ tenant_id)
100
+ end
101
+
102
+ # Provides a human-readable string representation of the object.
103
+ def to_s
104
+ class_name = self.class.name.split('::').last
105
+ "<#{class_name} from_currency: #{@from_currency}, to_currency: #{@to_currency},"\
106
+ " from_amount: #{@from_amount}, to_amount: #{@to_amount}, tenant_id: #{@tenant_id},"\
107
+ " to_account_id: #{@to_account_id}, to_network: #{@to_network}>"
108
+ end
109
+
110
+ # Provides a debugging-friendly string with detailed object information.
111
+ def inspect
112
+ class_name = self.class.name.split('::').last
113
+ "<#{class_name} from_currency: #{@from_currency.inspect}, to_currency:"\
114
+ " #{@to_currency.inspect}, from_amount: #{@from_amount.inspect}, to_amount:"\
115
+ " #{@to_amount.inspect}, tenant_id: #{@tenant_id.inspect}, to_account_id:"\
116
+ " #{@to_account_id.inspect}, to_network: #{@to_network.inspect}>"
117
+ end
118
+ end
119
+ end