turnkey_client 0.0.17 → 0.0.19

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 (166) hide show
  1. checksums.yaml +4 -4
  2. data/lib/turnkey_client/api/broadcasting_api.rb +12 -12
  3. data/lib/turnkey_client/api/default_api.rb +46 -0
  4. data/lib/turnkey_client/api/ip_allowlist_api.rb +193 -0
  5. data/lib/turnkey_client/api/organizations_api.rb +290 -0
  6. data/lib/turnkey_client/api/signing_api.rb +232 -0
  7. data/lib/turnkey_client/api/tvc_api.rb +773 -0
  8. data/lib/turnkey_client/api/wallets_api.rb +116 -0
  9. data/lib/turnkey_client/configuration.rb +7 -0
  10. data/lib/turnkey_client/models/activate_billing_tier_intent.rb +14 -4
  11. data/lib/turnkey_client/models/activity_type.rb +21 -0
  12. data/lib/turnkey_client/models/address_format.rb +2 -0
  13. data/lib/turnkey_client/models/app_status.rb +243 -0
  14. data/lib/turnkey_client/models/asset_balance.rb +255 -0
  15. data/lib/turnkey_client/models/asset_balance_display.rb +216 -0
  16. data/lib/turnkey_client/models/asset_metadata.rb +246 -0
  17. data/lib/turnkey_client/models/boot_proof.rb +17 -6
  18. data/lib/turnkey_client/models/create_oauth_providers_intent_v2.rb +228 -0
  19. data/lib/turnkey_client/models/create_oauth_providers_request.rb +2 -2
  20. data/lib/turnkey_client/models/create_oauth_providers_result_v2.rb +213 -0
  21. data/lib/turnkey_client/models/create_read_write_session_intent_v2.rb +1 -1
  22. data/lib/turnkey_client/models/create_sub_organization_intent_v8.rb +316 -0
  23. data/lib/turnkey_client/models/create_sub_organization_request.rb +2 -2
  24. data/lib/turnkey_client/models/create_sub_organization_result_v8.rb +230 -0
  25. data/lib/turnkey_client/models/create_tvc_app_intent.rb +9 -9
  26. data/lib/turnkey_client/models/create_tvc_app_request.rb +288 -0
  27. data/lib/turnkey_client/models/create_tvc_deployment_intent.rb +60 -41
  28. data/lib/turnkey_client/models/create_tvc_deployment_request.rb +288 -0
  29. data/lib/turnkey_client/models/create_tvc_manifest_approvals_request.rb +288 -0
  30. data/lib/turnkey_client/models/create_users_intent_v4.rb +213 -0
  31. data/lib/turnkey_client/models/create_users_request.rb +2 -2
  32. data/lib/turnkey_client/models/create_webhook_endpoint_intent.rb +238 -0
  33. data/lib/turnkey_client/models/create_webhook_endpoint_request.rb +298 -0
  34. data/lib/turnkey_client/models/create_webhook_endpoint_result.rb +225 -0
  35. data/lib/turnkey_client/models/delete_tvc_app_and_deployments_intent.rb +211 -0
  36. data/lib/turnkey_client/models/delete_tvc_app_and_deployments_request.rb +298 -0
  37. data/lib/turnkey_client/models/delete_tvc_app_and_deployments_result.rb +211 -0
  38. data/lib/turnkey_client/models/delete_tvc_deployment_intent.rb +211 -0
  39. data/lib/turnkey_client/models/delete_tvc_deployment_request.rb +298 -0
  40. data/lib/turnkey_client/models/delete_tvc_deployment_result.rb +211 -0
  41. data/lib/turnkey_client/models/delete_webhook_endpoint_intent.rb +211 -0
  42. data/lib/turnkey_client/models/delete_webhook_endpoint_request.rb +298 -0
  43. data/lib/turnkey_client/models/delete_webhook_endpoint_result.rb +211 -0
  44. data/lib/turnkey_client/models/deployment_status.rb +255 -0
  45. data/lib/turnkey_client/models/eth_failure_details.rb +208 -0
  46. data/lib/turnkey_client/models/eth_send_raw_transaction_intent.rb +2 -2
  47. data/lib/turnkey_client/models/eth_send_transaction_intent.rb +12 -1
  48. data/lib/turnkey_client/models/feature_name.rb +1 -0
  49. data/lib/turnkey_client/models/get_app_status_request.rb +226 -0
  50. data/lib/turnkey_client/models/get_app_status_response.rb +210 -0
  51. data/lib/turnkey_client/models/get_ip_allowlist_request.rb +222 -0
  52. data/lib/turnkey_client/models/get_ip_allowlist_response.rb +210 -0
  53. data/lib/turnkey_client/models/get_nonces_request.rb +35 -1
  54. data/lib/turnkey_client/models/get_send_transaction_status_response.rb +10 -1
  55. data/lib/turnkey_client/models/get_tvc_app_deployments_request.rb +226 -0
  56. data/lib/turnkey_client/models/get_tvc_app_deployments_response.rb +213 -0
  57. data/lib/turnkey_client/models/get_tvc_app_request.rb +226 -0
  58. data/lib/turnkey_client/models/get_tvc_app_response.rb +210 -0
  59. data/lib/turnkey_client/models/get_tvc_apps_request.rb +211 -0
  60. data/lib/turnkey_client/models/get_tvc_apps_response.rb +213 -0
  61. data/lib/turnkey_client/models/get_tvc_deployment_request.rb +226 -0
  62. data/lib/turnkey_client/models/get_tvc_deployment_response.rb +210 -0
  63. data/lib/turnkey_client/models/get_wallet_address_balances_request.rb +275 -0
  64. data/lib/turnkey_client/models/get_wallet_address_balances_response.rb +208 -0
  65. data/lib/turnkey_client/models/init_otp_auth_intent.rb +1 -1
  66. data/lib/turnkey_client/models/init_otp_auth_intent_v2.rb +1 -1
  67. data/lib/turnkey_client/models/init_otp_intent_v3.rb +336 -0
  68. data/lib/turnkey_client/models/init_otp_request.rb +2 -2
  69. data/lib/turnkey_client/models/init_otp_result_v2.rb +226 -0
  70. data/lib/turnkey_client/models/intent.rb +193 -4
  71. data/lib/turnkey_client/models/ip_allowlist.rb +261 -0
  72. data/lib/turnkey_client/models/ip_allowlist_intent_rule.rb +222 -0
  73. data/lib/turnkey_client/models/ip_allowlist_rule.rb +232 -0
  74. data/lib/turnkey_client/models/list_supported_assets_request.rb +260 -0
  75. data/lib/turnkey_client/models/list_supported_assets_response.rb +208 -0
  76. data/lib/turnkey_client/models/list_webhook_endpoints_request.rb +211 -0
  77. data/lib/turnkey_client/models/list_webhook_endpoints_response.rb +212 -0
  78. data/lib/turnkey_client/models/login_usage.rb +211 -0
  79. data/lib/turnkey_client/models/noop_codegen_anchor_response.rb +219 -0
  80. data/lib/turnkey_client/models/oauth2_authenticate_intent.rb +6 -2
  81. data/lib/turnkey_client/models/oauth_provider_params_v2.rb +230 -0
  82. data/lib/turnkey_client/models/oidc_claims.rb +241 -0
  83. data/lib/turnkey_client/models/otp_login_intent_v2.rb +262 -0
  84. data/lib/turnkey_client/models/otp_login_request.rb +2 -2
  85. data/lib/turnkey_client/models/post_tvc_quorum_key_share_intent.rb +240 -0
  86. data/lib/turnkey_client/models/post_tvc_quorum_key_share_result.rb +211 -0
  87. data/lib/turnkey_client/models/quorum_key_share_approval_bundle.rb +241 -0
  88. data/lib/turnkey_client/models/remove_ip_allowlist_intent.rb +207 -0
  89. data/lib/turnkey_client/models/remove_ip_allowlist_request.rb +298 -0
  90. data/lib/turnkey_client/models/remove_ip_allowlist_result.rb +196 -0
  91. data/lib/turnkey_client/models/restore_tvc_deployment_intent.rb +211 -0
  92. data/lib/turnkey_client/models/restore_tvc_deployment_request.rb +298 -0
  93. data/lib/turnkey_client/models/restore_tvc_deployment_result.rb +211 -0
  94. data/lib/turnkey_client/models/result.rb +166 -4
  95. data/lib/turnkey_client/models/root_user_params_v5.rb +284 -0
  96. data/lib/turnkey_client/models/set_ip_allowlist_intent.rb +241 -0
  97. data/lib/turnkey_client/models/set_ip_allowlist_request.rb +298 -0
  98. data/lib/turnkey_client/models/set_ip_allowlist_result.rb +196 -0
  99. data/lib/turnkey_client/models/signup_usage.rb +249 -0
  100. data/lib/turnkey_client/models/signup_usage_v2.rb +249 -0
  101. data/lib/turnkey_client/models/sol_send_transaction_intent.rb +3 -3
  102. data/lib/turnkey_client/models/solana_config.rb +207 -0
  103. data/lib/turnkey_client/models/solana_failure_details.rb +273 -0
  104. data/lib/turnkey_client/models/solana_send_transaction_status.rb +207 -0
  105. data/lib/turnkey_client/models/spark_claim_leaf.rb +241 -0
  106. data/lib/turnkey_client/models/spark_claim_package.rb +275 -0
  107. data/lib/turnkey_client/models/spark_claim_transfer_intent.rb +225 -0
  108. data/lib/turnkey_client/models/spark_claim_transfer_request.rb +288 -0
  109. data/lib/turnkey_client/models/spark_claim_transfer_result.rb +230 -0
  110. data/lib/turnkey_client/models/spark_deposit_derivation.rb +196 -0
  111. data/lib/turnkey_client/models/spark_encrypted_operator_package.rb +226 -0
  112. data/lib/turnkey_client/models/spark_frost_commitment.rb +241 -0
  113. data/lib/turnkey_client/models/spark_htlc_preimage_derivation.rb +196 -0
  114. data/lib/turnkey_client/models/spark_identity_derivation.rb +196 -0
  115. data/lib/turnkey_client/models/spark_key_derivation.rb +241 -0
  116. data/lib/turnkey_client/models/spark_leaf_public_key.rb +226 -0
  117. data/lib/turnkey_client/models/spark_lightning_receive_package.rb +228 -0
  118. data/lib/turnkey_client/models/spark_operator_recipient.rb +226 -0
  119. data/lib/turnkey_client/models/spark_partial_signature.rb +241 -0
  120. data/lib/turnkey_client/models/spark_prepare_lightning_receive_intent.rb +225 -0
  121. data/lib/turnkey_client/models/spark_prepare_lightning_receive_request.rb +288 -0
  122. data/lib/turnkey_client/models/spark_prepare_lightning_receive_result.rb +228 -0
  123. data/lib/turnkey_client/models/spark_prepare_transfer_intent.rb +225 -0
  124. data/lib/turnkey_client/models/spark_prepare_transfer_request.rb +288 -0
  125. data/lib/turnkey_client/models/spark_prepare_transfer_result.rb +245 -0
  126. data/lib/turnkey_client/models/spark_sign_frost_intent.rb +228 -0
  127. data/lib/turnkey_client/models/spark_sign_frost_request.rb +288 -0
  128. data/lib/turnkey_client/models/spark_sign_frost_result.rb +213 -0
  129. data/lib/turnkey_client/models/spark_signature_request.rb +268 -0
  130. data/lib/turnkey_client/models/spark_signing_leaf_derivation.rb +211 -0
  131. data/lib/turnkey_client/models/spark_static_deposit_derivation.rb +211 -0
  132. data/lib/turnkey_client/models/spark_transfer_leaf.rb +272 -0
  133. data/lib/turnkey_client/models/spark_transfer_package.rb +275 -0
  134. data/lib/turnkey_client/models/token_usage.rb +252 -0
  135. data/lib/turnkey_client/models/tvc_app.rb +353 -0
  136. data/lib/turnkey_client/models/tvc_container_spec.rb +302 -0
  137. data/lib/turnkey_client/models/tvc_deployment.rb +372 -0
  138. data/lib/turnkey_client/models/tvc_health_check_type.rb +27 -0
  139. data/lib/turnkey_client/models/tvc_manifest.rb +254 -0
  140. data/lib/turnkey_client/models/tvc_operator.rb +269 -0
  141. data/lib/turnkey_client/models/tvc_operator_approval.rb +283 -0
  142. data/lib/turnkey_client/models/tvc_operator_set.rb +301 -0
  143. data/lib/turnkey_client/models/tx_error.rb +22 -4
  144. data/lib/turnkey_client/models/update_auth_proxy_config_intent.rb +17 -5
  145. data/lib/turnkey_client/models/update_organization_name_intent.rb +211 -0
  146. data/lib/turnkey_client/models/update_organization_name_request.rb +298 -0
  147. data/lib/turnkey_client/models/update_organization_name_result.rb +226 -0
  148. data/lib/turnkey_client/models/update_tvc_app_live_deployment_intent.rb +211 -0
  149. data/lib/turnkey_client/models/update_tvc_app_live_deployment_request.rb +298 -0
  150. data/lib/turnkey_client/models/update_tvc_app_live_deployment_result.rb +196 -0
  151. data/lib/turnkey_client/models/update_webhook_endpoint_intent.rb +244 -0
  152. data/lib/turnkey_client/models/update_webhook_endpoint_request.rb +298 -0
  153. data/lib/turnkey_client/models/update_webhook_endpoint_result.rb +225 -0
  154. data/lib/turnkey_client/models/upsert_gas_usage_config_intent.rb +25 -5
  155. data/lib/turnkey_client/models/usage_type.rb +27 -0
  156. data/lib/turnkey_client/models/user_params_v4.rb +301 -0
  157. data/lib/turnkey_client/models/validate_tvc_image_request.rb +237 -0
  158. data/lib/turnkey_client/models/validate_tvc_image_response.rb +205 -0
  159. data/lib/turnkey_client/models/verify_otp_intent_v2.rb +237 -0
  160. data/lib/turnkey_client/models/verify_otp_request.rb +2 -2
  161. data/lib/turnkey_client/models/web_authn_stamp.rb +256 -0
  162. data/lib/turnkey_client/models/webhook_endpoint_data.rb +283 -0
  163. data/lib/turnkey_client/models/webhook_subscription_params.rb +233 -0
  164. data/lib/turnkey_client/version.rb +1 -1
  165. data/lib/turnkey_client.rb +129 -0
  166. metadata +153 -24
