turnkey_client 0.0.14 → 0.0.15

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 (57) hide show
  1. checksums.yaml +4 -4
  2. data/lib/turnkey_client/api/app_proof_api.rb +77 -0
  3. data/lib/turnkey_client/api/boot_proof_api.rb +135 -0
  4. data/lib/turnkey_client/api/default_api.rb +77 -0
  5. data/lib/turnkey_client/api/user_auth_api.rb +290 -0
  6. data/lib/turnkey_client/models/activity.rb +13 -1
  7. data/lib/turnkey_client/models/activity_type.rb +7 -0
  8. data/lib/turnkey_client/models/app_proof.rb +255 -0
  9. data/lib/turnkey_client/models/boot_proof.rb +315 -0
  10. data/lib/turnkey_client/models/boot_proof_response.rb +210 -0
  11. data/lib/turnkey_client/models/common_v1_policy_evaluation.rb +214 -0
  12. data/lib/turnkey_client/models/create_oauth2_credential_intent.rb +240 -0
  13. data/lib/turnkey_client/models/create_oauth2_credential_request.rb +288 -0
  14. data/lib/turnkey_client/models/create_oauth2_credential_result.rb +211 -0
  15. data/lib/turnkey_client/models/create_sub_organization_intent_v7.rb +16 -5
  16. data/lib/turnkey_client/models/delete_oauth2_credential_intent.rb +211 -0
  17. data/lib/turnkey_client/models/delete_oauth2_credential_request.rb +288 -0
  18. data/lib/turnkey_client/models/delete_oauth2_credential_result.rb +211 -0
  19. data/lib/turnkey_client/models/disable_auth_proxy_intent.rb +196 -0
  20. data/lib/turnkey_client/models/disable_auth_proxy_result.rb +196 -0
  21. data/lib/turnkey_client/models/enable_auth_proxy_intent.rb +196 -0
  22. data/lib/turnkey_client/models/enable_auth_proxy_result.rb +211 -0
  23. data/lib/turnkey_client/models/feature_name.rb +1 -0
  24. data/lib/turnkey_client/models/get_app_proofs_request.rb +226 -0
  25. data/lib/turnkey_client/models/get_app_proofs_response.rb +212 -0
  26. data/lib/turnkey_client/models/get_boot_proof_request.rb +226 -0
  27. data/lib/turnkey_client/models/get_latest_boot_proof_request.rb +226 -0
  28. data/lib/turnkey_client/models/get_oauth2_credential_request.rb +226 -0
  29. data/lib/turnkey_client/models/get_oauth2_credential_response.rb +210 -0
  30. data/lib/turnkey_client/models/get_wallet_accounts_request.rb +12 -1
  31. data/lib/turnkey_client/models/init_fiat_on_ramp_intent.rb +16 -5
  32. data/lib/turnkey_client/models/init_fiat_on_ramp_result.rb +14 -4
  33. data/lib/turnkey_client/models/intent.rb +67 -4
  34. data/lib/turnkey_client/models/list_oauth2_credentials_request.rb +211 -0
  35. data/lib/turnkey_client/models/list_oauth2_credentials_response.rb +212 -0
  36. data/lib/turnkey_client/models/oauth2_authenticate_intent.rb +278 -0
  37. data/lib/turnkey_client/models/oauth2_authenticate_request.rb +288 -0
  38. data/lib/turnkey_client/models/oauth2_authenticate_result.rb +211 -0
  39. data/lib/turnkey_client/models/oauth2_credential.rb +298 -0
  40. data/lib/turnkey_client/models/oauth2_provider.rb +27 -0
  41. data/lib/turnkey_client/models/otp_login_intent.rb +16 -5
  42. data/lib/turnkey_client/models/payload_encoding.rb +1 -0
  43. data/lib/turnkey_client/models/result.rb +67 -4
  44. data/lib/turnkey_client/models/signature_scheme.rb +26 -0
  45. data/lib/turnkey_client/models/smart_contract_interface.rb +329 -0
  46. data/lib/turnkey_client/models/update_auth_proxy_config_intent.rb +346 -0
  47. data/lib/turnkey_client/models/update_auth_proxy_config_result.rb +206 -0
  48. data/lib/turnkey_client/models/update_oauth2_credential_intent.rb +255 -0
  49. data/lib/turnkey_client/models/update_oauth2_credential_request.rb +288 -0
  50. data/lib/turnkey_client/models/update_oauth2_credential_result.rb +211 -0
  51. data/lib/turnkey_client/models/verify_otp_intent.rb +16 -5
  52. data/lib/turnkey_client/models/wallet_account.rb +14 -5
  53. data/lib/turnkey_client/models/wallet_kit_settings_params.rb +230 -0
  54. data/lib/turnkey_client/version.rb +1 -1
  55. data/lib/turnkey_client.rb +38 -2
  56. data/turnkey_client-0.0.14.gem +0 -0
  57. metadata +41 -2
