turnkey_client 0.0.3 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/turnkey_client/api/activities_api.rb +0 -1
- data/lib/turnkey_client/api/api_keys_api.rb +0 -1
- data/lib/turnkey_client/api/authenticators_api.rb +0 -1
- data/lib/turnkey_client/api/consensus_api.rb +0 -1
- data/lib/turnkey_client/api/features_api.rb +0 -1
- data/lib/turnkey_client/api/invitations_api.rb +0 -1
- data/lib/turnkey_client/api/organizations_api.rb +58 -1
- data/lib/turnkey_client/api/policies_api.rb +58 -1
- data/lib/turnkey_client/api/private_key_tags_api.rb +0 -1
- data/lib/turnkey_client/api/private_keys_api.rb +0 -1
- data/lib/turnkey_client/api/sessions_api.rb +118 -3
- data/lib/turnkey_client/api/signing_api.rb +58 -1
- data/lib/turnkey_client/api/user_auth_api.rb +0 -1
- data/lib/turnkey_client/api/user_recovery_api.rb +0 -1
- data/lib/turnkey_client/api/user_tags_api.rb +0 -1
- data/lib/turnkey_client/api/users_api.rb +232 -1
- data/lib/turnkey_client/api/wallets_api.rb +0 -1
- data/lib/turnkey_client/api_client.rb +0 -1
- data/lib/turnkey_client/api_error.rb +0 -1
- data/lib/turnkey_client/configuration.rb +0 -1
- data/lib/turnkey_client/models/accept_invitation_intent.rb +0 -1
- data/lib/turnkey_client/models/accept_invitation_intent_v2.rb +0 -1
- data/lib/turnkey_client/models/accept_invitation_result.rb +0 -1
- data/lib/turnkey_client/models/access_type.rb +0 -1
- data/lib/turnkey_client/models/activate_billing_tier_intent.rb +0 -1
- data/lib/turnkey_client/models/activate_billing_tier_result.rb +0 -1
- data/lib/turnkey_client/models/activity.rb +13 -5
- data/lib/turnkey_client/models/activity_response.rb +0 -1
- data/lib/turnkey_client/models/activity_status.rb +0 -1
- data/lib/turnkey_client/models/activity_type.rb +11 -1
- data/lib/turnkey_client/models/activity_v1_address.rb +0 -1
- data/lib/turnkey_client/models/address_format.rb +0 -1
- data/lib/turnkey_client/models/any.rb +200 -0
- data/lib/turnkey_client/models/api_key.rb +0 -1
- data/lib/turnkey_client/models/api_key_curve.rb +28 -0
- data/lib/turnkey_client/models/api_key_params.rb +0 -1
- data/lib/turnkey_client/models/api_key_params_v2.rb +250 -0
- data/lib/turnkey_client/models/api_only_user_params.rb +0 -1
- data/lib/turnkey_client/models/approve_activity_intent.rb +0 -1
- data/lib/turnkey_client/models/approve_activity_request.rb +0 -1
- data/lib/turnkey_client/models/attestation.rb +0 -1
- data/lib/turnkey_client/models/authenticator.rb +0 -1
- data/lib/turnkey_client/models/authenticator_attestation_response.rb +0 -1
- data/lib/turnkey_client/models/authenticator_params.rb +0 -1
- data/lib/turnkey_client/models/authenticator_params_v2.rb +0 -1
- data/lib/turnkey_client/models/authenticator_transport.rb +0 -1
- data/lib/turnkey_client/models/config.rb +216 -0
- data/lib/turnkey_client/models/create_api_keys_intent.rb +0 -1
- data/lib/turnkey_client/models/create_api_keys_intent_v2.rb +228 -0
- data/lib/turnkey_client/models/create_api_keys_request.rb +2 -3
- data/lib/turnkey_client/models/create_api_keys_result.rb +0 -1
- data/lib/turnkey_client/models/create_api_only_users_intent.rb +0 -1
- data/lib/turnkey_client/models/create_api_only_users_result.rb +0 -1
- data/lib/turnkey_client/models/create_authenticators_intent.rb +0 -1
- data/lib/turnkey_client/models/create_authenticators_intent_v2.rb +0 -1
- data/lib/turnkey_client/models/create_authenticators_request.rb +0 -1
- data/lib/turnkey_client/models/create_authenticators_result.rb +0 -1
- data/lib/turnkey_client/models/create_invitations_intent.rb +0 -1
- data/lib/turnkey_client/models/create_invitations_request.rb +0 -1
- data/lib/turnkey_client/models/create_invitations_result.rb +0 -1
- data/lib/turnkey_client/models/create_oauth_providers_intent.rb +228 -0
- data/lib/turnkey_client/models/create_oauth_providers_request.rb +288 -0
- data/lib/turnkey_client/models/create_oauth_providers_result.rb +213 -0
- data/lib/turnkey_client/models/create_organization_intent.rb +0 -1
- data/lib/turnkey_client/models/create_organization_intent_v2.rb +0 -1
- data/lib/turnkey_client/models/create_organization_result.rb +0 -1
- data/lib/turnkey_client/models/create_policies_intent.rb +213 -0
- data/lib/turnkey_client/models/create_policies_request.rb +288 -0
- data/lib/turnkey_client/models/create_policies_result.rb +213 -0
- data/lib/turnkey_client/models/create_policy_intent.rb +0 -1
- data/lib/turnkey_client/models/create_policy_intent_v2.rb +0 -1
- data/lib/turnkey_client/models/create_policy_intent_v3.rb +0 -1
- data/lib/turnkey_client/models/create_policy_request.rb +0 -1
- data/lib/turnkey_client/models/create_policy_result.rb +0 -1
- data/lib/turnkey_client/models/create_private_key_tag_intent.rb +0 -1
- data/lib/turnkey_client/models/create_private_key_tag_request.rb +0 -1
- data/lib/turnkey_client/models/create_private_key_tag_result.rb +0 -1
- data/lib/turnkey_client/models/create_private_keys_intent.rb +0 -1
- data/lib/turnkey_client/models/create_private_keys_intent_v2.rb +0 -1
- data/lib/turnkey_client/models/create_private_keys_request.rb +0 -1
- data/lib/turnkey_client/models/create_private_keys_result.rb +0 -1
- data/lib/turnkey_client/models/create_private_keys_result_v2.rb +0 -1
- data/lib/turnkey_client/models/create_read_only_session_intent.rb +196 -0
- data/lib/turnkey_client/models/create_read_only_session_request.rb +288 -0
- data/lib/turnkey_client/models/create_read_only_session_result.rb +286 -0
- data/lib/turnkey_client/models/create_read_write_session_intent.rb +246 -0
- data/lib/turnkey_client/models/create_read_write_session_request.rb +288 -0
- data/lib/turnkey_client/models/create_read_write_session_result.rb +286 -0
- data/lib/turnkey_client/models/create_sub_organization_intent.rb +0 -1
- data/lib/turnkey_client/models/create_sub_organization_intent_v2.rb +0 -1
- data/lib/turnkey_client/models/create_sub_organization_intent_v3.rb +0 -1
- data/lib/turnkey_client/models/create_sub_organization_intent_v4.rb +0 -1
- data/lib/turnkey_client/models/create_sub_organization_intent_v5.rb +272 -0
- data/lib/turnkey_client/models/create_sub_organization_intent_v6.rb +272 -0
- data/lib/turnkey_client/models/create_sub_organization_request.rb +2 -3
- data/lib/turnkey_client/models/create_sub_organization_result.rb +0 -1
- data/lib/turnkey_client/models/create_sub_organization_result_v3.rb +0 -1
- data/lib/turnkey_client/models/create_sub_organization_result_v4.rb +0 -1
- data/lib/turnkey_client/models/create_sub_organization_result_v5.rb +230 -0
- data/lib/turnkey_client/models/create_sub_organization_result_v6.rb +230 -0
- data/lib/turnkey_client/models/create_user_tag_intent.rb +0 -1
- data/lib/turnkey_client/models/create_user_tag_request.rb +0 -1
- data/lib/turnkey_client/models/create_user_tag_result.rb +0 -1
- data/lib/turnkey_client/models/create_users_intent.rb +0 -1
- data/lib/turnkey_client/models/create_users_intent_v2.rb +0 -1
- data/lib/turnkey_client/models/create_users_request.rb +0 -1
- data/lib/turnkey_client/models/create_users_result.rb +0 -1
- data/lib/turnkey_client/models/create_wallet_accounts_intent.rb +0 -1
- data/lib/turnkey_client/models/create_wallet_accounts_request.rb +0 -1
- data/lib/turnkey_client/models/create_wallet_accounts_result.rb +0 -1
- data/lib/turnkey_client/models/create_wallet_intent.rb +0 -1
- data/lib/turnkey_client/models/create_wallet_request.rb +0 -1
- data/lib/turnkey_client/models/create_wallet_result.rb +0 -1
- data/lib/turnkey_client/models/cred_props_authentication_extensions_client_outputs.rb +0 -1
- data/lib/turnkey_client/models/credential_type.rb +3 -1
- data/lib/turnkey_client/models/curve.rb +0 -1
- data/lib/turnkey_client/models/data_v1_address.rb +0 -1
- data/lib/turnkey_client/models/delete_api_keys_intent.rb +0 -1
- data/lib/turnkey_client/models/delete_api_keys_request.rb +0 -1
- data/lib/turnkey_client/models/delete_api_keys_result.rb +0 -1
- data/lib/turnkey_client/models/delete_authenticators_intent.rb +0 -1
- data/lib/turnkey_client/models/delete_authenticators_request.rb +0 -1
- data/lib/turnkey_client/models/delete_authenticators_result.rb +0 -1
- data/lib/turnkey_client/models/delete_invitation_intent.rb +0 -1
- data/lib/turnkey_client/models/delete_invitation_request.rb +0 -1
- data/lib/turnkey_client/models/delete_invitation_result.rb +0 -1
- data/lib/turnkey_client/models/delete_oauth_providers_intent.rb +228 -0
- data/lib/turnkey_client/models/delete_oauth_providers_request.rb +288 -0
- data/lib/turnkey_client/models/delete_oauth_providers_result.rb +213 -0
- data/lib/turnkey_client/models/delete_organization_intent.rb +0 -1
- data/lib/turnkey_client/models/delete_organization_result.rb +0 -1
- data/lib/turnkey_client/models/delete_payment_method_intent.rb +0 -1
- data/lib/turnkey_client/models/delete_payment_method_result.rb +0 -1
- data/lib/turnkey_client/models/delete_policy_intent.rb +0 -1
- data/lib/turnkey_client/models/delete_policy_request.rb +0 -1
- data/lib/turnkey_client/models/delete_policy_result.rb +0 -1
- data/lib/turnkey_client/models/delete_private_key_tags_intent.rb +0 -1
- data/lib/turnkey_client/models/delete_private_key_tags_request.rb +0 -1
- data/lib/turnkey_client/models/delete_private_key_tags_result.rb +0 -1
- data/lib/turnkey_client/models/delete_user_tags_intent.rb +0 -1
- data/lib/turnkey_client/models/delete_user_tags_request.rb +0 -1
- data/lib/turnkey_client/models/delete_user_tags_result.rb +0 -1
- data/lib/turnkey_client/models/delete_users_intent.rb +0 -1
- data/lib/turnkey_client/models/delete_users_request.rb +0 -1
- data/lib/turnkey_client/models/delete_users_result.rb +0 -1
- data/lib/turnkey_client/models/disable_private_key_intent.rb +0 -1
- data/lib/turnkey_client/models/disable_private_key_result.rb +0 -1
- data/lib/turnkey_client/models/effect.rb +0 -1
- data/lib/turnkey_client/models/email_auth_intent.rb +14 -5
- data/lib/turnkey_client/models/email_auth_intent_v2.rb +265 -0
- data/lib/turnkey_client/models/email_auth_request.rb +2 -3
- data/lib/turnkey_client/models/email_auth_result.rb +0 -1
- data/lib/turnkey_client/models/email_customization_params.rb +1 -2
- data/lib/turnkey_client/models/export_private_key_intent.rb +0 -1
- data/lib/turnkey_client/models/export_private_key_request.rb +0 -1
- data/lib/turnkey_client/models/export_private_key_result.rb +0 -1
- data/lib/turnkey_client/models/export_wallet_account_intent.rb +0 -1
- data/lib/turnkey_client/models/export_wallet_account_request.rb +0 -1
- data/lib/turnkey_client/models/export_wallet_account_result.rb +0 -1
- data/lib/turnkey_client/models/export_wallet_intent.rb +0 -1
- data/lib/turnkey_client/models/export_wallet_request.rb +0 -1
- data/lib/turnkey_client/models/export_wallet_result.rb +0 -1
- data/lib/turnkey_client/models/external_data_v1_credential.rb +0 -1
- data/lib/turnkey_client/models/external_data_v1_quorum.rb +228 -0
- data/lib/turnkey_client/models/external_data_v1_timestamp.rb +0 -1
- data/lib/turnkey_client/models/feature.rb +0 -1
- data/lib/turnkey_client/models/feature_name.rb +0 -1
- data/lib/turnkey_client/models/get_activities_request.rb +0 -1
- data/lib/turnkey_client/models/get_activities_response.rb +0 -1
- data/lib/turnkey_client/models/get_activity_request.rb +0 -1
- data/lib/turnkey_client/models/get_api_key_request.rb +0 -1
- data/lib/turnkey_client/models/get_api_key_response.rb +0 -1
- data/lib/turnkey_client/models/get_api_keys_request.rb +0 -1
- data/lib/turnkey_client/models/get_api_keys_response.rb +0 -1
- data/lib/turnkey_client/models/get_authenticator_request.rb +0 -1
- data/lib/turnkey_client/models/get_authenticator_response.rb +0 -1
- data/lib/turnkey_client/models/get_authenticators_request.rb +0 -1
- data/lib/turnkey_client/models/get_authenticators_response.rb +0 -1
- data/lib/turnkey_client/models/get_oauth_providers_request.rb +221 -0
- data/lib/turnkey_client/models/get_oauth_providers_response.rb +213 -0
- data/lib/turnkey_client/models/get_organization_configs_request.rb +211 -0
- data/lib/turnkey_client/models/get_organization_configs_response.rb +210 -0
- data/lib/turnkey_client/models/get_policies_request.rb +0 -1
- data/lib/turnkey_client/models/get_policies_response.rb +0 -1
- data/lib/turnkey_client/models/get_policy_request.rb +0 -1
- data/lib/turnkey_client/models/get_policy_response.rb +0 -1
- data/lib/turnkey_client/models/get_private_key_request.rb +0 -1
- data/lib/turnkey_client/models/get_private_key_response.rb +0 -1
- data/lib/turnkey_client/models/get_private_keys_request.rb +0 -1
- data/lib/turnkey_client/models/get_private_keys_response.rb +0 -1
- data/lib/turnkey_client/models/get_sub_org_ids_request.rb +14 -6
- data/lib/turnkey_client/models/get_sub_org_ids_response.rb +0 -1
- data/lib/turnkey_client/models/get_user_request.rb +0 -1
- data/lib/turnkey_client/models/get_user_response.rb +0 -1
- data/lib/turnkey_client/models/get_users_request.rb +0 -1
- data/lib/turnkey_client/models/get_users_response.rb +0 -1
- data/lib/turnkey_client/models/get_wallet_accounts_request.rb +13 -5
- data/lib/turnkey_client/models/get_wallet_accounts_response.rb +0 -1
- data/lib/turnkey_client/models/get_wallet_request.rb +0 -1
- data/lib/turnkey_client/models/get_wallet_response.rb +0 -1
- data/lib/turnkey_client/models/get_wallets_request.rb +0 -1
- data/lib/turnkey_client/models/get_wallets_response.rb +0 -1
- data/lib/turnkey_client/models/get_whoami_request.rb +0 -1
- data/lib/turnkey_client/models/get_whoami_response.rb +0 -1
- data/lib/turnkey_client/models/hash_function.rb +0 -1
- data/lib/turnkey_client/models/import_private_key_intent.rb +0 -1
- data/lib/turnkey_client/models/import_private_key_request.rb +0 -1
- data/lib/turnkey_client/models/import_private_key_result.rb +0 -1
- data/lib/turnkey_client/models/import_wallet_intent.rb +0 -1
- data/lib/turnkey_client/models/import_wallet_request.rb +0 -1
- data/lib/turnkey_client/models/import_wallet_result.rb +0 -1
- data/lib/turnkey_client/models/init_import_private_key_intent.rb +0 -1
- data/lib/turnkey_client/models/init_import_private_key_request.rb +0 -1
- data/lib/turnkey_client/models/init_import_private_key_result.rb +0 -1
- data/lib/turnkey_client/models/init_import_wallet_intent.rb +0 -1
- data/lib/turnkey_client/models/init_import_wallet_request.rb +0 -1
- data/lib/turnkey_client/models/init_import_wallet_result.rb +0 -1
- data/lib/turnkey_client/models/init_user_email_recovery_intent.rb +0 -1
- data/lib/turnkey_client/models/init_user_email_recovery_request.rb +0 -1
- data/lib/turnkey_client/models/init_user_email_recovery_result.rb +0 -1
- data/lib/turnkey_client/models/intent.rb +103 -10
- data/lib/turnkey_client/models/invitation_params.rb +0 -1
- data/lib/turnkey_client/models/list_private_key_tags_request.rb +0 -1
- data/lib/turnkey_client/models/list_private_key_tags_response.rb +0 -1
- data/lib/turnkey_client/models/list_user_tags_request.rb +0 -1
- data/lib/turnkey_client/models/list_user_tags_response.rb +0 -1
- data/lib/turnkey_client/models/mnemonic_language.rb +0 -1
- data/lib/turnkey_client/models/oauth_intent.rb +246 -0
- data/lib/turnkey_client/models/oauth_provider.rb +299 -0
- data/lib/turnkey_client/models/oauth_provider_params.rb +226 -0
- data/lib/turnkey_client/models/oauth_request.rb +288 -0
- data/lib/turnkey_client/models/oauth_result.rb +241 -0
- data/lib/turnkey_client/models/operator.rb +0 -1
- data/lib/turnkey_client/models/pagination.rb +0 -1
- data/lib/turnkey_client/models/path_format.rb +0 -1
- data/lib/turnkey_client/models/payload_encoding.rb +0 -1
- data/lib/turnkey_client/models/policy.rb +0 -1
- data/lib/turnkey_client/models/private_key.rb +0 -1
- data/lib/turnkey_client/models/private_key_params.rb +0 -1
- data/lib/turnkey_client/models/private_key_result.rb +0 -1
- data/lib/turnkey_client/models/public_key_credential_with_attestation.rb +0 -1
- data/lib/turnkey_client/models/recover_user_intent.rb +0 -1
- data/lib/turnkey_client/models/recover_user_request.rb +0 -1
- data/lib/turnkey_client/models/recover_user_result.rb +0 -1
- data/lib/turnkey_client/models/reject_activity_intent.rb +0 -1
- data/lib/turnkey_client/models/reject_activity_request.rb +0 -1
- data/lib/turnkey_client/models/remove_organization_feature_intent.rb +0 -1
- data/lib/turnkey_client/models/remove_organization_feature_request.rb +0 -1
- data/lib/turnkey_client/models/remove_organization_feature_result.rb +0 -1
- data/lib/turnkey_client/models/result.rb +85 -5
- data/lib/turnkey_client/models/root_user_params.rb +0 -1
- data/lib/turnkey_client/models/root_user_params_v2.rb +272 -0
- data/lib/turnkey_client/models/root_user_params_v3.rb +272 -0
- data/lib/turnkey_client/models/selector.rb +0 -1
- data/lib/turnkey_client/models/selector_v2.rb +0 -1
- data/lib/turnkey_client/models/set_organization_feature_intent.rb +0 -1
- data/lib/turnkey_client/models/set_organization_feature_request.rb +0 -1
- data/lib/turnkey_client/models/set_organization_feature_result.rb +0 -1
- data/lib/turnkey_client/models/set_payment_method_intent.rb +0 -1
- data/lib/turnkey_client/models/set_payment_method_intent_v2.rb +0 -1
- data/lib/turnkey_client/models/set_payment_method_result.rb +0 -1
- data/lib/turnkey_client/models/sign_raw_payload_intent.rb +0 -1
- data/lib/turnkey_client/models/sign_raw_payload_intent_v2.rb +0 -1
- data/lib/turnkey_client/models/sign_raw_payload_request.rb +0 -1
- data/lib/turnkey_client/models/sign_raw_payload_result.rb +0 -1
- data/lib/turnkey_client/models/sign_raw_payloads_intent.rb +256 -0
- data/lib/turnkey_client/models/sign_raw_payloads_request.rb +288 -0
- data/lib/turnkey_client/models/sign_raw_payloads_result.rb +207 -0
- data/lib/turnkey_client/models/sign_transaction_intent.rb +0 -1
- data/lib/turnkey_client/models/sign_transaction_intent_v2.rb +0 -1
- data/lib/turnkey_client/models/sign_transaction_request.rb +0 -1
- data/lib/turnkey_client/models/sign_transaction_result.rb +0 -1
- data/lib/turnkey_client/models/simple_client_extension_results.rb +0 -1
- data/lib/turnkey_client/models/status.rb +225 -0
- data/lib/turnkey_client/models/tag_type.rb +0 -1
- data/lib/turnkey_client/models/transaction_type.rb +0 -1
- data/lib/turnkey_client/models/update_allowed_origins_intent.rb +0 -1
- data/lib/turnkey_client/models/update_allowed_origins_result.rb +0 -1
- data/lib/turnkey_client/models/update_policy_intent.rb +0 -1
- data/lib/turnkey_client/models/update_policy_request.rb +0 -1
- data/lib/turnkey_client/models/update_policy_result.rb +0 -1
- data/lib/turnkey_client/models/update_private_key_tag_intent.rb +0 -1
- data/lib/turnkey_client/models/update_private_key_tag_request.rb +0 -1
- data/lib/turnkey_client/models/update_private_key_tag_result.rb +0 -1
- data/lib/turnkey_client/models/update_root_quorum_intent.rb +0 -1
- data/lib/turnkey_client/models/update_root_quorum_request.rb +0 -1
- data/lib/turnkey_client/models/update_root_quorum_result.rb +0 -1
- data/lib/turnkey_client/models/update_user_intent.rb +0 -1
- data/lib/turnkey_client/models/update_user_request.rb +0 -1
- data/lib/turnkey_client/models/update_user_result.rb +0 -1
- data/lib/turnkey_client/models/update_user_tag_intent.rb +0 -1
- data/lib/turnkey_client/models/update_user_tag_request.rb +0 -1
- data/lib/turnkey_client/models/update_user_tag_result.rb +0 -1
- data/lib/turnkey_client/models/user.rb +18 -2
- data/lib/turnkey_client/models/user_params.rb +0 -1
- data/lib/turnkey_client/models/user_params_v2.rb +0 -1
- data/lib/turnkey_client/models/v1_tag.rb +0 -1
- data/lib/turnkey_client/models/vote.rb +0 -1
- data/lib/turnkey_client/models/wallet.rb +0 -1
- data/lib/turnkey_client/models/wallet_account.rb +4 -20
- data/lib/turnkey_client/models/wallet_account_params.rb +0 -1
- data/lib/turnkey_client/models/wallet_params.rb +0 -1
- data/lib/turnkey_client/models/wallet_result.rb +0 -1
- data/lib/turnkey_client/version.rb +1 -2
- data/lib/turnkey_client.rb +41 -1
- data/turnkey_client-0.0.3.gem +0 -0
- data/turnkey_client-0.0.4.gem +0 -0
- data/turnkey_client.gemspec +0 -1
- metadata +45 -2
@@ -6,7 +6,6 @@
|
|
6
6
|
OpenAPI spec version: 1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 3.0.54
|
10
9
|
=end
|
11
10
|
|
12
11
|
module TurnkeyClient
|
@@ -16,6 +15,64 @@ module TurnkeyClient
|
|
16
15
|
def initialize(api_client = ApiClient.default)
|
17
16
|
@api_client = api_client
|
18
17
|
end
|
18
|
+
# Create Oauth Providers
|
19
|
+
# Creates Oauth providers for a specified user - BETA
|
20
|
+
# @param body
|
21
|
+
# @param [Hash] opts the optional parameters
|
22
|
+
# @return [ActivityResponse]
|
23
|
+
def create_oauth_providers(body, opts = {})
|
24
|
+
data, _status_code, _headers = create_oauth_providers_with_http_info(body, opts)
|
25
|
+
data
|
26
|
+
end
|
27
|
+
|
28
|
+
# Create Oauth Providers
|
29
|
+
# Creates Oauth providers for a specified user - BETA
|
30
|
+
# @param body
|
31
|
+
# @param [Hash] opts the optional parameters
|
32
|
+
# @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers
|
33
|
+
def create_oauth_providers_with_http_info(body, opts = {})
|
34
|
+
if @api_client.config.debugging
|
35
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.create_oauth_providers ...'
|
36
|
+
end
|
37
|
+
# verify the required parameter 'body' is set
|
38
|
+
if @api_client.config.client_side_validation && body.nil?
|
39
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.create_oauth_providers"
|
40
|
+
end
|
41
|
+
# resource path
|
42
|
+
local_var_path = '/public/v1/submit/create_oauth_providers'
|
43
|
+
|
44
|
+
# query parameters
|
45
|
+
query_params = opts[:query_params] || {}
|
46
|
+
|
47
|
+
# header parameters
|
48
|
+
header_params = opts[:header_params] || {}
|
49
|
+
# HTTP header 'Accept' (if needed)
|
50
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
51
|
+
# HTTP header 'Content-Type'
|
52
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
53
|
+
|
54
|
+
# form parameters
|
55
|
+
form_params = opts[:form_params] || {}
|
56
|
+
|
57
|
+
# http body (model)
|
58
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
59
|
+
|
60
|
+
return_type = opts[:return_type] || 'ActivityResponse'
|
61
|
+
|
62
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth']
|
63
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
64
|
+
:header_params => header_params,
|
65
|
+
:query_params => query_params,
|
66
|
+
:form_params => form_params,
|
67
|
+
:body => post_body,
|
68
|
+
:auth_names => auth_names,
|
69
|
+
:return_type => return_type)
|
70
|
+
|
71
|
+
if @api_client.config.debugging
|
72
|
+
@api_client.config.logger.debug "API called: UsersApi#create_oauth_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
73
|
+
end
|
74
|
+
return data, status_code, headers
|
75
|
+
end
|
19
76
|
# Create Users
|
20
77
|
# Create Users in an existing Organization
|
21
78
|
# @param body
|
@@ -74,6 +131,64 @@ module TurnkeyClient
|
|
74
131
|
end
|
75
132
|
return data, status_code, headers
|
76
133
|
end
|
134
|
+
# Delete Oauth Providers
|
135
|
+
# Removes Oauth providers for a specified user - BETA
|
136
|
+
# @param body
|
137
|
+
# @param [Hash] opts the optional parameters
|
138
|
+
# @return [ActivityResponse]
|
139
|
+
def delete_oauth_providers(body, opts = {})
|
140
|
+
data, _status_code, _headers = delete_oauth_providers_with_http_info(body, opts)
|
141
|
+
data
|
142
|
+
end
|
143
|
+
|
144
|
+
# Delete Oauth Providers
|
145
|
+
# Removes Oauth providers for a specified user - BETA
|
146
|
+
# @param body
|
147
|
+
# @param [Hash] opts the optional parameters
|
148
|
+
# @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers
|
149
|
+
def delete_oauth_providers_with_http_info(body, opts = {})
|
150
|
+
if @api_client.config.debugging
|
151
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.delete_oauth_providers ...'
|
152
|
+
end
|
153
|
+
# verify the required parameter 'body' is set
|
154
|
+
if @api_client.config.client_side_validation && body.nil?
|
155
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.delete_oauth_providers"
|
156
|
+
end
|
157
|
+
# resource path
|
158
|
+
local_var_path = '/public/v1/submit/delete_oauth_providers'
|
159
|
+
|
160
|
+
# query parameters
|
161
|
+
query_params = opts[:query_params] || {}
|
162
|
+
|
163
|
+
# header parameters
|
164
|
+
header_params = opts[:header_params] || {}
|
165
|
+
# HTTP header 'Accept' (if needed)
|
166
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
167
|
+
# HTTP header 'Content-Type'
|
168
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
169
|
+
|
170
|
+
# form parameters
|
171
|
+
form_params = opts[:form_params] || {}
|
172
|
+
|
173
|
+
# http body (model)
|
174
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
175
|
+
|
176
|
+
return_type = opts[:return_type] || 'ActivityResponse'
|
177
|
+
|
178
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth']
|
179
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
180
|
+
:header_params => header_params,
|
181
|
+
:query_params => query_params,
|
182
|
+
:form_params => form_params,
|
183
|
+
:body => post_body,
|
184
|
+
:auth_names => auth_names,
|
185
|
+
:return_type => return_type)
|
186
|
+
|
187
|
+
if @api_client.config.debugging
|
188
|
+
@api_client.config.logger.debug "API called: UsersApi#delete_oauth_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
189
|
+
end
|
190
|
+
return data, status_code, headers
|
191
|
+
end
|
77
192
|
# Delete Users
|
78
193
|
# Delete Users within an Organization
|
79
194
|
# @param body
|
@@ -132,6 +247,64 @@ module TurnkeyClient
|
|
132
247
|
end
|
133
248
|
return data, status_code, headers
|
134
249
|
end
|
250
|
+
# Get Oauth providers
|
251
|
+
# Get details about Oauth providers for a user
|
252
|
+
# @param body
|
253
|
+
# @param [Hash] opts the optional parameters
|
254
|
+
# @return [GetOauthProvidersResponse]
|
255
|
+
def get_oauth_providers(body, opts = {})
|
256
|
+
data, _status_code, _headers = get_oauth_providers_with_http_info(body, opts)
|
257
|
+
data
|
258
|
+
end
|
259
|
+
|
260
|
+
# Get Oauth providers
|
261
|
+
# Get details about Oauth providers for a user
|
262
|
+
# @param body
|
263
|
+
# @param [Hash] opts the optional parameters
|
264
|
+
# @return [Array<(GetOauthProvidersResponse, Integer, Hash)>] GetOauthProvidersResponse data, response status code and response headers
|
265
|
+
def get_oauth_providers_with_http_info(body, opts = {})
|
266
|
+
if @api_client.config.debugging
|
267
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.get_oauth_providers ...'
|
268
|
+
end
|
269
|
+
# verify the required parameter 'body' is set
|
270
|
+
if @api_client.config.client_side_validation && body.nil?
|
271
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.get_oauth_providers"
|
272
|
+
end
|
273
|
+
# resource path
|
274
|
+
local_var_path = '/public/v1/query/get_oauth_providers'
|
275
|
+
|
276
|
+
# query parameters
|
277
|
+
query_params = opts[:query_params] || {}
|
278
|
+
|
279
|
+
# header parameters
|
280
|
+
header_params = opts[:header_params] || {}
|
281
|
+
# HTTP header 'Accept' (if needed)
|
282
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
283
|
+
# HTTP header 'Content-Type'
|
284
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
285
|
+
|
286
|
+
# form parameters
|
287
|
+
form_params = opts[:form_params] || {}
|
288
|
+
|
289
|
+
# http body (model)
|
290
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
291
|
+
|
292
|
+
return_type = opts[:return_type] || 'GetOauthProvidersResponse'
|
293
|
+
|
294
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth']
|
295
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
296
|
+
:header_params => header_params,
|
297
|
+
:query_params => query_params,
|
298
|
+
:form_params => form_params,
|
299
|
+
:body => post_body,
|
300
|
+
:auth_names => auth_names,
|
301
|
+
:return_type => return_type)
|
302
|
+
|
303
|
+
if @api_client.config.debugging
|
304
|
+
@api_client.config.logger.debug "API called: UsersApi#get_oauth_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
305
|
+
end
|
306
|
+
return data, status_code, headers
|
307
|
+
end
|
135
308
|
# Get User
|
136
309
|
# Get details about a User
|
137
310
|
# @param body
|
@@ -248,6 +421,64 @@ module TurnkeyClient
|
|
248
421
|
end
|
249
422
|
return data, status_code, headers
|
250
423
|
end
|
424
|
+
# Oauth
|
425
|
+
# Authenticate a user with an Oidc token (Oauth) - BETA
|
426
|
+
# @param body
|
427
|
+
# @param [Hash] opts the optional parameters
|
428
|
+
# @return [ActivityResponse]
|
429
|
+
def oauth(body, opts = {})
|
430
|
+
data, _status_code, _headers = oauth_with_http_info(body, opts)
|
431
|
+
data
|
432
|
+
end
|
433
|
+
|
434
|
+
# Oauth
|
435
|
+
# Authenticate a user with an Oidc token (Oauth) - BETA
|
436
|
+
# @param body
|
437
|
+
# @param [Hash] opts the optional parameters
|
438
|
+
# @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers
|
439
|
+
def oauth_with_http_info(body, opts = {})
|
440
|
+
if @api_client.config.debugging
|
441
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.oauth ...'
|
442
|
+
end
|
443
|
+
# verify the required parameter 'body' is set
|
444
|
+
if @api_client.config.client_side_validation && body.nil?
|
445
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.oauth"
|
446
|
+
end
|
447
|
+
# resource path
|
448
|
+
local_var_path = '/public/v1/submit/oauth'
|
449
|
+
|
450
|
+
# query parameters
|
451
|
+
query_params = opts[:query_params] || {}
|
452
|
+
|
453
|
+
# header parameters
|
454
|
+
header_params = opts[:header_params] || {}
|
455
|
+
# HTTP header 'Accept' (if needed)
|
456
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
457
|
+
# HTTP header 'Content-Type'
|
458
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
459
|
+
|
460
|
+
# form parameters
|
461
|
+
form_params = opts[:form_params] || {}
|
462
|
+
|
463
|
+
# http body (model)
|
464
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
465
|
+
|
466
|
+
return_type = opts[:return_type] || 'ActivityResponse'
|
467
|
+
|
468
|
+
auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth']
|
469
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
470
|
+
:header_params => header_params,
|
471
|
+
:query_params => query_params,
|
472
|
+
:form_params => form_params,
|
473
|
+
:body => post_body,
|
474
|
+
:auth_names => auth_names,
|
475
|
+
:return_type => return_type)
|
476
|
+
|
477
|
+
if @api_client.config.debugging
|
478
|
+
@api_client.config.logger.debug "API called: UsersApi#oauth\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
479
|
+
end
|
480
|
+
return data, status_code, headers
|
481
|
+
end
|
251
482
|
# Update User
|
252
483
|
# Update a User in an existing Organization
|
253
484
|
# @param body
|
@@ -6,7 +6,6 @@
|
|
6
6
|
OpenAPI spec version: 1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 3.0.54
|
10
9
|
=end
|
11
10
|
|
12
11
|
require 'date'
|
@@ -41,6 +40,8 @@ module TurnkeyClient
|
|
41
40
|
|
42
41
|
attr_accessor :updated_at
|
43
42
|
|
43
|
+
attr_accessor :failure
|
44
|
+
|
44
45
|
# Attribute mapping from ruby-style variable name to JSON key.
|
45
46
|
def self.attribute_map
|
46
47
|
{
|
@@ -55,7 +56,8 @@ module TurnkeyClient
|
|
55
56
|
:'can_approve' => :'canApprove',
|
56
57
|
:'can_reject' => :'canReject',
|
57
58
|
:'created_at' => :'createdAt',
|
58
|
-
:'updated_at' => :'updatedAt'
|
59
|
+
:'updated_at' => :'updatedAt',
|
60
|
+
:'failure' => :'failure'
|
59
61
|
}
|
60
62
|
end
|
61
63
|
|
@@ -73,7 +75,8 @@ module TurnkeyClient
|
|
73
75
|
:'can_approve' => :'Object',
|
74
76
|
:'can_reject' => :'Object',
|
75
77
|
:'created_at' => :'Object',
|
76
|
-
:'updated_at' => :'Object'
|
78
|
+
:'updated_at' => :'Object',
|
79
|
+
:'failure' => :'Object'
|
77
80
|
}
|
78
81
|
end
|
79
82
|
|
@@ -147,6 +150,10 @@ module TurnkeyClient
|
|
147
150
|
if attributes.key?(:'updated_at')
|
148
151
|
self.updated_at = attributes[:'updated_at']
|
149
152
|
end
|
153
|
+
|
154
|
+
if attributes.key?(:'failure')
|
155
|
+
self.failure = attributes[:'failure']
|
156
|
+
end
|
150
157
|
end
|
151
158
|
|
152
159
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -238,7 +245,8 @@ module TurnkeyClient
|
|
238
245
|
can_approve == o.can_approve &&
|
239
246
|
can_reject == o.can_reject &&
|
240
247
|
created_at == o.created_at &&
|
241
|
-
updated_at == o.updated_at
|
248
|
+
updated_at == o.updated_at &&
|
249
|
+
failure == o.failure
|
242
250
|
end
|
243
251
|
|
244
252
|
# @see the `==` method
|
@@ -250,7 +258,7 @@ module TurnkeyClient
|
|
250
258
|
# Calculates hash code according to all attributes.
|
251
259
|
# @return [Integer] Hash code
|
252
260
|
def hash
|
253
|
-
[id, organization_id, status, type, intent, result, votes, fingerprint, can_approve, can_reject, created_at, updated_at].hash
|
261
|
+
[id, organization_id, status, type, intent, result, votes, fingerprint, can_approve, can_reject, created_at, updated_at, failure].hash
|
254
262
|
end
|
255
263
|
|
256
264
|
# Builds the object from hash
|
@@ -6,7 +6,6 @@
|
|
6
6
|
OpenAPI spec version: 1.0
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 3.0.54
|
10
9
|
=end
|
11
10
|
|
12
11
|
require 'date'
|
@@ -74,6 +73,17 @@ module TurnkeyClient
|
|
74
73
|
IMPORT_WALLET = 'ACTIVITY_TYPE_IMPORT_WALLET'.freeze
|
75
74
|
INIT_IMPORT_PRIVATE_KEY = 'ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY'.freeze
|
76
75
|
IMPORT_PRIVATE_KEY = 'ACTIVITY_TYPE_IMPORT_PRIVATE_KEY'.freeze
|
76
|
+
CREATE_POLICIES = 'ACTIVITY_TYPE_CREATE_POLICIES'.freeze
|
77
|
+
SIGN_RAW_PAYLOADS = 'ACTIVITY_TYPE_SIGN_RAW_PAYLOADS'.freeze
|
78
|
+
CREATE_READ_ONLY_SESSION = 'ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION'.freeze
|
79
|
+
CREATE_OAUTH_PROVIDERS = 'ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS'.freeze
|
80
|
+
DELETE_OAUTH_PROVIDERS = 'ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS'.freeze
|
81
|
+
CREATE_SUB_ORGANIZATION_V5 = 'ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V5'.freeze
|
82
|
+
OAUTH = 'ACTIVITY_TYPE_OAUTH'.freeze
|
83
|
+
CREATE_API_KEYS_V2 = 'ACTIVITY_TYPE_CREATE_API_KEYS_V2'.freeze
|
84
|
+
CREATE_READ_WRITE_SESSION = 'ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION'.freeze
|
85
|
+
EMAIL_AUTH_V2 = 'ACTIVITY_TYPE_EMAIL_AUTH_V2'.freeze
|
86
|
+
CREATE_SUB_ORGANIZATION_V6 = 'ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V6'.freeze
|
77
87
|
|
78
88
|
# Builds the enum from string
|
79
89
|
# @param [String] The enum value in the form of the string
|
@@ -0,0 +1,200 @@
|
|
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 Any
|
15
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
16
|
+
def self.attribute_map
|
17
|
+
{
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
# Attribute type mapping.
|
22
|
+
def self.openapi_types
|
23
|
+
{
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# List of attributes with nullable: true
|
28
|
+
def self.openapi_nullable
|
29
|
+
Set.new([
|
30
|
+
])
|
31
|
+
end
|
32
|
+
|
33
|
+
# Initializes the object
|
34
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
35
|
+
def initialize(attributes = {})
|
36
|
+
if (!attributes.is_a?(Hash))
|
37
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::Any` initialize method"
|
38
|
+
end
|
39
|
+
|
40
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
41
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
42
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
43
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::Any`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
44
|
+
end
|
45
|
+
h[k.to_sym] = v
|
46
|
+
}
|
47
|
+
|
48
|
+
# call parent's initialize
|
49
|
+
super(attributes)
|
50
|
+
end
|
51
|
+
|
52
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
53
|
+
# @return Array for valid properties with the reasons
|
54
|
+
def list_invalid_properties
|
55
|
+
invalid_properties = super
|
56
|
+
invalid_properties
|
57
|
+
end
|
58
|
+
|
59
|
+
# Check to see if the all the properties in the model are valid
|
60
|
+
# @return true if the model is valid
|
61
|
+
def valid?
|
62
|
+
true
|
63
|
+
end
|
64
|
+
|
65
|
+
# Checks equality by comparing each attribute.
|
66
|
+
# @param [Object] Object to be compared
|
67
|
+
def ==(o)
|
68
|
+
return true if self.equal?(o)
|
69
|
+
self.class == o.class && super(o)
|
70
|
+
end
|
71
|
+
|
72
|
+
# @see the `==` method
|
73
|
+
# @param [Object] Object to be compared
|
74
|
+
def eql?(o)
|
75
|
+
self == o
|
76
|
+
end
|
77
|
+
|
78
|
+
# Calculates hash code according to all attributes.
|
79
|
+
# @return [Integer] Hash code
|
80
|
+
def hash
|
81
|
+
[].hash
|
82
|
+
end
|
83
|
+
|
84
|
+
# Builds the object from hash
|
85
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
86
|
+
# @return [Object] Returns the model itself
|
87
|
+
def self.build_from_hash(attributes)
|
88
|
+
new.build_from_hash(attributes)
|
89
|
+
end
|
90
|
+
|
91
|
+
# Builds the object from hash
|
92
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
93
|
+
# @return [Object] Returns the model itself
|
94
|
+
def build_from_hash(attributes)
|
95
|
+
return nil unless attributes.is_a?(Hash)
|
96
|
+
super(attributes)
|
97
|
+
self.class.openapi_types.each_pair do |key, type|
|
98
|
+
if type =~ /\AArray<(.*)>/i
|
99
|
+
# check to ensure the input is an array given that the attribute
|
100
|
+
# is documented as an array but the input is not
|
101
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
102
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
103
|
+
end
|
104
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
105
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
106
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
107
|
+
self.send("#{key}=", nil)
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
self
|
112
|
+
end
|
113
|
+
|
114
|
+
# Deserializes the data based on type
|
115
|
+
# @param string type Data type
|
116
|
+
# @param string value Value to be deserialized
|
117
|
+
# @return [Object] Deserialized data
|
118
|
+
def _deserialize(type, value)
|
119
|
+
case type.to_sym
|
120
|
+
when :DateTime
|
121
|
+
DateTime.parse(value)
|
122
|
+
when :Date
|
123
|
+
Date.parse(value)
|
124
|
+
when :String
|
125
|
+
value.to_s
|
126
|
+
when :Integer
|
127
|
+
value.to_i
|
128
|
+
when :Float
|
129
|
+
value.to_f
|
130
|
+
when :Boolean
|
131
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
132
|
+
true
|
133
|
+
else
|
134
|
+
false
|
135
|
+
end
|
136
|
+
when :Object
|
137
|
+
# generic object (usually a Hash), return directly
|
138
|
+
value
|
139
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
140
|
+
inner_type = Regexp.last_match[:inner_type]
|
141
|
+
value.map { |v| _deserialize(inner_type, v) }
|
142
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
143
|
+
k_type = Regexp.last_match[:k_type]
|
144
|
+
v_type = Regexp.last_match[:v_type]
|
145
|
+
{}.tap do |hash|
|
146
|
+
value.each do |k, v|
|
147
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
148
|
+
end
|
149
|
+
end
|
150
|
+
else # model
|
151
|
+
TurnkeyClient.const_get(type).build_from_hash(value)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
# Returns the string representation of the object
|
156
|
+
# @return [String] String presentation of the object
|
157
|
+
def to_s
|
158
|
+
to_hash.to_s
|
159
|
+
end
|
160
|
+
|
161
|
+
# to_body is an alias to to_hash (backward compatibility)
|
162
|
+
# @return [Hash] Returns the object in the form of hash
|
163
|
+
def to_body
|
164
|
+
to_hash
|
165
|
+
end
|
166
|
+
|
167
|
+
# Returns the object in the form of hash
|
168
|
+
# @return [Hash] Returns the object in the form of hash
|
169
|
+
def to_hash
|
170
|
+
hash = super
|
171
|
+
self.class.attribute_map.each_pair do |attr, param|
|
172
|
+
value = self.send(attr)
|
173
|
+
if value.nil?
|
174
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
175
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
176
|
+
end
|
177
|
+
|
178
|
+
hash[param] = _to_hash(value)
|
179
|
+
end
|
180
|
+
hash
|
181
|
+
end
|
182
|
+
|
183
|
+
# Outputs non-array value in the form of hash
|
184
|
+
# For object, use to_hash. Otherwise, just return the value
|
185
|
+
# @param [Object] value Any valid value
|
186
|
+
# @return [Hash] Returns the value in the form of hash
|
187
|
+
def _to_hash(value)
|
188
|
+
if value.is_a?(Array)
|
189
|
+
value.compact.map { |v| _to_hash(v) }
|
190
|
+
elsif value.is_a?(Hash)
|
191
|
+
{}.tap do |hash|
|
192
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
193
|
+
end
|
194
|
+
elsif value.respond_to? :to_hash
|
195
|
+
value.to_hash
|
196
|
+
else
|
197
|
+
value
|
198
|
+
end
|
199
|
+
end end
|
200
|
+
end
|