turnkey_client 0.0.12 → 0.0.14

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 (169) 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/authenticators_api.rb +16 -16
  5. data/lib/turnkey_client/api/consensus_api.rb +8 -8
  6. data/lib/turnkey_client/api/features_api.rb +8 -8
  7. data/lib/turnkey_client/api/invitations_api.rb +8 -8
  8. data/lib/turnkey_client/api/on_ramp_api.rb +77 -0
  9. data/lib/turnkey_client/api/organizations_api.rb +18 -18
  10. data/lib/turnkey_client/api/policies_api.rb +256 -24
  11. data/lib/turnkey_client/api/private_key_tags_api.rb +12 -12
  12. data/lib/turnkey_client/api/private_keys_api.rb +28 -28
  13. data/lib/turnkey_client/api/sessions_api.rb +184 -10
  14. data/lib/turnkey_client/api/signing_api.rb +12 -12
  15. data/lib/turnkey_client/api/user_auth_api.rb +20 -20
  16. data/lib/turnkey_client/api/user_recovery_api.rb +6 -6
  17. data/lib/turnkey_client/api/user_tags_api.rb +12 -12
  18. data/lib/turnkey_client/api/user_verification_api.rb +135 -0
  19. data/lib/turnkey_client/api/users_api.rb +194 -20
  20. data/lib/turnkey_client/api/wallets_api.rb +102 -44
  21. data/lib/turnkey_client/models/activity_type.rb +14 -0
  22. data/lib/turnkey_client/models/activity_v1_policy_evaluation.rb +287 -0
  23. data/lib/turnkey_client/models/address_format.rb +1 -0
  24. data/lib/turnkey_client/models/api_key.rb +1 -0
  25. data/lib/turnkey_client/models/api_key_params.rb +1 -0
  26. data/lib/turnkey_client/models/api_key_params_v2.rb +1 -0
  27. data/lib/turnkey_client/models/api_only_user_params.rb +3 -2
  28. data/lib/turnkey_client/models/create_organization_intent.rb +1 -0
  29. data/lib/turnkey_client/models/create_organization_intent_v2.rb +1 -0
  30. data/lib/turnkey_client/models/create_policy_intent_v3.rb +2 -0
  31. data/lib/turnkey_client/models/create_read_write_session_intent.rb +3 -1
  32. data/lib/turnkey_client/models/create_read_write_session_intent_v2.rb +19 -5
  33. data/lib/turnkey_client/models/create_smart_contract_interface_intent.rb +265 -0
  34. data/lib/turnkey_client/models/create_smart_contract_interface_request.rb +288 -0
  35. data/lib/turnkey_client/models/create_smart_contract_interface_result.rb +211 -0
  36. data/lib/turnkey_client/models/create_sub_organization_intent_v4.rb +2 -0
  37. data/lib/turnkey_client/models/create_sub_organization_intent_v5.rb +2 -0
  38. data/lib/turnkey_client/models/create_sub_organization_intent_v6.rb +2 -0
  39. data/lib/turnkey_client/models/create_sub_organization_intent_v7.rb +4 -0
  40. data/lib/turnkey_client/models/create_users_intent_v3.rb +213 -0
  41. data/lib/turnkey_client/models/create_users_request.rb +2 -2
  42. data/lib/turnkey_client/models/create_wallet_intent.rb +2 -1
  43. data/lib/turnkey_client/models/credential_type.rb +3 -0
  44. data/lib/turnkey_client/models/data_v1_smart_contract_interface.rb +329 -0
  45. data/lib/turnkey_client/models/delete_payment_method_intent.rb +1 -0
  46. data/lib/turnkey_client/models/delete_private_keys_intent.rb +1 -0
  47. data/lib/turnkey_client/models/delete_smart_contract_interface_intent.rb +211 -0
  48. data/lib/turnkey_client/models/delete_smart_contract_interface_request.rb +288 -0
  49. data/lib/turnkey_client/models/delete_smart_contract_interface_result.rb +211 -0
  50. data/lib/turnkey_client/models/delete_sub_organization_intent.rb +1 -0
  51. data/lib/turnkey_client/models/delete_wallets_intent.rb +1 -0
  52. data/lib/turnkey_client/models/email_auth_intent.rb +31 -5
  53. data/lib/turnkey_client/models/email_auth_intent_v2.rb +31 -5
  54. data/lib/turnkey_client/models/email_customization_params.rb +5 -0
  55. data/lib/turnkey_client/models/feature.rb +1 -0
  56. data/lib/turnkey_client/models/fiat_on_ramp_blockchain_network.rb +29 -0
  57. data/lib/turnkey_client/models/fiat_on_ramp_crypto_currency.rb +29 -0
  58. data/lib/turnkey_client/models/fiat_on_ramp_currency.rb +59 -0
  59. data/lib/turnkey_client/models/fiat_on_ramp_payment_method.rb +38 -0
  60. data/lib/turnkey_client/models/fiat_on_ramp_provider.rb +27 -0
  61. data/lib/turnkey_client/models/get_activities_request.rb +3 -3
  62. data/lib/turnkey_client/models/get_activities_response.rb +1 -1
  63. data/lib/turnkey_client/models/get_activity_request.rb +2 -2
  64. data/lib/turnkey_client/models/get_api_key_request.rb +1 -1
  65. data/lib/turnkey_client/models/get_api_keys_request.rb +3 -2
  66. data/lib/turnkey_client/models/get_authenticator_request.rb +2 -2
  67. data/lib/turnkey_client/models/get_authenticators_request.rb +2 -2
  68. data/lib/turnkey_client/models/get_oauth_providers_request.rb +3 -2
  69. data/lib/turnkey_client/models/get_oauth_providers_response.rb +1 -1
  70. data/lib/turnkey_client/models/get_organization_configs_request.rb +1 -1
  71. data/lib/turnkey_client/models/get_policies_request.rb +1 -1
  72. data/lib/turnkey_client/models/get_policies_response.rb +1 -1
  73. data/lib/turnkey_client/models/get_policy_evaluations_request.rb +226 -0
  74. data/lib/turnkey_client/models/get_policy_evaluations_response.rb +212 -0
  75. data/lib/turnkey_client/models/get_policy_request.rb +2 -2
  76. data/lib/turnkey_client/models/get_private_key_request.rb +2 -2
  77. data/lib/turnkey_client/models/get_private_keys_request.rb +1 -1
  78. data/lib/turnkey_client/models/get_private_keys_response.rb +1 -1
  79. data/lib/turnkey_client/models/get_smart_contract_interface_request.rb +226 -0
  80. data/lib/turnkey_client/models/get_smart_contract_interface_response.rb +210 -0
  81. data/lib/turnkey_client/models/get_smart_contract_interfaces_request.rb +211 -0
  82. data/lib/turnkey_client/models/get_smart_contract_interfaces_response.rb +213 -0
  83. data/lib/turnkey_client/models/get_sub_org_ids_request.rb +2 -2
  84. data/lib/turnkey_client/models/get_user_request.rb +2 -2
  85. data/lib/turnkey_client/models/get_users_request.rb +1 -1
  86. data/lib/turnkey_client/models/get_users_response.rb +1 -1
  87. data/lib/turnkey_client/models/get_verified_sub_org_ids_request.rb +2 -2
  88. data/lib/turnkey_client/models/get_wallet_account_request.rb +248 -0
  89. data/lib/turnkey_client/models/get_wallet_account_response.rb +210 -0
  90. data/lib/turnkey_client/models/get_wallet_accounts_request.rb +3 -7
  91. data/lib/turnkey_client/models/get_wallet_accounts_response.rb +1 -1
  92. data/lib/turnkey_client/models/get_wallet_request.rb +2 -2
  93. data/lib/turnkey_client/models/get_wallets_request.rb +1 -1
  94. data/lib/turnkey_client/models/get_wallets_response.rb +1 -1
  95. data/lib/turnkey_client/models/get_whoami_request.rb +1 -1
  96. data/lib/turnkey_client/models/get_whoami_response.rb +4 -4
  97. data/lib/turnkey_client/models/init_fiat_on_ramp_intent.rb +315 -0
  98. data/lib/turnkey_client/models/init_fiat_on_ramp_request.rb +288 -0
  99. data/lib/turnkey_client/models/init_fiat_on_ramp_result.rb +226 -0
  100. data/lib/turnkey_client/models/init_otp_auth_intent.rb +28 -4
  101. data/lib/turnkey_client/models/init_otp_auth_intent_v2.rb +310 -0
  102. data/lib/turnkey_client/models/init_otp_auth_request.rb +2 -2
  103. data/lib/turnkey_client/models/init_otp_auth_result_v2.rb +211 -0
  104. data/lib/turnkey_client/models/init_otp_intent.rb +321 -0
  105. data/lib/turnkey_client/models/init_otp_request.rb +288 -0
  106. data/lib/turnkey_client/models/init_otp_result.rb +211 -0
  107. data/lib/turnkey_client/models/init_user_email_recovery_intent.rb +2 -1
  108. data/lib/turnkey_client/models/intent.rb +130 -4
  109. data/lib/turnkey_client/models/invitation_params.rb +1 -1
  110. data/lib/turnkey_client/models/list_private_key_tags_request.rb +1 -1
  111. data/lib/turnkey_client/models/list_private_key_tags_response.rb +1 -1
  112. data/lib/turnkey_client/models/list_user_tags_request.rb +1 -1
  113. data/lib/turnkey_client/models/list_user_tags_response.rb +1 -1
  114. data/lib/turnkey_client/models/oauth_intent.rb +18 -5
  115. data/lib/turnkey_client/models/oauth_login_intent.rb +248 -0
  116. data/lib/turnkey_client/models/oauth_login_request.rb +288 -0
  117. data/lib/turnkey_client/models/oauth_login_result.rb +211 -0
  118. data/lib/turnkey_client/models/otp_auth_intent.rb +10 -2
  119. data/lib/turnkey_client/models/otp_login_intent.rb +248 -0
  120. data/lib/turnkey_client/models/otp_login_request.rb +288 -0
  121. data/lib/turnkey_client/models/otp_login_result.rb +211 -0
  122. data/lib/turnkey_client/models/outcome.rb +31 -0
  123. data/lib/turnkey_client/models/payload_encoding.rb +1 -0
  124. data/lib/turnkey_client/models/policy.rb +2 -0
  125. data/lib/turnkey_client/models/private_key_params.rb +1 -1
  126. data/lib/turnkey_client/models/result.rb +121 -4
  127. data/lib/turnkey_client/models/root_user_params.rb +3 -2
  128. data/lib/turnkey_client/models/root_user_params_v2.rb +4 -3
  129. data/lib/turnkey_client/models/root_user_params_v3.rb +4 -3
  130. data/lib/turnkey_client/models/root_user_params_v4.rb +5 -3
  131. data/lib/turnkey_client/models/set_organization_feature_intent.rb +1 -0
  132. data/lib/turnkey_client/models/simple_client_extension_results.rb +2 -0
  133. data/lib/turnkey_client/models/smart_contract_interface_type.rb +27 -0
  134. data/lib/turnkey_client/models/sms_customization_params.rb +1 -0
  135. data/lib/turnkey_client/models/stamp_login_intent.rb +233 -0
  136. data/lib/turnkey_client/models/stamp_login_request.rb +288 -0
  137. data/lib/turnkey_client/models/stamp_login_result.rb +211 -0
  138. data/lib/turnkey_client/models/transaction_type.rb +1 -0
  139. data/lib/turnkey_client/models/ump_v1_policy_evaluation.rb +214 -0
  140. data/lib/turnkey_client/models/update_policy_intent.rb +4 -0
  141. data/lib/turnkey_client/models/update_policy_intent_v2.rb +264 -0
  142. data/lib/turnkey_client/models/update_policy_request.rb +2 -2
  143. data/lib/turnkey_client/models/update_policy_result_v2.rb +211 -0
  144. data/lib/turnkey_client/models/update_private_key_tag_intent.rb +1 -0
  145. data/lib/turnkey_client/models/update_user_email_intent.rb +237 -0
  146. data/lib/turnkey_client/models/update_user_email_request.rb +288 -0
  147. data/lib/turnkey_client/models/update_user_email_result.rb +211 -0
  148. data/lib/turnkey_client/models/update_user_intent.rb +4 -1
  149. data/lib/turnkey_client/models/update_user_name_intent.rb +226 -0
  150. data/lib/turnkey_client/models/update_user_name_request.rb +288 -0
  151. data/lib/turnkey_client/models/update_user_name_result.rb +211 -0
  152. data/lib/turnkey_client/models/update_user_phone_number_intent.rb +237 -0
  153. data/lib/turnkey_client/models/update_user_phone_number_request.rb +288 -0
  154. data/lib/turnkey_client/models/update_user_phone_number_result.rb +211 -0
  155. data/lib/turnkey_client/models/update_user_tag_intent.rb +1 -0
  156. data/lib/turnkey_client/models/user.rb +3 -1
  157. data/lib/turnkey_client/models/user_params.rb +4 -3
  158. data/lib/turnkey_client/models/user_params_v2.rb +4 -3
  159. data/lib/turnkey_client/models/user_params_v3.rb +301 -0
  160. data/lib/turnkey_client/models/verify_otp_intent.rb +237 -0
  161. data/lib/turnkey_client/models/verify_otp_request.rb +288 -0
  162. data/lib/turnkey_client/models/verify_otp_result.rb +211 -0
  163. data/lib/turnkey_client/models/wallet_account.rb +15 -4
  164. data/lib/turnkey_client/models/wallet_params.rb +2 -1
  165. data/lib/turnkey_client/version.rb +1 -1
  166. data/lib/turnkey_client.rb +59 -0
  167. data/turnkey_client-0.0.12.gem +0 -0
  168. data/turnkey_client-0.0.13.gem +0 -0
  169. metadata +63 -2
