turnkey_client 0.0.18 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/turnkey_client/api/default_api.rb +46 -0
- data/lib/turnkey_client/api/ip_allowlist_api.rb +193 -0
- data/lib/turnkey_client/api/organizations_api.rb +290 -0
- data/lib/turnkey_client/api/signing_api.rb +232 -0
- data/lib/turnkey_client/api/tvc_api.rb +773 -0
- data/lib/turnkey_client/api/wallets_api.rb +4 -4
- data/lib/turnkey_client/configuration.rb +7 -0
- data/lib/turnkey_client/models/activate_billing_tier_intent.rb +14 -4
- data/lib/turnkey_client/models/activity_type.rb +21 -0
- data/lib/turnkey_client/models/address_format.rb +2 -0
- data/lib/turnkey_client/models/app_status.rb +243 -0
- data/lib/turnkey_client/models/boot_proof.rb +17 -6
- data/lib/turnkey_client/models/create_oauth_providers_intent_v2.rb +228 -0
- data/lib/turnkey_client/models/create_oauth_providers_request.rb +2 -2
- data/lib/turnkey_client/models/create_oauth_providers_result_v2.rb +213 -0
- data/lib/turnkey_client/models/create_read_write_session_intent_v2.rb +1 -1
- data/lib/turnkey_client/models/create_sub_organization_intent_v8.rb +316 -0
- data/lib/turnkey_client/models/create_sub_organization_request.rb +2 -2
- data/lib/turnkey_client/models/create_sub_organization_result_v8.rb +230 -0
- data/lib/turnkey_client/models/create_tvc_app_intent.rb +9 -9
- data/lib/turnkey_client/models/create_tvc_app_request.rb +288 -0
- data/lib/turnkey_client/models/create_tvc_deployment_intent.rb +45 -48
- data/lib/turnkey_client/models/create_tvc_deployment_request.rb +288 -0
- data/lib/turnkey_client/models/create_tvc_manifest_approvals_request.rb +288 -0
- data/lib/turnkey_client/models/create_users_intent_v4.rb +213 -0
- data/lib/turnkey_client/models/create_users_request.rb +2 -2
- data/lib/turnkey_client/models/create_webhook_endpoint_intent.rb +238 -0
- data/lib/turnkey_client/models/create_webhook_endpoint_request.rb +298 -0
- data/lib/turnkey_client/models/create_webhook_endpoint_result.rb +225 -0
- data/lib/turnkey_client/models/delete_tvc_app_and_deployments_intent.rb +211 -0
- data/lib/turnkey_client/models/delete_tvc_app_and_deployments_request.rb +298 -0
- data/lib/turnkey_client/models/delete_tvc_app_and_deployments_result.rb +211 -0
- data/lib/turnkey_client/models/delete_tvc_deployment_intent.rb +211 -0
- data/lib/turnkey_client/models/delete_tvc_deployment_request.rb +298 -0
- data/lib/turnkey_client/models/delete_tvc_deployment_result.rb +211 -0
- data/lib/turnkey_client/models/delete_webhook_endpoint_intent.rb +211 -0
- data/lib/turnkey_client/models/delete_webhook_endpoint_request.rb +298 -0
- data/lib/turnkey_client/models/delete_webhook_endpoint_result.rb +211 -0
- data/lib/turnkey_client/models/deployment_status.rb +255 -0
- data/lib/turnkey_client/models/eth_failure_details.rb +208 -0
- data/lib/turnkey_client/models/eth_send_transaction_intent.rb +12 -1
- data/lib/turnkey_client/models/feature_name.rb +1 -0
- data/lib/turnkey_client/models/get_app_status_request.rb +226 -0
- data/lib/turnkey_client/models/get_app_status_response.rb +210 -0
- data/lib/turnkey_client/models/get_ip_allowlist_request.rb +222 -0
- data/lib/turnkey_client/models/get_ip_allowlist_response.rb +210 -0
- data/lib/turnkey_client/models/get_send_transaction_status_response.rb +10 -1
- data/lib/turnkey_client/models/get_tvc_app_deployments_request.rb +226 -0
- data/lib/turnkey_client/models/get_tvc_app_deployments_response.rb +213 -0
- data/lib/turnkey_client/models/get_tvc_app_request.rb +226 -0
- data/lib/turnkey_client/models/get_tvc_app_response.rb +210 -0
- data/lib/turnkey_client/models/get_tvc_apps_request.rb +211 -0
- data/lib/turnkey_client/models/get_tvc_apps_response.rb +213 -0
- data/lib/turnkey_client/models/get_tvc_deployment_request.rb +226 -0
- data/lib/turnkey_client/models/get_tvc_deployment_response.rb +210 -0
- data/lib/turnkey_client/models/get_wallet_address_balances_request.rb +4 -4
- data/lib/turnkey_client/models/init_otp_auth_intent.rb +1 -1
- data/lib/turnkey_client/models/init_otp_auth_intent_v2.rb +1 -1
- data/lib/turnkey_client/models/init_otp_intent_v3.rb +336 -0
- data/lib/turnkey_client/models/init_otp_request.rb +2 -2
- data/lib/turnkey_client/models/init_otp_result_v2.rb +226 -0
- data/lib/turnkey_client/models/intent.rb +193 -4
- data/lib/turnkey_client/models/ip_allowlist.rb +261 -0
- data/lib/turnkey_client/models/ip_allowlist_intent_rule.rb +222 -0
- data/lib/turnkey_client/models/ip_allowlist_rule.rb +232 -0
- data/lib/turnkey_client/models/list_supported_assets_request.rb +3 -3
- data/lib/turnkey_client/models/list_webhook_endpoints_request.rb +211 -0
- data/lib/turnkey_client/models/list_webhook_endpoints_response.rb +212 -0
- data/lib/turnkey_client/models/login_usage.rb +211 -0
- data/lib/turnkey_client/models/noop_codegen_anchor_response.rb +219 -0
- data/lib/turnkey_client/models/oauth2_authenticate_intent.rb +6 -2
- data/lib/turnkey_client/models/oauth_provider_params_v2.rb +230 -0
- data/lib/turnkey_client/models/oidc_claims.rb +241 -0
- data/lib/turnkey_client/models/otp_login_intent_v2.rb +262 -0
- data/lib/turnkey_client/models/otp_login_request.rb +2 -2
- data/lib/turnkey_client/models/post_tvc_quorum_key_share_intent.rb +240 -0
- data/lib/turnkey_client/models/post_tvc_quorum_key_share_result.rb +211 -0
- data/lib/turnkey_client/models/quorum_key_share_approval_bundle.rb +241 -0
- data/lib/turnkey_client/models/remove_ip_allowlist_intent.rb +207 -0
- data/lib/turnkey_client/models/remove_ip_allowlist_request.rb +298 -0
- data/lib/turnkey_client/models/remove_ip_allowlist_result.rb +196 -0
- data/lib/turnkey_client/models/restore_tvc_deployment_intent.rb +211 -0
- data/lib/turnkey_client/models/restore_tvc_deployment_request.rb +298 -0
- data/lib/turnkey_client/models/restore_tvc_deployment_result.rb +211 -0
- data/lib/turnkey_client/models/result.rb +166 -4
- data/lib/turnkey_client/models/root_user_params_v5.rb +284 -0
- data/lib/turnkey_client/models/set_ip_allowlist_intent.rb +241 -0
- data/lib/turnkey_client/models/set_ip_allowlist_request.rb +298 -0
- data/lib/turnkey_client/models/set_ip_allowlist_result.rb +196 -0
- data/lib/turnkey_client/models/signup_usage.rb +249 -0
- data/lib/turnkey_client/models/signup_usage_v2.rb +249 -0
- data/lib/turnkey_client/models/sol_send_transaction_intent.rb +3 -3
- data/lib/turnkey_client/models/solana_config.rb +207 -0
- data/lib/turnkey_client/models/solana_failure_details.rb +273 -0
- data/lib/turnkey_client/models/solana_send_transaction_status.rb +207 -0
- data/lib/turnkey_client/models/spark_claim_leaf.rb +241 -0
- data/lib/turnkey_client/models/spark_claim_package.rb +275 -0
- data/lib/turnkey_client/models/spark_claim_transfer_intent.rb +225 -0
- data/lib/turnkey_client/models/spark_claim_transfer_request.rb +288 -0
- data/lib/turnkey_client/models/spark_claim_transfer_result.rb +230 -0
- data/lib/turnkey_client/models/spark_deposit_derivation.rb +196 -0
- data/lib/turnkey_client/models/spark_encrypted_operator_package.rb +226 -0
- data/lib/turnkey_client/models/spark_frost_commitment.rb +241 -0
- data/lib/turnkey_client/models/spark_htlc_preimage_derivation.rb +196 -0
- data/lib/turnkey_client/models/spark_identity_derivation.rb +196 -0
- data/lib/turnkey_client/models/spark_key_derivation.rb +241 -0
- data/lib/turnkey_client/models/spark_leaf_public_key.rb +226 -0
- data/lib/turnkey_client/models/spark_lightning_receive_package.rb +228 -0
- data/lib/turnkey_client/models/spark_operator_recipient.rb +226 -0
- data/lib/turnkey_client/models/spark_partial_signature.rb +241 -0
- data/lib/turnkey_client/models/spark_prepare_lightning_receive_intent.rb +225 -0
- data/lib/turnkey_client/models/spark_prepare_lightning_receive_request.rb +288 -0
- data/lib/turnkey_client/models/spark_prepare_lightning_receive_result.rb +228 -0
- data/lib/turnkey_client/models/spark_prepare_transfer_intent.rb +225 -0
- data/lib/turnkey_client/models/spark_prepare_transfer_request.rb +288 -0
- data/lib/turnkey_client/models/spark_prepare_transfer_result.rb +245 -0
- data/lib/turnkey_client/models/spark_sign_frost_intent.rb +228 -0
- data/lib/turnkey_client/models/spark_sign_frost_request.rb +288 -0
- data/lib/turnkey_client/models/spark_sign_frost_result.rb +213 -0
- data/lib/turnkey_client/models/spark_signature_request.rb +268 -0
- data/lib/turnkey_client/models/spark_signing_leaf_derivation.rb +211 -0
- data/lib/turnkey_client/models/spark_static_deposit_derivation.rb +211 -0
- data/lib/turnkey_client/models/spark_transfer_leaf.rb +272 -0
- data/lib/turnkey_client/models/spark_transfer_package.rb +275 -0
- data/lib/turnkey_client/models/token_usage.rb +252 -0
- data/lib/turnkey_client/models/tvc_app.rb +353 -0
- data/lib/turnkey_client/models/tvc_container_spec.rb +302 -0
- data/lib/turnkey_client/models/tvc_deployment.rb +372 -0
- data/lib/turnkey_client/models/tvc_health_check_type.rb +27 -0
- data/lib/turnkey_client/models/tvc_manifest.rb +254 -0
- data/lib/turnkey_client/models/tvc_operator.rb +269 -0
- data/lib/turnkey_client/models/tvc_operator_approval.rb +283 -0
- data/lib/turnkey_client/models/tvc_operator_set.rb +301 -0
- data/lib/turnkey_client/models/tx_error.rb +22 -4
- data/lib/turnkey_client/models/update_auth_proxy_config_intent.rb +17 -5
- data/lib/turnkey_client/models/update_organization_name_intent.rb +211 -0
- data/lib/turnkey_client/models/update_organization_name_request.rb +298 -0
- data/lib/turnkey_client/models/update_organization_name_result.rb +226 -0
- data/lib/turnkey_client/models/update_tvc_app_live_deployment_intent.rb +211 -0
- data/lib/turnkey_client/models/update_tvc_app_live_deployment_request.rb +298 -0
- data/lib/turnkey_client/models/update_tvc_app_live_deployment_result.rb +196 -0
- data/lib/turnkey_client/models/update_webhook_endpoint_intent.rb +244 -0
- data/lib/turnkey_client/models/update_webhook_endpoint_request.rb +298 -0
- data/lib/turnkey_client/models/update_webhook_endpoint_result.rb +225 -0
- data/lib/turnkey_client/models/upsert_gas_usage_config_intent.rb +15 -6
- data/lib/turnkey_client/models/usage_type.rb +27 -0
- data/lib/turnkey_client/models/user_params_v4.rb +301 -0
- data/lib/turnkey_client/models/validate_tvc_image_request.rb +237 -0
- data/lib/turnkey_client/models/validate_tvc_image_response.rb +205 -0
- data/lib/turnkey_client/models/verify_otp_intent_v2.rb +237 -0
- data/lib/turnkey_client/models/verify_otp_request.rb +2 -2
- data/lib/turnkey_client/models/web_authn_stamp.rb +256 -0
- data/lib/turnkey_client/models/webhook_endpoint_data.rb +283 -0
- data/lib/turnkey_client/models/webhook_subscription_params.rb +233 -0
- data/lib/turnkey_client/version.rb +1 -1
- data/lib/turnkey_client.rb +122 -0
- metadata +124 -2
|
@@ -246,6 +246,48 @@ module TurnkeyClient
|
|
|
246
246
|
|
|
247
247
|
attr_accessor :sol_send_transaction_intent
|
|
248
248
|
|
|
249
|
+
attr_accessor :init_otp_intent_v3
|
|
250
|
+
|
|
251
|
+
attr_accessor :verify_otp_intent_v2
|
|
252
|
+
|
|
253
|
+
attr_accessor :otp_login_intent_v2
|
|
254
|
+
|
|
255
|
+
attr_accessor :update_organization_name_intent
|
|
256
|
+
|
|
257
|
+
attr_accessor :create_sub_organization_intent_v8
|
|
258
|
+
|
|
259
|
+
attr_accessor :create_oauth_providers_intent_v2
|
|
260
|
+
|
|
261
|
+
attr_accessor :create_users_intent_v4
|
|
262
|
+
|
|
263
|
+
attr_accessor :create_webhook_endpoint_intent
|
|
264
|
+
|
|
265
|
+
attr_accessor :update_webhook_endpoint_intent
|
|
266
|
+
|
|
267
|
+
attr_accessor :delete_webhook_endpoint_intent
|
|
268
|
+
|
|
269
|
+
attr_accessor :set_ip_allowlist_intent
|
|
270
|
+
|
|
271
|
+
attr_accessor :remove_ip_allowlist_intent
|
|
272
|
+
|
|
273
|
+
attr_accessor :update_tvc_app_live_deployment_intent
|
|
274
|
+
|
|
275
|
+
attr_accessor :delete_tvc_deployment_intent
|
|
276
|
+
|
|
277
|
+
attr_accessor :delete_tvc_app_and_deployments_intent
|
|
278
|
+
|
|
279
|
+
attr_accessor :restore_tvc_deployment_intent
|
|
280
|
+
|
|
281
|
+
attr_accessor :spark_sign_frost_intent
|
|
282
|
+
|
|
283
|
+
attr_accessor :spark_prepare_transfer_intent
|
|
284
|
+
|
|
285
|
+
attr_accessor :spark_claim_transfer_intent
|
|
286
|
+
|
|
287
|
+
attr_accessor :spark_prepare_lightning_receive_intent
|
|
288
|
+
|
|
289
|
+
attr_accessor :post_tvc_quorum_key_share_intent
|
|
290
|
+
|
|
249
291
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
250
292
|
def self.attribute_map
|
|
251
293
|
{
|
|
@@ -365,7 +407,28 @@ module TurnkeyClient
|
|
|
365
407
|
:'create_tvc_app_intent' => :'createTvcAppIntent',
|
|
366
408
|
:'create_tvc_deployment_intent' => :'createTvcDeploymentIntent',
|
|
367
409
|
:'create_tvc_manifest_approvals_intent' => :'createTvcManifestApprovalsIntent',
|
|
368
|
-
:'sol_send_transaction_intent' => :'solSendTransactionIntent'
|
|
410
|
+
:'sol_send_transaction_intent' => :'solSendTransactionIntent',
|
|
411
|
+
:'init_otp_intent_v3' => :'initOtpIntentV3',
|
|
412
|
+
:'verify_otp_intent_v2' => :'verifyOtpIntentV2',
|
|
413
|
+
:'otp_login_intent_v2' => :'otpLoginIntentV2',
|
|
414
|
+
:'update_organization_name_intent' => :'updateOrganizationNameIntent',
|
|
415
|
+
:'create_sub_organization_intent_v8' => :'createSubOrganizationIntentV8',
|
|
416
|
+
:'create_oauth_providers_intent_v2' => :'createOauthProvidersIntentV2',
|
|
417
|
+
:'create_users_intent_v4' => :'createUsersIntentV4',
|
|
418
|
+
:'create_webhook_endpoint_intent' => :'createWebhookEndpointIntent',
|
|
419
|
+
:'update_webhook_endpoint_intent' => :'updateWebhookEndpointIntent',
|
|
420
|
+
:'delete_webhook_endpoint_intent' => :'deleteWebhookEndpointIntent',
|
|
421
|
+
:'set_ip_allowlist_intent' => :'setIpAllowlistIntent',
|
|
422
|
+
:'remove_ip_allowlist_intent' => :'removeIpAllowlistIntent',
|
|
423
|
+
:'update_tvc_app_live_deployment_intent' => :'updateTvcAppLiveDeploymentIntent',
|
|
424
|
+
:'delete_tvc_deployment_intent' => :'deleteTvcDeploymentIntent',
|
|
425
|
+
:'delete_tvc_app_and_deployments_intent' => :'deleteTvcAppAndDeploymentsIntent',
|
|
426
|
+
:'restore_tvc_deployment_intent' => :'restoreTvcDeploymentIntent',
|
|
427
|
+
:'spark_sign_frost_intent' => :'sparkSignFrostIntent',
|
|
428
|
+
:'spark_prepare_transfer_intent' => :'sparkPrepareTransferIntent',
|
|
429
|
+
:'spark_claim_transfer_intent' => :'sparkClaimTransferIntent',
|
|
430
|
+
:'spark_prepare_lightning_receive_intent' => :'sparkPrepareLightningReceiveIntent',
|
|
431
|
+
:'post_tvc_quorum_key_share_intent' => :'postTvcQuorumKeyShareIntent'
|
|
369
432
|
}
|
|
370
433
|
end
|
|
371
434
|
|
|
@@ -488,7 +551,28 @@ module TurnkeyClient
|
|
|
488
551
|
:'create_tvc_app_intent' => :'Object',
|
|
489
552
|
:'create_tvc_deployment_intent' => :'Object',
|
|
490
553
|
:'create_tvc_manifest_approvals_intent' => :'Object',
|
|
491
|
-
:'sol_send_transaction_intent' => :'Object'
|
|
554
|
+
:'sol_send_transaction_intent' => :'Object',
|
|
555
|
+
:'init_otp_intent_v3' => :'Object',
|
|
556
|
+
:'verify_otp_intent_v2' => :'Object',
|
|
557
|
+
:'otp_login_intent_v2' => :'Object',
|
|
558
|
+
:'update_organization_name_intent' => :'Object',
|
|
559
|
+
:'create_sub_organization_intent_v8' => :'Object',
|
|
560
|
+
:'create_oauth_providers_intent_v2' => :'Object',
|
|
561
|
+
:'create_users_intent_v4' => :'Object',
|
|
562
|
+
:'create_webhook_endpoint_intent' => :'Object',
|
|
563
|
+
:'update_webhook_endpoint_intent' => :'Object',
|
|
564
|
+
:'delete_webhook_endpoint_intent' => :'Object',
|
|
565
|
+
:'set_ip_allowlist_intent' => :'Object',
|
|
566
|
+
:'remove_ip_allowlist_intent' => :'Object',
|
|
567
|
+
:'update_tvc_app_live_deployment_intent' => :'Object',
|
|
568
|
+
:'delete_tvc_deployment_intent' => :'Object',
|
|
569
|
+
:'delete_tvc_app_and_deployments_intent' => :'Object',
|
|
570
|
+
:'restore_tvc_deployment_intent' => :'Object',
|
|
571
|
+
:'spark_sign_frost_intent' => :'Object',
|
|
572
|
+
:'spark_prepare_transfer_intent' => :'Object',
|
|
573
|
+
:'spark_claim_transfer_intent' => :'Object',
|
|
574
|
+
:'spark_prepare_lightning_receive_intent' => :'Object',
|
|
575
|
+
:'post_tvc_quorum_key_share_intent' => :'Object'
|
|
492
576
|
}
|
|
493
577
|
end
|
|
494
578
|
|
|
@@ -980,6 +1064,90 @@ module TurnkeyClient
|
|
|
980
1064
|
if attributes.key?(:'sol_send_transaction_intent')
|
|
981
1065
|
self.sol_send_transaction_intent = attributes[:'sol_send_transaction_intent']
|
|
982
1066
|
end
|
|
1067
|
+
|
|
1068
|
+
if attributes.key?(:'init_otp_intent_v3')
|
|
1069
|
+
self.init_otp_intent_v3 = attributes[:'init_otp_intent_v3']
|
|
1070
|
+
end
|
|
1071
|
+
|
|
1072
|
+
if attributes.key?(:'verify_otp_intent_v2')
|
|
1073
|
+
self.verify_otp_intent_v2 = attributes[:'verify_otp_intent_v2']
|
|
1074
|
+
end
|
|
1075
|
+
|
|
1076
|
+
if attributes.key?(:'otp_login_intent_v2')
|
|
1077
|
+
self.otp_login_intent_v2 = attributes[:'otp_login_intent_v2']
|
|
1078
|
+
end
|
|
1079
|
+
|
|
1080
|
+
if attributes.key?(:'update_organization_name_intent')
|
|
1081
|
+
self.update_organization_name_intent = attributes[:'update_organization_name_intent']
|
|
1082
|
+
end
|
|
1083
|
+
|
|
1084
|
+
if attributes.key?(:'create_sub_organization_intent_v8')
|
|
1085
|
+
self.create_sub_organization_intent_v8 = attributes[:'create_sub_organization_intent_v8']
|
|
1086
|
+
end
|
|
1087
|
+
|
|
1088
|
+
if attributes.key?(:'create_oauth_providers_intent_v2')
|
|
1089
|
+
self.create_oauth_providers_intent_v2 = attributes[:'create_oauth_providers_intent_v2']
|
|
1090
|
+
end
|
|
1091
|
+
|
|
1092
|
+
if attributes.key?(:'create_users_intent_v4')
|
|
1093
|
+
self.create_users_intent_v4 = attributes[:'create_users_intent_v4']
|
|
1094
|
+
end
|
|
1095
|
+
|
|
1096
|
+
if attributes.key?(:'create_webhook_endpoint_intent')
|
|
1097
|
+
self.create_webhook_endpoint_intent = attributes[:'create_webhook_endpoint_intent']
|
|
1098
|
+
end
|
|
1099
|
+
|
|
1100
|
+
if attributes.key?(:'update_webhook_endpoint_intent')
|
|
1101
|
+
self.update_webhook_endpoint_intent = attributes[:'update_webhook_endpoint_intent']
|
|
1102
|
+
end
|
|
1103
|
+
|
|
1104
|
+
if attributes.key?(:'delete_webhook_endpoint_intent')
|
|
1105
|
+
self.delete_webhook_endpoint_intent = attributes[:'delete_webhook_endpoint_intent']
|
|
1106
|
+
end
|
|
1107
|
+
|
|
1108
|
+
if attributes.key?(:'set_ip_allowlist_intent')
|
|
1109
|
+
self.set_ip_allowlist_intent = attributes[:'set_ip_allowlist_intent']
|
|
1110
|
+
end
|
|
1111
|
+
|
|
1112
|
+
if attributes.key?(:'remove_ip_allowlist_intent')
|
|
1113
|
+
self.remove_ip_allowlist_intent = attributes[:'remove_ip_allowlist_intent']
|
|
1114
|
+
end
|
|
1115
|
+
|
|
1116
|
+
if attributes.key?(:'update_tvc_app_live_deployment_intent')
|
|
1117
|
+
self.update_tvc_app_live_deployment_intent = attributes[:'update_tvc_app_live_deployment_intent']
|
|
1118
|
+
end
|
|
1119
|
+
|
|
1120
|
+
if attributes.key?(:'delete_tvc_deployment_intent')
|
|
1121
|
+
self.delete_tvc_deployment_intent = attributes[:'delete_tvc_deployment_intent']
|
|
1122
|
+
end
|
|
1123
|
+
|
|
1124
|
+
if attributes.key?(:'delete_tvc_app_and_deployments_intent')
|
|
1125
|
+
self.delete_tvc_app_and_deployments_intent = attributes[:'delete_tvc_app_and_deployments_intent']
|
|
1126
|
+
end
|
|
1127
|
+
|
|
1128
|
+
if attributes.key?(:'restore_tvc_deployment_intent')
|
|
1129
|
+
self.restore_tvc_deployment_intent = attributes[:'restore_tvc_deployment_intent']
|
|
1130
|
+
end
|
|
1131
|
+
|
|
1132
|
+
if attributes.key?(:'spark_sign_frost_intent')
|
|
1133
|
+
self.spark_sign_frost_intent = attributes[:'spark_sign_frost_intent']
|
|
1134
|
+
end
|
|
1135
|
+
|
|
1136
|
+
if attributes.key?(:'spark_prepare_transfer_intent')
|
|
1137
|
+
self.spark_prepare_transfer_intent = attributes[:'spark_prepare_transfer_intent']
|
|
1138
|
+
end
|
|
1139
|
+
|
|
1140
|
+
if attributes.key?(:'spark_claim_transfer_intent')
|
|
1141
|
+
self.spark_claim_transfer_intent = attributes[:'spark_claim_transfer_intent']
|
|
1142
|
+
end
|
|
1143
|
+
|
|
1144
|
+
if attributes.key?(:'spark_prepare_lightning_receive_intent')
|
|
1145
|
+
self.spark_prepare_lightning_receive_intent = attributes[:'spark_prepare_lightning_receive_intent']
|
|
1146
|
+
end
|
|
1147
|
+
|
|
1148
|
+
if attributes.key?(:'post_tvc_quorum_key_share_intent')
|
|
1149
|
+
self.post_tvc_quorum_key_share_intent = attributes[:'post_tvc_quorum_key_share_intent']
|
|
1150
|
+
end
|
|
983
1151
|
end
|
|
984
1152
|
|
|
985
1153
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -1116,7 +1284,28 @@ module TurnkeyClient
|
|
|
1116
1284
|
create_tvc_app_intent == o.create_tvc_app_intent &&
|
|
1117
1285
|
create_tvc_deployment_intent == o.create_tvc_deployment_intent &&
|
|
1118
1286
|
create_tvc_manifest_approvals_intent == o.create_tvc_manifest_approvals_intent &&
|
|
1119
|
-
sol_send_transaction_intent == o.sol_send_transaction_intent
|
|
1287
|
+
sol_send_transaction_intent == o.sol_send_transaction_intent &&
|
|
1288
|
+
init_otp_intent_v3 == o.init_otp_intent_v3 &&
|
|
1289
|
+
verify_otp_intent_v2 == o.verify_otp_intent_v2 &&
|
|
1290
|
+
otp_login_intent_v2 == o.otp_login_intent_v2 &&
|
|
1291
|
+
update_organization_name_intent == o.update_organization_name_intent &&
|
|
1292
|
+
create_sub_organization_intent_v8 == o.create_sub_organization_intent_v8 &&
|
|
1293
|
+
create_oauth_providers_intent_v2 == o.create_oauth_providers_intent_v2 &&
|
|
1294
|
+
create_users_intent_v4 == o.create_users_intent_v4 &&
|
|
1295
|
+
create_webhook_endpoint_intent == o.create_webhook_endpoint_intent &&
|
|
1296
|
+
update_webhook_endpoint_intent == o.update_webhook_endpoint_intent &&
|
|
1297
|
+
delete_webhook_endpoint_intent == o.delete_webhook_endpoint_intent &&
|
|
1298
|
+
set_ip_allowlist_intent == o.set_ip_allowlist_intent &&
|
|
1299
|
+
remove_ip_allowlist_intent == o.remove_ip_allowlist_intent &&
|
|
1300
|
+
update_tvc_app_live_deployment_intent == o.update_tvc_app_live_deployment_intent &&
|
|
1301
|
+
delete_tvc_deployment_intent == o.delete_tvc_deployment_intent &&
|
|
1302
|
+
delete_tvc_app_and_deployments_intent == o.delete_tvc_app_and_deployments_intent &&
|
|
1303
|
+
restore_tvc_deployment_intent == o.restore_tvc_deployment_intent &&
|
|
1304
|
+
spark_sign_frost_intent == o.spark_sign_frost_intent &&
|
|
1305
|
+
spark_prepare_transfer_intent == o.spark_prepare_transfer_intent &&
|
|
1306
|
+
spark_claim_transfer_intent == o.spark_claim_transfer_intent &&
|
|
1307
|
+
spark_prepare_lightning_receive_intent == o.spark_prepare_lightning_receive_intent &&
|
|
1308
|
+
post_tvc_quorum_key_share_intent == o.post_tvc_quorum_key_share_intent
|
|
1120
1309
|
end
|
|
1121
1310
|
|
|
1122
1311
|
# @see the `==` method
|
|
@@ -1128,7 +1317,7 @@ module TurnkeyClient
|
|
|
1128
1317
|
# Calculates hash code according to all attributes.
|
|
1129
1318
|
# @return [Integer] Hash code
|
|
1130
1319
|
def hash
|
|
1131
|
-
[create_organization_intent, create_authenticators_intent, create_users_intent, create_private_keys_intent, sign_raw_payload_intent, create_invitations_intent, accept_invitation_intent, create_policy_intent, disable_private_key_intent, delete_users_intent, delete_authenticators_intent, delete_invitation_intent, delete_organization_intent, delete_policy_intent, create_user_tag_intent, delete_user_tags_intent, sign_transaction_intent, create_api_keys_intent, delete_api_keys_intent, approve_activity_intent, reject_activity_intent, create_private_key_tag_intent, delete_private_key_tags_intent, create_policy_intent_v2, set_payment_method_intent, activate_billing_tier_intent, delete_payment_method_intent, create_policy_intent_v3, create_api_only_users_intent, update_root_quorum_intent, update_user_tag_intent, update_private_key_tag_intent, create_authenticators_intent_v2, accept_invitation_intent_v2, create_organization_intent_v2, create_users_intent_v2, create_sub_organization_intent, create_sub_organization_intent_v2, update_allowed_origins_intent, create_private_keys_intent_v2, update_user_intent, update_policy_intent, set_payment_method_intent_v2, create_sub_organization_intent_v3, create_wallet_intent, create_wallet_accounts_intent, init_user_email_recovery_intent, recover_user_intent, set_organization_feature_intent, remove_organization_feature_intent, sign_raw_payload_intent_v2, sign_transaction_intent_v2, export_private_key_intent, export_wallet_intent, create_sub_organization_intent_v4, email_auth_intent, export_wallet_account_intent, init_import_wallet_intent, import_wallet_intent, init_import_private_key_intent, import_private_key_intent, create_policies_intent, sign_raw_payloads_intent, create_read_only_session_intent, create_oauth_providers_intent, delete_oauth_providers_intent, create_sub_organization_intent_v5, oauth_intent, create_api_keys_intent_v2, create_read_write_session_intent, email_auth_intent_v2, create_sub_organization_intent_v6, delete_private_keys_intent, delete_wallets_intent, create_read_write_session_intent_v2, delete_sub_organization_intent, init_otp_auth_intent, otp_auth_intent, create_sub_organization_intent_v7, update_wallet_intent, update_policy_intent_v2, create_users_intent_v3, init_otp_auth_intent_v2, init_otp_intent, verify_otp_intent, otp_login_intent, stamp_login_intent, oauth_login_intent, update_user_name_intent, update_user_email_intent, update_user_phone_number_intent, init_fiat_on_ramp_intent, create_smart_contract_interface_intent, delete_smart_contract_interface_intent, enable_auth_proxy_intent, disable_auth_proxy_intent, update_auth_proxy_config_intent, create_oauth2_credential_intent, update_oauth2_credential_intent, delete_oauth2_credential_intent, oauth2_authenticate_intent, delete_wallet_accounts_intent, delete_policies_intent, eth_send_raw_transaction_intent, eth_send_transaction_intent, create_fiat_on_ramp_credential_intent, update_fiat_on_ramp_credential_intent, delete_fiat_on_ramp_credential_intent, email_auth_intent_v3, init_user_email_recovery_intent_v2, init_otp_intent_v2, init_otp_auth_intent_v3, upsert_gas_usage_config_intent, create_tvc_app_intent, create_tvc_deployment_intent, create_tvc_manifest_approvals_intent, sol_send_transaction_intent].hash
|
|
1320
|
+
[create_organization_intent, create_authenticators_intent, create_users_intent, create_private_keys_intent, sign_raw_payload_intent, create_invitations_intent, accept_invitation_intent, create_policy_intent, disable_private_key_intent, delete_users_intent, delete_authenticators_intent, delete_invitation_intent, delete_organization_intent, delete_policy_intent, create_user_tag_intent, delete_user_tags_intent, sign_transaction_intent, create_api_keys_intent, delete_api_keys_intent, approve_activity_intent, reject_activity_intent, create_private_key_tag_intent, delete_private_key_tags_intent, create_policy_intent_v2, set_payment_method_intent, activate_billing_tier_intent, delete_payment_method_intent, create_policy_intent_v3, create_api_only_users_intent, update_root_quorum_intent, update_user_tag_intent, update_private_key_tag_intent, create_authenticators_intent_v2, accept_invitation_intent_v2, create_organization_intent_v2, create_users_intent_v2, create_sub_organization_intent, create_sub_organization_intent_v2, update_allowed_origins_intent, create_private_keys_intent_v2, update_user_intent, update_policy_intent, set_payment_method_intent_v2, create_sub_organization_intent_v3, create_wallet_intent, create_wallet_accounts_intent, init_user_email_recovery_intent, recover_user_intent, set_organization_feature_intent, remove_organization_feature_intent, sign_raw_payload_intent_v2, sign_transaction_intent_v2, export_private_key_intent, export_wallet_intent, create_sub_organization_intent_v4, email_auth_intent, export_wallet_account_intent, init_import_wallet_intent, import_wallet_intent, init_import_private_key_intent, import_private_key_intent, create_policies_intent, sign_raw_payloads_intent, create_read_only_session_intent, create_oauth_providers_intent, delete_oauth_providers_intent, create_sub_organization_intent_v5, oauth_intent, create_api_keys_intent_v2, create_read_write_session_intent, email_auth_intent_v2, create_sub_organization_intent_v6, delete_private_keys_intent, delete_wallets_intent, create_read_write_session_intent_v2, delete_sub_organization_intent, init_otp_auth_intent, otp_auth_intent, create_sub_organization_intent_v7, update_wallet_intent, update_policy_intent_v2, create_users_intent_v3, init_otp_auth_intent_v2, init_otp_intent, verify_otp_intent, otp_login_intent, stamp_login_intent, oauth_login_intent, update_user_name_intent, update_user_email_intent, update_user_phone_number_intent, init_fiat_on_ramp_intent, create_smart_contract_interface_intent, delete_smart_contract_interface_intent, enable_auth_proxy_intent, disable_auth_proxy_intent, update_auth_proxy_config_intent, create_oauth2_credential_intent, update_oauth2_credential_intent, delete_oauth2_credential_intent, oauth2_authenticate_intent, delete_wallet_accounts_intent, delete_policies_intent, eth_send_raw_transaction_intent, eth_send_transaction_intent, create_fiat_on_ramp_credential_intent, update_fiat_on_ramp_credential_intent, delete_fiat_on_ramp_credential_intent, email_auth_intent_v3, init_user_email_recovery_intent_v2, init_otp_intent_v2, init_otp_auth_intent_v3, upsert_gas_usage_config_intent, create_tvc_app_intent, create_tvc_deployment_intent, create_tvc_manifest_approvals_intent, sol_send_transaction_intent, init_otp_intent_v3, verify_otp_intent_v2, otp_login_intent_v2, update_organization_name_intent, create_sub_organization_intent_v8, create_oauth_providers_intent_v2, create_users_intent_v4, create_webhook_endpoint_intent, update_webhook_endpoint_intent, delete_webhook_endpoint_intent, set_ip_allowlist_intent, remove_ip_allowlist_intent, update_tvc_app_live_deployment_intent, delete_tvc_deployment_intent, delete_tvc_app_and_deployments_intent, restore_tvc_deployment_intent, spark_sign_frost_intent, spark_prepare_transfer_intent, spark_claim_transfer_intent, spark_prepare_lightning_receive_intent, post_tvc_quorum_key_share_intent].hash
|
|
1132
1321
|
end
|
|
1133
1322
|
|
|
1134
1323
|
# Builds the object from hash
|
|
@@ -0,0 +1,261 @@
|
|
|
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 IpAllowlist
|
|
15
|
+
# Unique identifier for the organization this allowlist belongs to.
|
|
16
|
+
attr_accessor :organization_id
|
|
17
|
+
|
|
18
|
+
# List of IP allowlist rules with their metadata.
|
|
19
|
+
attr_accessor :rules
|
|
20
|
+
|
|
21
|
+
# Public key of the API key this allowlist applies to. Null means the allowlist applies to the entire organization.
|
|
22
|
+
attr_accessor :public_key
|
|
23
|
+
|
|
24
|
+
# Whether the IP allowlist is enabled. Only present for organization-level allowlists. Null for API key-level allowlists (presence of the allowlist implies enablement).
|
|
25
|
+
attr_accessor :enabled
|
|
26
|
+
|
|
27
|
+
# Behavior when an error occurs during IP allowlist evaluation. Valid values: ALLOW, DENY. Defaults to DENY.
|
|
28
|
+
attr_accessor :on_evaluation_error
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'organization_id' => :'organizationId',
|
|
34
|
+
:'rules' => :'rules',
|
|
35
|
+
:'public_key' => :'publicKey',
|
|
36
|
+
:'enabled' => :'enabled',
|
|
37
|
+
:'on_evaluation_error' => :'onEvaluationError'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'organization_id' => :'Object',
|
|
45
|
+
:'rules' => :'Object',
|
|
46
|
+
:'public_key' => :'Object',
|
|
47
|
+
:'enabled' => :'Object',
|
|
48
|
+
:'on_evaluation_error' => :'Object'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# List of attributes with nullable: true
|
|
53
|
+
def self.openapi_nullable
|
|
54
|
+
Set.new([
|
|
55
|
+
:'public_key',
|
|
56
|
+
:'enabled',
|
|
57
|
+
:'on_evaluation_error'
|
|
58
|
+
])
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Initializes the object
|
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
63
|
+
def initialize(attributes = {})
|
|
64
|
+
if (!attributes.is_a?(Hash))
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::IpAllowlist` initialize method"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
70
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::IpAllowlist`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
72
|
+
end
|
|
73
|
+
h[k.to_sym] = v
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'organization_id')
|
|
77
|
+
self.organization_id = attributes[:'organization_id']
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'rules')
|
|
81
|
+
if (value = attributes[:'rules']).is_a?(Array)
|
|
82
|
+
self.rules = value
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'public_key')
|
|
87
|
+
self.public_key = attributes[:'public_key']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'enabled')
|
|
91
|
+
self.enabled = attributes[:'enabled']
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'on_evaluation_error')
|
|
95
|
+
self.on_evaluation_error = attributes[:'on_evaluation_error']
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
100
|
+
# @return Array for valid properties with the reasons
|
|
101
|
+
def list_invalid_properties
|
|
102
|
+
invalid_properties = Array.new
|
|
103
|
+
if @organization_id.nil?
|
|
104
|
+
invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if @rules.nil?
|
|
108
|
+
invalid_properties.push('invalid value for "rules", rules cannot be nil.')
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
invalid_properties
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Check to see if the all the properties in the model are valid
|
|
115
|
+
# @return true if the model is valid
|
|
116
|
+
def valid?
|
|
117
|
+
return false if @organization_id.nil?
|
|
118
|
+
return false if @rules.nil?
|
|
119
|
+
true
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Checks equality by comparing each attribute.
|
|
123
|
+
# @param [Object] Object to be compared
|
|
124
|
+
def ==(o)
|
|
125
|
+
return true if self.equal?(o)
|
|
126
|
+
self.class == o.class &&
|
|
127
|
+
organization_id == o.organization_id &&
|
|
128
|
+
rules == o.rules &&
|
|
129
|
+
public_key == o.public_key &&
|
|
130
|
+
enabled == o.enabled &&
|
|
131
|
+
on_evaluation_error == o.on_evaluation_error
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# @see the `==` method
|
|
135
|
+
# @param [Object] Object to be compared
|
|
136
|
+
def eql?(o)
|
|
137
|
+
self == o
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Calculates hash code according to all attributes.
|
|
141
|
+
# @return [Integer] Hash code
|
|
142
|
+
def hash
|
|
143
|
+
[organization_id, rules, public_key, enabled, on_evaluation_error].hash
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Builds the object from hash
|
|
147
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
148
|
+
# @return [Object] Returns the model itself
|
|
149
|
+
def self.build_from_hash(attributes)
|
|
150
|
+
new.build_from_hash(attributes)
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Builds the object from hash
|
|
154
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
155
|
+
# @return [Object] Returns the model itself
|
|
156
|
+
def build_from_hash(attributes)
|
|
157
|
+
return nil unless attributes.is_a?(Hash)
|
|
158
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
159
|
+
if type =~ /\AArray<(.*)>/i
|
|
160
|
+
# check to ensure the input is an array given that the attribute
|
|
161
|
+
# is documented as an array but the input is not
|
|
162
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
163
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
164
|
+
end
|
|
165
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
166
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
167
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
168
|
+
self.send("#{key}=", nil)
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
self
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Deserializes the data based on type
|
|
176
|
+
# @param string type Data type
|
|
177
|
+
# @param string value Value to be deserialized
|
|
178
|
+
# @return [Object] Deserialized data
|
|
179
|
+
def _deserialize(type, value)
|
|
180
|
+
case type.to_sym
|
|
181
|
+
when :DateTime
|
|
182
|
+
DateTime.parse(value)
|
|
183
|
+
when :Date
|
|
184
|
+
Date.parse(value)
|
|
185
|
+
when :String
|
|
186
|
+
value.to_s
|
|
187
|
+
when :Integer
|
|
188
|
+
value.to_i
|
|
189
|
+
when :Float
|
|
190
|
+
value.to_f
|
|
191
|
+
when :Boolean
|
|
192
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
193
|
+
true
|
|
194
|
+
else
|
|
195
|
+
false
|
|
196
|
+
end
|
|
197
|
+
when :Object
|
|
198
|
+
# generic object (usually a Hash), return directly
|
|
199
|
+
value
|
|
200
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
201
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
202
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
203
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
204
|
+
k_type = Regexp.last_match[:k_type]
|
|
205
|
+
v_type = Regexp.last_match[:v_type]
|
|
206
|
+
{}.tap do |hash|
|
|
207
|
+
value.each do |k, v|
|
|
208
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
else # model
|
|
212
|
+
TurnkeyClient.const_get(type).build_from_hash(value)
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Returns the string representation of the object
|
|
217
|
+
# @return [String] String presentation of the object
|
|
218
|
+
def to_s
|
|
219
|
+
to_hash.to_s
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
223
|
+
# @return [Hash] Returns the object in the form of hash
|
|
224
|
+
def to_body
|
|
225
|
+
to_hash
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Returns the object in the form of hash
|
|
229
|
+
# @return [Hash] Returns the object in the form of hash
|
|
230
|
+
def to_hash
|
|
231
|
+
hash = {}
|
|
232
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
233
|
+
value = self.send(attr)
|
|
234
|
+
if value.nil?
|
|
235
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
236
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
hash[param] = _to_hash(value)
|
|
240
|
+
end
|
|
241
|
+
hash
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Outputs non-array value in the form of hash
|
|
245
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
246
|
+
# @param [Object] value Any valid value
|
|
247
|
+
# @return [Hash] Returns the value in the form of hash
|
|
248
|
+
def _to_hash(value)
|
|
249
|
+
if value.is_a?(Array)
|
|
250
|
+
value.compact.map { |v| _to_hash(v) }
|
|
251
|
+
elsif value.is_a?(Hash)
|
|
252
|
+
{}.tap do |hash|
|
|
253
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
254
|
+
end
|
|
255
|
+
elsif value.respond_to? :to_hash
|
|
256
|
+
value.to_hash
|
|
257
|
+
else
|
|
258
|
+
value
|
|
259
|
+
end
|
|
260
|
+
end end
|
|
261
|
+
end
|