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,287 @@
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 ActivityV1PolicyEvaluation
15
+ # Unique identifier for a given policy evaluation.
16
+ attr_accessor :id
17
+
18
+ # Unique identifier for a given Activity.
19
+ attr_accessor :activity_id
20
+
21
+ # Unique identifier for the Organization the Activity belongs to.
22
+ attr_accessor :organization_id
23
+
24
+ # Unique identifier for the Vote associated with this policy evaluation.
25
+ attr_accessor :vote_id
26
+
27
+ # Detailed evaluation result for each Policy that was run.
28
+ attr_accessor :policy_evaluations
29
+
30
+ attr_accessor :created_at
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'id' => :'id',
36
+ :'activity_id' => :'activityId',
37
+ :'organization_id' => :'organizationId',
38
+ :'vote_id' => :'voteId',
39
+ :'policy_evaluations' => :'policyEvaluations',
40
+ :'created_at' => :'createdAt'
41
+ }
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.openapi_types
46
+ {
47
+ :'id' => :'Object',
48
+ :'activity_id' => :'Object',
49
+ :'organization_id' => :'Object',
50
+ :'vote_id' => :'Object',
51
+ :'policy_evaluations' => :'Object',
52
+ :'created_at' => :'Object'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::ActivityV1PolicyEvaluation` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!self.class.attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::ActivityV1PolicyEvaluation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'id')
78
+ self.id = attributes[:'id']
79
+ end
80
+
81
+ if attributes.key?(:'activity_id')
82
+ self.activity_id = attributes[:'activity_id']
83
+ end
84
+
85
+ if attributes.key?(:'organization_id')
86
+ self.organization_id = attributes[:'organization_id']
87
+ end
88
+
89
+ if attributes.key?(:'vote_id')
90
+ self.vote_id = attributes[:'vote_id']
91
+ end
92
+
93
+ if attributes.key?(:'policy_evaluations')
94
+ if (value = attributes[:'policy_evaluations']).is_a?(Array)
95
+ self.policy_evaluations = value
96
+ end
97
+ end
98
+
99
+ if attributes.key?(:'created_at')
100
+ self.created_at = attributes[:'created_at']
101
+ end
102
+ end
103
+
104
+ # Show invalid properties with the reasons. Usually used together with valid?
105
+ # @return Array for valid properties with the reasons
106
+ def list_invalid_properties
107
+ invalid_properties = Array.new
108
+ if @id.nil?
109
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
110
+ end
111
+
112
+ if @activity_id.nil?
113
+ invalid_properties.push('invalid value for "activity_id", activity_id cannot be nil.')
114
+ end
115
+
116
+ if @organization_id.nil?
117
+ invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
118
+ end
119
+
120
+ if @vote_id.nil?
121
+ invalid_properties.push('invalid value for "vote_id", vote_id cannot be nil.')
122
+ end
123
+
124
+ if @policy_evaluations.nil?
125
+ invalid_properties.push('invalid value for "policy_evaluations", policy_evaluations cannot be nil.')
126
+ end
127
+
128
+ if @created_at.nil?
129
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
130
+ end
131
+
132
+ invalid_properties
133
+ end
134
+
135
+ # Check to see if the all the properties in the model are valid
136
+ # @return true if the model is valid
137
+ def valid?
138
+ return false if @id.nil?
139
+ return false if @activity_id.nil?
140
+ return false if @organization_id.nil?
141
+ return false if @vote_id.nil?
142
+ return false if @policy_evaluations.nil?
143
+ return false if @created_at.nil?
144
+ true
145
+ end
146
+
147
+ # Checks equality by comparing each attribute.
148
+ # @param [Object] Object to be compared
149
+ def ==(o)
150
+ return true if self.equal?(o)
151
+ self.class == o.class &&
152
+ id == o.id &&
153
+ activity_id == o.activity_id &&
154
+ organization_id == o.organization_id &&
155
+ vote_id == o.vote_id &&
156
+ policy_evaluations == o.policy_evaluations &&
157
+ created_at == o.created_at
158
+ end
159
+
160
+ # @see the `==` method
161
+ # @param [Object] Object to be compared
162
+ def eql?(o)
163
+ self == o
164
+ end
165
+
166
+ # Calculates hash code according to all attributes.
167
+ # @return [Integer] Hash code
168
+ def hash
169
+ [id, activity_id, organization_id, vote_id, policy_evaluations, created_at].hash
170
+ end
171
+
172
+ # Builds the object from hash
173
+ # @param [Hash] attributes Model attributes in the form of hash
174
+ # @return [Object] Returns the model itself
175
+ def self.build_from_hash(attributes)
176
+ new.build_from_hash(attributes)
177
+ end
178
+
179
+ # Builds the object from hash
180
+ # @param [Hash] attributes Model attributes in the form of hash
181
+ # @return [Object] Returns the model itself
182
+ def build_from_hash(attributes)
183
+ return nil unless attributes.is_a?(Hash)
184
+ self.class.openapi_types.each_pair do |key, type|
185
+ if type =~ /\AArray<(.*)>/i
186
+ # check to ensure the input is an array given that the attribute
187
+ # is documented as an array but the input is not
188
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
189
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
190
+ end
191
+ elsif !attributes[self.class.attribute_map[key]].nil?
192
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
193
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
194
+ self.send("#{key}=", nil)
195
+ end
196
+ end
197
+
198
+ self
199
+ end
200
+
201
+ # Deserializes the data based on type
202
+ # @param string type Data type
203
+ # @param string value Value to be deserialized
204
+ # @return [Object] Deserialized data
205
+ def _deserialize(type, value)
206
+ case type.to_sym
207
+ when :DateTime
208
+ DateTime.parse(value)
209
+ when :Date
210
+ Date.parse(value)
211
+ when :String
212
+ value.to_s
213
+ when :Integer
214
+ value.to_i
215
+ when :Float
216
+ value.to_f
217
+ when :Boolean
218
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
219
+ true
220
+ else
221
+ false
222
+ end
223
+ when :Object
224
+ # generic object (usually a Hash), return directly
225
+ value
226
+ when /\AArray<(?<inner_type>.+)>\z/
227
+ inner_type = Regexp.last_match[:inner_type]
228
+ value.map { |v| _deserialize(inner_type, v) }
229
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
230
+ k_type = Regexp.last_match[:k_type]
231
+ v_type = Regexp.last_match[:v_type]
232
+ {}.tap do |hash|
233
+ value.each do |k, v|
234
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
235
+ end
236
+ end
237
+ else # model
238
+ TurnkeyClient.const_get(type).build_from_hash(value)
239
+ end
240
+ end
241
+
242
+ # Returns the string representation of the object
243
+ # @return [String] String presentation of the object
244
+ def to_s
245
+ to_hash.to_s
246
+ end
247
+
248
+ # to_body is an alias to to_hash (backward compatibility)
249
+ # @return [Hash] Returns the object in the form of hash
250
+ def to_body
251
+ to_hash
252
+ end
253
+
254
+ # Returns the object in the form of hash
255
+ # @return [Hash] Returns the object in the form of hash
256
+ def to_hash
257
+ hash = {}
258
+ self.class.attribute_map.each_pair do |attr, param|
259
+ value = self.send(attr)
260
+ if value.nil?
261
+ is_nullable = self.class.openapi_nullable.include?(attr)
262
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
263
+ end
264
+
265
+ hash[param] = _to_hash(value)
266
+ end
267
+ hash
268
+ end
269
+
270
+ # Outputs non-array value in the form of hash
271
+ # For object, use to_hash. Otherwise, just return the value
272
+ # @param [Object] value Any valid value
273
+ # @return [Hash] Returns the value in the form of hash
274
+ def _to_hash(value)
275
+ if value.is_a?(Array)
276
+ value.compact.map { |v| _to_hash(v) }
277
+ elsif value.is_a?(Hash)
278
+ {}.tap do |hash|
279
+ value.each { |k, v| hash[k] = _to_hash(v) }
280
+ end
281
+ elsif value.respond_to? :to_hash
282
+ value.to_hash
283
+ else
284
+ value
285
+ end
286
+ end end
287
+ end
@@ -46,6 +46,7 @@ module TurnkeyClient
46
46
  DOGE_TESTNET = 'ADDRESS_FORMAT_DOGE_TESTNET'.freeze
47
47
  TON_V3_R2 = 'ADDRESS_FORMAT_TON_V3R2'.freeze
48
48
  TON_V4_R2 = 'ADDRESS_FORMAT_TON_V4R2'.freeze
49
+ TON_V5_R1 = 'ADDRESS_FORMAT_TON_V5R1'.freeze
49
50
  XRP = 'ADDRESS_FORMAT_XRP'.freeze
50
51
 
51
52
  # Builds the enum from string
@@ -54,6 +54,7 @@ module TurnkeyClient
54
54
  # List of attributes with nullable: true
55
55
  def self.openapi_nullable
56
56
  Set.new([
57
+ :'expiration_seconds'
57
58
  ])
58
59
  end
59
60
 
@@ -42,6 +42,7 @@ module TurnkeyClient
42
42
  # List of attributes with nullable: true
43
43
  def self.openapi_nullable
44
44
  Set.new([
45
+ :'expiration_seconds'
45
46
  ])
46
47
  end
47
48
 
@@ -46,6 +46,7 @@ module TurnkeyClient
46
46
  # List of attributes with nullable: true
47
47
  def self.openapi_nullable
48
48
  Set.new([
49
+ :'expiration_seconds'
49
50
  ])
50
51
  end
51
52
 
@@ -18,10 +18,10 @@ module TurnkeyClient
18
18
  # The email address for this API-only User (optional).
19
19
  attr_accessor :user_email
20
20
 
21
- # A list of tags assigned to the new API-only User.
21
+ # A list of tags assigned to the new API-only User. This field, if not needed, should be an empty array in your request body.
22
22
  attr_accessor :user_tags
23
23
 
24
- # A list of API Key parameters.
24
+ # A list of API Key parameters. This field, if not needed, should be an empty array in your request body.
25
25
  attr_accessor :api_keys
26
26
 
27
27
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -47,6 +47,7 @@ module TurnkeyClient
47
47
  # List of attributes with nullable: true
48
48
  def self.openapi_nullable
49
49
  Set.new([
50
+ :'user_email',
50
51
  ])
51
52
  end
52
53
 
@@ -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 AppProof
15
+ attr_accessor :scheme
16
+
17
+ # Ephemeral public key.
18
+ attr_accessor :public_key
19
+
20
+ # JSON serialized AppProofPayload.
21
+ attr_accessor :proof_payload
22
+
23
+ # Signature over hashed proof_payload.
24
+ attr_accessor :signature
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'scheme' => :'scheme',
30
+ :'public_key' => :'publicKey',
31
+ :'proof_payload' => :'proofPayload',
32
+ :'signature' => :'signature'
33
+ }
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.openapi_types
38
+ {
39
+ :'scheme' => :'Object',
40
+ :'public_key' => :'Object',
41
+ :'proof_payload' => :'Object',
42
+ :'signature' => :'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::AppProof` 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::AppProof`. 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?(:'scheme')
68
+ self.scheme = attributes[:'scheme']
69
+ end
70
+
71
+ if attributes.key?(:'public_key')
72
+ self.public_key = attributes[:'public_key']
73
+ end
74
+
75
+ if attributes.key?(:'proof_payload')
76
+ self.proof_payload = attributes[:'proof_payload']
77
+ end
78
+
79
+ if attributes.key?(:'signature')
80
+ self.signature = attributes[:'signature']
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 @scheme.nil?
89
+ invalid_properties.push('invalid value for "scheme", scheme cannot be nil.')
90
+ end
91
+
92
+ if @public_key.nil?
93
+ invalid_properties.push('invalid value for "public_key", public_key cannot be nil.')
94
+ end
95
+
96
+ if @proof_payload.nil?
97
+ invalid_properties.push('invalid value for "proof_payload", proof_payload cannot be nil.')
98
+ end
99
+
100
+ if @signature.nil?
101
+ invalid_properties.push('invalid value for "signature", signature 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 @scheme.nil?
111
+ return false if @public_key.nil?
112
+ return false if @proof_payload.nil?
113
+ return false if @signature.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
+ scheme == o.scheme &&
123
+ public_key == o.public_key &&
124
+ proof_payload == o.proof_payload &&
125
+ signature == o.signature
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
+ [scheme, public_key, proof_payload, signature].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