@@ -15,8 +15,8 @@ module TurnkeyClient
15
15
  def initialize(api_client = ApiClient.default)
16
16
  @api_client = api_client
17
17
  end
18
- # Create Wallet
19
- # Create a Wallet and derive addresses
18
+ # Create wallet
19
+ # Create a wallet and derive addresses.
20
20
  # @param body
21
21
  # @param [Hash] opts the optional parameters
22
22
  # @return [ActivityResponse]
@@ -25,8 +25,8 @@ module TurnkeyClient
25
25
  data
26
26
  end
27
27
 
28
- # Create Wallet
29
- # Create a Wallet and derive addresses
28
+ # Create wallet
29
+ # Create a wallet and derive addresses.
30
30
  # @param body
31
31
  # @param [Hash] opts the optional parameters
32
32
  # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers
@@ -73,8 +73,8 @@ module TurnkeyClient
73
73
  end
74
74
  return data, status_code, headers
75
75
  end
76
- # Create Wallet Accounts
77
- # Derive additional addresses using an existing wallet
76
+ # Create wallet accounts
77
+ # Derive additional addresses using an existing wallet.
78
78
  # @param body
79
79
  # @param [Hash] opts the optional parameters
80
80
  # @return [ActivityResponse]
@@ -83,8 +83,8 @@ module TurnkeyClient
83
83
  data
