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
+ # UpdateAccountResponse Model.
8
+ class UpdateAccountResponse < 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
+ UpdateAccountResponse.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,166 @@
1
+ # tesser_apiv1
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module TesserApiv1
7
+ # UpdateCounterpartyRequest Model.
8
+ class UpdateCounterpartyRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Classification: 'individual' or 'business'.
13
+ # @return [ClassificationEnum]
14
+ attr_accessor :classification
15
+
16
+ # Updated tenant ID.
17
+ # @return [Object]
18
+ attr_accessor :tenant_id
19
+
20
+ # Updated first name. Secure field, returned based on include_secure.
21
+ # @return [Object]
22
+ attr_accessor :individual_first_name
23
+
24
+ # Updated last name. Secure field, returned based on include_secure.
25
+ # @return [Object]
26
+ attr_accessor :individual_last_name
27
+
28
+ # Updated individual country code.
29
+ # @return [Object]
30
+ attr_accessor :individual_address_country
31
+
32
+ # Updated business legal name.
33
+ # @return [Object]
34
+ attr_accessor :business_legal_name
35
+
36
+ # Updated business DBA.
37
+ # @return [Object]
38
+ attr_accessor :business_dba
39
+
40
+ # Updated business country code.
41
+ # @return [Object]
42
+ attr_accessor :business_address_country
43
+
44
+ # A mapping from model property names to API property names.
45
+ def self.names
46
+ @_hash = {} if @_hash.nil?
47
+ @_hash['classification'] = 'classification'
48
+ @_hash['tenant_id'] = 'tenant_id'
49
+ @_hash['individual_first_name'] = 'individual_first_name'
50
+ @_hash['individual_last_name'] = 'individual_last_name'
51
+ @_hash['individual_address_country'] = 'individual_address_country'
52
+ @_hash['business_legal_name'] = 'business_legal_name'
53
+ @_hash['business_dba'] = 'business_dba'
54
+ @_hash['business_address_country'] = 'business_address_country'
55
+ @_hash
56
+ end
57
+
58
+ # An array for optional fields
59
+ def self.optionals
60
+ %w[
61
+ classification
62
+ tenant_id
63
+ individual_first_name
64
+ individual_last_name
65
+ individual_address_country
66
+ business_legal_name
67
+ business_dba
68
+ business_address_country
69
+ ]
70
+ end
71
+
72
+ # An array for nullable fields
73
+ def self.nullables
74
+ []
75
+ end
76
+
77
+ def initialize(classification = SKIP, tenant_id = SKIP,
78
+ individual_first_name = SKIP, individual_last_name = SKIP,
79
+ individual_address_country = SKIP,
80
+ business_legal_name = SKIP, business_dba = SKIP,
81
+ business_address_country = SKIP)
82
+ @classification = classification unless classification == SKIP
83
+ @tenant_id = tenant_id unless tenant_id == SKIP
84
+ @individual_first_name = individual_first_name unless individual_first_name == SKIP
85
+ @individual_last_name = individual_last_name unless individual_last_name == SKIP
86
+ unless individual_address_country == SKIP
87
+ @individual_address_country =
88
+ individual_address_country
89
+ end
90
+ @business_legal_name = business_legal_name unless business_legal_name == SKIP
91
+ @business_dba = business_dba unless business_dba == SKIP
92
+ @business_address_country = business_address_country unless business_address_country == SKIP
93
+ end
94
+
95
+ # Creates an instance of the object from a hash.
96
+ def self.from_hash(hash)
97
+ return nil unless hash
98
+
99
+ # Extract variables from the hash.
100
+ classification =
101
+ hash.key?('classification') ? hash['classification'] : SKIP
102
+ tenant_id = hash.key?('tenant_id') ? APIHelper.deserialize_union_type(
103
+ UnionTypeLookUp.get(:UpdateCounterpartyRequestTenantId), hash['tenant_id']
104
+ ) : SKIP
105
+ individual_first_name = hash.key?('individual_first_name') ? APIHelper.deserialize_union_type(
106
+ UnionTypeLookUp.get(:UpdateCounterpartyRequestIndividualFirstName), hash['individual_first_name']
107
+ ) : SKIP
108
+ individual_last_name = hash.key?('individual_last_name') ? APIHelper.deserialize_union_type(
109
+ UnionTypeLookUp.get(:UpdateCounterpartyRequestIndividualLastName), hash['individual_last_name']
110
+ ) : SKIP
111
+ individual_address_country = hash.key?('individual_address_country') ? APIHelper.deserialize_union_type(
112
+ UnionTypeLookUp.get(:UpdateCounterpartyRequestIndividualAddressCountry), hash['individual_address_country']
113
+ ) : SKIP
114
+ business_legal_name = hash.key?('business_legal_name') ? APIHelper.deserialize_union_type(
115
+ UnionTypeLookUp.get(:UpdateCounterpartyRequestBusinessLegalName), hash['business_legal_name']
116
+ ) : SKIP
117
+ business_dba = hash.key?('business_dba') ? APIHelper.deserialize_union_type(
118
+ UnionTypeLookUp.get(:UpdateCounterpartyRequestBusinessDba), hash['business_dba']
119
+ ) : SKIP
120
+ business_address_country = hash.key?('business_address_country') ? APIHelper.deserialize_union_type(
121
+ UnionTypeLookUp.get(:UpdateCounterpartyRequestBusinessAddressCountry), hash['business_address_country']
122
+ ) : SKIP
123
+
124
+ # Create object from extracted values.
125
+ UpdateCounterpartyRequest.new(classification,
126
+ tenant_id,
127
+ individual_first_name,
128
+ individual_last_name,
129
+ individual_address_country,
130
+ business_legal_name,
131
+ business_dba,
132
+ business_address_country)
133
+ end
134
+
135
+ # Validates an instance of the object from a given value.
136
+ # @param [UpdateCounterpartyRequest | Hash] The value against the validation is performed.
137
+ def self.validate(value)
138
+ return true if value.instance_of? self
139
+
140
+ return false unless value.instance_of? Hash
141
+
142
+ true
143
+ end
144
+
145
+ # Provides a human-readable string representation of the object.
146
+ def to_s
147
+ class_name = self.class.name.split('::').last
148
+ "<#{class_name} classification: #{@classification}, tenant_id: #{@tenant_id},"\
149
+ " individual_first_name: #{@individual_first_name}, individual_last_name:"\
150
+ " #{@individual_last_name}, individual_address_country: #{@individual_address_country},"\
151
+ " business_legal_name: #{@business_legal_name}, business_dba: #{@business_dba},"\
152
+ " business_address_country: #{@business_address_country}>"
153
+ end
154
+
155
+ # Provides a debugging-friendly string with detailed object information.
156
+ def inspect
157
+ class_name = self.class.name.split('::').last
158
+ "<#{class_name} classification: #{@classification.inspect}, tenant_id:"\
159
+ " #{@tenant_id.inspect}, individual_first_name: #{@individual_first_name.inspect},"\
160
+ " individual_last_name: #{@individual_last_name.inspect}, individual_address_country:"\
161
+ " #{@individual_address_country.inspect}, business_legal_name:"\
162
+ " #{@business_legal_name.inspect}, business_dba: #{@business_dba.inspect},"\
163
+ " business_address_country: #{@business_address_country.inspect}>"
164
+ end
165
+ end
166
+ 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
+ # UpdateCounterpartyResponse Model.
8
+ class UpdateCounterpartyResponse < 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
+ UpdateCounterpartyResponse.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,100 @@
1
+ # tesser_apiv1
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module TesserApiv1
7
+ # UpdatePaymentRequest Model.
8
+ class UpdatePaymentRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # ID of the account originating the payment.
13
+ # @return [String]
14
+ attr_accessor :originator_account_id
15
+
16
+ # ID of the source account (e.g., wallet).
17
+ # @return [String]
18
+ attr_accessor :source_account_id
19
+
20
+ # ID of the beneficiary account.
21
+ # @return [String]
22
+ attr_accessor :beneficiary_account_id
23
+
24
+ # Optional external reference ID to update.
25
+ # @return [String]
26
+ attr_accessor :organization_reference_id
27
+
28
+ # A mapping from model property names to API property names.
29
+ def self.names
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['originator_account_id'] = 'originator_account_id'
32
+ @_hash['source_account_id'] = 'source_account_id'
33
+ @_hash['beneficiary_account_id'] = 'beneficiary_account_id'
34
+ @_hash['organization_reference_id'] = 'organization_reference_id'
35
+ @_hash
36
+ end
37
+
38
+ # An array for optional fields
39
+ def self.optionals
40
+ %w[
41
+ organization_reference_id
42
+ ]
43
+ end
44
+
45
+ # An array for nullable fields
46
+ def self.nullables
47
+ []
48
+ end
49
+
50
+ def initialize(originator_account_id = nil, source_account_id = nil,
51
+ beneficiary_account_id = nil,
52
+ organization_reference_id = SKIP)
53
+ @originator_account_id = originator_account_id
54
+ @source_account_id = source_account_id
55
+ @beneficiary_account_id = beneficiary_account_id
56
+ unless organization_reference_id == SKIP
57
+ @organization_reference_id =
58
+ organization_reference_id
59
+ end
60
+ end
61
+
62
+ # Creates an instance of the object from a hash.
63
+ def self.from_hash(hash)
64
+ return nil unless hash
65
+
66
+ # Extract variables from the hash.
67
+ originator_account_id =
68
+ hash.key?('originator_account_id') ? hash['originator_account_id'] : nil
69
+ source_account_id =
70
+ hash.key?('source_account_id') ? hash['source_account_id'] : nil
71
+ beneficiary_account_id =
72
+ hash.key?('beneficiary_account_id') ? hash['beneficiary_account_id'] : nil
73
+ organization_reference_id =
74
+ hash.key?('organization_reference_id') ? hash['organization_reference_id'] : SKIP
75
+
76
+ # Create object from extracted values.
77
+ UpdatePaymentRequest.new(originator_account_id,
78
+ source_account_id,
79
+ beneficiary_account_id,
80
+ organization_reference_id)
81
+ end
82
+
83
+ # Provides a human-readable string representation of the object.
84
+ def to_s
85
+ class_name = self.class.name.split('::').last
86
+ "<#{class_name} originator_account_id: #{@originator_account_id}, source_account_id:"\
87
+ " #{@source_account_id}, beneficiary_account_id: #{@beneficiary_account_id},"\
88
+ " organization_reference_id: #{@organization_reference_id}>"
89
+ end
90
+
91
+ # Provides a debugging-friendly string with detailed object information.
92
+ def inspect
93
+ class_name = self.class.name.split('::').last
94
+ "<#{class_name} originator_account_id: #{@originator_account_id.inspect},"\
95
+ " source_account_id: #{@source_account_id.inspect}, beneficiary_account_id:"\
96
+ " #{@beneficiary_account_id.inspect}, organization_reference_id:"\
97
+ " #{@organization_reference_id.inspect}>"
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,111 @@
1
+ # tesser_apiv1
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module TesserApiv1
7
+ # UpdateTenantRequest Model.
8
+ class UpdateTenantRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Updated legal business name.
13
+ # @return [String]
14
+ attr_accessor :business_legal_name
15
+
16
+ # Updated DBA name.
17
+ # @return [Object]
18
+ attr_accessor :business_dba
19
+
20
+ # Updated business country code.
21
+ # @return [Object]
22
+ attr_accessor :business_address_country
23
+
24
+ # Updated webhook URL.
25
+ # @return [Object]
26
+ attr_accessor :webhook_url
27
+
28
+ # A mapping from model property names to API property names.
29
+ def self.names
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['business_legal_name'] = 'business_legal_name'
32
+ @_hash['business_dba'] = 'business_dba'
33
+ @_hash['business_address_country'] = 'business_address_country'
34
+ @_hash['webhook_url'] = 'webhook_url'
35
+ @_hash
36
+ end
37
+
38
+ # An array for optional fields
39
+ def self.optionals
40
+ %w[
41
+ business_legal_name
42
+ business_dba
43
+ business_address_country
44
+ webhook_url
45
+ ]
46
+ end
47
+
48
+ # An array for nullable fields
49
+ def self.nullables
50
+ []
51
+ end
52
+
53
+ def initialize(business_legal_name = SKIP, business_dba = SKIP,
54
+ business_address_country = SKIP, webhook_url = SKIP)
55
+ @business_legal_name = business_legal_name unless business_legal_name == SKIP
56
+ @business_dba = business_dba unless business_dba == SKIP
57
+ @business_address_country = business_address_country unless business_address_country == SKIP
58
+ @webhook_url = webhook_url unless webhook_url == SKIP
59
+ end
60
+
61
+ # Creates an instance of the object from a hash.
62
+ def self.from_hash(hash)
63
+ return nil unless hash
64
+
65
+ # Extract variables from the hash.
66
+ business_legal_name =
67
+ hash.key?('business_legal_name') ? hash['business_legal_name'] : SKIP
68
+ business_dba = hash.key?('business_dba') ? APIHelper.deserialize_union_type(
69
+ UnionTypeLookUp.get(:UpdateTenantRequestBusinessDba), hash['business_dba']
70
+ ) : SKIP
71
+ business_address_country = hash.key?('business_address_country') ? APIHelper.deserialize_union_type(
72
+ UnionTypeLookUp.get(:UpdateTenantRequestBusinessAddressCountry), hash['business_address_country']
73
+ ) : SKIP
74
+ webhook_url = hash.key?('webhook_url') ? APIHelper.deserialize_union_type(
75
+ UnionTypeLookUp.get(:UpdateTenantRequestWebhookUrl), hash['webhook_url']
76
+ ) : SKIP
77
+
78
+ # Create object from extracted values.
79
+ UpdateTenantRequest.new(business_legal_name,
80
+ business_dba,
81
+ business_address_country,
82
+ webhook_url)
83
+ end
84
+
85
+ # Validates an instance of the object from a given value.
86
+ # @param [UpdateTenantRequest | Hash] The value against the validation is performed.
87
+ def self.validate(value)
88
+ return true if value.instance_of? self
89
+
90
+ return false unless value.instance_of? Hash
91
+
92
+ true
93
+ end
94
+
95
+ # Provides a human-readable string representation of the object.
96
+ def to_s
97
+ class_name = self.class.name.split('::').last
98
+ "<#{class_name} business_legal_name: #{@business_legal_name}, business_dba:"\
99
+ " #{@business_dba}, business_address_country: #{@business_address_country}, webhook_url:"\
100
+ " #{@webhook_url}>"
101
+ end
102
+
103
+ # Provides a debugging-friendly string with detailed object information.
104
+ def inspect
105
+ class_name = self.class.name.split('::').last
106
+ "<#{class_name} business_legal_name: #{@business_legal_name.inspect}, business_dba:"\
107
+ " #{@business_dba.inspect}, business_address_country: #{@business_address_country.inspect},"\
108
+ " webhook_url: #{@webhook_url.inspect}>"
109
+ end
110
+ end
111
+ 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
+ # UpdateTenantResponse Model.
8
+ class UpdateTenantResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Data8]
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 = Data8.from_hash(hash['data']) if hash['data']
43
+
44
+ # Create object from extracted values.
45
+ UpdateTenantResponse.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,11 @@
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
+ # A utility that supports dateTime conversion to different formats
9
+ class DateTimeHelper < CoreLibrary::DateTimeHelper
10
+ end
11
+ end
@@ -0,0 +1,28 @@
1
+ # tesser_apiv1
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module TesserApiv1
7
+ # A utility to allow users to set the content-type for files
8
+ class FileWrapper < CoreLibrary::FileWrapper
9
+ # The constructor.
10
+ # @param [File] file The file to be sent in the request.
11
+ # @param [string] content_type The content type of the provided file.
12
+ def initialize(file, content_type: 'application/octet-stream')
13
+ super
14
+ end
15
+
16
+ # Provides a human-readable string representation of the object.
17
+ def to_s
18
+ class_name = self.class.name.split('::').last
19
+ "<#{class_name} file: #{@file}, content_type: #{@content_type}>"
20
+ end
21
+
22
+ # Provides a debugging-friendly string with detailed object information.
23
+ def to_inspect
24
+ class_name = self.class.name.split('::').last
25
+ "<#{class_name} file: #{@file.inspect}, content_type: #{@content_type.inspect}>"
26
+ end
27
+ end
28
+ end