turnkey_client 0.0.13 → 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 (208) hide show
  1. checksums.yaml +4 -4
  2. data/lib/turnkey_client/api/activities_api.rb +66 -8
  3. data/lib/turnkey_client/api/api_keys_api.rb +14 -14
  4. data/lib/turnkey_client/api/app_proof_api.rb +77 -0
  5. data/lib/turnkey_client/api/authenticators_api.rb +16 -16
  6. data/lib/turnkey_client/api/boot_proof_api.rb +135 -0
  7. data/lib/turnkey_client/api/consensus_api.rb +8 -8
  8. data/lib/turnkey_client/api/default_api.rb +77 -0
  9. data/lib/turnkey_client/api/features_api.rb +8 -8
  10. data/lib/turnkey_client/api/invitations_api.rb +8 -8
  11. data/lib/turnkey_client/api/on_ramp_api.rb +77 -0
  12. data/lib/turnkey_client/api/organizations_api.rb +18 -18
  13. data/lib/turnkey_client/api/policies_api.rb +256 -24
  14. data/lib/turnkey_client/api/private_key_tags_api.rb +12 -12
  15. data/lib/turnkey_client/api/private_keys_api.rb +28 -28
  16. data/lib/turnkey_client/api/sessions_api.rb +184 -10
  17. data/lib/turnkey_client/api/signing_api.rb +12 -12
  18. data/lib/turnkey_client/api/user_auth_api.rb +310 -20
  19. data/lib/turnkey_client/api/user_recovery_api.rb +6 -6
  20. data/lib/turnkey_client/api/user_tags_api.rb +12 -12
  21. data/lib/turnkey_client/api/user_verification_api.rb +135 -0
  22. data/lib/turnkey_client/api/users_api.rb +194 -20
  23. data/lib/turnkey_client/api/wallets_api.rb +48 -48
  24. data/lib/turnkey_client/models/activity.rb +13 -1
  25. data/lib/turnkey_client/models/activity_type.rb +21 -0
  26. data/lib/turnkey_client/models/activity_v1_policy_evaluation.rb +287 -0
  27. data/lib/turnkey_client/models/address_format.rb +1 -0
  28. data/lib/turnkey_client/models/api_key.rb +1 -0
  29. data/lib/turnkey_client/models/api_key_params.rb +1 -0
  30. data/lib/turnkey_client/models/api_key_params_v2.rb +1 -0
  31. data/lib/turnkey_client/models/api_only_user_params.rb +3 -2
  32. data/lib/turnkey_client/models/app_proof.rb +255 -0
  33. data/lib/turnkey_client/models/boot_proof.rb +315 -0
  34. data/lib/turnkey_client/models/boot_proof_response.rb +210 -0
  35. data/lib/turnkey_client/models/common_v1_policy_evaluation.rb +214 -0
  36. data/lib/turnkey_client/models/create_oauth2_credential_intent.rb +240 -0
  37. data/lib/turnkey_client/models/create_oauth2_credential_request.rb +288 -0
  38. data/lib/turnkey_client/models/create_oauth2_credential_result.rb +211 -0
  39. data/lib/turnkey_client/models/create_organization_intent.rb +1 -0
  40. data/lib/turnkey_client/models/create_organization_intent_v2.rb +1 -0
  41. data/lib/turnkey_client/models/create_policy_intent_v3.rb +2 -0
  42. data/lib/turnkey_client/models/create_read_write_session_intent.rb +3 -1
  43. data/lib/turnkey_client/models/create_read_write_session_intent_v2.rb +19 -5
  44. data/lib/turnkey_client/models/create_smart_contract_interface_intent.rb +265 -0
  45. data/lib/turnkey_client/models/create_smart_contract_interface_request.rb +288 -0
  46. data/lib/turnkey_client/models/create_smart_contract_interface_result.rb +211 -0
  47. data/lib/turnkey_client/models/create_sub_organization_intent_v4.rb +2 -0
  48. data/lib/turnkey_client/models/create_sub_organization_intent_v5.rb +2 -0
  49. data/lib/turnkey_client/models/create_sub_organization_intent_v6.rb +2 -0
  50. data/lib/turnkey_client/models/create_sub_organization_intent_v7.rb +19 -4
  51. data/lib/turnkey_client/models/create_users_intent_v3.rb +213 -0
  52. data/lib/turnkey_client/models/create_users_request.rb +2 -2
  53. data/lib/turnkey_client/models/create_wallet_intent.rb +2 -1
  54. data/lib/turnkey_client/models/credential_type.rb +3 -0
  55. data/lib/turnkey_client/models/data_v1_smart_contract_interface.rb +329 -0
  56. data/lib/turnkey_client/models/delete_oauth2_credential_intent.rb +211 -0
  57. data/lib/turnkey_client/models/delete_oauth2_credential_request.rb +288 -0
  58. data/lib/turnkey_client/models/delete_oauth2_credential_result.rb +211 -0
  59. data/lib/turnkey_client/models/delete_payment_method_intent.rb +1 -0
  60. data/lib/turnkey_client/models/delete_private_keys_intent.rb +1 -0
  61. data/lib/turnkey_client/models/delete_smart_contract_interface_intent.rb +211 -0
  62. data/lib/turnkey_client/models/delete_smart_contract_interface_request.rb +288 -0
  63. data/lib/turnkey_client/models/delete_smart_contract_interface_result.rb +211 -0
  64. data/lib/turnkey_client/models/delete_sub_organization_intent.rb +1 -0
  65. data/lib/turnkey_client/models/delete_wallets_intent.rb +1 -0
  66. data/lib/turnkey_client/models/disable_auth_proxy_intent.rb +196 -0
  67. data/lib/turnkey_client/models/disable_auth_proxy_result.rb +196 -0
  68. data/lib/turnkey_client/models/email_auth_intent.rb +31 -5
  69. data/lib/turnkey_client/models/email_auth_intent_v2.rb +31 -5
  70. data/lib/turnkey_client/models/email_customization_params.rb +5 -0
  71. data/lib/turnkey_client/models/enable_auth_proxy_intent.rb +196 -0
  72. data/lib/turnkey_client/models/enable_auth_proxy_result.rb +211 -0
  73. data/lib/turnkey_client/models/feature.rb +1 -0
  74. data/lib/turnkey_client/models/feature_name.rb +1 -0
  75. data/lib/turnkey_client/models/fiat_on_ramp_blockchain_network.rb +29 -0
  76. data/lib/turnkey_client/models/fiat_on_ramp_crypto_currency.rb +29 -0
  77. data/lib/turnkey_client/models/fiat_on_ramp_currency.rb +59 -0
  78. data/lib/turnkey_client/models/fiat_on_ramp_payment_method.rb +38 -0
  79. data/lib/turnkey_client/models/fiat_on_ramp_provider.rb +27 -0
  80. data/lib/turnkey_client/models/get_activities_request.rb +3 -3
  81. data/lib/turnkey_client/models/get_activities_response.rb +1 -1
  82. data/lib/turnkey_client/models/get_activity_request.rb +2 -2
  83. data/lib/turnkey_client/models/get_api_key_request.rb +1 -1
  84. data/lib/turnkey_client/models/get_api_keys_request.rb +3 -2
  85. data/lib/turnkey_client/models/get_app_proofs_request.rb +226 -0
  86. data/lib/turnkey_client/models/get_app_proofs_response.rb +212 -0
  87. data/lib/turnkey_client/models/get_authenticator_request.rb +2 -2
  88. data/lib/turnkey_client/models/get_authenticators_request.rb +2 -2
  89. data/lib/turnkey_client/models/get_boot_proof_request.rb +226 -0
  90. data/lib/turnkey_client/models/get_latest_boot_proof_request.rb +226 -0
  91. data/lib/turnkey_client/models/get_oauth2_credential_request.rb +226 -0
  92. data/lib/turnkey_client/models/get_oauth2_credential_response.rb +210 -0
  93. data/lib/turnkey_client/models/get_oauth_providers_request.rb +3 -2
  94. data/lib/turnkey_client/models/get_oauth_providers_response.rb +1 -1
  95. data/lib/turnkey_client/models/get_organization_configs_request.rb +1 -1
  96. data/lib/turnkey_client/models/get_policies_request.rb +1 -1
  97. data/lib/turnkey_client/models/get_policies_response.rb +1 -1
  98. data/lib/turnkey_client/models/get_policy_evaluations_request.rb +226 -0
  99. data/lib/turnkey_client/models/get_policy_evaluations_response.rb +212 -0
  100. data/lib/turnkey_client/models/get_policy_request.rb +2 -2
  101. data/lib/turnkey_client/models/get_private_key_request.rb +2 -2
  102. data/lib/turnkey_client/models/get_private_keys_request.rb +1 -1
  103. data/lib/turnkey_client/models/get_private_keys_response.rb +1 -1
  104. data/lib/turnkey_client/models/get_smart_contract_interface_request.rb +226 -0
  105. data/lib/turnkey_client/models/get_smart_contract_interface_response.rb +210 -0
  106. data/lib/turnkey_client/models/get_smart_contract_interfaces_request.rb +211 -0
  107. data/lib/turnkey_client/models/get_smart_contract_interfaces_response.rb +213 -0
  108. data/lib/turnkey_client/models/get_sub_org_ids_request.rb +2 -2
  109. data/lib/turnkey_client/models/get_user_request.rb +2 -2
  110. data/lib/turnkey_client/models/get_users_request.rb +1 -1
  111. data/lib/turnkey_client/models/get_users_response.rb +1 -1
  112. data/lib/turnkey_client/models/get_verified_sub_org_ids_request.rb +2 -2
  113. data/lib/turnkey_client/models/get_wallet_account_request.rb +6 -4
  114. data/lib/turnkey_client/models/get_wallet_accounts_request.rb +15 -8
  115. data/lib/turnkey_client/models/get_wallet_accounts_response.rb +1 -1
  116. data/lib/turnkey_client/models/get_wallet_request.rb +2 -2
  117. data/lib/turnkey_client/models/get_wallets_request.rb +1 -1
  118. data/lib/turnkey_client/models/get_wallets_response.rb +1 -1
  119. data/lib/turnkey_client/models/get_whoami_request.rb +1 -1
  120. data/lib/turnkey_client/models/get_whoami_response.rb +4 -4
  121. data/lib/turnkey_client/models/init_fiat_on_ramp_intent.rb +326 -0
  122. data/lib/turnkey_client/models/init_fiat_on_ramp_request.rb +288 -0
  123. data/lib/turnkey_client/models/init_fiat_on_ramp_result.rb +236 -0
  124. data/lib/turnkey_client/models/init_otp_auth_intent.rb +28 -4
  125. data/lib/turnkey_client/models/init_otp_auth_intent_v2.rb +310 -0
  126. data/lib/turnkey_client/models/init_otp_auth_request.rb +2 -2
  127. data/lib/turnkey_client/models/init_otp_auth_result_v2.rb +211 -0
  128. data/lib/turnkey_client/models/init_otp_intent.rb +321 -0
  129. data/lib/turnkey_client/models/init_otp_request.rb +288 -0
  130. data/lib/turnkey_client/models/init_otp_result.rb +211 -0
  131. data/lib/turnkey_client/models/init_user_email_recovery_intent.rb +2 -1
  132. data/lib/turnkey_client/models/intent.rb +193 -4
  133. data/lib/turnkey_client/models/invitation_params.rb +1 -1
  134. data/lib/turnkey_client/models/list_oauth2_credentials_request.rb +211 -0
  135. data/lib/turnkey_client/models/list_oauth2_credentials_response.rb +212 -0
  136. data/lib/turnkey_client/models/list_private_key_tags_request.rb +1 -1
  137. data/lib/turnkey_client/models/list_private_key_tags_response.rb +1 -1
  138. data/lib/turnkey_client/models/list_user_tags_request.rb +1 -1
  139. data/lib/turnkey_client/models/list_user_tags_response.rb +1 -1
  140. data/lib/turnkey_client/models/oauth2_authenticate_intent.rb +278 -0
  141. data/lib/turnkey_client/models/oauth2_authenticate_request.rb +288 -0
  142. data/lib/turnkey_client/models/oauth2_authenticate_result.rb +211 -0
  143. data/lib/turnkey_client/models/oauth2_credential.rb +298 -0
  144. data/lib/turnkey_client/models/oauth2_provider.rb +27 -0
  145. data/lib/turnkey_client/models/oauth_intent.rb +18 -5
  146. data/lib/turnkey_client/models/oauth_login_intent.rb +248 -0
  147. data/lib/turnkey_client/models/oauth_login_request.rb +288 -0
  148. data/lib/turnkey_client/models/oauth_login_result.rb +211 -0
  149. data/lib/turnkey_client/models/otp_auth_intent.rb +10 -2
  150. data/lib/turnkey_client/models/otp_login_intent.rb +259 -0
  151. data/lib/turnkey_client/models/otp_login_request.rb +288 -0
  152. data/lib/turnkey_client/models/otp_login_result.rb +211 -0
  153. data/lib/turnkey_client/models/outcome.rb +31 -0
  154. data/lib/turnkey_client/models/payload_encoding.rb +2 -0
  155. data/lib/turnkey_client/models/policy.rb +2 -0
  156. data/lib/turnkey_client/models/private_key_params.rb +1 -1
  157. data/lib/turnkey_client/models/result.rb +184 -4
  158. data/lib/turnkey_client/models/root_user_params.rb +3 -2
  159. data/lib/turnkey_client/models/root_user_params_v2.rb +4 -3
  160. data/lib/turnkey_client/models/root_user_params_v3.rb +4 -3
  161. data/lib/turnkey_client/models/root_user_params_v4.rb +5 -3
  162. data/lib/turnkey_client/models/set_organization_feature_intent.rb +1 -0
  163. data/lib/turnkey_client/models/signature_scheme.rb +26 -0
  164. data/lib/turnkey_client/models/simple_client_extension_results.rb +2 -0
  165. data/lib/turnkey_client/models/smart_contract_interface.rb +329 -0
  166. data/lib/turnkey_client/models/smart_contract_interface_type.rb +27 -0
  167. data/lib/turnkey_client/models/sms_customization_params.rb +1 -0
  168. data/lib/turnkey_client/models/stamp_login_intent.rb +233 -0
  169. data/lib/turnkey_client/models/stamp_login_request.rb +288 -0
  170. data/lib/turnkey_client/models/stamp_login_result.rb +211 -0
  171. data/lib/turnkey_client/models/transaction_type.rb +1 -0
  172. data/lib/turnkey_client/models/ump_v1_policy_evaluation.rb +214 -0
  173. data/lib/turnkey_client/models/update_auth_proxy_config_intent.rb +346 -0
  174. data/lib/turnkey_client/models/update_auth_proxy_config_result.rb +206 -0
  175. data/lib/turnkey_client/models/update_oauth2_credential_intent.rb +255 -0
  176. data/lib/turnkey_client/models/update_oauth2_credential_request.rb +288 -0
  177. data/lib/turnkey_client/models/update_oauth2_credential_result.rb +211 -0
  178. data/lib/turnkey_client/models/update_policy_intent.rb +4 -0
  179. data/lib/turnkey_client/models/update_policy_intent_v2.rb +264 -0
  180. data/lib/turnkey_client/models/update_policy_request.rb +2 -2
  181. data/lib/turnkey_client/models/update_policy_result_v2.rb +211 -0
  182. data/lib/turnkey_client/models/update_private_key_tag_intent.rb +1 -0
  183. data/lib/turnkey_client/models/update_user_email_intent.rb +237 -0
  184. data/lib/turnkey_client/models/update_user_email_request.rb +288 -0
  185. data/lib/turnkey_client/models/update_user_email_result.rb +211 -0
  186. data/lib/turnkey_client/models/update_user_intent.rb +4 -1
  187. data/lib/turnkey_client/models/update_user_name_intent.rb +226 -0
  188. data/lib/turnkey_client/models/update_user_name_request.rb +288 -0
  189. data/lib/turnkey_client/models/update_user_name_result.rb +211 -0
  190. data/lib/turnkey_client/models/update_user_phone_number_intent.rb +237 -0
  191. data/lib/turnkey_client/models/update_user_phone_number_request.rb +288 -0
  192. data/lib/turnkey_client/models/update_user_phone_number_result.rb +211 -0
  193. data/lib/turnkey_client/models/update_user_tag_intent.rb +1 -0
  194. data/lib/turnkey_client/models/user.rb +3 -1
  195. data/lib/turnkey_client/models/user_params.rb +4 -3
  196. data/lib/turnkey_client/models/user_params_v2.rb +4 -3
  197. data/lib/turnkey_client/models/user_params_v3.rb +301 -0
  198. data/lib/turnkey_client/models/verify_otp_intent.rb +248 -0
  199. data/lib/turnkey_client/models/verify_otp_request.rb +288 -0
  200. data/lib/turnkey_client/models/verify_otp_result.rb +211 -0
  201. data/lib/turnkey_client/models/wallet_account.rb +24 -4
  202. data/lib/turnkey_client/models/wallet_kit_settings_params.rb +230 -0
  203. data/lib/turnkey_client/models/wallet_params.rb +2 -1
  204. data/lib/turnkey_client/version.rb +1 -1
  205. data/lib/turnkey_client.rb +93 -0
  206. data/turnkey_client-0.0.13.gem +0 -0
  207. data/turnkey_client-0.0.14.gem +0 -0
  208. metadata +99 -2