84
84
  end
85
85
 
86
- # Create Wallet Accounts
87
- # Derive additional addresses using an existing wallet
86
+ # Create wallet accounts
87
+ # Derive additional addresses using an existing wallet.
88
88
  # @param body
89
89
  # @param [Hash] opts the optional parameters
90
90
  # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers
@@ -131,8 +131,8 @@ module TurnkeyClient
131
131
  end
132
132
  return data, status_code, headers
133
133
  end
134
- # Delete Wallets
135
- # Deletes wallets for an organization
134
+ # Delete wallets
135
+ # Delete wallets for an organization.
136
136
  # @param body
137
137
  # @param [Hash] opts the optional parameters
138
138
  # @return [ActivityResponse]
@@ -141,8 +141,8 @@ module TurnkeyClient
141
141
  data
142
142
  end
143
143
 
144
- # Delete Wallets
145
- # Deletes wallets for an organization
144
+ # Delete wallets
145
+ # Delete wallets for an organization.
146
146
  # @param body
147
147
  # @param [Hash] opts the optional parameters
148
148
  # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers
@@ -189,8 +189,8 @@ module TurnkeyClient
189
189
  end
190
190
  return data, status_code, headers
191
191
  end
192
- # Export Wallet
193
- # Exports a Wallet
192
+ # Export wallet
193
+ # Export a wallet.
194
194
  # @param body
