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,200 @@
|
|
|
1
|
+
# tesser_apiv1
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require_relative 'tenant'
|
|
7
|
+
|
|
8
|
+
module TesserApiv1
|
|
9
|
+
# Data8 Model.
|
|
10
|
+
class Data8 < Tenant
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# A mapping from model property names to API property names.
|
|
14
|
+
def self.names
|
|
15
|
+
@_hash = {} if @_hash.nil?
|
|
16
|
+
|
|
17
|
+
@_hash = super().merge(@_hash)
|
|
18
|
+
@_hash
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# An array for optional fields
|
|
22
|
+
def self.optionals
|
|
23
|
+
_arr = []
|
|
24
|
+
(_arr << super()).flatten!
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# An array for nullable fields
|
|
28
|
+
def self.nullables
|
|
29
|
+
_arr = []
|
|
30
|
+
(_arr << super()).flatten!
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def initialize(id = nil, workspace_id = nil, business_legal_name = nil,
|
|
34
|
+
business_dba = nil, business_address_country = nil,
|
|
35
|
+
business_street_address1 = nil,
|
|
36
|
+
business_street_address2 = nil, business_city = nil,
|
|
37
|
+
business_state = nil, business_legal_entity_identifier = nil,
|
|
38
|
+
country = nil, webhook_url = nil, created_at = nil,
|
|
39
|
+
updated_at = nil)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
# Call the constructor of the base class
|
|
43
|
+
super(id,
|
|
44
|
+
workspace_id,
|
|
45
|
+
business_legal_name,
|
|
46
|
+
business_dba,
|
|
47
|
+
business_address_country,
|
|
48
|
+
business_street_address1,
|
|
49
|
+
business_street_address2,
|
|
50
|
+
business_city,
|
|
51
|
+
business_state,
|
|
52
|
+
business_legal_entity_identifier,
|
|
53
|
+
country,
|
|
54
|
+
webhook_url,
|
|
55
|
+
created_at,
|
|
56
|
+
updated_at)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Creates an instance of the object from a hash.
|
|
60
|
+
def self.from_hash(hash)
|
|
61
|
+
return nil unless hash
|
|
62
|
+
|
|
63
|
+
# Extract variables from the hash.
|
|
64
|
+
id = hash.key?('id') ? hash['id'] : nil
|
|
65
|
+
workspace_id = hash.key?('workspace_id') ? hash['workspace_id'] : nil
|
|
66
|
+
business_legal_name = hash.key?('business_legal_name') ? APIHelper.deserialize_union_type(
|
|
67
|
+
UnionTypeLookUp.get(:TenantBusinessLegalName), hash['business_legal_name']
|
|
68
|
+
) : nil
|
|
69
|
+
business_dba = hash.key?('business_dba') ? APIHelper.deserialize_union_type(
|
|
70
|
+
UnionTypeLookUp.get(:TenantBusinessDba), hash['business_dba']
|
|
71
|
+
) : nil
|
|
72
|
+
business_address_country = hash.key?('business_address_country') ? APIHelper.deserialize_union_type(
|
|
73
|
+
UnionTypeLookUp.get(:TenantBusinessAddressCountry), hash['business_address_country']
|
|
74
|
+
) : nil
|
|
75
|
+
business_street_address1 = hash.key?('business_street_address1') ? APIHelper.deserialize_union_type(
|
|
76
|
+
UnionTypeLookUp.get(:TenantBusinessStreetAddress1), hash['business_street_address1']
|
|
77
|
+
) : nil
|
|
78
|
+
business_street_address2 = hash.key?('business_street_address2') ? APIHelper.deserialize_union_type(
|
|
79
|
+
UnionTypeLookUp.get(:TenantBusinessStreetAddress2), hash['business_street_address2']
|
|
80
|
+
) : nil
|
|
81
|
+
business_city = hash.key?('business_city') ? APIHelper.deserialize_union_type(
|
|
82
|
+
UnionTypeLookUp.get(:TenantBusinessCity), hash['business_city']
|
|
83
|
+
) : nil
|
|
84
|
+
business_state = hash.key?('business_state') ? APIHelper.deserialize_union_type(
|
|
85
|
+
UnionTypeLookUp.get(:TenantBusinessState), hash['business_state']
|
|
86
|
+
) : nil
|
|
87
|
+
business_legal_entity_identifier = hash.key?('business_legal_entity_identifier') ? APIHelper.deserialize_union_type(
|
|
88
|
+
UnionTypeLookUp.get(:TenantBusinessLegalEntityIdentifier), hash['business_legal_entity_identifier']
|
|
89
|
+
) : nil
|
|
90
|
+
country = hash.key?('country') ? APIHelper.deserialize_union_type(
|
|
91
|
+
UnionTypeLookUp.get(:TenantCountry), hash['country']
|
|
92
|
+
) : nil
|
|
93
|
+
webhook_url = hash.key?('webhook_url') ? APIHelper.deserialize_union_type(
|
|
94
|
+
UnionTypeLookUp.get(:TenantWebhookUrl), hash['webhook_url']
|
|
95
|
+
) : nil
|
|
96
|
+
created_at = hash.key?('created_at') ? hash['created_at'] : nil
|
|
97
|
+
updated_at = hash.key?('updated_at') ? hash['updated_at'] : nil
|
|
98
|
+
|
|
99
|
+
# Create object from extracted values.
|
|
100
|
+
Data8.new(id,
|
|
101
|
+
workspace_id,
|
|
102
|
+
business_legal_name,
|
|
103
|
+
business_dba,
|
|
104
|
+
business_address_country,
|
|
105
|
+
business_street_address1,
|
|
106
|
+
business_street_address2,
|
|
107
|
+
business_city,
|
|
108
|
+
business_state,
|
|
109
|
+
business_legal_entity_identifier,
|
|
110
|
+
country,
|
|
111
|
+
webhook_url,
|
|
112
|
+
created_at,
|
|
113
|
+
updated_at)
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Validates an instance of the object from a given value.
|
|
117
|
+
# @param [Data8 | Hash] The value against the validation is performed.
|
|
118
|
+
def self.validate(value)
|
|
119
|
+
if value.instance_of? self
|
|
120
|
+
return (
|
|
121
|
+
APIHelper.valid_type?(value.id,
|
|
122
|
+
->(val) { val.instance_of? String }) and
|
|
123
|
+
APIHelper.valid_type?(value.workspace_id,
|
|
124
|
+
->(val) { val.instance_of? String }) and
|
|
125
|
+
UnionTypeLookUp.get(:TenantBusinessLegalName)
|
|
126
|
+
.validate(value.business_legal_name) and
|
|
127
|
+
UnionTypeLookUp.get(:TenantBusinessDba)
|
|
128
|
+
.validate(value.business_dba) and
|
|
129
|
+
UnionTypeLookUp.get(:TenantBusinessAddressCountry)
|
|
130
|
+
.validate(value.business_address_country) and
|
|
131
|
+
UnionTypeLookUp.get(:TenantBusinessStreetAddress1)
|
|
132
|
+
.validate(value.business_street_address1) and
|
|
133
|
+
UnionTypeLookUp.get(:TenantBusinessStreetAddress2)
|
|
134
|
+
.validate(value.business_street_address2) and
|
|
135
|
+
UnionTypeLookUp.get(:TenantBusinessCity)
|
|
136
|
+
.validate(value.business_city) and
|
|
137
|
+
UnionTypeLookUp.get(:TenantBusinessState)
|
|
138
|
+
.validate(value.business_state) and
|
|
139
|
+
UnionTypeLookUp.get(:TenantBusinessLegalEntityIdentifier)
|
|
140
|
+
.validate(value.business_legal_entity_identifier) and
|
|
141
|
+
UnionTypeLookUp.get(:TenantCountry)
|
|
142
|
+
.validate(value.country) and
|
|
143
|
+
UnionTypeLookUp.get(:TenantWebhookUrl)
|
|
144
|
+
.validate(value.webhook_url) and
|
|
145
|
+
APIHelper.valid_type?(value.created_at,
|
|
146
|
+
->(val) { val.instance_of? String }) and
|
|
147
|
+
APIHelper.valid_type?(value.updated_at,
|
|
148
|
+
->(val) { val.instance_of? String })
|
|
149
|
+
)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
return false unless value.instance_of? Hash
|
|
153
|
+
|
|
154
|
+
(
|
|
155
|
+
APIHelper.valid_type?(value['id'],
|
|
156
|
+
->(val) { val.instance_of? String }) and
|
|
157
|
+
APIHelper.valid_type?(value['workspace_id'],
|
|
158
|
+
->(val) { val.instance_of? String }) and
|
|
159
|
+
UnionTypeLookUp.get(:TenantBusinessLegalName)
|
|
160
|
+
.validate(value['business_legal_name']) and
|
|
161
|
+
UnionTypeLookUp.get(:TenantBusinessDba)
|
|
162
|
+
.validate(value['business_dba']) and
|
|
163
|
+
UnionTypeLookUp.get(:TenantBusinessAddressCountry)
|
|
164
|
+
.validate(value['business_address_country']) and
|
|
165
|
+
UnionTypeLookUp.get(:TenantBusinessStreetAddress1)
|
|
166
|
+
.validate(value['business_street_address1']) and
|
|
167
|
+
UnionTypeLookUp.get(:TenantBusinessStreetAddress2)
|
|
168
|
+
.validate(value['business_street_address2']) and
|
|
169
|
+
UnionTypeLookUp.get(:TenantBusinessCity)
|
|
170
|
+
.validate(value['business_city']) and
|
|
171
|
+
UnionTypeLookUp.get(:TenantBusinessState)
|
|
172
|
+
.validate(value['business_state']) and
|
|
173
|
+
UnionTypeLookUp.get(:TenantBusinessLegalEntityIdentifier)
|
|
174
|
+
.validate(value['business_legal_entity_identifier']) and
|
|
175
|
+
UnionTypeLookUp.get(:TenantCountry)
|
|
176
|
+
.validate(value['country']) and
|
|
177
|
+
UnionTypeLookUp.get(:TenantWebhookUrl)
|
|
178
|
+
.validate(value['webhook_url']) and
|
|
179
|
+
APIHelper.valid_type?(value['created_at'],
|
|
180
|
+
->(val) { val.instance_of? String }) and
|
|
181
|
+
APIHelper.valid_type?(value['updated_at'],
|
|
182
|
+
->(val) { val.instance_of? String })
|
|
183
|
+
)
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Provides a human-readable string representation of the object.
|
|
187
|
+
def to_s
|
|
188
|
+
class_name = self.class.name.split('::').last
|
|
189
|
+
super_string = super().sub(/^<[^ ]+ /, '').sub(/>$/, '')
|
|
190
|
+
"<#{class_name} #{super_string}>"
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
194
|
+
def inspect
|
|
195
|
+
class_name = self.class.name.split('::').last
|
|
196
|
+
super_string = super().inspect.sub(/^<[^ ]+ /, '').sub(/>$/, '')
|
|
197
|
+
"<#{class_name} #{super_string}>"
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
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
|
+
# Payment direction: 'inbound', 'outbound', 'internal'
|
|
8
|
+
class Direction1Enum
|
|
9
|
+
DIRECTION1_ENUM = [
|
|
10
|
+
# TODO: Write general description for INBOUND
|
|
11
|
+
INBOUND = 'inbound'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for OUTBOUND
|
|
14
|
+
OUTBOUND = 'outbound'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for INTERNAL
|
|
17
|
+
INTERNAL = 'internal'.freeze
|
|
18
|
+
].freeze
|
|
19
|
+
|
|
20
|
+
def self.validate(value)
|
|
21
|
+
return false if value.nil?
|
|
22
|
+
|
|
23
|
+
DIRECTION1_ENUM.include?(value)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.from_value(value, default_value = INBOUND)
|
|
27
|
+
return default_value if value.nil?
|
|
28
|
+
|
|
29
|
+
str = value.to_s.strip
|
|
30
|
+
|
|
31
|
+
case str.downcase
|
|
32
|
+
when 'inbound' then INBOUND
|
|
33
|
+
when 'outbound' then OUTBOUND
|
|
34
|
+
when 'internal' then INTERNAL
|
|
35
|
+
else
|
|
36
|
+
default_value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
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
|
+
# Payment direction: 'inbound', 'outbound', 'internal'.
|
|
8
|
+
class DirectionEnum
|
|
9
|
+
DIRECTION_ENUM = [
|
|
10
|
+
# TODO: Write general description for INBOUND
|
|
11
|
+
INBOUND = 'inbound'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for OUTBOUND
|
|
14
|
+
OUTBOUND = 'outbound'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for INTERNAL
|
|
17
|
+
INTERNAL = 'internal'.freeze
|
|
18
|
+
].freeze
|
|
19
|
+
|
|
20
|
+
def self.validate(value)
|
|
21
|
+
return false if value.nil?
|
|
22
|
+
|
|
23
|
+
DIRECTION_ENUM.include?(value)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def self.from_value(value, default_value = INBOUND)
|
|
27
|
+
return default_value if value.nil?
|
|
28
|
+
|
|
29
|
+
str = value.to_s.strip
|
|
30
|
+
|
|
31
|
+
case str.downcase
|
|
32
|
+
when 'inbound' then INBOUND
|
|
33
|
+
when 'outbound' then OUTBOUND
|
|
34
|
+
when 'internal' then INTERNAL
|
|
35
|
+
else
|
|
36
|
+
default_value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# tesser_apiv1
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TesserApiv1
|
|
7
|
+
# ExecutePaymentRequestDto Model.
|
|
8
|
+
class ExecutePaymentRequestDto < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Signature for the specified payment step.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :signature
|
|
15
|
+
|
|
16
|
+
# Optional Turnkey stamp data for server-side signing
|
|
17
|
+
# @return [TurnkeyStamp]
|
|
18
|
+
attr_accessor :turnkey_stamp
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['signature'] = 'signature'
|
|
24
|
+
@_hash['turnkey_stamp'] = 'turnkey_stamp'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
%w[
|
|
31
|
+
turnkey_stamp
|
|
32
|
+
]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# An array for nullable fields
|
|
36
|
+
def self.nullables
|
|
37
|
+
[]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def initialize(signature = nil, turnkey_stamp = SKIP)
|
|
41
|
+
@signature = signature
|
|
42
|
+
@turnkey_stamp = turnkey_stamp unless turnkey_stamp == SKIP
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Creates an instance of the object from a hash.
|
|
46
|
+
def self.from_hash(hash)
|
|
47
|
+
return nil unless hash
|
|
48
|
+
|
|
49
|
+
# Extract variables from the hash.
|
|
50
|
+
signature = hash.key?('signature') ? hash['signature'] : nil
|
|
51
|
+
turnkey_stamp = TurnkeyStamp.from_hash(hash['turnkey_stamp']) if hash['turnkey_stamp']
|
|
52
|
+
|
|
53
|
+
# Create object from extracted values.
|
|
54
|
+
ExecutePaymentRequestDto.new(signature,
|
|
55
|
+
turnkey_stamp)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Provides a human-readable string representation of the object.
|
|
59
|
+
def to_s
|
|
60
|
+
class_name = self.class.name.split('::').last
|
|
61
|
+
"<#{class_name} signature: #{@signature}, turnkey_stamp: #{@turnkey_stamp}>"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
65
|
+
def inspect
|
|
66
|
+
class_name = self.class.name.split('::').last
|
|
67
|
+
"<#{class_name} signature: #{@signature.inspect}, turnkey_stamp:"\
|
|
68
|
+
" #{@turnkey_stamp.inspect}>"
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# tesser_apiv1
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TesserApiv1
|
|
7
|
+
# Fee Model.
|
|
8
|
+
class Fee < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Fee amount.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :fee_amount
|
|
15
|
+
|
|
16
|
+
# Fee currency code.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :fee_currency
|
|
19
|
+
|
|
20
|
+
# Fee type (e.g., 'gas', 'provider').
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :type
|
|
23
|
+
|
|
24
|
+
# Additional metadata for the fee.
|
|
25
|
+
# @return [Object]
|
|
26
|
+
attr_accessor :metadata
|
|
27
|
+
|
|
28
|
+
# A mapping from model property names to API property names.
|
|
29
|
+
def self.names
|
|
30
|
+
@_hash = {} if @_hash.nil?
|
|
31
|
+
@_hash['fee_amount'] = 'fee_amount'
|
|
32
|
+
@_hash['fee_currency'] = 'fee_currency'
|
|
33
|
+
@_hash['type'] = 'type'
|
|
34
|
+
@_hash['metadata'] = 'metadata'
|
|
35
|
+
@_hash
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# An array for optional fields
|
|
39
|
+
def self.optionals
|
|
40
|
+
%w[
|
|
41
|
+
metadata
|
|
42
|
+
]
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# An array for nullable fields
|
|
46
|
+
def self.nullables
|
|
47
|
+
[]
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def initialize(fee_amount = nil, fee_currency = nil, type = nil,
|
|
51
|
+
metadata = SKIP)
|
|
52
|
+
@fee_amount = fee_amount
|
|
53
|
+
@fee_currency = fee_currency
|
|
54
|
+
@type = type
|
|
55
|
+
@metadata = metadata unless metadata == SKIP
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Creates an instance of the object from a hash.
|
|
59
|
+
def self.from_hash(hash)
|
|
60
|
+
return nil unless hash
|
|
61
|
+
|
|
62
|
+
# Extract variables from the hash.
|
|
63
|
+
fee_amount = hash.key?('fee_amount') ? hash['fee_amount'] : nil
|
|
64
|
+
fee_currency = hash.key?('fee_currency') ? hash['fee_currency'] : nil
|
|
65
|
+
type = hash.key?('type') ? hash['type'] : nil
|
|
66
|
+
metadata = hash.key?('metadata') ? APIHelper.deserialize_union_type(
|
|
67
|
+
UnionTypeLookUp.get(:FeeMetadata), hash['metadata']
|
|
68
|
+
) : SKIP
|
|
69
|
+
|
|
70
|
+
# Create object from extracted values.
|
|
71
|
+
Fee.new(fee_amount,
|
|
72
|
+
fee_currency,
|
|
73
|
+
type,
|
|
74
|
+
metadata)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Validates an instance of the object from a given value.
|
|
78
|
+
# @param [Fee | Hash] The value against the validation is performed.
|
|
79
|
+
def self.validate(value)
|
|
80
|
+
if value.instance_of? self
|
|
81
|
+
return (
|
|
82
|
+
APIHelper.valid_type?(value.fee_amount,
|
|
83
|
+
->(val) { val.instance_of? String }) and
|
|
84
|
+
APIHelper.valid_type?(value.fee_currency,
|
|
85
|
+
->(val) { val.instance_of? String }) and
|
|
86
|
+
APIHelper.valid_type?(value.type,
|
|
87
|
+
->(val) { val.instance_of? String })
|
|
88
|
+
)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
return false unless value.instance_of? Hash
|
|
92
|
+
|
|
93
|
+
(
|
|
94
|
+
APIHelper.valid_type?(value['fee_amount'],
|
|
95
|
+
->(val) { val.instance_of? String }) and
|
|
96
|
+
APIHelper.valid_type?(value['fee_currency'],
|
|
97
|
+
->(val) { val.instance_of? String }) and
|
|
98
|
+
APIHelper.valid_type?(value['type'],
|
|
99
|
+
->(val) { val.instance_of? String })
|
|
100
|
+
)
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Provides a human-readable string representation of the object.
|
|
104
|
+
def to_s
|
|
105
|
+
class_name = self.class.name.split('::').last
|
|
106
|
+
"<#{class_name} fee_amount: #{@fee_amount}, fee_currency: #{@fee_currency}, type: #{@type},"\
|
|
107
|
+
" metadata: #{@metadata}>"
|
|
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} fee_amount: #{@fee_amount.inspect}, fee_currency: #{@fee_currency.inspect},"\
|
|
114
|
+
" type: #{@type.inspect}, metadata: #{@metadata.inspect}>"
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# tesser_apiv1
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TesserApiv1
|
|
7
|
+
# Fee1 Model.
|
|
8
|
+
class Fee1 < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Fee amount.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :fee_amount
|
|
15
|
+
|
|
16
|
+
# Fee currency code.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :fee_currency
|
|
19
|
+
|
|
20
|
+
# Fee type (e.g., 'gas', 'provider').
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :type
|
|
23
|
+
|
|
24
|
+
# Additional metadata for the fee (JSON).
|
|
25
|
+
# @return [Object]
|
|
26
|
+
attr_accessor :metadata
|
|
27
|
+
|
|
28
|
+
# A mapping from model property names to API property names.
|
|
29
|
+
def self.names
|
|
30
|
+
@_hash = {} if @_hash.nil?
|
|
31
|
+
@_hash['fee_amount'] = 'fee_amount'
|
|
32
|
+
@_hash['fee_currency'] = 'fee_currency'
|
|
33
|
+
@_hash['type'] = 'type'
|
|
34
|
+
@_hash['metadata'] = 'metadata'
|
|
35
|
+
@_hash
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# An array for optional fields
|
|
39
|
+
def self.optionals
|
|
40
|
+
%w[
|
|
41
|
+
metadata
|
|
42
|
+
]
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# An array for nullable fields
|
|
46
|
+
def self.nullables
|
|
47
|
+
[]
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def initialize(fee_amount = nil, fee_currency = nil, type = nil,
|
|
51
|
+
metadata = SKIP)
|
|
52
|
+
@fee_amount = fee_amount
|
|
53
|
+
@fee_currency = fee_currency
|
|
54
|
+
@type = type
|
|
55
|
+
@metadata = metadata unless metadata == SKIP
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Creates an instance of the object from a hash.
|
|
59
|
+
def self.from_hash(hash)
|
|
60
|
+
return nil unless hash
|
|
61
|
+
|
|
62
|
+
# Extract variables from the hash.
|
|
63
|
+
fee_amount = hash.key?('fee_amount') ? hash['fee_amount'] : nil
|
|
64
|
+
fee_currency = hash.key?('fee_currency') ? hash['fee_currency'] : nil
|
|
65
|
+
type = hash.key?('type') ? hash['type'] : nil
|
|
66
|
+
metadata = hash.key?('metadata') ? APIHelper.deserialize_union_type(
|
|
67
|
+
UnionTypeLookUp.get(:Fee1Metadata), hash['metadata']
|
|
68
|
+
) : SKIP
|
|
69
|
+
|
|
70
|
+
# Create object from extracted values.
|
|
71
|
+
Fee1.new(fee_amount,
|
|
72
|
+
fee_currency,
|
|
73
|
+
type,
|
|
74
|
+
metadata)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Validates an instance of the object from a given value.
|
|
78
|
+
# @param [Fee1 | Hash] The value against the validation is performed.
|
|
79
|
+
def self.validate(value)
|
|
80
|
+
if value.instance_of? self
|
|
81
|
+
return (
|
|
82
|
+
APIHelper.valid_type?(value.fee_amount,
|
|
83
|
+
->(val) { val.instance_of? String }) and
|
|
84
|
+
APIHelper.valid_type?(value.fee_currency,
|
|
85
|
+
->(val) { val.instance_of? String }) and
|
|
86
|
+
APIHelper.valid_type?(value.type,
|
|
87
|
+
->(val) { val.instance_of? String })
|
|
88
|
+
)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
return false unless value.instance_of? Hash
|
|
92
|
+
|
|
93
|
+
(
|
|
94
|
+
APIHelper.valid_type?(value['fee_amount'],
|
|
95
|
+
->(val) { val.instance_of? String }) and
|
|
96
|
+
APIHelper.valid_type?(value['fee_currency'],
|
|
97
|
+
->(val) { val.instance_of? String }) and
|
|
98
|
+
APIHelper.valid_type?(value['type'],
|
|
99
|
+
->(val) { val.instance_of? String })
|
|
100
|
+
)
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Provides a human-readable string representation of the object.
|
|
104
|
+
def to_s
|
|
105
|
+
class_name = self.class.name.split('::').last
|
|
106
|
+
"<#{class_name} fee_amount: #{@fee_amount}, fee_currency: #{@fee_currency}, type: #{@type},"\
|
|
107
|
+
" metadata: #{@metadata}>"
|
|
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} fee_amount: #{@fee_amount.inspect}, fee_currency: #{@fee_currency.inspect},"\
|
|
114
|
+
" type: #{@type.inspect}, metadata: #{@metadata.inspect}>"
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# tesser_apiv1
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TesserApiv1
|
|
7
|
+
# Network Model.
|
|
8
|
+
class Network < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Network key/identifier (e.g., 'POLYGON', 'ETHEREUM')
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :key
|
|
15
|
+
|
|
16
|
+
# Display name for the network (e.g., 'Polygon')
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :name
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['key'] = 'key'
|
|
24
|
+
@_hash['name'] = 'name'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
[]
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for nullable fields
|
|
34
|
+
def self.nullables
|
|
35
|
+
[]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def initialize(key = nil, name = nil)
|
|
39
|
+
@key = key
|
|
40
|
+
@name = name
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Creates an instance of the object from a hash.
|
|
44
|
+
def self.from_hash(hash)
|
|
45
|
+
return nil unless hash
|
|
46
|
+
|
|
47
|
+
# Extract variables from the hash.
|
|
48
|
+
key = hash.key?('key') ? hash['key'] : nil
|
|
49
|
+
name = hash.key?('name') ? hash['name'] : nil
|
|
50
|
+
|
|
51
|
+
# Create object from extracted values.
|
|
52
|
+
Network.new(key,
|
|
53
|
+
name)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Provides a human-readable string representation of the object.
|
|
57
|
+
def to_s
|
|
58
|
+
class_name = self.class.name.split('::').last
|
|
59
|
+
"<#{class_name} key: #{@key}, name: #{@name}>"
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
63
|
+
def inspect
|
|
64
|
+
class_name = self.class.name.split('::').last
|
|
65
|
+
"<#{class_name} key: #{@key.inspect}, name: #{@name.inspect}>"
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|