@@ -0,0 +1,226 @@
1
+ =begin
2
+ #API Reference
3
+
4
+ #Review our [API Introduction](../api-introduction) to get started.
5
+
6
+ OpenAPI spec version: 1.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ =end
10
+
11
+ require 'date'
12
+
13
+ module TurnkeyClient
14
+ class GetTvcDeploymentRequest
15
+ # Unique identifier for a given organization.
16
+ attr_accessor :organization_id
17
+
18
+ # Unique identifier for a given TVC Deployment.
19
+ attr_accessor :deployment_id
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'organization_id' => :'organizationId',
25
+ :'deployment_id' => :'deploymentId'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.openapi_types
31
+ {
32
+ :'organization_id' => :'Object',
33
+ :'deployment_id' => :'Object'
34
+ }
35
+ end
36
+
37
+ # List of attributes with nullable: true
38
+ def self.openapi_nullable
39
+ Set.new([
40
+ ])
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ if (!attributes.is_a?(Hash))
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetTvcDeploymentRequest` initialize method"
48
+ end
49
+
50
+ # check to see if the attribute exists and convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h|
52
+ if (!self.class.attribute_map.key?(k.to_sym))
53
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetTvcDeploymentRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ end
55
+ h[k.to_sym] = v
56
+ }
57
+
58
+ if attributes.key?(:'organization_id')
59
+ self.organization_id = attributes[:'organization_id']
60
+ end
61
+
62
+ if attributes.key?(:'deployment_id')
63
+ self.deployment_id = attributes[:'deployment_id']
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ invalid_properties = Array.new
71
+ if @organization_id.nil?
72
+ invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
73
+ end
74
+
75
+ if @deployment_id.nil?
76
+ invalid_properties.push('invalid value for "deployment_id", deployment_id cannot be nil.')
77
+ end
78
+
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ return false if @organization_id.nil?
86
+ return false if @deployment_id.nil?
87
+ true
88
+ end
89
+
90
+ # Checks equality by comparing each attribute.
91
+ # @param [Object] Object to be compared
92
+ def ==(o)
93
+ return true if self.equal?(o)
94
+ self.class == o.class &&
95
+ organization_id == o.organization_id &&
96
+ deployment_id == o.deployment_id
97
+ end
98
+
99
+ # @see the `==` method
100
+ # @param [Object] Object to be compared
101
+ def eql?(o)
102
+ self == o
103
+ end
104
+
105
+ # Calculates hash code according to all attributes.
106
+ # @return [Integer] Hash code
107
+ def hash
108
+ [organization_id, deployment_id].hash
109
+ end
110
+
111
+ # Builds the object from hash
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ # @return [Object] Returns the model itself
114
+ def self.build_from_hash(attributes)
115
+ new.build_from_hash(attributes)
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def build_from_hash(attributes)
122
+ return nil unless attributes.is_a?(Hash)
123
+ self.class.openapi_types.each_pair do |key, type|
124
+ if type =~ /\AArray<(.*)>/i
125
+ # check to ensure the input is an array given that the attribute
126
+ # is documented as an array but the input is not
127
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
128
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
129
+ end
130
+ elsif !attributes[self.class.attribute_map[key]].nil?
131
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
132
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
133
+ self.send("#{key}=", nil)
134
+ end
135
+ end
136
+
137
+ self
138
+ end
139
+
140
+ # Deserializes the data based on type
141
+ # @param string type Data type
142
+ # @param string value Value to be deserialized
143
+ # @return [Object] Deserialized data
144
+ def _deserialize(type, value)
145
+ case type.to_sym
146
+ when :DateTime
147
+ DateTime.parse(value)
148
+ when :Date
149
+ Date.parse(value)
150
+ when :String
151
+ value.to_s
152
+ when :Integer
153
+ value.to_i
154
+ when :Float
155
+ value.to_f
156
+ when :Boolean
157
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
158
+ true
159
+ else
160
+ false
161
+ end
162
+ when :Object
163
+ # generic object (usually a Hash), return directly
164
+ value
165
+ when /\AArray<(?<inner_type>.+)>\z/
166
+ inner_type = Regexp.last_match[:inner_type]
167
+ value.map { |v| _deserialize(inner_type, v) }
168
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
169
+ k_type = Regexp.last_match[:k_type]
170
+ v_type = Regexp.last_match[:v_type]
171
+ {}.tap do |hash|
172
+ value.each do |k, v|
173
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
174
+ end
175
+ end
176
+ else # model
177
+ TurnkeyClient.const_get(type).build_from_hash(value)
178
+ end
179
+ end
180
+
181
+ # Returns the string representation of the object
182
+ # @return [String] String presentation of the object
183
+ def to_s
184
+ to_hash.to_s
185
+ end
186
+
187
+ # to_body is an alias to to_hash (backward compatibility)
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_body
190
+ to_hash
191
+ end
192
+
193
+ # Returns the object in the form of hash
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_hash
196
+ hash = {}
197
+ self.class.attribute_map.each_pair do |attr, param|
198
+ value = self.send(attr)
199
+ if value.nil?
200
+ is_nullable = self.class.openapi_nullable.include?(attr)
201
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
202
+ end
203
+
204
+ hash[param] = _to_hash(value)
205
+ end
206
+ hash
207
+ end
208
+
209
+ # Outputs non-array value in the form of hash
210
+ # For object, use to_hash. Otherwise, just return the value
211
+ # @param [Object] value Any valid value
212
+ # @return [Hash] Returns the value in the form of hash
213
+ def _to_hash(value)
214
+ if value.is_a?(Array)
215
+ value.compact.map { |v| _to_hash(v) }
216
+ elsif value.is_a?(Hash)
217
+ {}.tap do |hash|
218
+ value.each { |k, v| hash[k] = _to_hash(v) }
219
+ end
220
+ elsif value.respond_to? :to_hash
221
+ value.to_hash
222
+ else
223
+ value
224
+ end
225
+ end end
226
+ end
@@ -0,0 +1,210 @@
1
+ =begin
2
+ #API Reference
3
+
4
+ #Review our [API Introduction](../api-introduction) to get started.
5
+
6
+ OpenAPI spec version: 1.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ =end
10
+
11
+ require 'date'
12
+
13
+ module TurnkeyClient
14
+ class GetTvcDeploymentResponse
15
+ attr_accessor :tvc_deployment
16
+
17
+ # Attribute mapping from ruby-style variable name to JSON key.
18
+ def self.attribute_map
19
+ {
20
+ :'tvc_deployment' => :'tvcDeployment'
21
+ }
22
+ end
23
+
24
+ # Attribute type mapping.
25
+ def self.openapi_types
26
+ {
27
+ :'tvc_deployment' => :'Object'
28
+ }
29
+ end
30
+
31
+ # List of attributes with nullable: true
32
+ def self.openapi_nullable
33
+ Set.new([
34
+ ])
35
+ end
36
+
37
+ # Initializes the object
38
+ # @param [Hash] attributes Model attributes in the form of hash
39
+ def initialize(attributes = {})
40
+ if (!attributes.is_a?(Hash))
41
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetTvcDeploymentResponse` initialize method"
42
+ end
43
+
44
+ # check to see if the attribute exists and convert string to symbol for hash key
45
+ attributes = attributes.each_with_object({}) { |(k, v), h|
46
+ if (!self.class.attribute_map.key?(k.to_sym))
47
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetTvcDeploymentResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
48
+ end
49
+ h[k.to_sym] = v
50
+ }
51
+
52
+ if attributes.key?(:'tvc_deployment')
53
+ self.tvc_deployment = attributes[:'tvc_deployment']
54
+ end
55
+ end
56
+
57
+ # Show invalid properties with the reasons. Usually used together with valid?
58
+ # @return Array for valid properties with the reasons
59
+ def list_invalid_properties
60
+ invalid_properties = Array.new
61
+ if @tvc_deployment.nil?
62
+ invalid_properties.push('invalid value for "tvc_deployment", tvc_deployment cannot be nil.')
63
+ end
64
+
65
+ invalid_properties
66
+ end
67
+
68
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ def valid?
71
+ return false if @tvc_deployment.nil?
72
+ true
73
+ end
74
+
75
+ # Checks equality by comparing each attribute.
76
+ # @param [Object] Object to be compared
77
+ def ==(o)
78
+ return true if self.equal?(o)
79
+ self.class == o.class &&
80
+ tvc_deployment == o.tvc_deployment
81
+ end
82
+
83
+ # @see the `==` method
84
+ # @param [Object] Object to be compared
85
+ def eql?(o)
86
+ self == o
87
+ end
88
+
89
+ # Calculates hash code according to all attributes.
90
+ # @return [Integer] Hash code
91
+ def hash
92
+ [tvc_deployment].hash
93
+ end
94
+
95
+ # Builds the object from hash
96
+ # @param [Hash] attributes Model attributes in the form of hash
97
+ # @return [Object] Returns the model itself
98
+ def self.build_from_hash(attributes)
99
+ new.build_from_hash(attributes)
100
+ end
101
+
102
+ # Builds the object from hash
103
+ # @param [Hash] attributes Model attributes in the form of hash
104
+ # @return [Object] Returns the model itself
105
+ def build_from_hash(attributes)
106
+ return nil unless attributes.is_a?(Hash)
107
+ self.class.openapi_types.each_pair do |key, type|
108
+ if type =~ /\AArray<(.*)>/i
109
+ # check to ensure the input is an array given that the attribute
110
+ # is documented as an array but the input is not
111
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
112
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
113
+ end
114
+ elsif !attributes[self.class.attribute_map[key]].nil?
115
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
116
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
117
+ self.send("#{key}=", nil)
118
+ end
119
+ end
120
+
121
+ self
122
+ end
123
+
124
+ # Deserializes the data based on type
125
+ # @param string type Data type
126
+ # @param string value Value to be deserialized
127
+ # @return [Object] Deserialized data
128
+ def _deserialize(type, value)
129
+ case type.to_sym
130
+ when :DateTime
131
+ DateTime.parse(value)
132
+ when :Date
133
+ Date.parse(value)
134
+ when :String
135
+ value.to_s
136
+ when :Integer
137
+ value.to_i
138
+ when :Float
139
+ value.to_f
140
+ when :Boolean
141
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
142
+ true
143
+ else
144
+ false
145
+ end
146
+ when :Object
147
+ # generic object (usually a Hash), return directly
148
+ value
149
+ when /\AArray<(?<inner_type>.+)>\z/
150
+ inner_type = Regexp.last_match[:inner_type]
151
+ value.map { |v| _deserialize(inner_type, v) }
152
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
153
+ k_type = Regexp.last_match[:k_type]
154
+ v_type = Regexp.last_match[:v_type]
155
+ {}.tap do |hash|
156
+ value.each do |k, v|
157
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
158
+ end
159
+ end
160
+ else # model
161
+ TurnkeyClient.const_get(type).build_from_hash(value)
162
+ end
163
+ end
164
+
165
+ # Returns the string representation of the object
166
+ # @return [String] String presentation of the object
167
+ def to_s
168
+ to_hash.to_s
169
+ end
170
+
171
+ # to_body is an alias to to_hash (backward compatibility)
172
+ # @return [Hash] Returns the object in the form of hash
173
+ def to_body
174
+ to_hash
175
+ end
176
+
177
+ # Returns the object in the form of hash
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_hash
180
+ hash = {}
181
+ self.class.attribute_map.each_pair do |attr, param|
182
+ value = self.send(attr)
183
+ if value.nil?
184
+ is_nullable = self.class.openapi_nullable.include?(attr)
185
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
186
+ end
187
+
188
+ hash[param] = _to_hash(value)
189
+ end
190
+ hash
191
+ end
192
+
193
+ # Outputs non-array value in the form of hash
194
+ # For object, use to_hash. Otherwise, just return the value
195
+ # @param [Object] value Any valid value
196
+ # @return [Hash] Returns the value in the form of hash
197
+ def _to_hash(value)
198
+ if value.is_a?(Array)
199
+ value.compact.map { |v| _to_hash(v) }
200
+ elsif value.is_a?(Hash)
201
+ {}.tap do |hash|
202
+ value.each { |k, v| hash[k] = _to_hash(v) }
203
+ end
204
+ elsif value.respond_to? :to_hash
205
+ value.to_hash
206
+ else
207
+ value
208
+ end
209
+ end end
210
+ end
@@ -0,0 +1,275 @@
1
+ =begin
2
+ #API Reference
3
+
4
+ #Review our [API Introduction](../api-introduction) to get started.
5
+
6
+ OpenAPI spec version: 1.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ =end
10
+
11
+ require 'date'
12
+
13
+ module TurnkeyClient
14
+ class GetWalletAddressBalancesRequest
15
+ # Unique identifier for a given organization.
16
+ attr_accessor :organization_id
17
+
18
+ # Address corresponding to a wallet account. Private key addresses are not supported.
19
+ attr_accessor :address
20
+
21
+ # CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet or 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' for Solana mainnet). Human-readable Solana aliases ('solana:mainnet', 'solana:devnet') are also accepted and normalized to canonical CAIP-2 values.
22
+ attr_accessor :caip2
23
+
24
+ class EnumAttributeValidator
25
+ attr_reader :datatype
26
+ attr_reader :allowable_values
27
+
28
+ def initialize(datatype, allowable_values)
29
+ @allowable_values = allowable_values.map do |value|
30
+ case datatype.to_s
31
+ when /Integer/i
32
+ value.to_i
33
+ when /Float/i
34
+ value.to_f
35
+ else
36
+ value
37
+ end
38
+ end
39
+ end
40
+
41
+ def valid?(value)
42
+ !value || allowable_values.include?(value)
43
+ end
44
+ end
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'organization_id' => :'organizationId',
50
+ :'address' => :'address',
51
+ :'caip2' => :'caip2'
52
+ }
53
+ end
54
+
55
+ # Attribute type mapping.
56
+ def self.openapi_types
57
+ {
58
+ :'organization_id' => :'Object',
59
+ :'address' => :'Object',
60
+ :'caip2' => :'Object'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ ])
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ def initialize(attributes = {})
73
+ if (!attributes.is_a?(Hash))
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetWalletAddressBalancesRequest` initialize method"
75
+ end
76
+
77
+ # check to see if the attribute exists and convert string to symbol for hash key
78
+ attributes = attributes.each_with_object({}) { |(k, v), h|
79
+ if (!self.class.attribute_map.key?(k.to_sym))
80
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetWalletAddressBalancesRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
81
+ end
82
+ h[k.to_sym] = v
83
+ }
84
+
85
+ if attributes.key?(:'organization_id')
86
+ self.organization_id = attributes[:'organization_id']
87
+ end
88
+
89
+ if attributes.key?(:'address')
90
+ self.address = attributes[:'address']
91
+ end
92
+
93
+ if attributes.key?(:'caip2')
94
+ self.caip2 = attributes[:'caip2']
95
+ end
96
+ end
97
+
98
+ # Show invalid properties with the reasons. Usually used together with valid?
99
+ # @return Array for valid properties with the reasons
100
+ def list_invalid_properties
101
+ invalid_properties = Array.new
102
+ if @organization_id.nil?
103
+ invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
104
+ end
105
+
106
+ if @address.nil?
107
+ invalid_properties.push('invalid value for "address", address cannot be nil.')
108
+ end
109
+
110
+ if @caip2.nil?
111
+ invalid_properties.push('invalid value for "caip2", caip2 cannot be nil.')
112
+ end
113
+
114
+ invalid_properties
115
+ end
116
+
117
+ # Check to see if the all the properties in the model are valid
118
+ # @return true if the model is valid
119
+ def valid?
120
+ return false if @organization_id.nil?
121
+ return false if @address.nil?
122
+ return false if @caip2.nil?
123
+ caip2_validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002', 'eip155:42161', 'eip155:421614', 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1'])
124
+ return false unless caip2_validator.valid?(@caip2)
125
+ true
126
+ end
127
+
128
+ # Custom attribute writer method checking allowed values (enum).
129
+ # @param [Object] caip2 Object to be assigned
130
+ def caip2=(caip2)
131
+ validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002', 'eip155:42161', 'eip155:421614', 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1'])
132
+ unless validator.valid?(caip2)
133
+ fail ArgumentError, "invalid value for \"caip2\", must be one of #{validator.allowable_values}."
134
+ end
135
+ @caip2 = caip2
136
+ end
137
+
138
+ # Checks equality by comparing each attribute.
139
+ # @param [Object] Object to be compared
140
+ def ==(o)
141
+ return true if self.equal?(o)
142
+ self.class == o.class &&
143
+ organization_id == o.organization_id &&
144
+ address == o.address &&
145
+ caip2 == o.caip2
146
+ end
147
+
148
+ # @see the `==` method
149
+ # @param [Object] Object to be compared
150
+ def eql?(o)
151
+ self == o
152
+ end
153
+
154
+ # Calculates hash code according to all attributes.
155
+ # @return [Integer] Hash code
156
+ def hash
157
+ [organization_id, address, caip2].hash
158
+ end
159
+
160
+ # Builds the object from hash
161
+ # @param [Hash] attributes Model attributes in the form of hash
162
+ # @return [Object] Returns the model itself
163
+ def self.build_from_hash(attributes)
164
+ new.build_from_hash(attributes)
165
+ end
166
+
167
+ # Builds the object from hash
168
+ # @param [Hash] attributes Model attributes in the form of hash
169
+ # @return [Object] Returns the model itself
170
+ def build_from_hash(attributes)
171
+ return nil unless attributes.is_a?(Hash)
172
+ self.class.openapi_types.each_pair do |key, type|
173
+ if type =~ /\AArray<(.*)>/i
174
+ # check to ensure the input is an array given that the attribute
175
+ # is documented as an array but the input is not
176
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
177
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
178
+ end
179
+ elsif !attributes[self.class.attribute_map[key]].nil?
180
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
181
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
182
+ self.send("#{key}=", nil)
183
+ end
184
+ end
185
+
186
+ self
187
+ end
188
+
189
+ # Deserializes the data based on type
190
+ # @param string type Data type
191
+ # @param string value Value to be deserialized
192
+ # @return [Object] Deserialized data
193
+ def _deserialize(type, value)
194
+ case type.to_sym
195
+ when :DateTime
196
+ DateTime.parse(value)
197
+ when :Date
198
+ Date.parse(value)
199
+ when :String
200
+ value.to_s
201
+ when :Integer
202
+ value.to_i
203
+ when :Float
204
+ value.to_f
205
+ when :Boolean
206
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
207
+ true
208
+ else
209
+ false
210
+ end
211
+ when :Object
212
+ # generic object (usually a Hash), return directly
213
+ value
214
+ when /\AArray<(?<inner_type>.+)>\z/
215
+ inner_type = Regexp.last_match[:inner_type]
216
+ value.map { |v| _deserialize(inner_type, v) }
217
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
218
+ k_type = Regexp.last_match[:k_type]
219
+ v_type = Regexp.last_match[:v_type]
220
+ {}.tap do |hash|
221
+ value.each do |k, v|
222
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
223
+ end
224
+ end
225
+ else # model
226
+ TurnkeyClient.const_get(type).build_from_hash(value)
227
+ end
228
+ end
229
+
230
+ # Returns the string representation of the object
231
+ # @return [String] String presentation of the object
232
+ def to_s
233
+ to_hash.to_s
234
+ end
235
+
236
+ # to_body is an alias to to_hash (backward compatibility)
237
+ # @return [Hash] Returns the object in the form of hash
238
+ def to_body
239
+ to_hash
240
+ end
241
+
242
+ # Returns the object in the form of hash
243
+ # @return [Hash] Returns the object in the form of hash
244
+ def to_hash
245
+ hash = {}
246
+ self.class.attribute_map.each_pair do |attr, param|
247
+ value = self.send(attr)
248
+ if value.nil?
249
+ is_nullable = self.class.openapi_nullable.include?(attr)
250
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
251
+ end
252
+
253
+ hash[param] = _to_hash(value)
254
+ end
255
+ hash
256
+ end
257
+
258
+ # Outputs non-array value in the form of hash
259
+ # For object, use to_hash. Otherwise, just return the value
260
+ # @param [Object] value Any valid value
261
+ # @return [Hash] Returns the value in the form of hash
262
+ def _to_hash(value)
263
+ if value.is_a?(Array)
264
+ value.compact.map { |v| _to_hash(v) }
265
+ elsif value.is_a?(Hash)
266
+ {}.tap do |hash|
267
+ value.each { |k, v| hash[k] = _to_hash(v) }
268
+ end
269
+ elsif value.respond_to? :to_hash
270
+ value.to_hash
271
+ else
272
+ value
273
+ end
274
+ end end
275
+ end