195
195
  # @param [Hash] opts the optional parameters
196
196
  # @return [ActivityResponse]
@@ -199,8 +199,8 @@ module TurnkeyClient
199
199
  data
200
200
  end
201
201
 
202
- # Export Wallet
203
- # Exports a Wallet
202
+ # Export wallet
203
+ # Export a wallet.
204
204
  # @param body
205
205
  # @param [Hash] opts the optional parameters
206
206
  # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers
@@ -247,8 +247,8 @@ module TurnkeyClient
247
247
  end
248
248
  return data, status_code, headers
249
249
  end
250
- # Export Wallet Account
251
- # Exports a Wallet Account
250
+ # Export wallet account
251
+ # Export a wallet account.
252
252
  # @param body
253
253
  # @param [Hash] opts the optional parameters
254
254
  # @return [ActivityResponse]
@@ -257,8 +257,8 @@ module TurnkeyClient
257
257
  data
258
258
  end
259
259
 
260
- # Export Wallet Account
261
- # Exports a Wallet Account
260
+ # Export wallet account
261
+ # Export a wallet account.
262
262
  # @param body
263
263
  # @param [Hash] opts the optional parameters
264
264
  # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers
@@ -305,8 +305,8 @@ module TurnkeyClient
305
305
  end
306
306
  return data, status_code, headers