@@ -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 GetAppProofsRequest
15
+ # Unique identifier for a given Organization.
16
+ attr_accessor :organization_id
17
+
18
+ # Unique identifier for a given activity.
19
+ attr_accessor :activity_id
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'organization_id' => :'organizationId',
25
+ :'activity_id' => :'activityId'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.openapi_types
31
+ {
32
+ :'organization_id' => :'Object',
33
+ :'activity_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::GetAppProofsRequest` 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::GetAppProofsRequest`. 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?(:'activity_id')
63
+ self.activity_id = attributes[:'activity_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 @activity_id.nil?
76
+ invalid_properties.push('invalid value for "activity_id", activity_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 @activity_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
+ activity_id == o.activity_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, activity_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,212 @@
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 GetAppProofsResponse
15
+ attr_accessor :app_proofs
16
+
17
+ # Attribute mapping from ruby-style variable name to JSON key.
18
+ def self.attribute_map
19
+ {
20
+ :'app_proofs' => :'appProofs'
21
+ }
22
+ end
23
+
24
+ # Attribute type mapping.
25
+ def self.openapi_types
26
+ {
27
+ :'app_proofs' => :'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::GetAppProofsResponse` 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::GetAppProofsResponse`. 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?(:'app_proofs')
53
+ if (value = attributes[:'app_proofs']).is_a?(Array)
54
+ self.app_proofs = value
55
+ end
56
+ end
57
+ end
58
+
59
+ # Show invalid properties with the reasons. Usually used together with valid?
60
+ # @return Array for valid properties with the reasons
61
+ def list_invalid_properties
62
+ invalid_properties = Array.new
63
+ if @app_proofs.nil?
64
+ invalid_properties.push('invalid value for "app_proofs", app_proofs cannot be nil.')
65
+ end
66
+
67
+ invalid_properties
68
+ end
69
+
70
+ # Check to see if the all the properties in the model are valid
71
+ # @return true if the model is valid
72
+ def valid?
73
+ return false if @app_proofs.nil?
74
+ true
75
+ end
76
+
77
+ # Checks equality by comparing each attribute.
78
+ # @param [Object] Object to be compared
79
+ def ==(o)
80
+ return true if self.equal?(o)
81
+ self.class == o.class &&
82
+ app_proofs == o.app_proofs
83
+ end
84
+
85
+ # @see the `==` method
86
+ # @param [Object] Object to be compared
87
+ def eql?(o)
88
+ self == o
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Integer] Hash code
93
+ def hash
94
+ [app_proofs].hash
95
+ end
96
+
97
+ # Builds the object from hash
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ # @return [Object] Returns the model itself
100
+ def self.build_from_hash(attributes)
101
+ new.build_from_hash(attributes)
102
+ end
103
+
104
+ # Builds the object from hash
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ # @return [Object] Returns the model itself
107
+ def build_from_hash(attributes)
108
+ return nil unless attributes.is_a?(Hash)
109
+ self.class.openapi_types.each_pair do |key, type|
110
+ if type =~ /\AArray<(.*)>/i
111
+ # check to ensure the input is an array given that the attribute
112
+ # is documented as an array but the input is not
113
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
114
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
115
+ end
116
+ elsif !attributes[self.class.attribute_map[key]].nil?
117
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
118
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
119
+ self.send("#{key}=", nil)
120
+ end
121
+ end
122
+
123
+ self
124
+ end
125
+
126
+ # Deserializes the data based on type
127
+ # @param string type Data type
128
+ # @param string value Value to be deserialized
129
+ # @return [Object] Deserialized data
130
+ def _deserialize(type, value)
131
+ case type.to_sym
132
+ when :DateTime
133
+ DateTime.parse(value)
134
+ when :Date
135
+ Date.parse(value)
136
+ when :String
137
+ value.to_s
138
+ when :Integer
139
+ value.to_i
140
+ when :Float
141
+ value.to_f
142
+ when :Boolean
143
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
144
+ true
145
+ else
146
+ false
147
+ end
148
+ when :Object
149
+ # generic object (usually a Hash), return directly
150
+ value
151
+ when /\AArray<(?<inner_type>.+)>\z/
152
+ inner_type = Regexp.last_match[:inner_type]
153
+ value.map { |v| _deserialize(inner_type, v) }
154
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
155
+ k_type = Regexp.last_match[:k_type]
156
+ v_type = Regexp.last_match[:v_type]
157
+ {}.tap do |hash|
158
+ value.each do |k, v|
159
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
160
+ end
161
+ end
162
+ else # model
163
+ TurnkeyClient.const_get(type).build_from_hash(value)
164
+ end
165
+ end
166
+
167
+ # Returns the string representation of the object
168
+ # @return [String] String presentation of the object
169
+ def to_s
170
+ to_hash.to_s
171
+ end
172
+
173
+ # to_body is an alias to to_hash (backward compatibility)
174
+ # @return [Hash] Returns the object in the form of hash
175
+ def to_body
176
+ to_hash
177
+ end
178
+
179
+ # Returns the object in the form of hash
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_hash
182
+ hash = {}
183
+ self.class.attribute_map.each_pair do |attr, param|
184
+ value = self.send(attr)
185
+ if value.nil?
186
+ is_nullable = self.class.openapi_nullable.include?(attr)
187
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
188
+ end
189
+
190
+ hash[param] = _to_hash(value)
191
+ end
192
+ hash
193
+ end
194
+
195
+ # Outputs non-array value in the form of hash
196
+ # For object, use to_hash. Otherwise, just return the value
197
+ # @param [Object] value Any valid value
198
+ # @return [Hash] Returns the value in the form of hash
199
+ def _to_hash(value)
200
+ if value.is_a?(Array)
201
+ value.compact.map { |v| _to_hash(v) }
202
+ elsif value.is_a?(Hash)
203
+ {}.tap do |hash|
204
+ value.each { |k, v| hash[k] = _to_hash(v) }
205
+ end
206
+ elsif value.respond_to? :to_hash
207
+ value.to_hash
208
+ else
209
+ value
210
+ end
211
+ end end
212
+ end
@@ -12,10 +12,10 @@ require 'date'
12
12
 
13
13
  module TurnkeyClient
14
14
  class GetAuthenticatorRequest
15
- # Unique identifier for a given Organization.
15
+ # Unique identifier for a given organization.
16
16
  attr_accessor :organization_id
17
17
 
18
- # Unique identifier for a given Authenticator.
18
+ # Unique identifier for a given authenticator.
19
19
  attr_accessor :authenticator_id
20
20
 
21
21
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -12,10 +12,10 @@ require 'date'
12
12
 
13
13
  module TurnkeyClient
14
14
  class GetAuthenticatorsRequest
15
- # Unique identifier for a given Organization.
15
+ # Unique identifier for a given organization.
16
16
  attr_accessor :organization_id
17
17
 
18
- # Unique identifier for a given User.
18
+ # Unique identifier for a given user.
19
19
  attr_accessor :user_id
20
20
 
21
21
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -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 GetBootProofRequest
15
+ # Unique identifier for a given Organization.
16
+ attr_accessor :organization_id
17
+
18
+ # Hex encoded ephemeral public key.
19
+ attr_accessor :ephemeral_key
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'organization_id' => :'organizationId',
25
+ :'ephemeral_key' => :'ephemeralKey'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.openapi_types
31
+ {
32
+ :'organization_id' => :'Object',
33
+ :'ephemeral_key' => :'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::GetBootProofRequest` 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::GetBootProofRequest`. 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?(:'ephemeral_key')
63
+ self.ephemeral_key = attributes[:'ephemeral_key']
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 @ephemeral_key.nil?
76
+ invalid_properties.push('invalid value for "ephemeral_key", ephemeral_key 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 @ephemeral_key.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
+ ephemeral_key == o.ephemeral_key
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, ephemeral_key].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