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,422 @@
1
+ # tesser_apiv1
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ require 'date'
7
+ module TesserApiv1
8
+ # TransferStep Model.
9
+ class TransferStep < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Unique identifier for the step.
14
+ # @return [String]
15
+ attr_accessor :id
16
+
17
+ # ID of the parent payment/transfer.
18
+ # @return [String]
19
+ attr_accessor :transfer_id
20
+
21
+ # Step sequence number (0-based or 1-based).
22
+ # @return [Integer]
23
+ attr_accessor :step_sequence
24
+
25
+ # Step type: 'stablecoin_transfer', 'offramp', 'onramp', 'fiat_transfer'.
26
+ # @return [StepTypeEnum]
27
+ attr_accessor :step_type
28
+
29
+ # Source account asset ID for this step.
30
+ # @return [Object]
31
+ attr_accessor :from_account_asset_id
32
+
33
+ # Amount sent in this step.
34
+ # @return [String]
35
+ attr_accessor :from_amount
36
+
37
+ # Currency code sent in this step.
38
+ # @return [String]
39
+ attr_accessor :from_currency
40
+
41
+ # Destination account asset ID for this step.
42
+ # @return [Object]
43
+ attr_accessor :to_account_asset_id
44
+
45
+ # Amount received in this step.
46
+ # @return [String]
47
+ attr_accessor :to_amount
48
+
49
+ # Currency code received in this step.
50
+ # @return [String]
51
+ attr_accessor :to_currency
52
+
53
+ # Blockchain transaction hash (for crypto steps).
54
+ # @return [Object]
55
+ attr_accessor :transaction_hash
56
+
57
+ # List of fees associated with this step.
58
+ # @return [Array[Fee1]]
59
+ attr_accessor :fees
60
+
61
+ # Provider key used for this step (if applicable).
62
+ # @return [ProviderKey1Enum]
63
+ attr_accessor :provider_key
64
+
65
+ # Step status: 'created', 'submitted', 'confirmed', 'finalized', 'failed'.
66
+ # @return [StatusEnum]
67
+ attr_accessor :status
68
+
69
+ # Array of reasons explaining the current status (if any).
70
+ # @return [Array[String]]
71
+ attr_accessor :status_reasons
72
+
73
+ # Submitted timestamp.
74
+ # @return [Object]
75
+ attr_accessor :submitted_at
76
+
77
+ # Confirmed timestamp.
78
+ # @return [Object]
79
+ attr_accessor :confirmed_at
80
+
81
+ # Finalized timestamp.
82
+ # @return [Object]
83
+ attr_accessor :finalized_at
84
+
85
+ # Completed timestamp.
86
+ # @return [Object]
87
+ attr_accessor :completed_at
88
+
89
+ # Failed timestamp.
90
+ # @return [Object]
91
+ attr_accessor :failed_at
92
+
93
+ # ISO 8601 timestamp of creation.
94
+ # @return [DateTime]
95
+ attr_accessor :created_at
96
+
97
+ # ISO 8601 timestamp of last update.
98
+ # @return [DateTime]
99
+ attr_accessor :updated_at
100
+
101
+ # Source account ID for this step.
102
+ # @return [Object]
103
+ attr_accessor :from_account_id
104
+
105
+ # Destination account ID for this step.
106
+ # @return [Object]
107
+ attr_accessor :to_account_id
108
+
109
+ # A mapping from model property names to API property names.
110
+ def self.names
111
+ @_hash = {} if @_hash.nil?
112
+ @_hash['id'] = 'id'
113
+ @_hash['transfer_id'] = 'transfer_id'
114
+ @_hash['step_sequence'] = 'step_sequence'
115
+ @_hash['step_type'] = 'step_type'
116
+ @_hash['from_account_asset_id'] = 'from_account_asset_id'
117
+ @_hash['from_amount'] = 'from_amount'
118
+ @_hash['from_currency'] = 'from_currency'
119
+ @_hash['to_account_asset_id'] = 'to_account_asset_id'
120
+ @_hash['to_amount'] = 'to_amount'
121
+ @_hash['to_currency'] = 'to_currency'
122
+ @_hash['transaction_hash'] = 'transaction_hash'
123
+ @_hash['fees'] = 'fees'
124
+ @_hash['provider_key'] = 'provider_key'
125
+ @_hash['status'] = 'status'
126
+ @_hash['status_reasons'] = 'status_reasons'
127
+ @_hash['submitted_at'] = 'submitted_at'
128
+ @_hash['confirmed_at'] = 'confirmed_at'
129
+ @_hash['finalized_at'] = 'finalized_at'
130
+ @_hash['completed_at'] = 'completed_at'
131
+ @_hash['failed_at'] = 'failed_at'
132
+ @_hash['created_at'] = 'created_at'
133
+ @_hash['updated_at'] = 'updated_at'
134
+ @_hash['from_account_id'] = 'from_account_id'
135
+ @_hash['to_account_id'] = 'to_account_id'
136
+ @_hash
137
+ end
138
+
139
+ # An array for optional fields
140
+ def self.optionals
141
+ %w[
142
+ from_account_asset_id
143
+ to_account_asset_id
144
+ transaction_hash
145
+ fees
146
+ provider_key
147
+ status_reasons
148
+ submitted_at
149
+ confirmed_at
150
+ finalized_at
151
+ completed_at
152
+ failed_at
153
+ from_account_id
154
+ to_account_id
155
+ ]
156
+ end
157
+
158
+ # An array for nullable fields
159
+ def self.nullables
160
+ %w[
161
+ provider_key
162
+ status_reasons
163
+ ]
164
+ end
165
+
166
+ def initialize(id = nil, transfer_id = nil, step_sequence = nil,
167
+ step_type = nil, from_amount = nil, from_currency = nil,
168
+ to_amount = nil, to_currency = nil, status = nil,
169
+ created_at = nil, updated_at = nil,
170
+ from_account_asset_id = SKIP, to_account_asset_id = SKIP,
171
+ transaction_hash = SKIP, fees = SKIP, provider_key = SKIP,
172
+ status_reasons = SKIP, submitted_at = SKIP,
173
+ confirmed_at = SKIP, finalized_at = SKIP,
174
+ completed_at = SKIP, failed_at = SKIP,
175
+ from_account_id = SKIP, to_account_id = SKIP)
176
+ @id = id
177
+ @transfer_id = transfer_id
178
+ @step_sequence = step_sequence
179
+ @step_type = step_type
180
+ @from_account_asset_id = from_account_asset_id unless from_account_asset_id == SKIP
181
+ @from_amount = from_amount
182
+ @from_currency = from_currency
183
+ @to_account_asset_id = to_account_asset_id unless to_account_asset_id == SKIP
184
+ @to_amount = to_amount
185
+ @to_currency = to_currency
186
+ @transaction_hash = transaction_hash unless transaction_hash == SKIP
187
+ @fees = fees unless fees == SKIP
188
+ @provider_key = provider_key unless provider_key == SKIP
189
+ @status = status
190
+ @status_reasons = status_reasons unless status_reasons == SKIP
191
+ @submitted_at = submitted_at unless submitted_at == SKIP
192
+ @confirmed_at = confirmed_at unless confirmed_at == SKIP
193
+ @finalized_at = finalized_at unless finalized_at == SKIP
194
+ @completed_at = completed_at unless completed_at == SKIP
195
+ @failed_at = failed_at unless failed_at == SKIP
196
+ @created_at = created_at
197
+ @updated_at = updated_at
198
+ @from_account_id = from_account_id unless from_account_id == SKIP
199
+ @to_account_id = to_account_id unless to_account_id == SKIP
200
+ end
201
+
202
+ # Creates an instance of the object from a hash.
203
+ def self.from_hash(hash)
204
+ return nil unless hash
205
+
206
+ # Extract variables from the hash.
207
+ id = hash.key?('id') ? hash['id'] : nil
208
+ transfer_id = hash.key?('transfer_id') ? hash['transfer_id'] : nil
209
+ step_sequence = hash.key?('step_sequence') ? hash['step_sequence'] : nil
210
+ step_type = hash.key?('step_type') ? hash['step_type'] : nil
211
+ from_amount = hash.key?('from_amount') ? hash['from_amount'] : nil
212
+ from_currency = hash.key?('from_currency') ? hash['from_currency'] : nil
213
+ to_amount = hash.key?('to_amount') ? hash['to_amount'] : nil
214
+ to_currency = hash.key?('to_currency') ? hash['to_currency'] : nil
215
+ status = hash.key?('status') ? hash['status'] : nil
216
+ created_at = if hash.key?('created_at')
217
+ (DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at'])
218
+ end
219
+ updated_at = if hash.key?('updated_at')
220
+ (DateTimeHelper.from_rfc3339(hash['updated_at']) if hash['updated_at'])
221
+ end
222
+ from_account_asset_id = hash.key?('from_account_asset_id') ? APIHelper.deserialize_union_type(
223
+ UnionTypeLookUp.get(:TransferStepFromAccountAssetId), hash['from_account_asset_id']
224
+ ) : SKIP
225
+ to_account_asset_id = hash.key?('to_account_asset_id') ? APIHelper.deserialize_union_type(
226
+ UnionTypeLookUp.get(:TransferStepToAccountAssetId), hash['to_account_asset_id']
227
+ ) : SKIP
228
+ transaction_hash = hash.key?('transaction_hash') ? APIHelper.deserialize_union_type(
229
+ UnionTypeLookUp.get(:TransferStepTransactionHash), hash['transaction_hash']
230
+ ) : SKIP
231
+ # Parameter is an array, so we need to iterate through it
232
+ fees = nil
233
+ unless hash['fees'].nil?
234
+ fees = []
235
+ hash['fees'].each do |structure|
236
+ fees << (Fee1.from_hash(structure) if structure)
237
+ end
238
+ end
239
+
240
+ fees = SKIP unless hash.key?('fees')
241
+ provider_key = hash.key?('provider_key') ? APIHelper.deserialize_union_type(
242
+ UnionTypeLookUp.get(:TransferStepProviderKey), hash['provider_key']
243
+ ) : SKIP
244
+ status_reasons =
245
+ hash.key?('status_reasons') ? hash['status_reasons'] : SKIP
246
+ submitted_at = hash.key?('submitted_at') ? APIHelper.deserialize_union_type(
247
+ UnionTypeLookUp.get(:TransferStepSubmittedAt), hash['submitted_at']
248
+ ) : SKIP
249
+ confirmed_at = hash.key?('confirmed_at') ? APIHelper.deserialize_union_type(
250
+ UnionTypeLookUp.get(:TransferStepConfirmedAt), hash['confirmed_at']
251
+ ) : SKIP
252
+ finalized_at = hash.key?('finalized_at') ? APIHelper.deserialize_union_type(
253
+ UnionTypeLookUp.get(:TransferStepFinalizedAt), hash['finalized_at']
254
+ ) : SKIP
255
+ completed_at = hash.key?('completed_at') ? APIHelper.deserialize_union_type(
256
+ UnionTypeLookUp.get(:TransferStepCompletedAt), hash['completed_at']
257
+ ) : SKIP
258
+ failed_at = hash.key?('failed_at') ? APIHelper.deserialize_union_type(
259
+ UnionTypeLookUp.get(:TransferStepFailedAt), hash['failed_at']
260
+ ) : SKIP
261
+ from_account_id = hash.key?('from_account_id') ? APIHelper.deserialize_union_type(
262
+ UnionTypeLookUp.get(:TransferStepFromAccountId), hash['from_account_id']
263
+ ) : SKIP
264
+ to_account_id = hash.key?('to_account_id') ? APIHelper.deserialize_union_type(
265
+ UnionTypeLookUp.get(:TransferStepToAccountId), hash['to_account_id']
266
+ ) : SKIP
267
+
268
+ # Create object from extracted values.
269
+ TransferStep.new(id,
270
+ transfer_id,
271
+ step_sequence,
272
+ step_type,
273
+ from_amount,
274
+ from_currency,
275
+ to_amount,
276
+ to_currency,
277
+ status,
278
+ created_at,
279
+ updated_at,
280
+ from_account_asset_id,
281
+ to_account_asset_id,
282
+ transaction_hash,
283
+ fees,
284
+ provider_key,
285
+ status_reasons,
286
+ submitted_at,
287
+ confirmed_at,
288
+ finalized_at,
289
+ completed_at,
290
+ failed_at,
291
+ from_account_id,
292
+ to_account_id)
293
+ end
294
+
295
+ def to_union_type_submitted_at
296
+ UnionTypeLookUp.get(:TransferStepSubmittedAt)
297
+ .validate(submitted_at)
298
+ .serialize(submitted_at)
299
+ end
300
+
301
+ def to_union_type_confirmed_at
302
+ UnionTypeLookUp.get(:TransferStepConfirmedAt)
303
+ .validate(confirmed_at)
304
+ .serialize(confirmed_at)
305
+ end
306
+
307
+ def to_union_type_finalized_at
308
+ UnionTypeLookUp.get(:TransferStepFinalizedAt)
309
+ .validate(finalized_at)
310
+ .serialize(finalized_at)
311
+ end
312
+
313
+ def to_union_type_completed_at
314
+ UnionTypeLookUp.get(:TransferStepCompletedAt)
315
+ .validate(completed_at)
316
+ .serialize(completed_at)
317
+ end
318
+
319
+ def to_union_type_failed_at
320
+ UnionTypeLookUp.get(:TransferStepFailedAt)
321
+ .validate(failed_at)
322
+ .serialize(failed_at)
323
+ end
324
+
325
+ def to_custom_created_at
326
+ DateTimeHelper.to_rfc3339(created_at)
327
+ end
328
+
329
+ def to_custom_updated_at
330
+ DateTimeHelper.to_rfc3339(updated_at)
331
+ end
332
+
333
+ # Validates an instance of the object from a given value.
334
+ # @param [TransferStep | Hash] The value against the validation is performed.
335
+ def self.validate(value)
336
+ if value.instance_of? self
337
+ return (
338
+ APIHelper.valid_type?(value.id,
339
+ ->(val) { val.instance_of? String }) and
340
+ APIHelper.valid_type?(value.transfer_id,
341
+ ->(val) { val.instance_of? String }) and
342
+ APIHelper.valid_type?(value.step_sequence,
343
+ ->(val) { val.instance_of? Integer }) and
344
+ APIHelper.valid_type?(value.step_type,
345
+ ->(val) { StepTypeEnum.validate(val) }) and
346
+ APIHelper.valid_type?(value.from_amount,
347
+ ->(val) { val.instance_of? String }) and
348
+ APIHelper.valid_type?(value.from_currency,
349
+ ->(val) { val.instance_of? String }) and
350
+ APIHelper.valid_type?(value.to_amount,
351
+ ->(val) { val.instance_of? String }) and
352
+ APIHelper.valid_type?(value.to_currency,
353
+ ->(val) { val.instance_of? String }) and
354
+ APIHelper.valid_type?(value.status,
355
+ ->(val) { StatusEnum.validate(val) }) and
356
+ APIHelper.valid_type?(value.created_at,
357
+ ->(val) { val.instance_of? DateTime }) and
358
+ APIHelper.valid_type?(value.updated_at,
359
+ ->(val) { val.instance_of? DateTime })
360
+ )
361
+ end
362
+
363
+ return false unless value.instance_of? Hash
364
+
365
+ (
366
+ APIHelper.valid_type?(value['id'],
367
+ ->(val) { val.instance_of? String }) and
368
+ APIHelper.valid_type?(value['transfer_id'],
369
+ ->(val) { val.instance_of? String }) and
370
+ APIHelper.valid_type?(value['step_sequence'],
371
+ ->(val) { val.instance_of? Integer }) and
372
+ APIHelper.valid_type?(value['step_type'],
373
+ ->(val) { StepTypeEnum.validate(val) }) and
374
+ APIHelper.valid_type?(value['from_amount'],
375
+ ->(val) { val.instance_of? String }) and
376
+ APIHelper.valid_type?(value['from_currency'],
377
+ ->(val) { val.instance_of? String }) and
378
+ APIHelper.valid_type?(value['to_amount'],
379
+ ->(val) { val.instance_of? String }) and
380
+ APIHelper.valid_type?(value['to_currency'],
381
+ ->(val) { val.instance_of? String }) and
382
+ APIHelper.valid_type?(value['status'],
383
+ ->(val) { StatusEnum.validate(val) }) and
384
+ APIHelper.valid_type?(value['created_at'],
385
+ ->(val) { val.instance_of? String }) and
386
+ APIHelper.valid_type?(value['updated_at'],
387
+ ->(val) { val.instance_of? String })
388
+ )
389
+ end
390
+
391
+ # Provides a human-readable string representation of the object.
392
+ def to_s
393
+ class_name = self.class.name.split('::').last
394
+ "<#{class_name} id: #{@id}, transfer_id: #{@transfer_id}, step_sequence: #{@step_sequence},"\
395
+ " step_type: #{@step_type}, from_account_asset_id: #{@from_account_asset_id}, from_amount:"\
396
+ " #{@from_amount}, from_currency: #{@from_currency}, to_account_asset_id:"\
397
+ " #{@to_account_asset_id}, to_amount: #{@to_amount}, to_currency: #{@to_currency},"\
398
+ " transaction_hash: #{@transaction_hash}, fees: #{@fees}, provider_key: #{@provider_key},"\
399
+ " status: #{@status}, status_reasons: #{@status_reasons}, submitted_at: #{@submitted_at},"\
400
+ " confirmed_at: #{@confirmed_at}, finalized_at: #{@finalized_at}, completed_at:"\
401
+ " #{@completed_at}, failed_at: #{@failed_at}, created_at: #{@created_at}, updated_at:"\
402
+ " #{@updated_at}, from_account_id: #{@from_account_id}, to_account_id: #{@to_account_id}>"
403
+ end
404
+
405
+ # Provides a debugging-friendly string with detailed object information.
406
+ def inspect
407
+ class_name = self.class.name.split('::').last
408
+ "<#{class_name} id: #{@id.inspect}, transfer_id: #{@transfer_id.inspect}, step_sequence:"\
409
+ " #{@step_sequence.inspect}, step_type: #{@step_type.inspect}, from_account_asset_id:"\
410
+ " #{@from_account_asset_id.inspect}, from_amount: #{@from_amount.inspect}, from_currency:"\
411
+ " #{@from_currency.inspect}, to_account_asset_id: #{@to_account_asset_id.inspect},"\
412
+ " to_amount: #{@to_amount.inspect}, to_currency: #{@to_currency.inspect}, transaction_hash:"\
413
+ " #{@transaction_hash.inspect}, fees: #{@fees.inspect}, provider_key:"\
414
+ " #{@provider_key.inspect}, status: #{@status.inspect}, status_reasons:"\
415
+ " #{@status_reasons.inspect}, submitted_at: #{@submitted_at.inspect}, confirmed_at:"\
416
+ " #{@confirmed_at.inspect}, finalized_at: #{@finalized_at.inspect}, completed_at:"\
417
+ " #{@completed_at.inspect}, failed_at: #{@failed_at.inspect}, created_at:"\
418
+ " #{@created_at.inspect}, updated_at: #{@updated_at.inspect}, from_account_id:"\
419
+ " #{@from_account_id.inspect}, to_account_id: #{@to_account_id.inspect}>"
420
+ end
421
+ end
422
+ end
@@ -0,0 +1,81 @@
1
+ # tesser_apiv1
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module TesserApiv1
7
+ # Optional Turnkey stamp data for server-side signing
8
+ class TurnkeyStamp < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :stamp_header_name
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :stamp_header_value
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [String]
22
+ attr_accessor :turnkey_body
23
+
24
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['stamp_header_name'] = 'stampHeaderName'
28
+ @_hash['stamp_header_value'] = 'stampHeaderValue'
29
+ @_hash['turnkey_body'] = 'turnkeyBody'
30
+ @_hash
31
+ end
32
+
33
+ # An array for optional fields
34
+ def self.optionals
35
+ []
36
+ end
37
+
38
+ # An array for nullable fields
39
+ def self.nullables
40
+ []
41
+ end
42
+
43
+ def initialize(stamp_header_name = nil, stamp_header_value = nil,
44
+ turnkey_body = nil)
45
+ @stamp_header_name = stamp_header_name
46
+ @stamp_header_value = stamp_header_value
47
+ @turnkey_body = turnkey_body
48
+ end
49
+
50
+ # Creates an instance of the object from a hash.
51
+ def self.from_hash(hash)
52
+ return nil unless hash
53
+
54
+ # Extract variables from the hash.
55
+ stamp_header_name =
56
+ hash.key?('stampHeaderName') ? hash['stampHeaderName'] : nil
57
+ stamp_header_value =
58
+ hash.key?('stampHeaderValue') ? hash['stampHeaderValue'] : nil
59
+ turnkey_body = hash.key?('turnkeyBody') ? hash['turnkeyBody'] : nil
60
+
61
+ # Create object from extracted values.
62
+ TurnkeyStamp.new(stamp_header_name,
63
+ stamp_header_value,
64
+ turnkey_body)
65
+ end
66
+
67
+ # Provides a human-readable string representation of the object.
68
+ def to_s
69
+ class_name = self.class.name.split('::').last
70
+ "<#{class_name} stamp_header_name: #{@stamp_header_name}, stamp_header_value:"\
71
+ " #{@stamp_header_value}, turnkey_body: #{@turnkey_body}>"
72
+ end
73
+
74
+ # Provides a debugging-friendly string with detailed object information.
75
+ def inspect
76
+ class_name = self.class.name.split('::').last
77
+ "<#{class_name} stamp_header_name: #{@stamp_header_name.inspect}, stamp_header_value:"\
78
+ " #{@stamp_header_value.inspect}, turnkey_body: #{@turnkey_body.inspect}>"
79
+ end
80
+ end
81
+ end
@@ -0,0 +1,40 @@
1
+ # tesser_apiv1
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module TesserApiv1
7
+ # Wallet type.
8
+ class Type3Enum
9
+ TYPE3_ENUM = [
10
+ # TODO: Write general description for STABLECOIN_ETHEREUM
11
+ STABLECOIN_ETHEREUM = 'stablecoin_ethereum'.freeze,
12
+
13
+ # TODO: Write general description for STABLECOIN_SOLANA
14
+ STABLECOIN_SOLANA = 'stablecoin_solana'.freeze,
15
+
16
+ # TODO: Write general description for STABLECOIN_STELLAR
17
+ STABLECOIN_STELLAR = 'stablecoin_stellar'.freeze
18
+ ].freeze
19
+
20
+ def self.validate(value)
21
+ return false if value.nil?
22
+
23
+ TYPE3_ENUM.include?(value)
24
+ end
25
+
26
+ def self.from_value(value, default_value = STABLECOIN_ETHEREUM)
27
+ return default_value if value.nil?
28
+
29
+ str = value.to_s.strip
30
+
31
+ case str.downcase
32
+ when 'stablecoin_ethereum' then STABLECOIN_ETHEREUM
33
+ when 'stablecoin_solana' then STABLECOIN_SOLANA
34
+ when 'stablecoin_stellar' then STABLECOIN_STELLAR
35
+ else
36
+ default_value
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,44 @@
1
+ # tesser_apiv1
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module TesserApiv1
7
+ # type4.
8
+ class Type4Enum
9
+ TYPE4_ENUM = [
10
+ # TODO: Write general description for FIAT_BANK
11
+ FIAT_BANK = 'fiat_bank'.freeze,
12
+
13
+ # TODO: Write general description for STABLECOIN_ETHEREUM
14
+ STABLECOIN_ETHEREUM = 'stablecoin_ethereum'.freeze,
15
+
16
+ # TODO: Write general description for STABLECOIN_SOLANA
17
+ STABLECOIN_SOLANA = 'stablecoin_solana'.freeze,
18
+
19
+ # TODO: Write general description for STABLECOIN_STELLAR
20
+ STABLECOIN_STELLAR = 'stablecoin_stellar'.freeze
21
+ ].freeze
22
+
23
+ def self.validate(value)
24
+ return false if value.nil?
25
+
26
+ TYPE4_ENUM.include?(value)
27
+ end
28
+
29
+ def self.from_value(value, default_value = FIAT_BANK)
30
+ return default_value if value.nil?
31
+
32
+ str = value.to_s.strip
33
+
34
+ case str.downcase
35
+ when 'fiat_bank' then FIAT_BANK
36
+ when 'stablecoin_ethereum' then STABLECOIN_ETHEREUM
37
+ when 'stablecoin_solana' then STABLECOIN_SOLANA
38
+ when 'stablecoin_stellar' then STABLECOIN_STELLAR
39
+ else
40
+ default_value
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,44 @@
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 type.
8
+ class TypeEnum
9
+ TYPE_ENUM = [
10
+ # TODO: Write general description for FIAT_BANK
11
+ FIAT_BANK = 'fiat_bank'.freeze,
12
+
13
+ # TODO: Write general description for STABLECOIN_ETHEREUM
14
+ STABLECOIN_ETHEREUM = 'stablecoin_ethereum'.freeze,
15
+
16
+ # TODO: Write general description for STABLECOIN_SOLANA
17
+ STABLECOIN_SOLANA = 'stablecoin_solana'.freeze,
18
+
19
+ # TODO: Write general description for STABLECOIN_STELLAR
20
+ STABLECOIN_STELLAR = 'stablecoin_stellar'.freeze
21
+ ].freeze
22
+
23
+ def self.validate(value)
24
+ return false if value.nil?
25
+
26
+ TYPE_ENUM.include?(value)
27
+ end
28
+
29
+ def self.from_value(value, default_value = FIAT_BANK)
30
+ return default_value if value.nil?
31
+
32
+ str = value.to_s.strip
33
+
34
+ case str.downcase
35
+ when 'fiat_bank' then FIAT_BANK
36
+ when 'stablecoin_ethereum' then STABLECOIN_ETHEREUM
37
+ when 'stablecoin_solana' then STABLECOIN_SOLANA
38
+ when 'stablecoin_stellar' then STABLECOIN_STELLAR
39
+ else
40
+ default_value
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,62 @@
1
+ # tesser_apiv1
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module TesserApiv1
7
+ # UpdateAccountRequest Model.
8
+ class UpdateAccountRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # New name for the account.
13
+ # @return [String]
14
+ attr_accessor :name
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['name'] = 'name'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ name
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(name = SKIP)
36
+ @name = name unless name == SKIP
37
+ end
38
+
39
+ # Creates an instance of the object from a hash.
40
+ def self.from_hash(hash)
41
+ return nil unless hash
42
+
43
+ # Extract variables from the hash.
44
+ name = hash.key?('name') ? hash['name'] : SKIP
45
+
46
+ # Create object from extracted values.
47
+ UpdateAccountRequest.new(name)
48
+ end
49
+
50
+ # Provides a human-readable string representation of the object.
51
+ def to_s
52
+ class_name = self.class.name.split('::').last
53
+ "<#{class_name} name: #{@name}>"
54
+ end
55
+
56
+ # Provides a debugging-friendly string with detailed object information.
57
+ def inspect
58
+ class_name = self.class.name.split('::').last
59
+ "<#{class_name} name: #{@name.inspect}>"
60
+ end
61
+ end
62
+ end