307
307
  end
308
- # Get Wallet
309
- # Get details about a Wallet
308
+ # Get wallet
309
+ # Get details about a wallet.
310
310
  # @param body
311
311
  # @param [Hash] opts the optional parameters
312
312
  # @return [GetWalletResponse]
@@ -315,8 +315,8 @@ module TurnkeyClient
315
315
  data
316
316
  end
317
317
 
318
- # Get Wallet
319
- # Get details about a Wallet
318
+ # Get wallet
319
+ # Get details about a wallet.
320
320
  # @param body
321
321
  # @param [Hash] opts the optional parameters
322
322
  # @return [Array<(GetWalletResponse, Integer, Hash)>] GetWalletResponse data, response status code and response headers
@@ -363,8 +363,66 @@ module TurnkeyClient
363
363
  end
364
364
  return data, status_code, headers
365
365
  end
366
- # List Wallets Accounts
367
- # List all Accounts wirhin a Wallet
366
+ # Get wallet account
367
+ # Get a single wallet account.
368
+ # @param body
369
+ # @param [Hash] opts the optional parameters
370
+ # @return [GetWalletAccountResponse]
371
+ def get_wallet_account(body, opts = {})
372
+ data, _status_code, _headers = get_wallet_account_with_http_info(body, opts)
373
+ data
374
+ end
375
+
376
+ # Get wallet account
377
+ # Get a single wallet account.
378
+ # @param body
379
+ # @param [Hash] opts the optional parameters
380
+ # @return [Array<(GetWalletAccountResponse, Integer, Hash)>] GetWalletAccountResponse data, response status code and response headers
381
+ def get_wallet_account_with_http_info(body, opts = {})
382
+ if @api_client.config.debugging
383
+ @api_client.config.logger.debug 'Calling API: WalletsApi.get_wallet_account ...'
384
+ end
385
+ # verify the required parameter 'body' is set
386
+ if @api_client.config.client_side_validation && body.nil?
387
+ fail ArgumentError, "Missing the required parameter 'body' when calling WalletsApi.get_wallet_account"
388
+ end
389
+ # resource path
390
+ local_var_path = '/public/v1/query/get_wallet_account'
391
+
392
+ # query parameters
393
+ query_params = opts[:query_params] || {}
394
+
395
+ # header parameters
396
+ header_params = opts[:header_params] || {}
397
+ # HTTP header 'Accept' (if needed)
398
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
399
+ # HTTP header 'Content-Type'
400
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
401
+
402
+ # form parameters
403
+ form_params = opts[:form_params] || {}
404
+
405
+ # http body (model)
406
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
407
+
408
+ return_type = opts[:return_type] || 'GetWalletAccountResponse'
409
+
410
+ auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth']
411
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
412
+ :header_params => header_params,
413
+ :query_params => query_params,
414
+ :form_params => form_params,
415
+ :body => post_body,
416
+ :auth_names => auth_names,
417
+ :return_type => return_type)
418
+
419
+ if @api_client.config.debugging
420
+ @api_client.config.logger.debug "API called: WalletsApi#get_wallet_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
421
+ end
422
+ return data, status_code, headers
423
+ end
424
+ # List wallets accounts
425
+ # List all accounts within a wallet.
368
426
  # @param body