@@ -0,0 +1,206 @@
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 UpdateAuthProxyConfigResult
15
+ # Unique identifier for a given User. (representing the turnkey signer user id)
16
+ attr_accessor :config_id
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :'config_id' => :'configId'
22
+ }
23
+ end
24
+
25
+ # Attribute type mapping.
26
+ def self.openapi_types
27
+ {
28
+ :'config_id' => :'Object'
29
+ }
30
+ end
31
+
32
+ # List of attributes with nullable: true
33
+ def self.openapi_nullable
34
+ Set.new([
35
+ ])
36
+ end
37
+
38
+ # Initializes the object
39
+ # @param [Hash] attributes Model attributes in the form of hash
40
+ def initialize(attributes = {})
41
+ if (!attributes.is_a?(Hash))
42
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::UpdateAuthProxyConfigResult` initialize method"
43
+ end
44
+
45
+ # check to see if the attribute exists and convert string to symbol for hash key
46
+ attributes = attributes.each_with_object({}) { |(k, v), h|
47
+ if (!self.class.attribute_map.key?(k.to_sym))
48
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::UpdateAuthProxyConfigResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
49
+ end
50
+ h[k.to_sym] = v
51
+ }
52
+
53
+ if attributes.key?(:'config_id')
54
+ self.config_id = attributes[:'config_id']
55
+ end
56
+ end
57
+
58
+ # Show invalid properties with the reasons. Usually used together with valid?
59
+ # @return Array for valid properties with the reasons
60
+ def list_invalid_properties
61
+ invalid_properties = Array.new
62
+ invalid_properties
63
+ end
64
+
65
+ # Check to see if the all the properties in the model are valid
66
+ # @return true if the model is valid
67
+ def valid?
68
+ true
69
+ end
70
+
71
+ # Checks equality by comparing each attribute.
72
+ # @param [Object] Object to be compared
73
+ def ==(o)
74
+ return true if self.equal?(o)
75
+ self.class == o.class &&
76
+ config_id == o.config_id
77
+ end
78
+
79
+ # @see the `==` method
80
+ # @param [Object] Object to be compared
81
+ def eql?(o)
82
+ self == o
83
+ end
84
+
85
+ # Calculates hash code according to all attributes.
86
+ # @return [Integer] Hash code
87
+ def hash
88
+ [config_id].hash
89
+ end
90
+
91
+ # Builds the object from hash
92
+ # @param [Hash] attributes Model attributes in the form of hash
93
+ # @return [Object] Returns the model itself
94
+ def self.build_from_hash(attributes)
95
+ new.build_from_hash(attributes)
96
+ end
97
+
98
+ # Builds the object from hash
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ # @return [Object] Returns the model itself
101
+ def build_from_hash(attributes)
102
+ return nil unless attributes.is_a?(Hash)
103
+ self.class.openapi_types.each_pair do |key, type|
104
+ if type =~ /\AArray<(.*)>/i
105
+ # check to ensure the input is an array given that the attribute
106
+ # is documented as an array but the input is not
107
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
108
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
109
+ end
110
+ elsif !attributes[self.class.attribute_map[key]].nil?
111
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
112
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
+ self.send("#{key}=", nil)
114
+ end
115
+ end
116
+
117
+ self
118
+ end
119
+
120
+ # Deserializes the data based on type
121
+ # @param string type Data type
122
+ # @param string value Value to be deserialized
123
+ # @return [Object] Deserialized data
124
+ def _deserialize(type, value)
125
+ case type.to_sym
126
+ when :DateTime
127
+ DateTime.parse(value)
128
+ when :Date
129
+ Date.parse(value)
130
+ when :String
131
+ value.to_s
132
+ when :Integer
133
+ value.to_i
134
+ when :Float
135
+ value.to_f
136
+ when :Boolean
137
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
138
+ true
139
+ else
140
+ false
141
+ end
142
+ when :Object
143
+ # generic object (usually a Hash), return directly
144
+ value
145
+ when /\AArray<(?<inner_type>.+)>\z/
146
+ inner_type = Regexp.last_match[:inner_type]
147
+ value.map { |v| _deserialize(inner_type, v) }
148
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
149
+ k_type = Regexp.last_match[:k_type]
150
+ v_type = Regexp.last_match[:v_type]
151
+ {}.tap do |hash|
152
+ value.each do |k, v|
153
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
154
+ end
155
+ end
156
+ else # model
157
+ TurnkeyClient.const_get(type).build_from_hash(value)
158
+ end
159
+ end
160
+
161
+ # Returns the string representation of the object
162
+ # @return [String] String presentation of the object
163
+ def to_s
164
+ to_hash.to_s
165
+ end
166
+
167
+ # to_body is an alias to to_hash (backward compatibility)
168
+ # @return [Hash] Returns the object in the form of hash
169
+ def to_body
170
+ to_hash
171
+ end
172
+
173
+ # Returns the object in the form of hash
174
+ # @return [Hash] Returns the object in the form of hash
175
+ def to_hash
176
+ hash = {}
177
+ self.class.attribute_map.each_pair do |attr, param|
178
+ value = self.send(attr)
179
+ if value.nil?
180
+ is_nullable = self.class.openapi_nullable.include?(attr)
181
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
182
+ end
183
+
184
+ hash[param] = _to_hash(value)
185
+ end
186
+ hash
187
+ end
188
+
189
+ # Outputs non-array value in the form of hash
190
+ # For object, use to_hash. Otherwise, just return the value
191
+ # @param [Object] value Any valid value
192
+ # @return [Hash] Returns the value in the form of hash
193
+ def _to_hash(value)
194
+ if value.is_a?(Array)
195
+ value.compact.map { |v| _to_hash(v) }
196
+ elsif value.is_a?(Hash)
197
+ {}.tap do |hash|
198
+ value.each { |k, v| hash[k] = _to_hash(v) }
199
+ end
200
+ elsif value.respond_to? :to_hash
201
+ value.to_hash
202
+ else
203
+ value
204
+ end
205
+ end end
206
+ end
@@ -0,0 +1,255 @@
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 UpdateOauth2CredentialIntent
15
+ # The ID of the OAuth 2.0 credential to update
16
+ attr_accessor :oauth2_credential_id
17
+
18
+ attr_accessor :provider
19
+
20
+ # The Client ID issued by the OAuth 2.0 provider
21
+ attr_accessor :client_id
22
+
23
+ # The client secret issued by the OAuth 2.0 provider encrypted to the TLS Fetcher quorum key
24
+ attr_accessor :encrypted_client_secret
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'oauth2_credential_id' => :'oauth2CredentialId',
30
+ :'provider' => :'provider',
31
+ :'client_id' => :'clientId',
32
+ :'encrypted_client_secret' => :'encryptedClientSecret'
33
+ }
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.openapi_types
38
+ {
39
+ :'oauth2_credential_id' => :'Object',
40
+ :'provider' => :'Object',
41
+ :'client_id' => :'Object',
42
+ :'encrypted_client_secret' => :'Object'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ ])
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::UpdateOauth2CredentialIntent` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::UpdateOauth2CredentialIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'oauth2_credential_id')
68
+ self.oauth2_credential_id = attributes[:'oauth2_credential_id']
69
+ end
70
+
71
+ if attributes.key?(:'provider')
72
+ self.provider = attributes[:'provider']
73
+ end
74
+
75
+ if attributes.key?(:'client_id')
76
+ self.client_id = attributes[:'client_id']
77
+ end
78
+
79
+ if attributes.key?(:'encrypted_client_secret')
80
+ self.encrypted_client_secret = attributes[:'encrypted_client_secret']
81
+ end
82
+ end
83
+
84
+ # Show invalid properties with the reasons. Usually used together with valid?
85
+ # @return Array for valid properties with the reasons
86
+ def list_invalid_properties
87
+ invalid_properties = Array.new
88
+ if @oauth2_credential_id.nil?
89
+ invalid_properties.push('invalid value for "oauth2_credential_id", oauth2_credential_id cannot be nil.')
90
+ end
91
+
92
+ if @provider.nil?
93
+ invalid_properties.push('invalid value for "provider", provider cannot be nil.')
94
+ end
95
+
96
+ if @client_id.nil?
97
+ invalid_properties.push('invalid value for "client_id", client_id cannot be nil.')
98
+ end
99
+
100
+ if @encrypted_client_secret.nil?
101
+ invalid_properties.push('invalid value for "encrypted_client_secret", encrypted_client_secret cannot be nil.')
102
+ end
103
+
104
+ invalid_properties
105
+ end
106
+
107
+ # Check to see if the all the properties in the model are valid
108
+ # @return true if the model is valid
109
+ def valid?
110
+ return false if @oauth2_credential_id.nil?
111
+ return false if @provider.nil?
112
+ return false if @client_id.nil?
113
+ return false if @encrypted_client_secret.nil?
114
+ true
115
+ end
116
+
117
+ # Checks equality by comparing each attribute.
118
+ # @param [Object] Object to be compared
119
+ def ==(o)
120
+ return true if self.equal?(o)
121
+ self.class == o.class &&
122
+ oauth2_credential_id == o.oauth2_credential_id &&
123
+ provider == o.provider &&
124
+ client_id == o.client_id &&
125
+ encrypted_client_secret == o.encrypted_client_secret
126
+ end
127
+
128
+ # @see the `==` method
129
+ # @param [Object] Object to be compared
130
+ def eql?(o)
131
+ self == o
132
+ end
133
+
134
+ # Calculates hash code according to all attributes.
135
+ # @return [Integer] Hash code
136
+ def hash
137
+ [oauth2_credential_id, provider, client_id, encrypted_client_secret].hash
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def self.build_from_hash(attributes)
144
+ new.build_from_hash(attributes)
145
+ end
146
+
147
+ # Builds the object from hash
148
+ # @param [Hash] attributes Model attributes in the form of hash
149
+ # @return [Object] Returns the model itself
150
+ def build_from_hash(attributes)
151
+ return nil unless attributes.is_a?(Hash)
152
+ self.class.openapi_types.each_pair do |key, type|
153
+ if type =~ /\AArray<(.*)>/i
154
+ # check to ensure the input is an array given that the attribute
155
+ # is documented as an array but the input is not
156
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
157
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
158
+ end
159
+ elsif !attributes[self.class.attribute_map[key]].nil?
160
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
161
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
162
+ self.send("#{key}=", nil)
163
+ end
164
+ end
165
+
166
+ self
167
+ end
168
+
169
+ # Deserializes the data based on type
170
+ # @param string type Data type
171
+ # @param string value Value to be deserialized
172
+ # @return [Object] Deserialized data
173
+ def _deserialize(type, value)
174
+ case type.to_sym
175
+ when :DateTime
176
+ DateTime.parse(value)
177
+ when :Date
178
+ Date.parse(value)
179
+ when :String
180
+ value.to_s
181
+ when :Integer
182
+ value.to_i
183
+ when :Float
184
+ value.to_f
185
+ when :Boolean
186
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
187
+ true
188
+ else
189
+ false
190
+ end
191
+ when :Object
192
+ # generic object (usually a Hash), return directly
193
+ value
194
+ when /\AArray<(?<inner_type>.+)>\z/
195
+ inner_type = Regexp.last_match[:inner_type]
196
+ value.map { |v| _deserialize(inner_type, v) }
197
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
198
+ k_type = Regexp.last_match[:k_type]
199
+ v_type = Regexp.last_match[:v_type]
200
+ {}.tap do |hash|
201
+ value.each do |k, v|
202
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
203
+ end
204
+ end
205
+ else # model
206
+ TurnkeyClient.const_get(type).build_from_hash(value)
207
+ end
208
+ end
209
+
210
+ # Returns the string representation of the object
211
+ # @return [String] String presentation of the object
212
+ def to_s
213
+ to_hash.to_s
214
+ end
215
+
216
+ # to_body is an alias to to_hash (backward compatibility)
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_body
219
+ to_hash
220
+ end
221
+
222
+ # Returns the object in the form of hash
223
+ # @return [Hash] Returns the object in the form of hash
224
+ def to_hash
225
+ hash = {}
226
+ self.class.attribute_map.each_pair do |attr, param|
227
+ value = self.send(attr)
228
+ if value.nil?
229
+ is_nullable = self.class.openapi_nullable.include?(attr)
230
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
231
+ end
232
+
233
+ hash[param] = _to_hash(value)
234
+ end
235
+ hash
236
+ end
237
+
238
+ # Outputs non-array value in the form of hash
239
+ # For object, use to_hash. Otherwise, just return the value
240
+ # @param [Object] value Any valid value
241
+ # @return [Hash] Returns the value in the form of hash
242
+ def _to_hash(value)
243
+ if value.is_a?(Array)
244
+ value.compact.map { |v| _to_hash(v) }
245
+ elsif value.is_a?(Hash)
246
+ {}.tap do |hash|
247
+ value.each { |k, v| hash[k] = _to_hash(v) }
248
+ end
249
+ elsif value.respond_to? :to_hash
250
+ value.to_hash
251
+ else
252
+ value
253
+ end
254
+ end end
255
+ end