369
427
  # @param [Hash] opts the optional parameters
370
428
  # @return [GetWalletAccountsResponse]
@@ -373,8 +431,8 @@ module TurnkeyClient
373
431
  data
374
432
  end
375
433
 
376
- # List Wallets Accounts
377
- # List all Accounts wirhin a Wallet
434
+ # List wallets accounts
435
+ # List all accounts within a wallet.
378
436
  # @param body
379
437
  # @param [Hash] opts the optional parameters
380
438
  # @return [Array<(GetWalletAccountsResponse, Integer, Hash)>] GetWalletAccountsResponse data, response status code and response headers
@@ -421,8 +479,8 @@ module TurnkeyClient
421
479
  end
422
480
  return data, status_code, headers
423
481
  end
424
- # List Wallets
425
- # List all Wallets within an Organization
482
+ # List wallets
483
+ # List all wallets within an organization.
426
484
  # @param body
427
485
  # @param [Hash] opts the optional parameters
428
486
  # @return [GetWalletsResponse]
@@ -431,8 +489,8 @@ module TurnkeyClient
431
489
  data
432
490
  end
433
491
 
434
- # List Wallets
435
- # List all Wallets within an Organization
492
+ # List wallets
493
+ # List all wallets within an organization.
436
494
  # @param body
437
495
  # @param [Hash] opts the optional parameters
438
496
  # @return [Array<(GetWalletsResponse, Integer, Hash)>] GetWalletsResponse data, response status code and response headers
@@ -479,8 +537,8 @@ module TurnkeyClient
479
537
  end
480
538
  return data, status_code, headers
481
539
  end
482
- # Import Wallet
483
- # Imports a wallet
540
+ # Import wallet
541
+ # Import a wallet.
484
542
  # @param body
485
543
  # @param [Hash] opts the optional parameters
486
544
  # @return [ActivityResponse]
@@ -489,8 +547,8 @@ module TurnkeyClient
489
547
  data
490
548
  end
491
549
 
492
- # Import Wallet
493
- # Imports a wallet
550
+ # Import wallet
551
+ # Import a wallet.
494
552
  # @param body
495
553
  # @param [Hash] opts the optional parameters
496
554
  # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers
@@ -537,8 +595,8 @@ module TurnkeyClient
537
595
  end
538
596
  return data, status_code, headers
539
597
  end
540
- # Init Import Wallet
541
- # Initializes a new wallet import
598
+ # Init import wallet
599
+ # Initialize a new wallet import.
542
600
  # @param body
543
601
  # @param [Hash] opts the optional parameters
544
602
  # @return [ActivityResponse]
@@ -547,8 +605,8 @@ module TurnkeyClient
547
605
  data
548
606
  end
549
607
 
550
- # Init Import Wallet
551
- # Initializes a new wallet import
608
+ # Init import wallet
609
+ # Initialize a new wallet import.
552
610
  # @param body
553
611
  # @param [Hash] opts the optional parameters
554
612
  # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers
@@ -595,8 +653,8 @@ module TurnkeyClient
595
653
  end
596
654
  return data, status_code, headers
597
655
  end
598
- # Update Wallet
599
- # Update a wallet for an organization
656
+ # Update wallet
657
+ # Update a wallet for an organization.
600
658
  # @param body
601
659
  # @param [Hash] opts the optional parameters
602
660
  # @return [ActivityResponse]
@@ -605,8 +663,8 @@ module TurnkeyClient
605
663
  data
606
664
  end
607
665
 
608
- # Update Wallet
609
- # Update a wallet for an organization
666
+ # Update wallet
667
+ # Update a wallet for an organization.
610
668
  # @param body
611
669
  # @param [Hash] opts the optional parameters
612
670
  # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers
@@ -92,6 +92,20 @@ module TurnkeyClient
92
92
  OTP_AUTH = 'ACTIVITY_TYPE_OTP_AUTH'.freeze
93
93
  CREATE_SUB_ORGANIZATION_V7 = 'ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7'.freeze
94
94
  UPDATE_WALLET = 'ACTIVITY_TYPE_UPDATE_WALLET'.freeze
95
+ UPDATE_POLICY_V2 = 'ACTIVITY_TYPE_UPDATE_POLICY_V2'.freeze
96
+ CREATE_USERS_V3 = 'ACTIVITY_TYPE_CREATE_USERS_V3'.freeze
97
+ INIT_OTP_AUTH_V2 = 'ACTIVITY_TYPE_INIT_OTP_AUTH_V2'.freeze
98
+ INIT_OTP = 'ACTIVITY_TYPE_INIT_OTP'.freeze
99
+ VERIFY_OTP = 'ACTIVITY_TYPE_VERIFY_OTP'.freeze
100
+ OTP_LOGIN = 'ACTIVITY_TYPE_OTP_LOGIN'.freeze
101
+ STAMP_LOGIN = 'ACTIVITY_TYPE_STAMP_LOGIN'.freeze
102
+ OAUTH_LOGIN = 'ACTIVITY_TYPE_OAUTH_LOGIN'.freeze
103
+ UPDATE_USER_NAME = 'ACTIVITY_TYPE_UPDATE_USER_NAME'.freeze
104
+ UPDATE_USER_EMAIL = 'ACTIVITY_TYPE_UPDATE_USER_EMAIL'.freeze
105
+ UPDATE_USER_PHONE_NUMBER = 'ACTIVITY_TYPE_UPDATE_USER_PHONE_NUMBER'.freeze
106
+ INIT_FIAT_ON_RAMP = 'ACTIVITY_TYPE_INIT_FIAT_ON_RAMP'.freeze
107
+ CREATE_SMART_CONTRACT_INTERFACE = 'ACTIVITY_TYPE_CREATE_SMART_CONTRACT_INTERFACE'.freeze
108
+ DELETE_SMART_CONTRACT_INTERFACE = 'ACTIVITY_TYPE_DELETE_SMART_CONTRACT_INTERFACE'.freeze
95
109
 
96
110
  # Builds the enum from string
97
111
  # @param [String] The enum value in the form of the string
@@ -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
 
@@ -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
+ :'root_user_id'
49
50
  ])
50
51
  end
51
52
 
@@ -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
+ :'root_user_id'
49
50
  ])
50
51
  end
51
52
 
@@ -50,6 +50,8 @@ module TurnkeyClient
50
50
  # List of attributes with nullable: true
51
51
  def self.openapi_nullable
52
52
  Set.new([
53
+ :'condition',
54
+ :'consensus',
53
55
  ])
54
56
  end
55
57