diff --git a/.changesets/20260129-183946-mono-sync.md b/.changesets/20260129-183946-mono-sync.md new file mode 100644 index 0000000..aa275fe --- /dev/null +++ b/.changesets/20260129-183946-mono-sync.md @@ -0,0 +1,7 @@ +--- +title: "Mono Sync" +date: "2026-01-29" +bump: "patch" +--- + +Synced with Mono API v2026.1.4 diff --git a/Makefile b/Makefile index 2ec57c1..e26897d 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,6 @@ version: .PHONY: changelog changelog: ruby tool/changeset_changelog.rb - .PHONY: prepare-release prepare-release: ruby tool/changeset_version.rb diff --git a/turnkey_client/.swagger-codegen/VERSION b/turnkey_client/.swagger-codegen/VERSION index 9ad03a7..bec157c 100644 --- a/turnkey_client/.swagger-codegen/VERSION +++ b/turnkey_client/.swagger-codegen/VERSION @@ -1 +1 @@ -3.0.73 \ No newline at end of file +3.0.76 \ No newline at end of file diff --git a/turnkey_client/lib/turnkey_client.rb b/turnkey_client/lib/turnkey_client.rb index 83c4a8d..0107a28 100644 --- a/turnkey_client/lib/turnkey_client.rb +++ b/turnkey_client/lib/turnkey_client.rb @@ -45,6 +45,8 @@ require 'turnkey_client/models/authenticator_transport' require 'turnkey_client/models/boot_proof' require 'turnkey_client/models/boot_proof_response' +require 'turnkey_client/models/client_signature' +require 'turnkey_client/models/client_signature_scheme' require 'turnkey_client/models/common_v1_policy_evaluation' require 'turnkey_client/models/config' require 'turnkey_client/models/create_api_keys_intent' @@ -57,6 +59,9 @@ require 'turnkey_client/models/create_authenticators_intent_v2' require 'turnkey_client/models/create_authenticators_request' require 'turnkey_client/models/create_authenticators_result' +require 'turnkey_client/models/create_fiat_on_ramp_credential_intent' +require 'turnkey_client/models/create_fiat_on_ramp_credential_request' +require 'turnkey_client/models/create_fiat_on_ramp_credential_result' require 'turnkey_client/models/create_invitations_intent' require 'turnkey_client/models/create_invitations_request' require 'turnkey_client/models/create_invitations_result' @@ -110,6 +115,12 @@ require 'turnkey_client/models/create_sub_organization_result_v5' require 'turnkey_client/models/create_sub_organization_result_v6' require 'turnkey_client/models/create_sub_organization_result_v7' +require 'turnkey_client/models/create_tvc_app_intent' +require 'turnkey_client/models/create_tvc_app_result' +require 'turnkey_client/models/create_tvc_deployment_intent' +require 'turnkey_client/models/create_tvc_deployment_result' +require 'turnkey_client/models/create_tvc_manifest_approvals_intent' +require 'turnkey_client/models/create_tvc_manifest_approvals_result' require 'turnkey_client/models/create_user_tag_intent' require 'turnkey_client/models/create_user_tag_request' require 'turnkey_client/models/create_user_tag_result' @@ -127,13 +138,19 @@ require 'turnkey_client/models/cred_props_authentication_extensions_client_outputs' require 'turnkey_client/models/credential_type' require 'turnkey_client/models/curve' +require 'turnkey_client/models/custom_revert_error' require 'turnkey_client/models/data_v1_address' +require 'turnkey_client/models/data_v1_signature_scheme' +require 'turnkey_client/models/data_v1_smart_contract_interface' require 'turnkey_client/models/delete_api_keys_intent' require 'turnkey_client/models/delete_api_keys_request' require 'turnkey_client/models/delete_api_keys_result' require 'turnkey_client/models/delete_authenticators_intent' require 'turnkey_client/models/delete_authenticators_request' require 'turnkey_client/models/delete_authenticators_result' +require 'turnkey_client/models/delete_fiat_on_ramp_credential_intent' +require 'turnkey_client/models/delete_fiat_on_ramp_credential_request' +require 'turnkey_client/models/delete_fiat_on_ramp_credential_result' require 'turnkey_client/models/delete_invitation_intent' require 'turnkey_client/models/delete_invitation_request' require 'turnkey_client/models/delete_invitation_result' @@ -147,6 +164,9 @@ require 'turnkey_client/models/delete_organization_result' require 'turnkey_client/models/delete_payment_method_intent' require 'turnkey_client/models/delete_payment_method_result' +require 'turnkey_client/models/delete_policies_intent' +require 'turnkey_client/models/delete_policies_request' +require 'turnkey_client/models/delete_policies_result' require 'turnkey_client/models/delete_policy_intent' require 'turnkey_client/models/delete_policy_request' require 'turnkey_client/models/delete_policy_result' @@ -168,6 +188,9 @@ require 'turnkey_client/models/delete_users_intent' require 'turnkey_client/models/delete_users_request' require 'turnkey_client/models/delete_users_result' +require 'turnkey_client/models/delete_wallet_accounts_intent' +require 'turnkey_client/models/delete_wallet_accounts_request' +require 'turnkey_client/models/delete_wallet_accounts_result' require 'turnkey_client/models/delete_wallets_intent' require 'turnkey_client/models/delete_wallets_request' require 'turnkey_client/models/delete_wallets_result' @@ -176,13 +199,22 @@ require 'turnkey_client/models/disable_private_key_intent' require 'turnkey_client/models/disable_private_key_result' require 'turnkey_client/models/effect' +require 'turnkey_client/models/email_auth_customization_params' require 'turnkey_client/models/email_auth_intent' require 'turnkey_client/models/email_auth_intent_v2' +require 'turnkey_client/models/email_auth_intent_v3' require 'turnkey_client/models/email_auth_request' require 'turnkey_client/models/email_auth_result' require 'turnkey_client/models/email_customization_params' +require 'turnkey_client/models/email_customization_params_v2' require 'turnkey_client/models/enable_auth_proxy_intent' require 'turnkey_client/models/enable_auth_proxy_result' +require 'turnkey_client/models/eth_send_raw_transaction_intent' +require 'turnkey_client/models/eth_send_raw_transaction_result' +require 'turnkey_client/models/eth_send_transaction_intent' +require 'turnkey_client/models/eth_send_transaction_request' +require 'turnkey_client/models/eth_send_transaction_result' +require 'turnkey_client/models/eth_send_transaction_status' require 'turnkey_client/models/export_private_key_intent' require 'turnkey_client/models/export_private_key_request' require 'turnkey_client/models/export_private_key_result' @@ -198,6 +230,7 @@ require 'turnkey_client/models/feature' require 'turnkey_client/models/feature_name' require 'turnkey_client/models/fiat_on_ramp_blockchain_network' +require 'turnkey_client/models/fiat_on_ramp_credential' require 'turnkey_client/models/fiat_on_ramp_crypto_currency' require 'turnkey_client/models/fiat_on_ramp_currency' require 'turnkey_client/models/fiat_on_ramp_payment_method' @@ -216,11 +249,17 @@ require 'turnkey_client/models/get_authenticators_request' require 'turnkey_client/models/get_authenticators_response' require 'turnkey_client/models/get_boot_proof_request' +require 'turnkey_client/models/get_gas_usage_request' +require 'turnkey_client/models/get_gas_usage_response' require 'turnkey_client/models/get_latest_boot_proof_request' +require 'turnkey_client/models/get_nonces_request' +require 'turnkey_client/models/get_nonces_response' require 'turnkey_client/models/get_oauth2_credential_request' require 'turnkey_client/models/get_oauth2_credential_response' require 'turnkey_client/models/get_oauth_providers_request' require 'turnkey_client/models/get_oauth_providers_response' +require 'turnkey_client/models/get_on_ramp_transaction_status_request' +require 'turnkey_client/models/get_on_ramp_transaction_status_response' require 'turnkey_client/models/get_organization_configs_request' require 'turnkey_client/models/get_organization_configs_response' require 'turnkey_client/models/get_policies_request' @@ -233,6 +272,8 @@ require 'turnkey_client/models/get_private_key_response' require 'turnkey_client/models/get_private_keys_request' require 'turnkey_client/models/get_private_keys_response' +require 'turnkey_client/models/get_send_transaction_status_request' +require 'turnkey_client/models/get_send_transaction_status_response' require 'turnkey_client/models/get_smart_contract_interface_request' require 'turnkey_client/models/get_smart_contract_interface_response' require 'turnkey_client/models/get_smart_contract_interfaces_request' @@ -273,17 +314,22 @@ require 'turnkey_client/models/init_import_wallet_result' require 'turnkey_client/models/init_otp_auth_intent' require 'turnkey_client/models/init_otp_auth_intent_v2' +require 'turnkey_client/models/init_otp_auth_intent_v3' require 'turnkey_client/models/init_otp_auth_request' require 'turnkey_client/models/init_otp_auth_result' require 'turnkey_client/models/init_otp_auth_result_v2' require 'turnkey_client/models/init_otp_intent' +require 'turnkey_client/models/init_otp_intent_v2' require 'turnkey_client/models/init_otp_request' require 'turnkey_client/models/init_otp_result' require 'turnkey_client/models/init_user_email_recovery_intent' +require 'turnkey_client/models/init_user_email_recovery_intent_v2' require 'turnkey_client/models/init_user_email_recovery_request' require 'turnkey_client/models/init_user_email_recovery_result' require 'turnkey_client/models/intent' require 'turnkey_client/models/invitation_params' +require 'turnkey_client/models/list_fiat_on_ramp_credentials_request' +require 'turnkey_client/models/list_fiat_on_ramp_credentials_response' require 'turnkey_client/models/list_oauth2_credentials_request' require 'turnkey_client/models/list_oauth2_credentials_response' require 'turnkey_client/models/list_private_key_tags_request' @@ -291,6 +337,7 @@ require 'turnkey_client/models/list_user_tags_request' require 'turnkey_client/models/list_user_tags_response' require 'turnkey_client/models/mnemonic_language' +require 'turnkey_client/models/native_revert_error' require 'turnkey_client/models/oauth2_authenticate_intent' require 'turnkey_client/models/oauth2_authenticate_request' require 'turnkey_client/models/oauth2_authenticate_result' @@ -329,6 +376,7 @@ require 'turnkey_client/models/remove_organization_feature_request' require 'turnkey_client/models/remove_organization_feature_result' require 'turnkey_client/models/result' +require 'turnkey_client/models/revert_chain_entry' require 'turnkey_client/models/root_user_params' require 'turnkey_client/models/root_user_params_v2' require 'turnkey_client/models/root_user_params_v3' @@ -352,21 +400,30 @@ require 'turnkey_client/models/sign_transaction_intent_v2' require 'turnkey_client/models/sign_transaction_request' require 'turnkey_client/models/sign_transaction_result' -require 'turnkey_client/models/signature_scheme' require 'turnkey_client/models/simple_client_extension_results' -require 'turnkey_client/models/smart_contract_interface' require 'turnkey_client/models/smart_contract_interface_type' require 'turnkey_client/models/sms_customization_params' +require 'turnkey_client/models/sol_send_transaction_intent' +require 'turnkey_client/models/sol_send_transaction_request' +require 'turnkey_client/models/sol_send_transaction_result' require 'turnkey_client/models/stamp_login_intent' require 'turnkey_client/models/stamp_login_request' require 'turnkey_client/models/stamp_login_result' require 'turnkey_client/models/status' require 'turnkey_client/models/tag_type' require 'turnkey_client/models/transaction_type' +require 'turnkey_client/models/tvc_manifest_approval' +require 'turnkey_client/models/tvc_operator_params' +require 'turnkey_client/models/tvc_operator_set_params' +require 'turnkey_client/models/tx_error' +require 'turnkey_client/models/unknown_revert_error' require 'turnkey_client/models/update_allowed_origins_intent' require 'turnkey_client/models/update_allowed_origins_result' require 'turnkey_client/models/update_auth_proxy_config_intent' require 'turnkey_client/models/update_auth_proxy_config_result' +require 'turnkey_client/models/update_fiat_on_ramp_credential_intent' +require 'turnkey_client/models/update_fiat_on_ramp_credential_request' +require 'turnkey_client/models/update_fiat_on_ramp_credential_result' require 'turnkey_client/models/update_oauth2_credential_intent' require 'turnkey_client/models/update_oauth2_credential_request' require 'turnkey_client/models/update_oauth2_credential_result' @@ -399,6 +456,8 @@ require 'turnkey_client/models/update_wallet_intent' require 'turnkey_client/models/update_wallet_request' require 'turnkey_client/models/update_wallet_result' +require 'turnkey_client/models/upsert_gas_usage_config_intent' +require 'turnkey_client/models/upsert_gas_usage_config_result' require 'turnkey_client/models/user' require 'turnkey_client/models/user_params' require 'turnkey_client/models/user_params_v2' @@ -421,6 +480,7 @@ require 'turnkey_client/api/app_proof_api' require 'turnkey_client/api/authenticators_api' require 'turnkey_client/api/boot_proof_api' +require 'turnkey_client/api/broadcasting_api' require 'turnkey_client/api/consensus_api' require 'turnkey_client/api/default_api' require 'turnkey_client/api/features_api' @@ -430,6 +490,7 @@ require 'turnkey_client/api/policies_api' require 'turnkey_client/api/private_key_tags_api' require 'turnkey_client/api/private_keys_api' +require 'turnkey_client/api/send_transactions_api' require 'turnkey_client/api/sessions_api' require 'turnkey_client/api/signing_api' require 'turnkey_client/api/user_auth_api' diff --git a/turnkey_client/lib/turnkey_client/api/app_proof_api.rb b/turnkey_client/lib/turnkey_client/api/app_proof_api.rb index 29953cd..e4e6622 100644 --- a/turnkey_client/lib/turnkey_client/api/app_proof_api.rb +++ b/turnkey_client/lib/turnkey_client/api/app_proof_api.rb @@ -15,8 +15,8 @@ class AppProofApi def initialize(api_client = ApiClient.default) @api_client = api_client end - # List app proofs for an activity - # List the app proofs for the given activity. + # List App Proofs for an activity + # List the App Proofs for the given activity. # @param body # @param [Hash] opts the optional parameters # @return [GetAppProofsResponse] @@ -25,8 +25,8 @@ def get_app_proofs(body, opts = {}) data end - # List app proofs for an activity - # List the app proofs for the given activity. + # List App Proofs for an activity + # List the App Proofs for the given activity. # @param body # @param [Hash] opts the optional parameters # @return [Array<(GetAppProofsResponse, Integer, Hash)>] GetAppProofsResponse data, response status code and response headers diff --git a/turnkey_client/lib/turnkey_client/api/broadcasting_api.rb b/turnkey_client/lib/turnkey_client/api/broadcasting_api.rb new file mode 100644 index 0000000..5f96544 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/api/broadcasting_api.rb @@ -0,0 +1,251 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +module TurnkeyClient + class BroadcastingApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Submit a transaction intent for broadcasting. + # Submit a transaction intent describing a transaction you would like to broadcast. + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def eth_send_transaction(body, opts = {}) + data, _status_code, _headers = eth_send_transaction_with_http_info(body, opts) + data + end + + # Submit a transaction intent for broadcasting. + # Submit a transaction intent describing a transaction you would like to broadcast. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def eth_send_transaction_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: BroadcastingApi.eth_send_transaction ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling BroadcastingApi.eth_send_transaction" + end + # resource path + local_var_path = '/public/v1/submit/eth_send_transaction' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: BroadcastingApi#eth_send_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get gas usage and limits. + # Get gas usage and gas limits for either the parent organization or a sub-organization. + # @param body + # @param [Hash] opts the optional parameters + # @return [GetGasUsageResponse] + def get_gas_usage(body, opts = {}) + data, _status_code, _headers = get_gas_usage_with_http_info(body, opts) + data + end + + # Get gas usage and limits. + # Get gas usage and gas limits for either the parent organization or a sub-organization. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(GetGasUsageResponse, Integer, Hash)>] GetGasUsageResponse data, response status code and response headers + def get_gas_usage_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: BroadcastingApi.get_gas_usage ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling BroadcastingApi.get_gas_usage" + end + # resource path + local_var_path = '/public/v1/query/get_gas_usage' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'GetGasUsageResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: BroadcastingApi#get_gas_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get nonces for an address. + # Get nonce values for an address on a given network. Can fetch the standard on-chain nonce and/or the gas station nonce used for sponsored transactions. + # @param body + # @param [Hash] opts the optional parameters + # @return [GetNoncesResponse] + def get_nonces(body, opts = {}) + data, _status_code, _headers = get_nonces_with_http_info(body, opts) + data + end + + # Get nonces for an address. + # Get nonce values for an address on a given network. Can fetch the standard on-chain nonce and/or the gas station nonce used for sponsored transactions. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(GetNoncesResponse, Integer, Hash)>] GetNoncesResponse data, response status code and response headers + def get_nonces_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: BroadcastingApi.get_nonces ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling BroadcastingApi.get_nonces" + end + # resource path + local_var_path = '/public/v1/query/get_nonces' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'GetNoncesResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: BroadcastingApi#get_nonces\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Submit a transaction intent for broadcasting. + # Submit a transaction intent describing a transaction you would like to broadcast. + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def sol_send_transaction(body, opts = {}) + data, _status_code, _headers = sol_send_transaction_with_http_info(body, opts) + data + end + + # Submit a transaction intent for broadcasting. + # Submit a transaction intent describing a transaction you would like to broadcast. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def sol_send_transaction_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: BroadcastingApi.sol_send_transaction ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling BroadcastingApi.sol_send_transaction" + end + # resource path + local_var_path = '/public/v1/submit/sol_send_transaction' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: BroadcastingApi#sol_send_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/turnkey_client/lib/turnkey_client/api/on_ramp_api.rb b/turnkey_client/lib/turnkey_client/api/on_ramp_api.rb index 7a4ae23..504b472 100644 --- a/turnkey_client/lib/turnkey_client/api/on_ramp_api.rb +++ b/turnkey_client/lib/turnkey_client/api/on_ramp_api.rb @@ -15,6 +15,180 @@ class OnRampApi def initialize(api_client = ApiClient.default) @api_client = api_client end + # Create a Fiat On Ramp Credential + # Create a fiat on ramp provider credential + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def create_fiat_on_ramp_credential(body, opts = {}) + data, _status_code, _headers = create_fiat_on_ramp_credential_with_http_info(body, opts) + data + end + + # Create a Fiat On Ramp Credential + # Create a fiat on ramp provider credential + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def create_fiat_on_ramp_credential_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OnRampApi.create_fiat_on_ramp_credential ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling OnRampApi.create_fiat_on_ramp_credential" + end + # resource path + local_var_path = '/public/v1/submit/create_fiat_on_ramp_credential' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OnRampApi#create_fiat_on_ramp_credential\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Delete a Fiat On Ramp Credential + # Delete a fiat on ramp provider credential + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def delete_fiat_on_ramp_credential(body, opts = {}) + data, _status_code, _headers = delete_fiat_on_ramp_credential_with_http_info(body, opts) + data + end + + # Delete a Fiat On Ramp Credential + # Delete a fiat on ramp provider credential + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def delete_fiat_on_ramp_credential_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OnRampApi.delete_fiat_on_ramp_credential ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling OnRampApi.delete_fiat_on_ramp_credential" + end + # resource path + local_var_path = '/public/v1/submit/delete_fiat_on_ramp_credential' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OnRampApi#delete_fiat_on_ramp_credential\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get On Ramp transaction status + # Get the status of an on ramp transaction. + # @param body + # @param [Hash] opts the optional parameters + # @return [GetOnRampTransactionStatusResponse] + def get_on_ramp_transaction_status(body, opts = {}) + data, _status_code, _headers = get_on_ramp_transaction_status_with_http_info(body, opts) + data + end + + # Get On Ramp transaction status + # Get the status of an on ramp transaction. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(GetOnRampTransactionStatusResponse, Integer, Hash)>] GetOnRampTransactionStatusResponse data, response status code and response headers + def get_on_ramp_transaction_status_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OnRampApi.get_on_ramp_transaction_status ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling OnRampApi.get_on_ramp_transaction_status" + end + # resource path + local_var_path = '/public/v1/query/get_onramp_transaction_status' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'GetOnRampTransactionStatusResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OnRampApi#get_on_ramp_transaction_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end # Init fiat on ramp # Initiate a fiat on ramp flow. # @param body @@ -73,5 +247,121 @@ def init_fiat_on_ramp_with_http_info(body, opts = {}) end return data, status_code, headers end + # List Fiat On Ramp Credentials + # List all fiat on ramp provider credentials within an organization. + # @param body + # @param [Hash] opts the optional parameters + # @return [ListFiatOnRampCredentialsResponse] + def list_fiat_on_ramp_credentials(body, opts = {}) + data, _status_code, _headers = list_fiat_on_ramp_credentials_with_http_info(body, opts) + data + end + + # List Fiat On Ramp Credentials + # List all fiat on ramp provider credentials within an organization. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ListFiatOnRampCredentialsResponse, Integer, Hash)>] ListFiatOnRampCredentialsResponse data, response status code and response headers + def list_fiat_on_ramp_credentials_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OnRampApi.list_fiat_on_ramp_credentials ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling OnRampApi.list_fiat_on_ramp_credentials" + end + # resource path + local_var_path = '/public/v1/query/list_fiat_on_ramp_credentials' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ListFiatOnRampCredentialsResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OnRampApi#list_fiat_on_ramp_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Update a Fiat On Ramp Credential + # Update a fiat on ramp provider credential + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def update_fiat_on_ramp_credential(body, opts = {}) + data, _status_code, _headers = update_fiat_on_ramp_credential_with_http_info(body, opts) + data + end + + # Update a Fiat On Ramp Credential + # Update a fiat on ramp provider credential + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def update_fiat_on_ramp_credential_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OnRampApi.update_fiat_on_ramp_credential ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling OnRampApi.update_fiat_on_ramp_credential" + end + # resource path + local_var_path = '/public/v1/submit/update_fiat_on_ramp_credential' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OnRampApi#update_fiat_on_ramp_credential\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end end end diff --git a/turnkey_client/lib/turnkey_client/api/policies_api.rb b/turnkey_client/lib/turnkey_client/api/policies_api.rb index 9b06a07..9e5709e 100644 --- a/turnkey_client/lib/turnkey_client/api/policies_api.rb +++ b/turnkey_client/lib/turnkey_client/api/policies_api.rb @@ -189,6 +189,64 @@ def create_smart_contract_interface_with_http_info(body, opts = {}) end return data, status_code, headers end + # Delete policies + # Delete existing policies. + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def delete_policies(body, opts = {}) + data, _status_code, _headers = delete_policies_with_http_info(body, opts) + data + end + + # Delete policies + # Delete existing policies. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def delete_policies_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: PoliciesApi.delete_policies ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling PoliciesApi.delete_policies" + end + # resource path + local_var_path = '/public/v1/submit/delete_policies' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: PoliciesApi#delete_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end # Delete policy # Delete an existing policy. # @param body diff --git a/turnkey_client/lib/turnkey_client/api/send_transactions_api.rb b/turnkey_client/lib/turnkey_client/api/send_transactions_api.rb new file mode 100644 index 0000000..adfc518 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/api/send_transactions_api.rb @@ -0,0 +1,77 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +module TurnkeyClient + class SendTransactionsApi + attr_accessor :api_client + + def initialize(api_client = ApiClient.default) + @api_client = api_client + end + # Get send transaction status + # Get the status of a send transaction request. + # @param body + # @param [Hash] opts the optional parameters + # @return [GetSendTransactionStatusResponse] + def get_send_transaction_status(body, opts = {}) + data, _status_code, _headers = get_send_transaction_status_with_http_info(body, opts) + data + end + + # Get send transaction status + # Get the status of a send transaction request. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(GetSendTransactionStatusResponse, Integer, Hash)>] GetSendTransactionStatusResponse data, response status code and response headers + def get_send_transaction_status_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SendTransactionsApi.get_send_transaction_status ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling SendTransactionsApi.get_send_transaction_status" + end + # resource path + local_var_path = '/public/v1/query/get_send_transaction_status' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'GetSendTransactionStatusResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SendTransactionsApi#get_send_transaction_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/turnkey_client/lib/turnkey_client/api/wallets_api.rb b/turnkey_client/lib/turnkey_client/api/wallets_api.rb index 8733e9f..f5097f6 100644 --- a/turnkey_client/lib/turnkey_client/api/wallets_api.rb +++ b/turnkey_client/lib/turnkey_client/api/wallets_api.rb @@ -131,6 +131,64 @@ def create_wallet_accounts_with_http_info(body, opts = {}) end return data, status_code, headers end + # Delete wallet accounts + # Delete wallet accounts for an organization. + # @param body + # @param [Hash] opts the optional parameters + # @return [ActivityResponse] + def delete_wallet_accounts(body, opts = {}) + data, _status_code, _headers = delete_wallet_accounts_with_http_info(body, opts) + data + end + + # Delete wallet accounts + # Delete wallet accounts for an organization. + # @param body + # @param [Hash] opts the optional parameters + # @return [Array<(ActivityResponse, Integer, Hash)>] ActivityResponse data, response status code and response headers + def delete_wallet_accounts_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: WalletsApi.delete_wallet_accounts ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling WalletsApi.delete_wallet_accounts" + end + # resource path + local_var_path = '/public/v1/submit/delete_wallet_accounts' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:body] || @api_client.object_to_http_body(body) + + return_type = opts[:return_type] || 'ActivityResponse' + + auth_names = opts[:auth_names] || ['ApiKeyAuth', 'AuthenticatorAuth'] + data, status_code, headers = @api_client.call_api(:POST, local_var_path, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type) + + if @api_client.config.debugging + @api_client.config.logger.debug "API called: WalletsApi#delete_wallet_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end # Delete wallets # Delete wallets for an organization. # @param body diff --git a/turnkey_client/lib/turnkey_client/models/activity.rb b/turnkey_client/lib/turnkey_client/models/activity.rb index d79e13e..b0208cd 100644 --- a/turnkey_client/lib/turnkey_client/models/activity.rb +++ b/turnkey_client/lib/turnkey_client/models/activity.rb @@ -29,7 +29,7 @@ class Activity # A list of objects representing a particular User's approval or rejection of a Consensus request, including all relevant metadata. attr_accessor :votes - # A list of app proofs generated by enclaves during activity execution, providing verifiable attestations of performed operations. + # A list of App Proofs generated by enclaves during activity execution, providing verifiable attestations of performed operations. attr_accessor :app_proofs # An artifact verifying a User's action. diff --git a/turnkey_client/lib/turnkey_client/models/activity_type.rb b/turnkey_client/lib/turnkey_client/models/activity_type.rb index b92917e..8a4efdb 100644 --- a/turnkey_client/lib/turnkey_client/models/activity_type.rb +++ b/turnkey_client/lib/turnkey_client/models/activity_type.rb @@ -113,6 +113,22 @@ class ActivityType UPDATE_OAUTH2_CREDENTIAL = 'ACTIVITY_TYPE_UPDATE_OAUTH2_CREDENTIAL'.freeze DELETE_OAUTH2_CREDENTIAL = 'ACTIVITY_TYPE_DELETE_OAUTH2_CREDENTIAL'.freeze OAUTH2_AUTHENTICATE = 'ACTIVITY_TYPE_OAUTH2_AUTHENTICATE'.freeze + DELETE_WALLET_ACCOUNTS = 'ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS'.freeze + DELETE_POLICIES = 'ACTIVITY_TYPE_DELETE_POLICIES'.freeze + ETH_SEND_RAW_TRANSACTION = 'ACTIVITY_TYPE_ETH_SEND_RAW_TRANSACTION'.freeze + ETH_SEND_TRANSACTION = 'ACTIVITY_TYPE_ETH_SEND_TRANSACTION'.freeze + CREATE_FIAT_ON_RAMP_CREDENTIAL = 'ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL'.freeze + UPDATE_FIAT_ON_RAMP_CREDENTIAL = 'ACTIVITY_TYPE_UPDATE_FIAT_ON_RAMP_CREDENTIAL'.freeze + DELETE_FIAT_ON_RAMP_CREDENTIAL = 'ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL'.freeze + EMAIL_AUTH_V3 = 'ACTIVITY_TYPE_EMAIL_AUTH_V3'.freeze + INIT_USER_EMAIL_RECOVERY_V2 = 'ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY_V2'.freeze + INIT_OTP_AUTH_V3 = 'ACTIVITY_TYPE_INIT_OTP_AUTH_V3'.freeze + INIT_OTP_V2 = 'ACTIVITY_TYPE_INIT_OTP_V2'.freeze + UPSERT_GAS_USAGE_CONFIG = 'ACTIVITY_TYPE_UPSERT_GAS_USAGE_CONFIG'.freeze + CREATE_TVC_APP = 'ACTIVITY_TYPE_CREATE_TVC_APP'.freeze + CREATE_TVC_DEPLOYMENT = 'ACTIVITY_TYPE_CREATE_TVC_DEPLOYMENT'.freeze + CREATE_TVC_MANIFEST_APPROVALS = 'ACTIVITY_TYPE_CREATE_TVC_MANIFEST_APPROVALS'.freeze + SOL_SEND_TRANSACTION = 'ACTIVITY_TYPE_SOL_SEND_TRANSACTION'.freeze # Builds the enum from string # @param [String] The enum value in the form of the string diff --git a/turnkey_client/lib/turnkey_client/models/approve_activity_request.rb b/turnkey_client/lib/turnkey_client/models/approve_activity_request.rb index 87e22d9..09db65c 100644 --- a/turnkey_client/lib/turnkey_client/models/approve_activity_request.rb +++ b/turnkey_client/lib/turnkey_client/models/approve_activity_request.rb @@ -22,6 +22,8 @@ class ApproveActivityRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/client_signature.rb b/turnkey_client/lib/turnkey_client/models/client_signature.rb new file mode 100644 index 0000000..0653796 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/client_signature.rb @@ -0,0 +1,255 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class ClientSignature + # The public component of a cryptographic key pair used to create the signature. + attr_accessor :public_key + + attr_accessor :scheme + + # The message that was signed. + attr_accessor :message + + # The cryptographic signature over the message. + attr_accessor :signature + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'public_key' => :'publicKey', + :'scheme' => :'scheme', + :'message' => :'message', + :'signature' => :'signature' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'public_key' => :'Object', + :'scheme' => :'Object', + :'message' => :'Object', + :'signature' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::ClientSignature` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::ClientSignature`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'public_key') + self.public_key = attributes[:'public_key'] + end + + if attributes.key?(:'scheme') + self.scheme = attributes[:'scheme'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'signature') + self.signature = attributes[:'signature'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @public_key.nil? + invalid_properties.push('invalid value for "public_key", public_key cannot be nil.') + end + + if @scheme.nil? + invalid_properties.push('invalid value for "scheme", scheme cannot be nil.') + end + + if @message.nil? + invalid_properties.push('invalid value for "message", message cannot be nil.') + end + + if @signature.nil? + invalid_properties.push('invalid value for "signature", signature cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @public_key.nil? + return false if @scheme.nil? + return false if @message.nil? + return false if @signature.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + public_key == o.public_key && + scheme == o.scheme && + message == o.message && + signature == o.signature + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [public_key, scheme, message, signature].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/client_signature_scheme.rb b/turnkey_client/lib/turnkey_client/models/client_signature_scheme.rb new file mode 100644 index 0000000..f995142 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/client_signature_scheme.rb @@ -0,0 +1,26 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class ClientSignatureScheme + CLIENT_SIGNATURE_SCHEME_API_P256 = 'CLIENT_SIGNATURE_SCHEME_API_P256'.freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = ClientSignatureScheme.constants.select { |c| ClientSignatureScheme::const_get(c) == value } + raise "Invalid ENUM value #{value} for class #ClientSignatureScheme" if constantValues.empty? + value + end + end +end diff --git a/turnkey_client/lib/turnkey_client/models/create_api_keys_request.rb b/turnkey_client/lib/turnkey_client/models/create_api_keys_request.rb index d0b95ef..47dc837 100644 --- a/turnkey_client/lib/turnkey_client/models/create_api_keys_request.rb +++ b/turnkey_client/lib/turnkey_client/models/create_api_keys_request.rb @@ -22,6 +22,8 @@ class CreateApiKeysRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/create_authenticators_request.rb b/turnkey_client/lib/turnkey_client/models/create_authenticators_request.rb index 5b37be9..ad522d4 100644 --- a/turnkey_client/lib/turnkey_client/models/create_authenticators_request.rb +++ b/turnkey_client/lib/turnkey_client/models/create_authenticators_request.rb @@ -22,6 +22,8 @@ class CreateAuthenticatorsRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/create_fiat_on_ramp_credential_intent.rb b/turnkey_client/lib/turnkey_client/models/create_fiat_on_ramp_credential_intent.rb new file mode 100644 index 0000000..933538b --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/create_fiat_on_ramp_credential_intent.rb @@ -0,0 +1,272 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class CreateFiatOnRampCredentialIntent + attr_accessor :onramp_provider + + # Project ID for the on-ramp provider. Some providers, like Coinbase, require this additional identifier + attr_accessor :project_id + + # Publishable API key for the on-ramp provider + attr_accessor :publishable_api_key + + # Secret API key for the on-ramp provider encrypted to our on-ramp encryption public key + attr_accessor :encrypted_secret_api_key + + # Private API key for the on-ramp provider encrypted to our on-ramp encryption public key. Some providers, like Coinbase, require this additional key. + attr_accessor :encrypted_private_api_key + + # If the on-ramp credential is a sandbox credential + attr_accessor :sandbox_mode + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'onramp_provider' => :'onrampProvider', + :'project_id' => :'projectId', + :'publishable_api_key' => :'publishableApiKey', + :'encrypted_secret_api_key' => :'encryptedSecretApiKey', + :'encrypted_private_api_key' => :'encryptedPrivateApiKey', + :'sandbox_mode' => :'sandboxMode' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'onramp_provider' => :'Object', + :'project_id' => :'Object', + :'publishable_api_key' => :'Object', + :'encrypted_secret_api_key' => :'Object', + :'encrypted_private_api_key' => :'Object', + :'sandbox_mode' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'project_id', + :'encrypted_private_api_key', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateFiatOnRampCredentialIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateFiatOnRampCredentialIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'onramp_provider') + self.onramp_provider = attributes[:'onramp_provider'] + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + end + + if attributes.key?(:'publishable_api_key') + self.publishable_api_key = attributes[:'publishable_api_key'] + end + + if attributes.key?(:'encrypted_secret_api_key') + self.encrypted_secret_api_key = attributes[:'encrypted_secret_api_key'] + end + + if attributes.key?(:'encrypted_private_api_key') + self.encrypted_private_api_key = attributes[:'encrypted_private_api_key'] + end + + if attributes.key?(:'sandbox_mode') + self.sandbox_mode = attributes[:'sandbox_mode'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @onramp_provider.nil? + invalid_properties.push('invalid value for "onramp_provider", onramp_provider cannot be nil.') + end + + if @publishable_api_key.nil? + invalid_properties.push('invalid value for "publishable_api_key", publishable_api_key cannot be nil.') + end + + if @encrypted_secret_api_key.nil? + invalid_properties.push('invalid value for "encrypted_secret_api_key", encrypted_secret_api_key cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @onramp_provider.nil? + return false if @publishable_api_key.nil? + return false if @encrypted_secret_api_key.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + onramp_provider == o.onramp_provider && + project_id == o.project_id && + publishable_api_key == o.publishable_api_key && + encrypted_secret_api_key == o.encrypted_secret_api_key && + encrypted_private_api_key == o.encrypted_private_api_key && + sandbox_mode == o.sandbox_mode + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [onramp_provider, project_id, publishable_api_key, encrypted_secret_api_key, encrypted_private_api_key, sandbox_mode].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/create_fiat_on_ramp_credential_request.rb b/turnkey_client/lib/turnkey_client/models/create_fiat_on_ramp_credential_request.rb new file mode 100644 index 0000000..44b1a23 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/create_fiat_on_ramp_credential_request.rb @@ -0,0 +1,298 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class CreateFiatOnRampCredentialRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + attr_accessor :generate_app_proofs + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'generate_app_proofs' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateFiatOnRampCredentialRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateFiatOnRampCredentialRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/create_fiat_on_ramp_credential_result.rb b/turnkey_client/lib/turnkey_client/models/create_fiat_on_ramp_credential_result.rb new file mode 100644 index 0000000..2286a7b --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/create_fiat_on_ramp_credential_result.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class CreateFiatOnRampCredentialResult + # Unique identifier of the Fiat On-Ramp credential that was created + attr_accessor :fiat_on_ramp_credential_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fiat_on_ramp_credential_id' => :'fiatOnRampCredentialId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'fiat_on_ramp_credential_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateFiatOnRampCredentialResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateFiatOnRampCredentialResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'fiat_on_ramp_credential_id') + self.fiat_on_ramp_credential_id = attributes[:'fiat_on_ramp_credential_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @fiat_on_ramp_credential_id.nil? + invalid_properties.push('invalid value for "fiat_on_ramp_credential_id", fiat_on_ramp_credential_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @fiat_on_ramp_credential_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + fiat_on_ramp_credential_id == o.fiat_on_ramp_credential_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [fiat_on_ramp_credential_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/create_invitations_request.rb b/turnkey_client/lib/turnkey_client/models/create_invitations_request.rb index dd5893e..b9289bd 100644 --- a/turnkey_client/lib/turnkey_client/models/create_invitations_request.rb +++ b/turnkey_client/lib/turnkey_client/models/create_invitations_request.rb @@ -22,6 +22,8 @@ class CreateInvitationsRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/create_oauth2_credential_request.rb b/turnkey_client/lib/turnkey_client/models/create_oauth2_credential_request.rb index d6e51c8..60daae9 100644 --- a/turnkey_client/lib/turnkey_client/models/create_oauth2_credential_request.rb +++ b/turnkey_client/lib/turnkey_client/models/create_oauth2_credential_request.rb @@ -22,6 +22,8 @@ class CreateOauth2CredentialRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/create_oauth_providers_request.rb b/turnkey_client/lib/turnkey_client/models/create_oauth_providers_request.rb index 2b5ad2e..ea88cbd 100644 --- a/turnkey_client/lib/turnkey_client/models/create_oauth_providers_request.rb +++ b/turnkey_client/lib/turnkey_client/models/create_oauth_providers_request.rb @@ -22,6 +22,8 @@ class CreateOauthProvidersRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/create_policies_request.rb b/turnkey_client/lib/turnkey_client/models/create_policies_request.rb index 8ff41e0..0f9cc3a 100644 --- a/turnkey_client/lib/turnkey_client/models/create_policies_request.rb +++ b/turnkey_client/lib/turnkey_client/models/create_policies_request.rb @@ -22,6 +22,8 @@ class CreatePoliciesRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/create_policy_intent_v3.rb b/turnkey_client/lib/turnkey_client/models/create_policy_intent_v3.rb index d225176..bca3efe 100644 --- a/turnkey_client/lib/turnkey_client/models/create_policy_intent_v3.rb +++ b/turnkey_client/lib/turnkey_client/models/create_policy_intent_v3.rb @@ -23,6 +23,7 @@ class CreatePolicyIntentV3 # The consensus expression that triggers the Effect attr_accessor :consensus + # Notes for a Policy. attr_accessor :notes # Attribute mapping from ruby-style variable name to JSON key. @@ -103,6 +104,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "effect", effect cannot be nil.') end + if @notes.nil? + invalid_properties.push('invalid value for "notes", notes cannot be nil.') + end + invalid_properties end @@ -111,6 +116,7 @@ def list_invalid_properties def valid? return false if @policy_name.nil? return false if @effect.nil? + return false if @notes.nil? true end diff --git a/turnkey_client/lib/turnkey_client/models/create_policy_request.rb b/turnkey_client/lib/turnkey_client/models/create_policy_request.rb index d137bba..4dc6645 100644 --- a/turnkey_client/lib/turnkey_client/models/create_policy_request.rb +++ b/turnkey_client/lib/turnkey_client/models/create_policy_request.rb @@ -22,6 +22,8 @@ class CreatePolicyRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/create_private_key_tag_request.rb b/turnkey_client/lib/turnkey_client/models/create_private_key_tag_request.rb index 4dc020d..72ab4db 100644 --- a/turnkey_client/lib/turnkey_client/models/create_private_key_tag_request.rb +++ b/turnkey_client/lib/turnkey_client/models/create_private_key_tag_request.rb @@ -22,6 +22,8 @@ class CreatePrivateKeyTagRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/create_private_keys_request.rb b/turnkey_client/lib/turnkey_client/models/create_private_keys_request.rb index 19bf4fc..d4ac600 100644 --- a/turnkey_client/lib/turnkey_client/models/create_private_keys_request.rb +++ b/turnkey_client/lib/turnkey_client/models/create_private_keys_request.rb @@ -22,6 +22,8 @@ class CreatePrivateKeysRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/create_read_only_session_request.rb b/turnkey_client/lib/turnkey_client/models/create_read_only_session_request.rb index dc3cdd6..48c8e16 100644 --- a/turnkey_client/lib/turnkey_client/models/create_read_only_session_request.rb +++ b/turnkey_client/lib/turnkey_client/models/create_read_only_session_request.rb @@ -22,6 +22,8 @@ class CreateReadOnlySessionRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/create_read_write_session_request.rb b/turnkey_client/lib/turnkey_client/models/create_read_write_session_request.rb index df54946..3b61192 100644 --- a/turnkey_client/lib/turnkey_client/models/create_read_write_session_request.rb +++ b/turnkey_client/lib/turnkey_client/models/create_read_write_session_request.rb @@ -22,6 +22,8 @@ class CreateReadWriteSessionRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/create_smart_contract_interface_intent.rb b/turnkey_client/lib/turnkey_client/models/create_smart_contract_interface_intent.rb index ab9ce8f..9ab7ff5 100644 --- a/turnkey_client/lib/turnkey_client/models/create_smart_contract_interface_intent.rb +++ b/turnkey_client/lib/turnkey_client/models/create_smart_contract_interface_intent.rb @@ -15,7 +15,7 @@ class CreateSmartContractInterfaceIntent # Corresponding contract address or program ID attr_accessor :smart_contract_address - # ABI/IDL as a JSON string + # ABI/IDL as a JSON string. Limited to 400kb attr_accessor :smart_contract_interface attr_accessor :type diff --git a/turnkey_client/lib/turnkey_client/models/create_smart_contract_interface_request.rb b/turnkey_client/lib/turnkey_client/models/create_smart_contract_interface_request.rb index 2de35b9..9cff788 100644 --- a/turnkey_client/lib/turnkey_client/models/create_smart_contract_interface_request.rb +++ b/turnkey_client/lib/turnkey_client/models/create_smart_contract_interface_request.rb @@ -22,6 +22,8 @@ class CreateSmartContractInterfaceRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/create_sub_organization_intent_v7.rb b/turnkey_client/lib/turnkey_client/models/create_sub_organization_intent_v7.rb index b706323..f033161 100644 --- a/turnkey_client/lib/turnkey_client/models/create_sub_organization_intent_v7.rb +++ b/turnkey_client/lib/turnkey_client/models/create_sub_organization_intent_v7.rb @@ -38,6 +38,8 @@ class CreateSubOrganizationIntentV7 # Signed JWT containing a unique id, expiry, verification type, contact attr_accessor :verification_token + attr_accessor :client_signature + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -49,7 +51,8 @@ def self.attribute_map :'disable_email_auth' => :'disableEmailAuth', :'disable_sms_auth' => :'disableSmsAuth', :'disable_otp_email_auth' => :'disableOtpEmailAuth', - :'verification_token' => :'verificationToken' + :'verification_token' => :'verificationToken', + :'client_signature' => :'clientSignature' } end @@ -64,7 +67,8 @@ def self.openapi_types :'disable_email_auth' => :'Object', :'disable_sms_auth' => :'Object', :'disable_otp_email_auth' => :'Object', - :'verification_token' => :'Object' + :'verification_token' => :'Object', + :'client_signature' => :'Object' } end @@ -75,7 +79,7 @@ def self.openapi_nullable :'disable_email_auth', :'disable_sms_auth', :'disable_otp_email_auth', - :'verification_token' + :'verification_token', ]) end @@ -131,6 +135,10 @@ def initialize(attributes = {}) if attributes.key?(:'verification_token') self.verification_token = attributes[:'verification_token'] end + + if attributes.key?(:'client_signature') + self.client_signature = attributes[:'client_signature'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -174,7 +182,8 @@ def ==(o) disable_email_auth == o.disable_email_auth && disable_sms_auth == o.disable_sms_auth && disable_otp_email_auth == o.disable_otp_email_auth && - verification_token == o.verification_token + verification_token == o.verification_token && + client_signature == o.client_signature end # @see the `==` method @@ -186,7 +195,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [sub_organization_name, root_users, root_quorum_threshold, wallet, disable_email_recovery, disable_email_auth, disable_sms_auth, disable_otp_email_auth, verification_token].hash + [sub_organization_name, root_users, root_quorum_threshold, wallet, disable_email_recovery, disable_email_auth, disable_sms_auth, disable_otp_email_auth, verification_token, client_signature].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/create_sub_organization_request.rb b/turnkey_client/lib/turnkey_client/models/create_sub_organization_request.rb index 7351171..af4dbcf 100644 --- a/turnkey_client/lib/turnkey_client/models/create_sub_organization_request.rb +++ b/turnkey_client/lib/turnkey_client/models/create_sub_organization_request.rb @@ -22,6 +22,8 @@ class CreateSubOrganizationRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/create_tvc_app_intent.rb b/turnkey_client/lib/turnkey_client/models/create_tvc_app_intent.rb new file mode 100644 index 0000000..df9412e --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/create_tvc_app_intent.rb @@ -0,0 +1,277 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class CreateTvcAppIntent + # The name of the new TVC application + attr_accessor :name + + # Quorum public key to use for this application + attr_accessor :quorum_public_key + + # Unique identifier for an existing TVC operator set to use as the Manifest Set for this TVC application. If left empty, a new Manifest Set configuration is required + attr_accessor :manifest_set_id + + attr_accessor :manifest_set_params + + # Unique identifier for an existing TVC operator set to use as the Share Set for this TVC application. If left empty, a new Share Set configuration is required + attr_accessor :share_set_id + + attr_accessor :share_set_params + + # Enables external connectivity for this TVC app. Default if not provided: false. + attr_accessor :external_connectivity + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'quorum_public_key' => :'quorumPublicKey', + :'manifest_set_id' => :'manifestSetId', + :'manifest_set_params' => :'manifestSetParams', + :'share_set_id' => :'shareSetId', + :'share_set_params' => :'shareSetParams', + :'external_connectivity' => :'externalConnectivity' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'Object', + :'quorum_public_key' => :'Object', + :'manifest_set_id' => :'Object', + :'manifest_set_params' => :'Object', + :'share_set_id' => :'Object', + :'share_set_params' => :'Object', + :'external_connectivity' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'manifest_set_id', + :'share_set_id', + :'external_connectivity' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateTvcAppIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateTvcAppIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'quorum_public_key') + self.quorum_public_key = attributes[:'quorum_public_key'] + end + + if attributes.key?(:'manifest_set_id') + self.manifest_set_id = attributes[:'manifest_set_id'] + end + + if attributes.key?(:'manifest_set_params') + self.manifest_set_params = attributes[:'manifest_set_params'] + end + + if attributes.key?(:'share_set_id') + self.share_set_id = attributes[:'share_set_id'] + end + + if attributes.key?(:'share_set_params') + self.share_set_params = attributes[:'share_set_params'] + end + + if attributes.key?(:'external_connectivity') + self.external_connectivity = attributes[:'external_connectivity'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @quorum_public_key.nil? + invalid_properties.push('invalid value for "quorum_public_key", quorum_public_key cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @name.nil? + return false if @quorum_public_key.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + quorum_public_key == o.quorum_public_key && + manifest_set_id == o.manifest_set_id && + manifest_set_params == o.manifest_set_params && + share_set_id == o.share_set_id && + share_set_params == o.share_set_params && + external_connectivity == o.external_connectivity + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, quorum_public_key, manifest_set_id, manifest_set_params, share_set_id, share_set_params, external_connectivity].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/create_tvc_app_result.rb b/turnkey_client/lib/turnkey_client/models/create_tvc_app_result.rb new file mode 100644 index 0000000..86c04b5 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/create_tvc_app_result.rb @@ -0,0 +1,258 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class CreateTvcAppResult + # The unique identifier for the TVC application + attr_accessor :app_id + + # The unique identifier for the TVC manifest set + attr_accessor :manifest_set_id + + # The unique identifier(s) of the manifest set operators + attr_accessor :manifest_set_operator_ids + + # The required number of approvals for the manifest set + attr_accessor :manifest_set_threshold + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'app_id' => :'appId', + :'manifest_set_id' => :'manifestSetId', + :'manifest_set_operator_ids' => :'manifestSetOperatorIds', + :'manifest_set_threshold' => :'manifestSetThreshold' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'app_id' => :'Object', + :'manifest_set_id' => :'Object', + :'manifest_set_operator_ids' => :'Object', + :'manifest_set_threshold' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateTvcAppResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateTvcAppResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'app_id') + self.app_id = attributes[:'app_id'] + end + + if attributes.key?(:'manifest_set_id') + self.manifest_set_id = attributes[:'manifest_set_id'] + end + + if attributes.key?(:'manifest_set_operator_ids') + if (value = attributes[:'manifest_set_operator_ids']).is_a?(Array) + self.manifest_set_operator_ids = value + end + end + + if attributes.key?(:'manifest_set_threshold') + self.manifest_set_threshold = attributes[:'manifest_set_threshold'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @app_id.nil? + invalid_properties.push('invalid value for "app_id", app_id cannot be nil.') + end + + if @manifest_set_id.nil? + invalid_properties.push('invalid value for "manifest_set_id", manifest_set_id cannot be nil.') + end + + if @manifest_set_operator_ids.nil? + invalid_properties.push('invalid value for "manifest_set_operator_ids", manifest_set_operator_ids cannot be nil.') + end + + if @manifest_set_threshold.nil? + invalid_properties.push('invalid value for "manifest_set_threshold", manifest_set_threshold cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @app_id.nil? + return false if @manifest_set_id.nil? + return false if @manifest_set_operator_ids.nil? + return false if @manifest_set_threshold.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + app_id == o.app_id && + manifest_set_id == o.manifest_set_id && + manifest_set_operator_ids == o.manifest_set_operator_ids && + manifest_set_threshold == o.manifest_set_threshold + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [app_id, manifest_set_id, manifest_set_operator_ids, manifest_set_threshold].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/create_tvc_deployment_intent.rb b/turnkey_client/lib/turnkey_client/models/create_tvc_deployment_intent.rb new file mode 100644 index 0000000..87cf939 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/create_tvc_deployment_intent.rb @@ -0,0 +1,346 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class CreateTvcDeploymentIntent + # The unique identifier of the to-be-deployed TVC application + attr_accessor :app_id + + # The QuorumOS version to use to deploy this application + attr_accessor :qos_version + + # URL of the container containing the pivot binary + attr_accessor :pivot_container_image_url + + # Location of the binary in the pivot container + attr_accessor :pivot_path + + # Arguments to pass to the pivot binary at startup. Encoded as a list of strings, for example [\"--foo\", \"bar\"] + attr_accessor :pivot_args + + # Digest of the pivot binary in the pivot container. This value will be inserted in the QOS manifest to ensure application integrity. + attr_accessor :expected_pivot_digest + + # URL of the container containing the host binary + attr_accessor :host_container_image_url + + # Location of the binary inside the host container + attr_accessor :host_path + + # Arguments to pass to the host binary at startup. Encoded as a list of strings, for example [\"--foo\", \"bar\"] + attr_accessor :host_args + + # Optional nonce to ensure uniqueness of the deployment manifest. If not provided, it defaults to the current Unix timestamp in seconds. + attr_accessor :nonce + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'app_id' => :'appId', + :'qos_version' => :'qosVersion', + :'pivot_container_image_url' => :'pivotContainerImageUrl', + :'pivot_path' => :'pivotPath', + :'pivot_args' => :'pivotArgs', + :'expected_pivot_digest' => :'expectedPivotDigest', + :'host_container_image_url' => :'hostContainerImageUrl', + :'host_path' => :'hostPath', + :'host_args' => :'hostArgs', + :'nonce' => :'nonce' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'app_id' => :'Object', + :'qos_version' => :'Object', + :'pivot_container_image_url' => :'Object', + :'pivot_path' => :'Object', + :'pivot_args' => :'Object', + :'expected_pivot_digest' => :'Object', + :'host_container_image_url' => :'Object', + :'host_path' => :'Object', + :'host_args' => :'Object', + :'nonce' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'nonce' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateTvcDeploymentIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateTvcDeploymentIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'app_id') + self.app_id = attributes[:'app_id'] + end + + if attributes.key?(:'qos_version') + self.qos_version = attributes[:'qos_version'] + end + + if attributes.key?(:'pivot_container_image_url') + self.pivot_container_image_url = attributes[:'pivot_container_image_url'] + end + + if attributes.key?(:'pivot_path') + self.pivot_path = attributes[:'pivot_path'] + end + + if attributes.key?(:'pivot_args') + if (value = attributes[:'pivot_args']).is_a?(Array) + self.pivot_args = value + end + end + + if attributes.key?(:'expected_pivot_digest') + self.expected_pivot_digest = attributes[:'expected_pivot_digest'] + end + + if attributes.key?(:'host_container_image_url') + self.host_container_image_url = attributes[:'host_container_image_url'] + end + + if attributes.key?(:'host_path') + self.host_path = attributes[:'host_path'] + end + + if attributes.key?(:'host_args') + if (value = attributes[:'host_args']).is_a?(Array) + self.host_args = value + end + end + + if attributes.key?(:'nonce') + self.nonce = attributes[:'nonce'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @app_id.nil? + invalid_properties.push('invalid value for "app_id", app_id cannot be nil.') + end + + if @qos_version.nil? + invalid_properties.push('invalid value for "qos_version", qos_version cannot be nil.') + end + + if @pivot_container_image_url.nil? + invalid_properties.push('invalid value for "pivot_container_image_url", pivot_container_image_url cannot be nil.') + end + + if @pivot_path.nil? + invalid_properties.push('invalid value for "pivot_path", pivot_path cannot be nil.') + end + + if @pivot_args.nil? + invalid_properties.push('invalid value for "pivot_args", pivot_args cannot be nil.') + end + + if @expected_pivot_digest.nil? + invalid_properties.push('invalid value for "expected_pivot_digest", expected_pivot_digest cannot be nil.') + end + + if @host_container_image_url.nil? + invalid_properties.push('invalid value for "host_container_image_url", host_container_image_url cannot be nil.') + end + + if @host_path.nil? + invalid_properties.push('invalid value for "host_path", host_path cannot be nil.') + end + + if @host_args.nil? + invalid_properties.push('invalid value for "host_args", host_args cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @app_id.nil? + return false if @qos_version.nil? + return false if @pivot_container_image_url.nil? + return false if @pivot_path.nil? + return false if @pivot_args.nil? + return false if @expected_pivot_digest.nil? + return false if @host_container_image_url.nil? + return false if @host_path.nil? + return false if @host_args.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + app_id == o.app_id && + qos_version == o.qos_version && + pivot_container_image_url == o.pivot_container_image_url && + pivot_path == o.pivot_path && + pivot_args == o.pivot_args && + expected_pivot_digest == o.expected_pivot_digest && + host_container_image_url == o.host_container_image_url && + host_path == o.host_path && + host_args == o.host_args && + nonce == o.nonce + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [app_id, qos_version, pivot_container_image_url, pivot_path, pivot_args, expected_pivot_digest, host_container_image_url, host_path, host_args, nonce].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/create_tvc_deployment_result.rb b/turnkey_client/lib/turnkey_client/models/create_tvc_deployment_result.rb new file mode 100644 index 0000000..f77fbae --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/create_tvc_deployment_result.rb @@ -0,0 +1,226 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class CreateTvcDeploymentResult + # The unique identifier for the TVC deployment + attr_accessor :deployment_id + + # The unique identifier for the TVC manifest + attr_accessor :manifest_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'deployment_id' => :'deploymentId', + :'manifest_id' => :'manifestId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'deployment_id' => :'Object', + :'manifest_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateTvcDeploymentResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateTvcDeploymentResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'deployment_id') + self.deployment_id = attributes[:'deployment_id'] + end + + if attributes.key?(:'manifest_id') + self.manifest_id = attributes[:'manifest_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @deployment_id.nil? + invalid_properties.push('invalid value for "deployment_id", deployment_id cannot be nil.') + end + + if @manifest_id.nil? + invalid_properties.push('invalid value for "manifest_id", manifest_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @deployment_id.nil? + return false if @manifest_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + deployment_id == o.deployment_id && + manifest_id == o.manifest_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [deployment_id, manifest_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/create_tvc_manifest_approvals_intent.rb b/turnkey_client/lib/turnkey_client/models/create_tvc_manifest_approvals_intent.rb new file mode 100644 index 0000000..3313971 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/create_tvc_manifest_approvals_intent.rb @@ -0,0 +1,228 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class CreateTvcManifestApprovalsIntent + # Unique identifier of the TVC deployment to approve + attr_accessor :manifest_id + + # List of manifest approvals + attr_accessor :approvals + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'manifest_id' => :'manifestId', + :'approvals' => :'approvals' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'manifest_id' => :'Object', + :'approvals' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateTvcManifestApprovalsIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateTvcManifestApprovalsIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'manifest_id') + self.manifest_id = attributes[:'manifest_id'] + end + + if attributes.key?(:'approvals') + if (value = attributes[:'approvals']).is_a?(Array) + self.approvals = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @manifest_id.nil? + invalid_properties.push('invalid value for "manifest_id", manifest_id cannot be nil.') + end + + if @approvals.nil? + invalid_properties.push('invalid value for "approvals", approvals cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @manifest_id.nil? + return false if @approvals.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + manifest_id == o.manifest_id && + approvals == o.approvals + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [manifest_id, approvals].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/create_tvc_manifest_approvals_result.rb b/turnkey_client/lib/turnkey_client/models/create_tvc_manifest_approvals_result.rb new file mode 100644 index 0000000..a5445c4 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/create_tvc_manifest_approvals_result.rb @@ -0,0 +1,213 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class CreateTvcManifestApprovalsResult + # The unique identifier(s) for the manifest approvals + attr_accessor :approval_ids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'approval_ids' => :'approvalIds' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'approval_ids' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateTvcManifestApprovalsResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CreateTvcManifestApprovalsResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'approval_ids') + if (value = attributes[:'approval_ids']).is_a?(Array) + self.approval_ids = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @approval_ids.nil? + invalid_properties.push('invalid value for "approval_ids", approval_ids cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @approval_ids.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + approval_ids == o.approval_ids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [approval_ids].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/create_user_tag_request.rb b/turnkey_client/lib/turnkey_client/models/create_user_tag_request.rb index a2d9ea1..0162b19 100644 --- a/turnkey_client/lib/turnkey_client/models/create_user_tag_request.rb +++ b/turnkey_client/lib/turnkey_client/models/create_user_tag_request.rb @@ -22,6 +22,8 @@ class CreateUserTagRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/create_users_request.rb b/turnkey_client/lib/turnkey_client/models/create_users_request.rb index 7e0f9b5..3e84270 100644 --- a/turnkey_client/lib/turnkey_client/models/create_users_request.rb +++ b/turnkey_client/lib/turnkey_client/models/create_users_request.rb @@ -22,6 +22,8 @@ class CreateUsersRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/create_wallet_accounts_intent.rb b/turnkey_client/lib/turnkey_client/models/create_wallet_accounts_intent.rb index e80af63..81b8245 100644 --- a/turnkey_client/lib/turnkey_client/models/create_wallet_accounts_intent.rb +++ b/turnkey_client/lib/turnkey_client/models/create_wallet_accounts_intent.rb @@ -18,11 +18,15 @@ class CreateWalletAccountsIntent # A list of wallet Accounts. attr_accessor :accounts + # Indicates if the wallet accounts should be persisted. This is helpful if you'd like to see the addresses of different derivation paths without actually creating the accounts. Defaults to true. + attr_accessor :persist + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'wallet_id' => :'walletId', - :'accounts' => :'accounts' + :'accounts' => :'accounts', + :'persist' => :'persist' } end @@ -30,13 +34,15 @@ def self.attribute_map def self.openapi_types { :'wallet_id' => :'Object', - :'accounts' => :'Object' + :'accounts' => :'Object', + :'persist' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'persist' ]) end @@ -64,6 +70,10 @@ def initialize(attributes = {}) self.accounts = value end end + + if attributes.key?(:'persist') + self.persist = attributes[:'persist'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -95,7 +105,8 @@ def ==(o) return true if self.equal?(o) self.class == o.class && wallet_id == o.wallet_id && - accounts == o.accounts + accounts == o.accounts && + persist == o.persist end # @see the `==` method @@ -107,7 +118,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [wallet_id, accounts].hash + [wallet_id, accounts, persist].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/create_wallet_accounts_request.rb b/turnkey_client/lib/turnkey_client/models/create_wallet_accounts_request.rb index 50fcdc5..04af202 100644 --- a/turnkey_client/lib/turnkey_client/models/create_wallet_accounts_request.rb +++ b/turnkey_client/lib/turnkey_client/models/create_wallet_accounts_request.rb @@ -22,6 +22,8 @@ class CreateWalletAccountsRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/create_wallet_request.rb b/turnkey_client/lib/turnkey_client/models/create_wallet_request.rb index eb3ffe0..a1f0e8a 100644 --- a/turnkey_client/lib/turnkey_client/models/create_wallet_request.rb +++ b/turnkey_client/lib/turnkey_client/models/create_wallet_request.rb @@ -22,6 +22,8 @@ class CreateWalletRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/curve.rb b/turnkey_client/lib/turnkey_client/models/curve.rb index c19f9f6..ead8c6c 100644 --- a/turnkey_client/lib/turnkey_client/models/curve.rb +++ b/turnkey_client/lib/turnkey_client/models/curve.rb @@ -14,6 +14,7 @@ module TurnkeyClient class Curve SECP256_K1 = 'CURVE_SECP256K1'.freeze ED25519 = 'CURVE_ED25519'.freeze + P256 = 'CURVE_P256'.freeze # Builds the enum from string # @param [String] The enum value in the form of the string diff --git a/turnkey_client/lib/turnkey_client/models/custom_revert_error.rb b/turnkey_client/lib/turnkey_client/models/custom_revert_error.rb new file mode 100644 index 0000000..031588e --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/custom_revert_error.rb @@ -0,0 +1,218 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class CustomRevertError + # The name of the custom error. + attr_accessor :error_name + + # The decoded parameters as a JSON object. + attr_accessor :params_json + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'error_name' => :'errorName', + :'params_json' => :'paramsJson' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'error_name' => :'Object', + :'params_json' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'error_name', + :'params_json' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CustomRevertError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::CustomRevertError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'error_name') + self.error_name = attributes[:'error_name'] + end + + if attributes.key?(:'params_json') + self.params_json = attributes[:'params_json'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + error_name == o.error_name && + params_json == o.params_json + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [error_name, params_json].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/data_v1_signature_scheme.rb b/turnkey_client/lib/turnkey_client/models/data_v1_signature_scheme.rb new file mode 100644 index 0000000..9eebc20 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/data_v1_signature_scheme.rb @@ -0,0 +1,26 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class DataV1SignatureScheme + SIGNATURE_SCHEME_EPHEMERAL_KEY_P256 = 'SIGNATURE_SCHEME_EPHEMERAL_KEY_P256'.freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = DataV1SignatureScheme.constants.select { |c| DataV1SignatureScheme::const_get(c) == value } + raise "Invalid ENUM value #{value} for class #DataV1SignatureScheme" if constantValues.empty? + value + end + end +end diff --git a/turnkey_client/lib/turnkey_client/models/delete_api_keys_request.rb b/turnkey_client/lib/turnkey_client/models/delete_api_keys_request.rb index 12fed64..f6b9df0 100644 --- a/turnkey_client/lib/turnkey_client/models/delete_api_keys_request.rb +++ b/turnkey_client/lib/turnkey_client/models/delete_api_keys_request.rb @@ -22,6 +22,8 @@ class DeleteApiKeysRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/delete_authenticators_request.rb b/turnkey_client/lib/turnkey_client/models/delete_authenticators_request.rb index 1fca9d9..a73b6ee 100644 --- a/turnkey_client/lib/turnkey_client/models/delete_authenticators_request.rb +++ b/turnkey_client/lib/turnkey_client/models/delete_authenticators_request.rb @@ -22,6 +22,8 @@ class DeleteAuthenticatorsRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/delete_fiat_on_ramp_credential_intent.rb b/turnkey_client/lib/turnkey_client/models/delete_fiat_on_ramp_credential_intent.rb new file mode 100644 index 0000000..455d276 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/delete_fiat_on_ramp_credential_intent.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class DeleteFiatOnRampCredentialIntent + # The ID of the fiat on-ramp credential to delete + attr_accessor :fiat_onramp_credential_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fiat_onramp_credential_id' => :'fiatOnrampCredentialId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'fiat_onramp_credential_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::DeleteFiatOnRampCredentialIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::DeleteFiatOnRampCredentialIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'fiat_onramp_credential_id') + self.fiat_onramp_credential_id = attributes[:'fiat_onramp_credential_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @fiat_onramp_credential_id.nil? + invalid_properties.push('invalid value for "fiat_onramp_credential_id", fiat_onramp_credential_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @fiat_onramp_credential_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + fiat_onramp_credential_id == o.fiat_onramp_credential_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [fiat_onramp_credential_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/delete_fiat_on_ramp_credential_request.rb b/turnkey_client/lib/turnkey_client/models/delete_fiat_on_ramp_credential_request.rb new file mode 100644 index 0000000..37bc528 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/delete_fiat_on_ramp_credential_request.rb @@ -0,0 +1,298 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class DeleteFiatOnRampCredentialRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + attr_accessor :generate_app_proofs + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'generate_app_proofs' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::DeleteFiatOnRampCredentialRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::DeleteFiatOnRampCredentialRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/delete_fiat_on_ramp_credential_result.rb b/turnkey_client/lib/turnkey_client/models/delete_fiat_on_ramp_credential_result.rb new file mode 100644 index 0000000..711b6d9 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/delete_fiat_on_ramp_credential_result.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class DeleteFiatOnRampCredentialResult + # Unique identifier of the Fiat On-Ramp credential that was deleted + attr_accessor :fiat_on_ramp_credential_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fiat_on_ramp_credential_id' => :'fiatOnRampCredentialId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'fiat_on_ramp_credential_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::DeleteFiatOnRampCredentialResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::DeleteFiatOnRampCredentialResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'fiat_on_ramp_credential_id') + self.fiat_on_ramp_credential_id = attributes[:'fiat_on_ramp_credential_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @fiat_on_ramp_credential_id.nil? + invalid_properties.push('invalid value for "fiat_on_ramp_credential_id", fiat_on_ramp_credential_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @fiat_on_ramp_credential_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + fiat_on_ramp_credential_id == o.fiat_on_ramp_credential_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [fiat_on_ramp_credential_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/delete_invitation_request.rb b/turnkey_client/lib/turnkey_client/models/delete_invitation_request.rb index ae5ca30..acc962f 100644 --- a/turnkey_client/lib/turnkey_client/models/delete_invitation_request.rb +++ b/turnkey_client/lib/turnkey_client/models/delete_invitation_request.rb @@ -22,6 +22,8 @@ class DeleteInvitationRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/delete_oauth2_credential_request.rb b/turnkey_client/lib/turnkey_client/models/delete_oauth2_credential_request.rb index 7b92c2c..102ccb9 100644 --- a/turnkey_client/lib/turnkey_client/models/delete_oauth2_credential_request.rb +++ b/turnkey_client/lib/turnkey_client/models/delete_oauth2_credential_request.rb @@ -22,6 +22,8 @@ class DeleteOauth2CredentialRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/delete_oauth_providers_request.rb b/turnkey_client/lib/turnkey_client/models/delete_oauth_providers_request.rb index ddd43d3..438c952 100644 --- a/turnkey_client/lib/turnkey_client/models/delete_oauth_providers_request.rb +++ b/turnkey_client/lib/turnkey_client/models/delete_oauth_providers_request.rb @@ -22,6 +22,8 @@ class DeleteOauthProvidersRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/delete_policies_intent.rb b/turnkey_client/lib/turnkey_client/models/delete_policies_intent.rb new file mode 100644 index 0000000..fd6879a --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/delete_policies_intent.rb @@ -0,0 +1,213 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class DeletePoliciesIntent + # List of unique identifiers for policies within an organization + attr_accessor :policy_ids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'policy_ids' => :'policyIds' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'policy_ids' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::DeletePoliciesIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::DeletePoliciesIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'policy_ids') + if (value = attributes[:'policy_ids']).is_a?(Array) + self.policy_ids = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @policy_ids.nil? + invalid_properties.push('invalid value for "policy_ids", policy_ids cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @policy_ids.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + policy_ids == o.policy_ids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [policy_ids].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/delete_policies_request.rb b/turnkey_client/lib/turnkey_client/models/delete_policies_request.rb new file mode 100644 index 0000000..4e0eb2a --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/delete_policies_request.rb @@ -0,0 +1,298 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class DeletePoliciesRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + attr_accessor :generate_app_proofs + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'generate_app_proofs' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::DeletePoliciesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::DeletePoliciesRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_DELETE_POLICIES']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_DELETE_POLICIES']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/delete_policies_result.rb b/turnkey_client/lib/turnkey_client/models/delete_policies_result.rb new file mode 100644 index 0000000..ff0399a --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/delete_policies_result.rb @@ -0,0 +1,213 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class DeletePoliciesResult + # A list of unique identifiers for the deleted policies. + attr_accessor :policy_ids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'policy_ids' => :'policyIds' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'policy_ids' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::DeletePoliciesResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::DeletePoliciesResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'policy_ids') + if (value = attributes[:'policy_ids']).is_a?(Array) + self.policy_ids = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @policy_ids.nil? + invalid_properties.push('invalid value for "policy_ids", policy_ids cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @policy_ids.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + policy_ids == o.policy_ids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [policy_ids].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/delete_policy_request.rb b/turnkey_client/lib/turnkey_client/models/delete_policy_request.rb index c6f28ee..c654a15 100644 --- a/turnkey_client/lib/turnkey_client/models/delete_policy_request.rb +++ b/turnkey_client/lib/turnkey_client/models/delete_policy_request.rb @@ -22,6 +22,8 @@ class DeletePolicyRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/delete_private_key_tags_request.rb b/turnkey_client/lib/turnkey_client/models/delete_private_key_tags_request.rb index 04a010d..75a84e1 100644 --- a/turnkey_client/lib/turnkey_client/models/delete_private_key_tags_request.rb +++ b/turnkey_client/lib/turnkey_client/models/delete_private_key_tags_request.rb @@ -22,6 +22,8 @@ class DeletePrivateKeyTagsRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/delete_private_keys_request.rb b/turnkey_client/lib/turnkey_client/models/delete_private_keys_request.rb index 32b4442..c1dd27a 100644 --- a/turnkey_client/lib/turnkey_client/models/delete_private_keys_request.rb +++ b/turnkey_client/lib/turnkey_client/models/delete_private_keys_request.rb @@ -22,6 +22,8 @@ class DeletePrivateKeysRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/delete_smart_contract_interface_request.rb b/turnkey_client/lib/turnkey_client/models/delete_smart_contract_interface_request.rb index adad47a..2c3d0b3 100644 --- a/turnkey_client/lib/turnkey_client/models/delete_smart_contract_interface_request.rb +++ b/turnkey_client/lib/turnkey_client/models/delete_smart_contract_interface_request.rb @@ -22,6 +22,8 @@ class DeleteSmartContractInterfaceRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/delete_sub_organization_request.rb b/turnkey_client/lib/turnkey_client/models/delete_sub_organization_request.rb index 77504ed..d10e8c3 100644 --- a/turnkey_client/lib/turnkey_client/models/delete_sub_organization_request.rb +++ b/turnkey_client/lib/turnkey_client/models/delete_sub_organization_request.rb @@ -22,6 +22,8 @@ class DeleteSubOrganizationRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/delete_user_tags_request.rb b/turnkey_client/lib/turnkey_client/models/delete_user_tags_request.rb index 7bb1720..85352d1 100644 --- a/turnkey_client/lib/turnkey_client/models/delete_user_tags_request.rb +++ b/turnkey_client/lib/turnkey_client/models/delete_user_tags_request.rb @@ -22,6 +22,8 @@ class DeleteUserTagsRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/delete_users_request.rb b/turnkey_client/lib/turnkey_client/models/delete_users_request.rb index ad71bf2..14732ba 100644 --- a/turnkey_client/lib/turnkey_client/models/delete_users_request.rb +++ b/turnkey_client/lib/turnkey_client/models/delete_users_request.rb @@ -22,6 +22,8 @@ class DeleteUsersRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/delete_wallet_accounts_intent.rb b/turnkey_client/lib/turnkey_client/models/delete_wallet_accounts_intent.rb new file mode 100644 index 0000000..d4bdd7e --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/delete_wallet_accounts_intent.rb @@ -0,0 +1,224 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class DeleteWalletAccountsIntent + # List of unique identifiers for wallet accounts within an organization + attr_accessor :wallet_account_ids + + # Optional parameter for deleting the wallet accounts, even if any have not been previously exported. If they have been exported, this field is ignored. + attr_accessor :delete_without_export + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'wallet_account_ids' => :'walletAccountIds', + :'delete_without_export' => :'deleteWithoutExport' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'wallet_account_ids' => :'Object', + :'delete_without_export' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'delete_without_export' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::DeleteWalletAccountsIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::DeleteWalletAccountsIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'wallet_account_ids') + if (value = attributes[:'wallet_account_ids']).is_a?(Array) + self.wallet_account_ids = value + end + end + + if attributes.key?(:'delete_without_export') + self.delete_without_export = attributes[:'delete_without_export'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @wallet_account_ids.nil? + invalid_properties.push('invalid value for "wallet_account_ids", wallet_account_ids cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @wallet_account_ids.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + wallet_account_ids == o.wallet_account_ids && + delete_without_export == o.delete_without_export + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [wallet_account_ids, delete_without_export].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/delete_wallet_accounts_request.rb b/turnkey_client/lib/turnkey_client/models/delete_wallet_accounts_request.rb new file mode 100644 index 0000000..5361ebc --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/delete_wallet_accounts_request.rb @@ -0,0 +1,298 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class DeleteWalletAccountsRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + attr_accessor :generate_app_proofs + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'generate_app_proofs' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::DeleteWalletAccountsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::DeleteWalletAccountsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/delete_wallet_accounts_result.rb b/turnkey_client/lib/turnkey_client/models/delete_wallet_accounts_result.rb new file mode 100644 index 0000000..435c9c0 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/delete_wallet_accounts_result.rb @@ -0,0 +1,213 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class DeleteWalletAccountsResult + # A list of wallet account unique identifiers that were removed + attr_accessor :wallet_account_ids + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'wallet_account_ids' => :'walletAccountIds' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'wallet_account_ids' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::DeleteWalletAccountsResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::DeleteWalletAccountsResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'wallet_account_ids') + if (value = attributes[:'wallet_account_ids']).is_a?(Array) + self.wallet_account_ids = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @wallet_account_ids.nil? + invalid_properties.push('invalid value for "wallet_account_ids", wallet_account_ids cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @wallet_account_ids.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + wallet_account_ids == o.wallet_account_ids + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [wallet_account_ids].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/delete_wallets_request.rb b/turnkey_client/lib/turnkey_client/models/delete_wallets_request.rb index 4413977..29058b4 100644 --- a/turnkey_client/lib/turnkey_client/models/delete_wallets_request.rb +++ b/turnkey_client/lib/turnkey_client/models/delete_wallets_request.rb @@ -22,6 +22,8 @@ class DeleteWalletsRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/email_auth_customization_params.rb b/turnkey_client/lib/turnkey_client/models/email_auth_customization_params.rb new file mode 100644 index 0000000..624fb1e --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/email_auth_customization_params.rb @@ -0,0 +1,255 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class EmailAuthCustomizationParams + # The name of the application. This field is required and will be used in email notifications if an email template is not provided. + attr_accessor :app_name + + # A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px. + attr_accessor :logo_url + + # A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`. + attr_accessor :magic_link_template + + # JSON object containing key/value pairs to be used with custom templates. + attr_accessor :template_variables + + # Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template. + attr_accessor :template_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'app_name' => :'appName', + :'logo_url' => :'logoUrl', + :'magic_link_template' => :'magicLinkTemplate', + :'template_variables' => :'templateVariables', + :'template_id' => :'templateId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'app_name' => :'Object', + :'logo_url' => :'Object', + :'magic_link_template' => :'Object', + :'template_variables' => :'Object', + :'template_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'logo_url', + :'magic_link_template', + :'template_variables', + :'template_id' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::EmailAuthCustomizationParams` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::EmailAuthCustomizationParams`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'app_name') + self.app_name = attributes[:'app_name'] + end + + if attributes.key?(:'logo_url') + self.logo_url = attributes[:'logo_url'] + end + + if attributes.key?(:'magic_link_template') + self.magic_link_template = attributes[:'magic_link_template'] + end + + if attributes.key?(:'template_variables') + self.template_variables = attributes[:'template_variables'] + end + + if attributes.key?(:'template_id') + self.template_id = attributes[:'template_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @app_name.nil? + invalid_properties.push('invalid value for "app_name", app_name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @app_name.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + app_name == o.app_name && + logo_url == o.logo_url && + magic_link_template == o.magic_link_template && + template_variables == o.template_variables && + template_id == o.template_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [app_name, logo_url, magic_link_template, template_variables, template_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/email_auth_intent_v3.rb b/turnkey_client/lib/turnkey_client/models/email_auth_intent_v3.rb new file mode 100644 index 0000000..2d9e9db --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/email_auth_intent_v3.rb @@ -0,0 +1,306 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class EmailAuthIntentV3 + # Email of the authenticating user. + attr_accessor :email + + # Client-side public key generated by the user, to which the email auth bundle (credentials) will be encrypted. + attr_accessor :target_public_key + + # Optional human-readable name for an API Key. If none provided, default to Email Auth - + attr_accessor :api_key_name + + # Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used. + attr_accessor :expiration_seconds + + attr_accessor :email_customization + + # Invalidate all other previously generated Email Auth API keys + attr_accessor :invalidate_existing + + # Optional custom email address from which to send the email + attr_accessor :send_from_email_address + + # Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications' + attr_accessor :send_from_email_sender_name + + # Optional custom email address to use as reply-to + attr_accessor :reply_to_email_address + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'email' => :'email', + :'target_public_key' => :'targetPublicKey', + :'api_key_name' => :'apiKeyName', + :'expiration_seconds' => :'expirationSeconds', + :'email_customization' => :'emailCustomization', + :'invalidate_existing' => :'invalidateExisting', + :'send_from_email_address' => :'sendFromEmailAddress', + :'send_from_email_sender_name' => :'sendFromEmailSenderName', + :'reply_to_email_address' => :'replyToEmailAddress' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'email' => :'Object', + :'target_public_key' => :'Object', + :'api_key_name' => :'Object', + :'expiration_seconds' => :'Object', + :'email_customization' => :'Object', + :'invalidate_existing' => :'Object', + :'send_from_email_address' => :'Object', + :'send_from_email_sender_name' => :'Object', + :'reply_to_email_address' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'api_key_name', + :'expiration_seconds', + :'invalidate_existing', + :'send_from_email_address', + :'send_from_email_sender_name', + :'reply_to_email_address' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::EmailAuthIntentV3` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::EmailAuthIntentV3`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'target_public_key') + self.target_public_key = attributes[:'target_public_key'] + end + + if attributes.key?(:'api_key_name') + self.api_key_name = attributes[:'api_key_name'] + end + + if attributes.key?(:'expiration_seconds') + self.expiration_seconds = attributes[:'expiration_seconds'] + end + + if attributes.key?(:'email_customization') + self.email_customization = attributes[:'email_customization'] + end + + if attributes.key?(:'invalidate_existing') + self.invalidate_existing = attributes[:'invalidate_existing'] + end + + if attributes.key?(:'send_from_email_address') + self.send_from_email_address = attributes[:'send_from_email_address'] + end + + if attributes.key?(:'send_from_email_sender_name') + self.send_from_email_sender_name = attributes[:'send_from_email_sender_name'] + end + + if attributes.key?(:'reply_to_email_address') + self.reply_to_email_address = attributes[:'reply_to_email_address'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @email.nil? + invalid_properties.push('invalid value for "email", email cannot be nil.') + end + + if @target_public_key.nil? + invalid_properties.push('invalid value for "target_public_key", target_public_key cannot be nil.') + end + + if @email_customization.nil? + invalid_properties.push('invalid value for "email_customization", email_customization cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @email.nil? + return false if @target_public_key.nil? + return false if @email_customization.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + email == o.email && + target_public_key == o.target_public_key && + api_key_name == o.api_key_name && + expiration_seconds == o.expiration_seconds && + email_customization == o.email_customization && + invalidate_existing == o.invalidate_existing && + send_from_email_address == o.send_from_email_address && + send_from_email_sender_name == o.send_from_email_sender_name && + reply_to_email_address == o.reply_to_email_address + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [email, target_public_key, api_key_name, expiration_seconds, email_customization, invalidate_existing, send_from_email_address, send_from_email_sender_name, reply_to_email_address].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/email_auth_request.rb b/turnkey_client/lib/turnkey_client/models/email_auth_request.rb index 4b89f59..c43517a 100644 --- a/turnkey_client/lib/turnkey_client/models/email_auth_request.rb +++ b/turnkey_client/lib/turnkey_client/models/email_auth_request.rb @@ -22,6 +22,8 @@ class EmailAuthRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -129,7 +138,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @type.nil? - type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_EMAIL_AUTH_V2']) + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_EMAIL_AUTH_V3']) return false unless type_validator.valid?(@type) return false if @timestamp_ms.nil? return false if @organization_id.nil? @@ -140,7 +149,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_EMAIL_AUTH_V2']) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_EMAIL_AUTH_V3']) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/email_customization_params_v2.rb b/turnkey_client/lib/turnkey_client/models/email_customization_params_v2.rb new file mode 100644 index 0000000..a1dbd87 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/email_customization_params_v2.rb @@ -0,0 +1,240 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class EmailCustomizationParamsV2 + # A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px. + attr_accessor :logo_url + + # A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`. + attr_accessor :magic_link_template + + # JSON object containing key/value pairs to be used with custom templates. + attr_accessor :template_variables + + # Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template. + attr_accessor :template_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'logo_url' => :'logoUrl', + :'magic_link_template' => :'magicLinkTemplate', + :'template_variables' => :'templateVariables', + :'template_id' => :'templateId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'logo_url' => :'Object', + :'magic_link_template' => :'Object', + :'template_variables' => :'Object', + :'template_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'logo_url', + :'magic_link_template', + :'template_variables', + :'template_id' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::EmailCustomizationParamsV2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::EmailCustomizationParamsV2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'logo_url') + self.logo_url = attributes[:'logo_url'] + end + + if attributes.key?(:'magic_link_template') + self.magic_link_template = attributes[:'magic_link_template'] + end + + if attributes.key?(:'template_variables') + self.template_variables = attributes[:'template_variables'] + end + + if attributes.key?(:'template_id') + self.template_id = attributes[:'template_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + logo_url == o.logo_url && + magic_link_template == o.magic_link_template && + template_variables == o.template_variables && + template_id == o.template_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [logo_url, magic_link_template, template_variables, template_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/eth_send_raw_transaction_intent.rb b/turnkey_client/lib/turnkey_client/models/eth_send_raw_transaction_intent.rb new file mode 100644 index 0000000..7f25584 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/eth_send_raw_transaction_intent.rb @@ -0,0 +1,260 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class EthSendRawTransactionIntent + # The raw, signed transaction to be sent. + attr_accessor :signed_transaction + + # CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet). + attr_accessor :caip2 + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'signed_transaction' => :'signedTransaction', + :'caip2' => :'caip2' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'signed_transaction' => :'Object', + :'caip2' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::EthSendRawTransactionIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::EthSendRawTransactionIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'signed_transaction') + self.signed_transaction = attributes[:'signed_transaction'] + end + + if attributes.key?(:'caip2') + self.caip2 = attributes[:'caip2'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @signed_transaction.nil? + invalid_properties.push('invalid value for "signed_transaction", signed_transaction cannot be nil.') + end + + if @caip2.nil? + invalid_properties.push('invalid value for "caip2", caip2 cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @signed_transaction.nil? + return false if @caip2.nil? + caip2_validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532']) + return false unless caip2_validator.valid?(@caip2) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] caip2 Object to be assigned + def caip2=(caip2) + validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532']) + unless validator.valid?(caip2) + fail ArgumentError, "invalid value for \"caip2\", must be one of #{validator.allowable_values}." + end + @caip2 = caip2 + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + signed_transaction == o.signed_transaction && + caip2 == o.caip2 + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [signed_transaction, caip2].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/eth_send_raw_transaction_result.rb b/turnkey_client/lib/turnkey_client/models/eth_send_raw_transaction_result.rb new file mode 100644 index 0000000..7a06519 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/eth_send_raw_transaction_result.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class EthSendRawTransactionResult + # The transaction hash of the sent transaction + attr_accessor :transaction_hash + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'transaction_hash' => :'transactionHash' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'transaction_hash' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::EthSendRawTransactionResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::EthSendRawTransactionResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'transaction_hash') + self.transaction_hash = attributes[:'transaction_hash'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @transaction_hash.nil? + invalid_properties.push('invalid value for "transaction_hash", transaction_hash cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @transaction_hash.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + transaction_hash == o.transaction_hash + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [transaction_hash].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/eth_send_transaction_intent.rb b/turnkey_client/lib/turnkey_client/models/eth_send_transaction_intent.rb new file mode 100644 index 0000000..8798651 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/eth_send_transaction_intent.rb @@ -0,0 +1,363 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class EthSendTransactionIntent + # A wallet or private key address to sign with. This does not support private key IDs. + attr_accessor :from + + # Whether to sponsor this transaction via Gas Station. + attr_accessor :sponsor + + # CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet). + attr_accessor :caip2 + + # Recipient address as a hex string with 0x prefix. + attr_accessor :to + + # Amount of native asset to send in wei. + attr_accessor :value + + # Hex-encoded call data for contract interactions. + attr_accessor :data + + # Transaction nonce, for EIP-1559 and Turnkey Gas Station authorizations. + attr_accessor :nonce + + # Maximum amount of gas to use for this transaction, for EIP-1559 transactions. + attr_accessor :gas_limit + + # Maximum total fee per gas unit (base fee + priority fee) in wei. Required for non-sponsored (EIP-1559) transactions. Not used for sponsored transactions. + attr_accessor :max_fee_per_gas + + # Maximum priority fee (tip) per gas unit in wei. Required for non-sponsored (EIP-1559) transactions. Not used for sponsored transactions. + attr_accessor :max_priority_fee_per_gas + + # The gas station delegate contract nonce. Only used when sponsor=true. Include this if you want maximal security posture. + attr_accessor :gas_station_nonce + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'from' => :'from', + :'sponsor' => :'sponsor', + :'caip2' => :'caip2', + :'to' => :'to', + :'value' => :'value', + :'data' => :'data', + :'nonce' => :'nonce', + :'gas_limit' => :'gasLimit', + :'max_fee_per_gas' => :'maxFeePerGas', + :'max_priority_fee_per_gas' => :'maxPriorityFeePerGas', + :'gas_station_nonce' => :'gasStationNonce' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'from' => :'Object', + :'sponsor' => :'Object', + :'caip2' => :'Object', + :'to' => :'Object', + :'value' => :'Object', + :'data' => :'Object', + :'nonce' => :'Object', + :'gas_limit' => :'Object', + :'max_fee_per_gas' => :'Object', + :'max_priority_fee_per_gas' => :'Object', + :'gas_station_nonce' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'sponsor', + :'value', + :'data', + :'nonce', + :'gas_limit', + :'max_fee_per_gas', + :'max_priority_fee_per_gas', + :'gas_station_nonce' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::EthSendTransactionIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::EthSendTransactionIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'sponsor') + self.sponsor = attributes[:'sponsor'] + end + + if attributes.key?(:'caip2') + self.caip2 = attributes[:'caip2'] + end + + if attributes.key?(:'to') + self.to = attributes[:'to'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + + if attributes.key?(:'nonce') + self.nonce = attributes[:'nonce'] + end + + if attributes.key?(:'gas_limit') + self.gas_limit = attributes[:'gas_limit'] + end + + if attributes.key?(:'max_fee_per_gas') + self.max_fee_per_gas = attributes[:'max_fee_per_gas'] + end + + if attributes.key?(:'max_priority_fee_per_gas') + self.max_priority_fee_per_gas = attributes[:'max_priority_fee_per_gas'] + end + + if attributes.key?(:'gas_station_nonce') + self.gas_station_nonce = attributes[:'gas_station_nonce'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @from.nil? + invalid_properties.push('invalid value for "from", from cannot be nil.') + end + + if @caip2.nil? + invalid_properties.push('invalid value for "caip2", caip2 cannot be nil.') + end + + if @to.nil? + invalid_properties.push('invalid value for "to", to cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @from.nil? + return false if @caip2.nil? + caip2_validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002']) + return false unless caip2_validator.valid?(@caip2) + return false if @to.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] caip2 Object to be assigned + def caip2=(caip2) + validator = EnumAttributeValidator.new('Object', ['eip155:1', 'eip155:11155111', 'eip155:8453', 'eip155:84532', 'eip155:137', 'eip155:80002']) + unless validator.valid?(caip2) + fail ArgumentError, "invalid value for \"caip2\", must be one of #{validator.allowable_values}." + end + @caip2 = caip2 + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + from == o.from && + sponsor == o.sponsor && + caip2 == o.caip2 && + to == o.to && + value == o.value && + data == o.data && + nonce == o.nonce && + gas_limit == o.gas_limit && + max_fee_per_gas == o.max_fee_per_gas && + max_priority_fee_per_gas == o.max_priority_fee_per_gas && + gas_station_nonce == o.gas_station_nonce + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [from, sponsor, caip2, to, value, data, nonce, gas_limit, max_fee_per_gas, max_priority_fee_per_gas, gas_station_nonce].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/eth_send_transaction_request.rb b/turnkey_client/lib/turnkey_client/models/eth_send_transaction_request.rb new file mode 100644 index 0000000..f58659d --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/eth_send_transaction_request.rb @@ -0,0 +1,298 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class EthSendTransactionRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + attr_accessor :generate_app_proofs + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'generate_app_proofs' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::EthSendTransactionRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::EthSendTransactionRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_ETH_SEND_TRANSACTION']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_ETH_SEND_TRANSACTION']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/eth_send_transaction_result.rb b/turnkey_client/lib/turnkey_client/models/eth_send_transaction_result.rb new file mode 100644 index 0000000..08bd7f3 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/eth_send_transaction_result.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class EthSendTransactionResult + # The send_transaction_status ID associated with the transaction submission + attr_accessor :send_transaction_status_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'send_transaction_status_id' => :'sendTransactionStatusId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'send_transaction_status_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::EthSendTransactionResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::EthSendTransactionResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'send_transaction_status_id') + self.send_transaction_status_id = attributes[:'send_transaction_status_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @send_transaction_status_id.nil? + invalid_properties.push('invalid value for "send_transaction_status_id", send_transaction_status_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @send_transaction_status_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + send_transaction_status_id == o.send_transaction_status_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [send_transaction_status_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/eth_send_transaction_status.rb b/turnkey_client/lib/turnkey_client/models/eth_send_transaction_status.rb new file mode 100644 index 0000000..62a89df --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/eth_send_transaction_status.rb @@ -0,0 +1,207 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class EthSendTransactionStatus + # The Ethereum transaction hash, if available. + attr_accessor :tx_hash + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'tx_hash' => :'txHash' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'tx_hash' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'tx_hash' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::EthSendTransactionStatus` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::EthSendTransactionStatus`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'tx_hash') + self.tx_hash = attributes[:'tx_hash'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + tx_hash == o.tx_hash + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [tx_hash].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/export_private_key_request.rb b/turnkey_client/lib/turnkey_client/models/export_private_key_request.rb index 8f7a40b..fb7c26a 100644 --- a/turnkey_client/lib/turnkey_client/models/export_private_key_request.rb +++ b/turnkey_client/lib/turnkey_client/models/export_private_key_request.rb @@ -22,6 +22,8 @@ class ExportPrivateKeyRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/export_wallet_account_request.rb b/turnkey_client/lib/turnkey_client/models/export_wallet_account_request.rb index 5379186..f8ec7af 100644 --- a/turnkey_client/lib/turnkey_client/models/export_wallet_account_request.rb +++ b/turnkey_client/lib/turnkey_client/models/export_wallet_account_request.rb @@ -22,6 +22,8 @@ class ExportWalletAccountRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/export_wallet_request.rb b/turnkey_client/lib/turnkey_client/models/export_wallet_request.rb index 0bdb7ab..d2f22f0 100644 --- a/turnkey_client/lib/turnkey_client/models/export_wallet_request.rb +++ b/turnkey_client/lib/turnkey_client/models/export_wallet_request.rb @@ -22,6 +22,8 @@ class ExportWalletRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/fiat_on_ramp_credential.rb b/turnkey_client/lib/turnkey_client/models/fiat_on_ramp_credential.rb new file mode 100644 index 0000000..9fd0bad --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/fiat_on_ramp_credential.rb @@ -0,0 +1,330 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class FiatOnRampCredential + # Unique identifier for a given Fiat On-Ramp Credential. + attr_accessor :fiat_onramp_credential_id + + # Unique identifier for an Organization. + attr_accessor :organization_id + + attr_accessor :onramp_provider + + # Project ID for the on-ramp provider. Some providers, like Coinbase, require this additional identifier. + attr_accessor :project_id + + # Publishable API key for the on-ramp provider. + attr_accessor :publishable_api_key + + # Secret API key for the on-ramp provider encrypted to our on-ramp encryption public key. + attr_accessor :encrypted_secret_api_key + + # Private API key for the on-ramp provider encrypted to our on-ramp encryption public key. Some providers, like Coinbase, require this additional key. + attr_accessor :encrypted_private_api_key + + # If the on-ramp credential is a sandbox credential. + attr_accessor :sandbox_mode + + attr_accessor :created_at + + attr_accessor :updated_at + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fiat_onramp_credential_id' => :'fiatOnrampCredentialId', + :'organization_id' => :'organizationId', + :'onramp_provider' => :'onrampProvider', + :'project_id' => :'projectId', + :'publishable_api_key' => :'publishableApiKey', + :'encrypted_secret_api_key' => :'encryptedSecretApiKey', + :'encrypted_private_api_key' => :'encryptedPrivateApiKey', + :'sandbox_mode' => :'sandboxMode', + :'created_at' => :'createdAt', + :'updated_at' => :'updatedAt' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'fiat_onramp_credential_id' => :'Object', + :'organization_id' => :'Object', + :'onramp_provider' => :'Object', + :'project_id' => :'Object', + :'publishable_api_key' => :'Object', + :'encrypted_secret_api_key' => :'Object', + :'encrypted_private_api_key' => :'Object', + :'sandbox_mode' => :'Object', + :'created_at' => :'Object', + :'updated_at' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'project_id', + :'encrypted_private_api_key', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::FiatOnRampCredential` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::FiatOnRampCredential`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'fiat_onramp_credential_id') + self.fiat_onramp_credential_id = attributes[:'fiat_onramp_credential_id'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'onramp_provider') + self.onramp_provider = attributes[:'onramp_provider'] + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + end + + if attributes.key?(:'publishable_api_key') + self.publishable_api_key = attributes[:'publishable_api_key'] + end + + if attributes.key?(:'encrypted_secret_api_key') + self.encrypted_secret_api_key = attributes[:'encrypted_secret_api_key'] + end + + if attributes.key?(:'encrypted_private_api_key') + self.encrypted_private_api_key = attributes[:'encrypted_private_api_key'] + end + + if attributes.key?(:'sandbox_mode') + self.sandbox_mode = attributes[:'sandbox_mode'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @fiat_onramp_credential_id.nil? + invalid_properties.push('invalid value for "fiat_onramp_credential_id", fiat_onramp_credential_id cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @onramp_provider.nil? + invalid_properties.push('invalid value for "onramp_provider", onramp_provider cannot be nil.') + end + + if @publishable_api_key.nil? + invalid_properties.push('invalid value for "publishable_api_key", publishable_api_key cannot be nil.') + end + + if @encrypted_secret_api_key.nil? + invalid_properties.push('invalid value for "encrypted_secret_api_key", encrypted_secret_api_key cannot be nil.') + end + + if @created_at.nil? + invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') + end + + if @updated_at.nil? + invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @fiat_onramp_credential_id.nil? + return false if @organization_id.nil? + return false if @onramp_provider.nil? + return false if @publishable_api_key.nil? + return false if @encrypted_secret_api_key.nil? + return false if @created_at.nil? + return false if @updated_at.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + fiat_onramp_credential_id == o.fiat_onramp_credential_id && + organization_id == o.organization_id && + onramp_provider == o.onramp_provider && + project_id == o.project_id && + publishable_api_key == o.publishable_api_key && + encrypted_secret_api_key == o.encrypted_secret_api_key && + encrypted_private_api_key == o.encrypted_private_api_key && + sandbox_mode == o.sandbox_mode && + created_at == o.created_at && + updated_at == o.updated_at + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [fiat_onramp_credential_id, organization_id, onramp_provider, project_id, publishable_api_key, encrypted_secret_api_key, encrypted_private_api_key, sandbox_mode, created_at, updated_at].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/get_gas_usage_request.rb b/turnkey_client/lib/turnkey_client/models/get_gas_usage_request.rb new file mode 100644 index 0000000..7cb147f --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_gas_usage_request.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetGasUsageRequest + # Unique identifier for a given Organization. + attr_accessor :organization_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'organization_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetGasUsageRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetGasUsageRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @organization_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_id == o.organization_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [organization_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/get_gas_usage_response.rb b/turnkey_client/lib/turnkey_client/models/get_gas_usage_response.rb new file mode 100644 index 0000000..d997de8 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_gas_usage_response.rb @@ -0,0 +1,241 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetGasUsageResponse + # The window duration (in minutes) for the organization or sub-organization. + attr_accessor :window_duration_minutes + + # The window limit (in USD) for the organization or sub-organization. + attr_accessor :window_limit_usd + + # The total gas usage (in USD) of all sponsored transactions processed over the last `window_duration_minutes` + attr_accessor :usage_usd + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'window_duration_minutes' => :'windowDurationMinutes', + :'window_limit_usd' => :'windowLimitUsd', + :'usage_usd' => :'usageUsd' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'window_duration_minutes' => :'Object', + :'window_limit_usd' => :'Object', + :'usage_usd' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetGasUsageResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetGasUsageResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'window_duration_minutes') + self.window_duration_minutes = attributes[:'window_duration_minutes'] + end + + if attributes.key?(:'window_limit_usd') + self.window_limit_usd = attributes[:'window_limit_usd'] + end + + if attributes.key?(:'usage_usd') + self.usage_usd = attributes[:'usage_usd'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @window_duration_minutes.nil? + invalid_properties.push('invalid value for "window_duration_minutes", window_duration_minutes cannot be nil.') + end + + if @window_limit_usd.nil? + invalid_properties.push('invalid value for "window_limit_usd", window_limit_usd cannot be nil.') + end + + if @usage_usd.nil? + invalid_properties.push('invalid value for "usage_usd", usage_usd cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @window_duration_minutes.nil? + return false if @window_limit_usd.nil? + return false if @usage_usd.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + window_duration_minutes == o.window_duration_minutes && + window_limit_usd == o.window_limit_usd && + usage_usd == o.usage_usd + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [window_duration_minutes, window_limit_usd, usage_usd].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/get_nonces_request.rb b/turnkey_client/lib/turnkey_client/models/get_nonces_request.rb new file mode 100644 index 0000000..ad42006 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_nonces_request.rb @@ -0,0 +1,261 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetNoncesRequest + # Unique identifier for a given Organization. + attr_accessor :organization_id + + # The Ethereum address to query nonces for. + attr_accessor :address + + # The network identifier in CAIP-2 format (e.g., 'eip155:1' for Ethereum mainnet). + attr_accessor :caip2 + + # Whether to fetch the standard on-chain nonce. + attr_accessor :nonce + + # Whether to fetch the gas station nonce used for sponsored transactions. + attr_accessor :gas_station_nonce + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId', + :'address' => :'address', + :'caip2' => :'caip2', + :'nonce' => :'nonce', + :'gas_station_nonce' => :'gasStationNonce' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'organization_id' => :'Object', + :'address' => :'Object', + :'caip2' => :'Object', + :'nonce' => :'Object', + :'gas_station_nonce' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetNoncesRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetNoncesRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'caip2') + self.caip2 = attributes[:'caip2'] + end + + if attributes.key?(:'nonce') + self.nonce = attributes[:'nonce'] + end + + if attributes.key?(:'gas_station_nonce') + self.gas_station_nonce = attributes[:'gas_station_nonce'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @address.nil? + invalid_properties.push('invalid value for "address", address cannot be nil.') + end + + if @caip2.nil? + invalid_properties.push('invalid value for "caip2", caip2 cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @organization_id.nil? + return false if @address.nil? + return false if @caip2.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_id == o.organization_id && + address == o.address && + caip2 == o.caip2 && + nonce == o.nonce && + gas_station_nonce == o.gas_station_nonce + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [organization_id, address, caip2, nonce, gas_station_nonce].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/get_nonces_response.rb b/turnkey_client/lib/turnkey_client/models/get_nonces_response.rb new file mode 100644 index 0000000..0bb8a34 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_nonces_response.rb @@ -0,0 +1,218 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetNoncesResponse + # The standard on-chain nonce for the address, if requested. + attr_accessor :nonce + + # The gas station nonce for sponsored transactions, if requested. + attr_accessor :gas_station_nonce + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'nonce' => :'nonce', + :'gas_station_nonce' => :'gasStationNonce' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'nonce' => :'Object', + :'gas_station_nonce' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'nonce', + :'gas_station_nonce' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetNoncesResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetNoncesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'nonce') + self.nonce = attributes[:'nonce'] + end + + if attributes.key?(:'gas_station_nonce') + self.gas_station_nonce = attributes[:'gas_station_nonce'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + nonce == o.nonce && + gas_station_nonce == o.gas_station_nonce + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [nonce, gas_station_nonce].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/get_on_ramp_transaction_status_request.rb b/turnkey_client/lib/turnkey_client/models/get_on_ramp_transaction_status_request.rb new file mode 100644 index 0000000..c23b5a0 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_on_ramp_transaction_status_request.rb @@ -0,0 +1,237 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetOnRampTransactionStatusRequest + # Unique identifier for a given organization. + attr_accessor :organization_id + + # The unique identifier for the fiat on ramp transaction. + attr_accessor :transaction_id + + # Optional flag to specify if the transaction status should be refreshed from the fiat on ramp provider. Default = false. + attr_accessor :refresh + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId', + :'transaction_id' => :'transactionId', + :'refresh' => :'refresh' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'organization_id' => :'Object', + :'transaction_id' => :'Object', + :'refresh' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'refresh' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetOnRampTransactionStatusRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetOnRampTransactionStatusRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'transaction_id') + self.transaction_id = attributes[:'transaction_id'] + end + + if attributes.key?(:'refresh') + self.refresh = attributes[:'refresh'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @transaction_id.nil? + invalid_properties.push('invalid value for "transaction_id", transaction_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @organization_id.nil? + return false if @transaction_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_id == o.organization_id && + transaction_id == o.transaction_id && + refresh == o.refresh + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [organization_id, transaction_id, refresh].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/get_on_ramp_transaction_status_response.rb b/turnkey_client/lib/turnkey_client/models/get_on_ramp_transaction_status_response.rb new file mode 100644 index 0000000..de59f8f --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_on_ramp_transaction_status_response.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetOnRampTransactionStatusResponse + # The status of the fiat on ramp transaction. + attr_accessor :transaction_status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'transaction_status' => :'transactionStatus' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'transaction_status' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetOnRampTransactionStatusResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetOnRampTransactionStatusResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'transaction_status') + self.transaction_status = attributes[:'transaction_status'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @transaction_status.nil? + invalid_properties.push('invalid value for "transaction_status", transaction_status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @transaction_status.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + transaction_status == o.transaction_status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [transaction_status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/get_send_transaction_status_request.rb b/turnkey_client/lib/turnkey_client/models/get_send_transaction_status_request.rb new file mode 100644 index 0000000..68b67f4 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_send_transaction_status_request.rb @@ -0,0 +1,226 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetSendTransactionStatusRequest + # Unique identifier for a given organization. + attr_accessor :organization_id + + # The unique identifier of a send transaction request. + attr_accessor :send_transaction_status_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId', + :'send_transaction_status_id' => :'sendTransactionStatusId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'organization_id' => :'Object', + :'send_transaction_status_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetSendTransactionStatusRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetSendTransactionStatusRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'send_transaction_status_id') + self.send_transaction_status_id = attributes[:'send_transaction_status_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @send_transaction_status_id.nil? + invalid_properties.push('invalid value for "send_transaction_status_id", send_transaction_status_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @organization_id.nil? + return false if @send_transaction_status_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_id == o.organization_id && + send_transaction_status_id == o.send_transaction_status_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [organization_id, send_transaction_status_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/get_send_transaction_status_response.rb b/turnkey_client/lib/turnkey_client/models/get_send_transaction_status_response.rb new file mode 100644 index 0000000..8746646 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/get_send_transaction_status_response.rb @@ -0,0 +1,240 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class GetSendTransactionStatusResponse + # The current status of the send transaction. + attr_accessor :tx_status + + attr_accessor :eth + + # The error encountered when broadcasting or confirming the transaction, if any. + attr_accessor :tx_error + + attr_accessor :error + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'tx_status' => :'txStatus', + :'eth' => :'eth', + :'tx_error' => :'txError', + :'error' => :'error' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'tx_status' => :'Object', + :'eth' => :'Object', + :'tx_error' => :'Object', + :'error' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'tx_error', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::GetSendTransactionStatusResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::GetSendTransactionStatusResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'tx_status') + self.tx_status = attributes[:'tx_status'] + end + + if attributes.key?(:'eth') + self.eth = attributes[:'eth'] + end + + if attributes.key?(:'tx_error') + self.tx_error = attributes[:'tx_error'] + end + + if attributes.key?(:'error') + self.error = attributes[:'error'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @tx_status.nil? + invalid_properties.push('invalid value for "tx_status", tx_status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @tx_status.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + tx_status == o.tx_status && + eth == o.eth && + tx_error == o.tx_error && + error == o.error + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [tx_status, eth, tx_error, error].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/import_private_key_request.rb b/turnkey_client/lib/turnkey_client/models/import_private_key_request.rb index 8a316a4..c5d49c6 100644 --- a/turnkey_client/lib/turnkey_client/models/import_private_key_request.rb +++ b/turnkey_client/lib/turnkey_client/models/import_private_key_request.rb @@ -22,6 +22,8 @@ class ImportPrivateKeyRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/import_wallet_request.rb b/turnkey_client/lib/turnkey_client/models/import_wallet_request.rb index 4f00e4a..92eb182 100644 --- a/turnkey_client/lib/turnkey_client/models/import_wallet_request.rb +++ b/turnkey_client/lib/turnkey_client/models/import_wallet_request.rb @@ -22,6 +22,8 @@ class ImportWalletRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/init_fiat_on_ramp_request.rb b/turnkey_client/lib/turnkey_client/models/init_fiat_on_ramp_request.rb index 45d1eb8..9abb2af 100644 --- a/turnkey_client/lib/turnkey_client/models/init_fiat_on_ramp_request.rb +++ b/turnkey_client/lib/turnkey_client/models/init_fiat_on_ramp_request.rb @@ -22,6 +22,8 @@ class InitFiatOnRampRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/init_import_private_key_request.rb b/turnkey_client/lib/turnkey_client/models/init_import_private_key_request.rb index ecb6a3b..ac94cc1 100644 --- a/turnkey_client/lib/turnkey_client/models/init_import_private_key_request.rb +++ b/turnkey_client/lib/turnkey_client/models/init_import_private_key_request.rb @@ -22,6 +22,8 @@ class InitImportPrivateKeyRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/init_import_wallet_request.rb b/turnkey_client/lib/turnkey_client/models/init_import_wallet_request.rb index 6f07802..5c5f834 100644 --- a/turnkey_client/lib/turnkey_client/models/init_import_wallet_request.rb +++ b/turnkey_client/lib/turnkey_client/models/init_import_wallet_request.rb @@ -22,6 +22,8 @@ class InitImportWalletRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/init_otp_auth_intent_v3.rb b/turnkey_client/lib/turnkey_client/models/init_otp_auth_intent_v3.rb new file mode 100644 index 0000000..b922ceb --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/init_otp_auth_intent_v3.rb @@ -0,0 +1,336 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class InitOtpAuthIntentV3 + # Whether to send OTP via SMS or email. Possible values: OTP_TYPE_SMS, OTP_TYPE_EMAIL + attr_accessor :otp_type + + # Email or phone number to send the OTP code to + attr_accessor :contact + + # Optional length of the OTP code. Default = 9 + attr_accessor :otp_length + + # The name of the application. This field is required and will be used in email notifications if an email template is not provided. + attr_accessor :app_name + + attr_accessor :email_customization + + attr_accessor :sms_customization + + # Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address. + attr_accessor :user_identifier + + # Optional custom email address from which to send the OTP email + attr_accessor :send_from_email_address + + # Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). Default = true + attr_accessor :alphanumeric + + # Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications' + attr_accessor :send_from_email_sender_name + + # Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes) + attr_accessor :expiration_seconds + + # Optional custom email address to use as reply-to + attr_accessor :reply_to_email_address + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'otp_type' => :'otpType', + :'contact' => :'contact', + :'otp_length' => :'otpLength', + :'app_name' => :'appName', + :'email_customization' => :'emailCustomization', + :'sms_customization' => :'smsCustomization', + :'user_identifier' => :'userIdentifier', + :'send_from_email_address' => :'sendFromEmailAddress', + :'alphanumeric' => :'alphanumeric', + :'send_from_email_sender_name' => :'sendFromEmailSenderName', + :'expiration_seconds' => :'expirationSeconds', + :'reply_to_email_address' => :'replyToEmailAddress' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'otp_type' => :'Object', + :'contact' => :'Object', + :'otp_length' => :'Object', + :'app_name' => :'Object', + :'email_customization' => :'Object', + :'sms_customization' => :'Object', + :'user_identifier' => :'Object', + :'send_from_email_address' => :'Object', + :'alphanumeric' => :'Object', + :'send_from_email_sender_name' => :'Object', + :'expiration_seconds' => :'Object', + :'reply_to_email_address' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'otp_length', + :'user_identifier', + :'send_from_email_address', + :'alphanumeric', + :'send_from_email_sender_name', + :'expiration_seconds', + :'reply_to_email_address' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::InitOtpAuthIntentV3` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::InitOtpAuthIntentV3`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'otp_type') + self.otp_type = attributes[:'otp_type'] + end + + if attributes.key?(:'contact') + self.contact = attributes[:'contact'] + end + + if attributes.key?(:'otp_length') + self.otp_length = attributes[:'otp_length'] + end + + if attributes.key?(:'app_name') + self.app_name = attributes[:'app_name'] + end + + if attributes.key?(:'email_customization') + self.email_customization = attributes[:'email_customization'] + end + + if attributes.key?(:'sms_customization') + self.sms_customization = attributes[:'sms_customization'] + end + + if attributes.key?(:'user_identifier') + self.user_identifier = attributes[:'user_identifier'] + end + + if attributes.key?(:'send_from_email_address') + self.send_from_email_address = attributes[:'send_from_email_address'] + end + + if attributes.key?(:'alphanumeric') + self.alphanumeric = attributes[:'alphanumeric'] + end + + if attributes.key?(:'send_from_email_sender_name') + self.send_from_email_sender_name = attributes[:'send_from_email_sender_name'] + end + + if attributes.key?(:'expiration_seconds') + self.expiration_seconds = attributes[:'expiration_seconds'] + end + + if attributes.key?(:'reply_to_email_address') + self.reply_to_email_address = attributes[:'reply_to_email_address'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @otp_type.nil? + invalid_properties.push('invalid value for "otp_type", otp_type cannot be nil.') + end + + if @contact.nil? + invalid_properties.push('invalid value for "contact", contact cannot be nil.') + end + + if @app_name.nil? + invalid_properties.push('invalid value for "app_name", app_name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @otp_type.nil? + return false if @contact.nil? + return false if @app_name.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + otp_type == o.otp_type && + contact == o.contact && + otp_length == o.otp_length && + app_name == o.app_name && + email_customization == o.email_customization && + sms_customization == o.sms_customization && + user_identifier == o.user_identifier && + send_from_email_address == o.send_from_email_address && + alphanumeric == o.alphanumeric && + send_from_email_sender_name == o.send_from_email_sender_name && + expiration_seconds == o.expiration_seconds && + reply_to_email_address == o.reply_to_email_address + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [otp_type, contact, otp_length, app_name, email_customization, sms_customization, user_identifier, send_from_email_address, alphanumeric, send_from_email_sender_name, expiration_seconds, reply_to_email_address].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/init_otp_auth_request.rb b/turnkey_client/lib/turnkey_client/models/init_otp_auth_request.rb index 7eefac0..f9ac3ed 100644 --- a/turnkey_client/lib/turnkey_client/models/init_otp_auth_request.rb +++ b/turnkey_client/lib/turnkey_client/models/init_otp_auth_request.rb @@ -22,6 +22,8 @@ class InitOtpAuthRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -129,7 +138,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @type.nil? - type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_INIT_OTP_AUTH_V2']) + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_INIT_OTP_AUTH_V3']) return false unless type_validator.valid?(@type) return false if @timestamp_ms.nil? return false if @organization_id.nil? @@ -140,7 +149,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_INIT_OTP_AUTH_V2']) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_INIT_OTP_AUTH_V3']) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/init_otp_intent_v2.rb b/turnkey_client/lib/turnkey_client/models/init_otp_intent_v2.rb new file mode 100644 index 0000000..097cd27 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/init_otp_intent_v2.rb @@ -0,0 +1,336 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class InitOtpIntentV2 + # Whether to send OTP via SMS or email. Possible values: OTP_TYPE_SMS, OTP_TYPE_EMAIL + attr_accessor :otp_type + + # Email or phone number to send the OTP code to + attr_accessor :contact + + # Optional length of the OTP code. Default = 9 + attr_accessor :otp_length + + # The name of the application. This field is required and will be used in email notifications if an email template is not provided. + attr_accessor :app_name + + attr_accessor :email_customization + + attr_accessor :sms_customization + + # Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address. + attr_accessor :user_identifier + + # Optional custom email address from which to send the OTP email + attr_accessor :send_from_email_address + + # Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). Default = true + attr_accessor :alphanumeric + + # Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications' + attr_accessor :send_from_email_sender_name + + # Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes) + attr_accessor :expiration_seconds + + # Optional custom email address to use as reply-to + attr_accessor :reply_to_email_address + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'otp_type' => :'otpType', + :'contact' => :'contact', + :'otp_length' => :'otpLength', + :'app_name' => :'appName', + :'email_customization' => :'emailCustomization', + :'sms_customization' => :'smsCustomization', + :'user_identifier' => :'userIdentifier', + :'send_from_email_address' => :'sendFromEmailAddress', + :'alphanumeric' => :'alphanumeric', + :'send_from_email_sender_name' => :'sendFromEmailSenderName', + :'expiration_seconds' => :'expirationSeconds', + :'reply_to_email_address' => :'replyToEmailAddress' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'otp_type' => :'Object', + :'contact' => :'Object', + :'otp_length' => :'Object', + :'app_name' => :'Object', + :'email_customization' => :'Object', + :'sms_customization' => :'Object', + :'user_identifier' => :'Object', + :'send_from_email_address' => :'Object', + :'alphanumeric' => :'Object', + :'send_from_email_sender_name' => :'Object', + :'expiration_seconds' => :'Object', + :'reply_to_email_address' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'otp_length', + :'user_identifier', + :'send_from_email_address', + :'alphanumeric', + :'send_from_email_sender_name', + :'expiration_seconds', + :'reply_to_email_address' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::InitOtpIntentV2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::InitOtpIntentV2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'otp_type') + self.otp_type = attributes[:'otp_type'] + end + + if attributes.key?(:'contact') + self.contact = attributes[:'contact'] + end + + if attributes.key?(:'otp_length') + self.otp_length = attributes[:'otp_length'] + end + + if attributes.key?(:'app_name') + self.app_name = attributes[:'app_name'] + end + + if attributes.key?(:'email_customization') + self.email_customization = attributes[:'email_customization'] + end + + if attributes.key?(:'sms_customization') + self.sms_customization = attributes[:'sms_customization'] + end + + if attributes.key?(:'user_identifier') + self.user_identifier = attributes[:'user_identifier'] + end + + if attributes.key?(:'send_from_email_address') + self.send_from_email_address = attributes[:'send_from_email_address'] + end + + if attributes.key?(:'alphanumeric') + self.alphanumeric = attributes[:'alphanumeric'] + end + + if attributes.key?(:'send_from_email_sender_name') + self.send_from_email_sender_name = attributes[:'send_from_email_sender_name'] + end + + if attributes.key?(:'expiration_seconds') + self.expiration_seconds = attributes[:'expiration_seconds'] + end + + if attributes.key?(:'reply_to_email_address') + self.reply_to_email_address = attributes[:'reply_to_email_address'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @otp_type.nil? + invalid_properties.push('invalid value for "otp_type", otp_type cannot be nil.') + end + + if @contact.nil? + invalid_properties.push('invalid value for "contact", contact cannot be nil.') + end + + if @app_name.nil? + invalid_properties.push('invalid value for "app_name", app_name cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @otp_type.nil? + return false if @contact.nil? + return false if @app_name.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + otp_type == o.otp_type && + contact == o.contact && + otp_length == o.otp_length && + app_name == o.app_name && + email_customization == o.email_customization && + sms_customization == o.sms_customization && + user_identifier == o.user_identifier && + send_from_email_address == o.send_from_email_address && + alphanumeric == o.alphanumeric && + send_from_email_sender_name == o.send_from_email_sender_name && + expiration_seconds == o.expiration_seconds && + reply_to_email_address == o.reply_to_email_address + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [otp_type, contact, otp_length, app_name, email_customization, sms_customization, user_identifier, send_from_email_address, alphanumeric, send_from_email_sender_name, expiration_seconds, reply_to_email_address].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/init_otp_request.rb b/turnkey_client/lib/turnkey_client/models/init_otp_request.rb index bc0e8ef..774e109 100644 --- a/turnkey_client/lib/turnkey_client/models/init_otp_request.rb +++ b/turnkey_client/lib/turnkey_client/models/init_otp_request.rb @@ -22,6 +22,8 @@ class InitOtpRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -129,7 +138,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @type.nil? - type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_INIT_OTP']) + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_INIT_OTP_V2']) return false unless type_validator.valid?(@type) return false if @timestamp_ms.nil? return false if @organization_id.nil? @@ -140,7 +149,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_INIT_OTP']) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_INIT_OTP_V2']) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/init_user_email_recovery_intent.rb b/turnkey_client/lib/turnkey_client/models/init_user_email_recovery_intent.rb index 64f4583..79ee1d5 100644 --- a/turnkey_client/lib/turnkey_client/models/init_user_email_recovery_intent.rb +++ b/turnkey_client/lib/turnkey_client/models/init_user_email_recovery_intent.rb @@ -23,13 +23,25 @@ class InitUserEmailRecoveryIntent attr_accessor :email_customization + # Optional custom email address from which to send the OTP email + attr_accessor :send_from_email_address + + # Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications' + attr_accessor :send_from_email_sender_name + + # Optional custom email address to use as reply-to + attr_accessor :reply_to_email_address + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'email' => :'email', :'target_public_key' => :'targetPublicKey', :'expiration_seconds' => :'expirationSeconds', - :'email_customization' => :'emailCustomization' + :'email_customization' => :'emailCustomization', + :'send_from_email_address' => :'sendFromEmailAddress', + :'send_from_email_sender_name' => :'sendFromEmailSenderName', + :'reply_to_email_address' => :'replyToEmailAddress' } end @@ -39,7 +51,10 @@ def self.openapi_types :'email' => :'Object', :'target_public_key' => :'Object', :'expiration_seconds' => :'Object', - :'email_customization' => :'Object' + :'email_customization' => :'Object', + :'send_from_email_address' => :'Object', + :'send_from_email_sender_name' => :'Object', + :'reply_to_email_address' => :'Object' } end @@ -47,6 +62,9 @@ def self.openapi_types def self.openapi_nullable Set.new([ :'expiration_seconds', + :'send_from_email_address', + :'send_from_email_sender_name', + :'reply_to_email_address' ]) end @@ -80,6 +98,18 @@ def initialize(attributes = {}) if attributes.key?(:'email_customization') self.email_customization = attributes[:'email_customization'] end + + if attributes.key?(:'send_from_email_address') + self.send_from_email_address = attributes[:'send_from_email_address'] + end + + if attributes.key?(:'send_from_email_sender_name') + self.send_from_email_sender_name = attributes[:'send_from_email_sender_name'] + end + + if attributes.key?(:'reply_to_email_address') + self.reply_to_email_address = attributes[:'reply_to_email_address'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -113,7 +143,10 @@ def ==(o) email == o.email && target_public_key == o.target_public_key && expiration_seconds == o.expiration_seconds && - email_customization == o.email_customization + email_customization == o.email_customization && + send_from_email_address == o.send_from_email_address && + send_from_email_sender_name == o.send_from_email_sender_name && + reply_to_email_address == o.reply_to_email_address end # @see the `==` method @@ -125,7 +158,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [email, target_public_key, expiration_seconds, email_customization].hash + [email, target_public_key, expiration_seconds, email_customization, send_from_email_address, send_from_email_sender_name, reply_to_email_address].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/init_user_email_recovery_intent_v2.rb b/turnkey_client/lib/turnkey_client/models/init_user_email_recovery_intent_v2.rb new file mode 100644 index 0000000..99daba9 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/init_user_email_recovery_intent_v2.rb @@ -0,0 +1,284 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class InitUserEmailRecoveryIntentV2 + # Email of the user starting recovery + attr_accessor :email + + # Client-side public key generated by the user, to which the recovery bundle will be encrypted. + attr_accessor :target_public_key + + # Expiration window (in seconds) indicating how long the recovery credential is valid for. If not provided, a default of 15 minutes will be used. + attr_accessor :expiration_seconds + + attr_accessor :email_customization + + # Optional custom email address from which to send the OTP email + attr_accessor :send_from_email_address + + # Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications' + attr_accessor :send_from_email_sender_name + + # Optional custom email address to use as reply-to + attr_accessor :reply_to_email_address + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'email' => :'email', + :'target_public_key' => :'targetPublicKey', + :'expiration_seconds' => :'expirationSeconds', + :'email_customization' => :'emailCustomization', + :'send_from_email_address' => :'sendFromEmailAddress', + :'send_from_email_sender_name' => :'sendFromEmailSenderName', + :'reply_to_email_address' => :'replyToEmailAddress' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'email' => :'Object', + :'target_public_key' => :'Object', + :'expiration_seconds' => :'Object', + :'email_customization' => :'Object', + :'send_from_email_address' => :'Object', + :'send_from_email_sender_name' => :'Object', + :'reply_to_email_address' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'expiration_seconds', + :'send_from_email_address', + :'send_from_email_sender_name', + :'reply_to_email_address' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::InitUserEmailRecoveryIntentV2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::InitUserEmailRecoveryIntentV2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'target_public_key') + self.target_public_key = attributes[:'target_public_key'] + end + + if attributes.key?(:'expiration_seconds') + self.expiration_seconds = attributes[:'expiration_seconds'] + end + + if attributes.key?(:'email_customization') + self.email_customization = attributes[:'email_customization'] + end + + if attributes.key?(:'send_from_email_address') + self.send_from_email_address = attributes[:'send_from_email_address'] + end + + if attributes.key?(:'send_from_email_sender_name') + self.send_from_email_sender_name = attributes[:'send_from_email_sender_name'] + end + + if attributes.key?(:'reply_to_email_address') + self.reply_to_email_address = attributes[:'reply_to_email_address'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @email.nil? + invalid_properties.push('invalid value for "email", email cannot be nil.') + end + + if @target_public_key.nil? + invalid_properties.push('invalid value for "target_public_key", target_public_key cannot be nil.') + end + + if @email_customization.nil? + invalid_properties.push('invalid value for "email_customization", email_customization cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @email.nil? + return false if @target_public_key.nil? + return false if @email_customization.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + email == o.email && + target_public_key == o.target_public_key && + expiration_seconds == o.expiration_seconds && + email_customization == o.email_customization && + send_from_email_address == o.send_from_email_address && + send_from_email_sender_name == o.send_from_email_sender_name && + reply_to_email_address == o.reply_to_email_address + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [email, target_public_key, expiration_seconds, email_customization, send_from_email_address, send_from_email_sender_name, reply_to_email_address].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/init_user_email_recovery_request.rb b/turnkey_client/lib/turnkey_client/models/init_user_email_recovery_request.rb index 1243304..089feb4 100644 --- a/turnkey_client/lib/turnkey_client/models/init_user_email_recovery_request.rb +++ b/turnkey_client/lib/turnkey_client/models/init_user_email_recovery_request.rb @@ -22,6 +22,8 @@ class InitUserEmailRecoveryRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -129,7 +138,7 @@ def list_invalid_properties # @return true if the model is valid def valid? return false if @type.nil? - type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY']) + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY_V2']) return false unless type_validator.valid?(@type) return false if @timestamp_ms.nil? return false if @organization_id.nil? @@ -140,7 +149,7 @@ def valid? # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY']) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY_V2']) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/intent.rb b/turnkey_client/lib/turnkey_client/models/intent.rb index 5c16869..1891f6b 100644 --- a/turnkey_client/lib/turnkey_client/models/intent.rb +++ b/turnkey_client/lib/turnkey_client/models/intent.rb @@ -214,6 +214,38 @@ class Intent attr_accessor :oauth2_authenticate_intent + attr_accessor :delete_wallet_accounts_intent + + attr_accessor :delete_policies_intent + + attr_accessor :eth_send_raw_transaction_intent + + attr_accessor :eth_send_transaction_intent + + attr_accessor :create_fiat_on_ramp_credential_intent + + attr_accessor :update_fiat_on_ramp_credential_intent + + attr_accessor :delete_fiat_on_ramp_credential_intent + + attr_accessor :email_auth_intent_v3 + + attr_accessor :init_user_email_recovery_intent_v2 + + attr_accessor :init_otp_intent_v2 + + attr_accessor :init_otp_auth_intent_v3 + + attr_accessor :upsert_gas_usage_config_intent + + attr_accessor :create_tvc_app_intent + + attr_accessor :create_tvc_deployment_intent + + attr_accessor :create_tvc_manifest_approvals_intent + + attr_accessor :sol_send_transaction_intent + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -317,7 +349,23 @@ def self.attribute_map :'create_oauth2_credential_intent' => :'createOauth2CredentialIntent', :'update_oauth2_credential_intent' => :'updateOauth2CredentialIntent', :'delete_oauth2_credential_intent' => :'deleteOauth2CredentialIntent', - :'oauth2_authenticate_intent' => :'oauth2AuthenticateIntent' + :'oauth2_authenticate_intent' => :'oauth2AuthenticateIntent', + :'delete_wallet_accounts_intent' => :'deleteWalletAccountsIntent', + :'delete_policies_intent' => :'deletePoliciesIntent', + :'eth_send_raw_transaction_intent' => :'ethSendRawTransactionIntent', + :'eth_send_transaction_intent' => :'ethSendTransactionIntent', + :'create_fiat_on_ramp_credential_intent' => :'createFiatOnRampCredentialIntent', + :'update_fiat_on_ramp_credential_intent' => :'updateFiatOnRampCredentialIntent', + :'delete_fiat_on_ramp_credential_intent' => :'deleteFiatOnRampCredentialIntent', + :'email_auth_intent_v3' => :'emailAuthIntentV3', + :'init_user_email_recovery_intent_v2' => :'initUserEmailRecoveryIntentV2', + :'init_otp_intent_v2' => :'initOtpIntentV2', + :'init_otp_auth_intent_v3' => :'initOtpAuthIntentV3', + :'upsert_gas_usage_config_intent' => :'upsertGasUsageConfigIntent', + :'create_tvc_app_intent' => :'createTvcAppIntent', + :'create_tvc_deployment_intent' => :'createTvcDeploymentIntent', + :'create_tvc_manifest_approvals_intent' => :'createTvcManifestApprovalsIntent', + :'sol_send_transaction_intent' => :'solSendTransactionIntent' } end @@ -424,7 +472,23 @@ def self.openapi_types :'create_oauth2_credential_intent' => :'Object', :'update_oauth2_credential_intent' => :'Object', :'delete_oauth2_credential_intent' => :'Object', - :'oauth2_authenticate_intent' => :'Object' + :'oauth2_authenticate_intent' => :'Object', + :'delete_wallet_accounts_intent' => :'Object', + :'delete_policies_intent' => :'Object', + :'eth_send_raw_transaction_intent' => :'Object', + :'eth_send_transaction_intent' => :'Object', + :'create_fiat_on_ramp_credential_intent' => :'Object', + :'update_fiat_on_ramp_credential_intent' => :'Object', + :'delete_fiat_on_ramp_credential_intent' => :'Object', + :'email_auth_intent_v3' => :'Object', + :'init_user_email_recovery_intent_v2' => :'Object', + :'init_otp_intent_v2' => :'Object', + :'init_otp_auth_intent_v3' => :'Object', + :'upsert_gas_usage_config_intent' => :'Object', + :'create_tvc_app_intent' => :'Object', + :'create_tvc_deployment_intent' => :'Object', + :'create_tvc_manifest_approvals_intent' => :'Object', + :'sol_send_transaction_intent' => :'Object' } end @@ -852,6 +916,70 @@ def initialize(attributes = {}) if attributes.key?(:'oauth2_authenticate_intent') self.oauth2_authenticate_intent = attributes[:'oauth2_authenticate_intent'] end + + if attributes.key?(:'delete_wallet_accounts_intent') + self.delete_wallet_accounts_intent = attributes[:'delete_wallet_accounts_intent'] + end + + if attributes.key?(:'delete_policies_intent') + self.delete_policies_intent = attributes[:'delete_policies_intent'] + end + + if attributes.key?(:'eth_send_raw_transaction_intent') + self.eth_send_raw_transaction_intent = attributes[:'eth_send_raw_transaction_intent'] + end + + if attributes.key?(:'eth_send_transaction_intent') + self.eth_send_transaction_intent = attributes[:'eth_send_transaction_intent'] + end + + if attributes.key?(:'create_fiat_on_ramp_credential_intent') + self.create_fiat_on_ramp_credential_intent = attributes[:'create_fiat_on_ramp_credential_intent'] + end + + if attributes.key?(:'update_fiat_on_ramp_credential_intent') + self.update_fiat_on_ramp_credential_intent = attributes[:'update_fiat_on_ramp_credential_intent'] + end + + if attributes.key?(:'delete_fiat_on_ramp_credential_intent') + self.delete_fiat_on_ramp_credential_intent = attributes[:'delete_fiat_on_ramp_credential_intent'] + end + + if attributes.key?(:'email_auth_intent_v3') + self.email_auth_intent_v3 = attributes[:'email_auth_intent_v3'] + end + + if attributes.key?(:'init_user_email_recovery_intent_v2') + self.init_user_email_recovery_intent_v2 = attributes[:'init_user_email_recovery_intent_v2'] + end + + if attributes.key?(:'init_otp_intent_v2') + self.init_otp_intent_v2 = attributes[:'init_otp_intent_v2'] + end + + if attributes.key?(:'init_otp_auth_intent_v3') + self.init_otp_auth_intent_v3 = attributes[:'init_otp_auth_intent_v3'] + end + + if attributes.key?(:'upsert_gas_usage_config_intent') + self.upsert_gas_usage_config_intent = attributes[:'upsert_gas_usage_config_intent'] + end + + if attributes.key?(:'create_tvc_app_intent') + self.create_tvc_app_intent = attributes[:'create_tvc_app_intent'] + end + + if attributes.key?(:'create_tvc_deployment_intent') + self.create_tvc_deployment_intent = attributes[:'create_tvc_deployment_intent'] + end + + if attributes.key?(:'create_tvc_manifest_approvals_intent') + self.create_tvc_manifest_approvals_intent = attributes[:'create_tvc_manifest_approvals_intent'] + end + + if attributes.key?(:'sol_send_transaction_intent') + self.sol_send_transaction_intent = attributes[:'sol_send_transaction_intent'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -972,7 +1100,23 @@ def ==(o) create_oauth2_credential_intent == o.create_oauth2_credential_intent && update_oauth2_credential_intent == o.update_oauth2_credential_intent && delete_oauth2_credential_intent == o.delete_oauth2_credential_intent && - oauth2_authenticate_intent == o.oauth2_authenticate_intent + oauth2_authenticate_intent == o.oauth2_authenticate_intent && + delete_wallet_accounts_intent == o.delete_wallet_accounts_intent && + delete_policies_intent == o.delete_policies_intent && + eth_send_raw_transaction_intent == o.eth_send_raw_transaction_intent && + eth_send_transaction_intent == o.eth_send_transaction_intent && + create_fiat_on_ramp_credential_intent == o.create_fiat_on_ramp_credential_intent && + update_fiat_on_ramp_credential_intent == o.update_fiat_on_ramp_credential_intent && + delete_fiat_on_ramp_credential_intent == o.delete_fiat_on_ramp_credential_intent && + email_auth_intent_v3 == o.email_auth_intent_v3 && + init_user_email_recovery_intent_v2 == o.init_user_email_recovery_intent_v2 && + init_otp_intent_v2 == o.init_otp_intent_v2 && + init_otp_auth_intent_v3 == o.init_otp_auth_intent_v3 && + upsert_gas_usage_config_intent == o.upsert_gas_usage_config_intent && + create_tvc_app_intent == o.create_tvc_app_intent && + create_tvc_deployment_intent == o.create_tvc_deployment_intent && + create_tvc_manifest_approvals_intent == o.create_tvc_manifest_approvals_intent && + sol_send_transaction_intent == o.sol_send_transaction_intent end # @see the `==` method @@ -984,7 +1128,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [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].hash + [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 end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/list_fiat_on_ramp_credentials_request.rb b/turnkey_client/lib/turnkey_client/models/list_fiat_on_ramp_credentials_request.rb new file mode 100644 index 0000000..0c1c9b1 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/list_fiat_on_ramp_credentials_request.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class ListFiatOnRampCredentialsRequest + # Unique identifier for a given Organization. + attr_accessor :organization_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'organization_id' => :'organizationId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'organization_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::ListFiatOnRampCredentialsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::ListFiatOnRampCredentialsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @organization_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + organization_id == o.organization_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [organization_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/list_fiat_on_ramp_credentials_response.rb b/turnkey_client/lib/turnkey_client/models/list_fiat_on_ramp_credentials_response.rb new file mode 100644 index 0000000..573cb26 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/list_fiat_on_ramp_credentials_response.rb @@ -0,0 +1,212 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class ListFiatOnRampCredentialsResponse + attr_accessor :fiat_on_ramp_credentials + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fiat_on_ramp_credentials' => :'fiatOnRampCredentials' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'fiat_on_ramp_credentials' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::ListFiatOnRampCredentialsResponse` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::ListFiatOnRampCredentialsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'fiat_on_ramp_credentials') + if (value = attributes[:'fiat_on_ramp_credentials']).is_a?(Array) + self.fiat_on_ramp_credentials = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @fiat_on_ramp_credentials.nil? + invalid_properties.push('invalid value for "fiat_on_ramp_credentials", fiat_on_ramp_credentials cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @fiat_on_ramp_credentials.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + fiat_on_ramp_credentials == o.fiat_on_ramp_credentials + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [fiat_on_ramp_credentials].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/native_revert_error.rb b/turnkey_client/lib/turnkey_client/models/native_revert_error.rb new file mode 100644 index 0000000..8a7112b --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/native_revert_error.rb @@ -0,0 +1,229 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class NativeRevertError + # The type of native error: 'error_string', 'panic', or 'execution_reverted'. + attr_accessor :native_type + + # The error message for Error(string) reverts. + attr_accessor :message + + # The panic code for Panic(uint256) reverts. + attr_accessor :panic_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'native_type' => :'nativeType', + :'message' => :'message', + :'panic_code' => :'panicCode' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'native_type' => :'Object', + :'message' => :'Object', + :'panic_code' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'native_type', + :'message', + :'panic_code' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::NativeRevertError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::NativeRevertError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'native_type') + self.native_type = attributes[:'native_type'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'panic_code') + self.panic_code = attributes[:'panic_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + native_type == o.native_type && + message == o.message && + panic_code == o.panic_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [native_type, message, panic_code].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/oauth2_authenticate_request.rb b/turnkey_client/lib/turnkey_client/models/oauth2_authenticate_request.rb index 4eff5e9..cb75c79 100644 --- a/turnkey_client/lib/turnkey_client/models/oauth2_authenticate_request.rb +++ b/turnkey_client/lib/turnkey_client/models/oauth2_authenticate_request.rb @@ -22,6 +22,8 @@ class Oauth2AuthenticateRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/oauth_login_request.rb b/turnkey_client/lib/turnkey_client/models/oauth_login_request.rb index 9d3ef47..4962024 100644 --- a/turnkey_client/lib/turnkey_client/models/oauth_login_request.rb +++ b/turnkey_client/lib/turnkey_client/models/oauth_login_request.rb @@ -22,6 +22,8 @@ class OauthLoginRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/oauth_request.rb b/turnkey_client/lib/turnkey_client/models/oauth_request.rb index ab9bbad..53bab9d 100644 --- a/turnkey_client/lib/turnkey_client/models/oauth_request.rb +++ b/turnkey_client/lib/turnkey_client/models/oauth_request.rb @@ -22,6 +22,8 @@ class OauthRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/otp_auth_request.rb b/turnkey_client/lib/turnkey_client/models/otp_auth_request.rb index c6a4953..65f8758 100644 --- a/turnkey_client/lib/turnkey_client/models/otp_auth_request.rb +++ b/turnkey_client/lib/turnkey_client/models/otp_auth_request.rb @@ -22,6 +22,8 @@ class OtpAuthRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/otp_login_intent.rb b/turnkey_client/lib/turnkey_client/models/otp_login_intent.rb index 9515fea..07d7cb0 100644 --- a/turnkey_client/lib/turnkey_client/models/otp_login_intent.rb +++ b/turnkey_client/lib/turnkey_client/models/otp_login_intent.rb @@ -24,7 +24,6 @@ class OtpLoginIntent # Invalidate all other previously generated Login API keys attr_accessor :invalidate_existing - # Optional signature associated with the public key passed into the verification step. This must be a hex-encoded ECDSA signature over the verification token. Only required if a public key was provided during the verification step. attr_accessor :client_signature # Attribute mapping from ruby-style variable name to JSON key. @@ -54,7 +53,6 @@ def self.openapi_nullable Set.new([ :'expiration_seconds', :'invalidate_existing', - :'client_signature' ]) end diff --git a/turnkey_client/lib/turnkey_client/models/otp_login_request.rb b/turnkey_client/lib/turnkey_client/models/otp_login_request.rb index 229c24a..489c657 100644 --- a/turnkey_client/lib/turnkey_client/models/otp_login_request.rb +++ b/turnkey_client/lib/turnkey_client/models/otp_login_request.rb @@ -22,6 +22,8 @@ class OtpLoginRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/recover_user_request.rb b/turnkey_client/lib/turnkey_client/models/recover_user_request.rb index 50fc6f5..989e1e5 100644 --- a/turnkey_client/lib/turnkey_client/models/recover_user_request.rb +++ b/turnkey_client/lib/turnkey_client/models/recover_user_request.rb @@ -22,6 +22,8 @@ class RecoverUserRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/reject_activity_request.rb b/turnkey_client/lib/turnkey_client/models/reject_activity_request.rb index baf381d..2e29ba7 100644 --- a/turnkey_client/lib/turnkey_client/models/reject_activity_request.rb +++ b/turnkey_client/lib/turnkey_client/models/reject_activity_request.rb @@ -22,6 +22,8 @@ class RejectActivityRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/remove_organization_feature_request.rb b/turnkey_client/lib/turnkey_client/models/remove_organization_feature_request.rb index dd60e0c..d36490c 100644 --- a/turnkey_client/lib/turnkey_client/models/remove_organization_feature_request.rb +++ b/turnkey_client/lib/turnkey_client/models/remove_organization_feature_request.rb @@ -22,6 +22,8 @@ class RemoveOrganizationFeatureRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/result.rb b/turnkey_client/lib/turnkey_client/models/result.rb index b0f76c5..87bb458 100644 --- a/turnkey_client/lib/turnkey_client/models/result.rb +++ b/turnkey_client/lib/turnkey_client/models/result.rb @@ -184,6 +184,30 @@ class Result attr_accessor :oauth2_authenticate_result + attr_accessor :delete_wallet_accounts_result + + attr_accessor :delete_policies_result + + attr_accessor :eth_send_raw_transaction_result + + attr_accessor :create_fiat_on_ramp_credential_result + + attr_accessor :update_fiat_on_ramp_credential_result + + attr_accessor :delete_fiat_on_ramp_credential_result + + attr_accessor :eth_send_transaction_result + + attr_accessor :upsert_gas_usage_config_result + + attr_accessor :create_tvc_app_result + + attr_accessor :create_tvc_deployment_result + + attr_accessor :create_tvc_manifest_approvals_result + + attr_accessor :sol_send_transaction_result + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -272,7 +296,19 @@ def self.attribute_map :'create_oauth2_credential_result' => :'createOauth2CredentialResult', :'update_oauth2_credential_result' => :'updateOauth2CredentialResult', :'delete_oauth2_credential_result' => :'deleteOauth2CredentialResult', - :'oauth2_authenticate_result' => :'oauth2AuthenticateResult' + :'oauth2_authenticate_result' => :'oauth2AuthenticateResult', + :'delete_wallet_accounts_result' => :'deleteWalletAccountsResult', + :'delete_policies_result' => :'deletePoliciesResult', + :'eth_send_raw_transaction_result' => :'ethSendRawTransactionResult', + :'create_fiat_on_ramp_credential_result' => :'createFiatOnRampCredentialResult', + :'update_fiat_on_ramp_credential_result' => :'updateFiatOnRampCredentialResult', + :'delete_fiat_on_ramp_credential_result' => :'deleteFiatOnRampCredentialResult', + :'eth_send_transaction_result' => :'ethSendTransactionResult', + :'upsert_gas_usage_config_result' => :'upsertGasUsageConfigResult', + :'create_tvc_app_result' => :'createTvcAppResult', + :'create_tvc_deployment_result' => :'createTvcDeploymentResult', + :'create_tvc_manifest_approvals_result' => :'createTvcManifestApprovalsResult', + :'sol_send_transaction_result' => :'solSendTransactionResult' } end @@ -364,7 +400,19 @@ def self.openapi_types :'create_oauth2_credential_result' => :'Object', :'update_oauth2_credential_result' => :'Object', :'delete_oauth2_credential_result' => :'Object', - :'oauth2_authenticate_result' => :'Object' + :'oauth2_authenticate_result' => :'Object', + :'delete_wallet_accounts_result' => :'Object', + :'delete_policies_result' => :'Object', + :'eth_send_raw_transaction_result' => :'Object', + :'create_fiat_on_ramp_credential_result' => :'Object', + :'update_fiat_on_ramp_credential_result' => :'Object', + :'delete_fiat_on_ramp_credential_result' => :'Object', + :'eth_send_transaction_result' => :'Object', + :'upsert_gas_usage_config_result' => :'Object', + :'create_tvc_app_result' => :'Object', + :'create_tvc_deployment_result' => :'Object', + :'create_tvc_manifest_approvals_result' => :'Object', + :'sol_send_transaction_result' => :'Object' } end @@ -732,6 +780,54 @@ def initialize(attributes = {}) if attributes.key?(:'oauth2_authenticate_result') self.oauth2_authenticate_result = attributes[:'oauth2_authenticate_result'] end + + if attributes.key?(:'delete_wallet_accounts_result') + self.delete_wallet_accounts_result = attributes[:'delete_wallet_accounts_result'] + end + + if attributes.key?(:'delete_policies_result') + self.delete_policies_result = attributes[:'delete_policies_result'] + end + + if attributes.key?(:'eth_send_raw_transaction_result') + self.eth_send_raw_transaction_result = attributes[:'eth_send_raw_transaction_result'] + end + + if attributes.key?(:'create_fiat_on_ramp_credential_result') + self.create_fiat_on_ramp_credential_result = attributes[:'create_fiat_on_ramp_credential_result'] + end + + if attributes.key?(:'update_fiat_on_ramp_credential_result') + self.update_fiat_on_ramp_credential_result = attributes[:'update_fiat_on_ramp_credential_result'] + end + + if attributes.key?(:'delete_fiat_on_ramp_credential_result') + self.delete_fiat_on_ramp_credential_result = attributes[:'delete_fiat_on_ramp_credential_result'] + end + + if attributes.key?(:'eth_send_transaction_result') + self.eth_send_transaction_result = attributes[:'eth_send_transaction_result'] + end + + if attributes.key?(:'upsert_gas_usage_config_result') + self.upsert_gas_usage_config_result = attributes[:'upsert_gas_usage_config_result'] + end + + if attributes.key?(:'create_tvc_app_result') + self.create_tvc_app_result = attributes[:'create_tvc_app_result'] + end + + if attributes.key?(:'create_tvc_deployment_result') + self.create_tvc_deployment_result = attributes[:'create_tvc_deployment_result'] + end + + if attributes.key?(:'create_tvc_manifest_approvals_result') + self.create_tvc_manifest_approvals_result = attributes[:'create_tvc_manifest_approvals_result'] + end + + if attributes.key?(:'sol_send_transaction_result') + self.sol_send_transaction_result = attributes[:'sol_send_transaction_result'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -837,7 +933,19 @@ def ==(o) create_oauth2_credential_result == o.create_oauth2_credential_result && update_oauth2_credential_result == o.update_oauth2_credential_result && delete_oauth2_credential_result == o.delete_oauth2_credential_result && - oauth2_authenticate_result == o.oauth2_authenticate_result + oauth2_authenticate_result == o.oauth2_authenticate_result && + delete_wallet_accounts_result == o.delete_wallet_accounts_result && + delete_policies_result == o.delete_policies_result && + eth_send_raw_transaction_result == o.eth_send_raw_transaction_result && + create_fiat_on_ramp_credential_result == o.create_fiat_on_ramp_credential_result && + update_fiat_on_ramp_credential_result == o.update_fiat_on_ramp_credential_result && + delete_fiat_on_ramp_credential_result == o.delete_fiat_on_ramp_credential_result && + eth_send_transaction_result == o.eth_send_transaction_result && + upsert_gas_usage_config_result == o.upsert_gas_usage_config_result && + create_tvc_app_result == o.create_tvc_app_result && + create_tvc_deployment_result == o.create_tvc_deployment_result && + create_tvc_manifest_approvals_result == o.create_tvc_manifest_approvals_result && + sol_send_transaction_result == o.sol_send_transaction_result end # @see the `==` method @@ -849,7 +957,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [create_organization_result, create_authenticators_result, create_users_result, create_private_keys_result, create_invitations_result, accept_invitation_result, sign_raw_payload_result, create_policy_result, disable_private_key_result, delete_users_result, delete_authenticators_result, delete_invitation_result, delete_organization_result, delete_policy_result, create_user_tag_result, delete_user_tags_result, sign_transaction_result, delete_api_keys_result, create_api_keys_result, create_private_key_tag_result, delete_private_key_tags_result, set_payment_method_result, activate_billing_tier_result, delete_payment_method_result, create_api_only_users_result, update_root_quorum_result, update_user_tag_result, update_private_key_tag_result, create_sub_organization_result, update_allowed_origins_result, create_private_keys_result_v2, update_user_result, update_policy_result, create_sub_organization_result_v3, create_wallet_result, create_wallet_accounts_result, init_user_email_recovery_result, recover_user_result, set_organization_feature_result, remove_organization_feature_result, export_private_key_result, export_wallet_result, create_sub_organization_result_v4, email_auth_result, export_wallet_account_result, init_import_wallet_result, import_wallet_result, init_import_private_key_result, import_private_key_result, create_policies_result, sign_raw_payloads_result, create_read_only_session_result, create_oauth_providers_result, delete_oauth_providers_result, create_sub_organization_result_v5, oauth_result, create_read_write_session_result, create_sub_organization_result_v6, delete_private_keys_result, delete_wallets_result, create_read_write_session_result_v2, delete_sub_organization_result, init_otp_auth_result, otp_auth_result, create_sub_organization_result_v7, update_wallet_result, update_policy_result_v2, init_otp_auth_result_v2, init_otp_result, verify_otp_result, otp_login_result, stamp_login_result, oauth_login_result, update_user_name_result, update_user_email_result, update_user_phone_number_result, init_fiat_on_ramp_result, create_smart_contract_interface_result, delete_smart_contract_interface_result, enable_auth_proxy_result, disable_auth_proxy_result, update_auth_proxy_config_result, create_oauth2_credential_result, update_oauth2_credential_result, delete_oauth2_credential_result, oauth2_authenticate_result].hash + [create_organization_result, create_authenticators_result, create_users_result, create_private_keys_result, create_invitations_result, accept_invitation_result, sign_raw_payload_result, create_policy_result, disable_private_key_result, delete_users_result, delete_authenticators_result, delete_invitation_result, delete_organization_result, delete_policy_result, create_user_tag_result, delete_user_tags_result, sign_transaction_result, delete_api_keys_result, create_api_keys_result, create_private_key_tag_result, delete_private_key_tags_result, set_payment_method_result, activate_billing_tier_result, delete_payment_method_result, create_api_only_users_result, update_root_quorum_result, update_user_tag_result, update_private_key_tag_result, create_sub_organization_result, update_allowed_origins_result, create_private_keys_result_v2, update_user_result, update_policy_result, create_sub_organization_result_v3, create_wallet_result, create_wallet_accounts_result, init_user_email_recovery_result, recover_user_result, set_organization_feature_result, remove_organization_feature_result, export_private_key_result, export_wallet_result, create_sub_organization_result_v4, email_auth_result, export_wallet_account_result, init_import_wallet_result, import_wallet_result, init_import_private_key_result, import_private_key_result, create_policies_result, sign_raw_payloads_result, create_read_only_session_result, create_oauth_providers_result, delete_oauth_providers_result, create_sub_organization_result_v5, oauth_result, create_read_write_session_result, create_sub_organization_result_v6, delete_private_keys_result, delete_wallets_result, create_read_write_session_result_v2, delete_sub_organization_result, init_otp_auth_result, otp_auth_result, create_sub_organization_result_v7, update_wallet_result, update_policy_result_v2, init_otp_auth_result_v2, init_otp_result, verify_otp_result, otp_login_result, stamp_login_result, oauth_login_result, update_user_name_result, update_user_email_result, update_user_phone_number_result, init_fiat_on_ramp_result, create_smart_contract_interface_result, delete_smart_contract_interface_result, enable_auth_proxy_result, disable_auth_proxy_result, update_auth_proxy_config_result, create_oauth2_credential_result, update_oauth2_credential_result, delete_oauth2_credential_result, oauth2_authenticate_result, delete_wallet_accounts_result, delete_policies_result, eth_send_raw_transaction_result, create_fiat_on_ramp_credential_result, update_fiat_on_ramp_credential_result, delete_fiat_on_ramp_credential_result, eth_send_transaction_result, upsert_gas_usage_config_result, create_tvc_app_result, create_tvc_deployment_result, create_tvc_manifest_approvals_result, sol_send_transaction_result].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/revert_chain_entry.rb b/turnkey_client/lib/turnkey_client/models/revert_chain_entry.rb new file mode 100644 index 0000000..5391352 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/revert_chain_entry.rb @@ -0,0 +1,253 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class RevertChainEntry + # The contract address where the revert occurred. + attr_accessor :address + + # Type of error: 'unknown', 'native', or 'custom'. + attr_accessor :error_type + + # Human-readable message describing this revert. + attr_accessor :display_message + + attr_accessor :unknown + + attr_accessor :native + + attr_accessor :custom + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'address' => :'address', + :'error_type' => :'errorType', + :'display_message' => :'displayMessage', + :'unknown' => :'unknown', + :'native' => :'native', + :'custom' => :'custom' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'address' => :'Object', + :'error_type' => :'Object', + :'display_message' => :'Object', + :'unknown' => :'Object', + :'native' => :'Object', + :'custom' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::RevertChainEntry` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::RevertChainEntry`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'error_type') + self.error_type = attributes[:'error_type'] + end + + if attributes.key?(:'display_message') + self.display_message = attributes[:'display_message'] + end + + if attributes.key?(:'unknown') + self.unknown = attributes[:'unknown'] + end + + if attributes.key?(:'native') + self.native = attributes[:'native'] + end + + if attributes.key?(:'custom') + self.custom = attributes[:'custom'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + address == o.address && + error_type == o.error_type && + display_message == o.display_message && + unknown == o.unknown && + native == o.native && + custom == o.custom + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [address, error_type, display_message, unknown, native, custom].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/set_organization_feature_request.rb b/turnkey_client/lib/turnkey_client/models/set_organization_feature_request.rb index 7b8e891..fa81de3 100644 --- a/turnkey_client/lib/turnkey_client/models/set_organization_feature_request.rb +++ b/turnkey_client/lib/turnkey_client/models/set_organization_feature_request.rb @@ -22,6 +22,8 @@ class SetOrganizationFeatureRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/sign_raw_payload_request.rb b/turnkey_client/lib/turnkey_client/models/sign_raw_payload_request.rb index 4e8dd35..52526d1 100644 --- a/turnkey_client/lib/turnkey_client/models/sign_raw_payload_request.rb +++ b/turnkey_client/lib/turnkey_client/models/sign_raw_payload_request.rb @@ -22,6 +22,8 @@ class SignRawPayloadRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/sign_raw_payloads_request.rb b/turnkey_client/lib/turnkey_client/models/sign_raw_payloads_request.rb index f82c8f9..f091539 100644 --- a/turnkey_client/lib/turnkey_client/models/sign_raw_payloads_request.rb +++ b/turnkey_client/lib/turnkey_client/models/sign_raw_payloads_request.rb @@ -22,6 +22,8 @@ class SignRawPayloadsRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/sign_transaction_request.rb b/turnkey_client/lib/turnkey_client/models/sign_transaction_request.rb index 88f04b0..a68a464 100644 --- a/turnkey_client/lib/turnkey_client/models/sign_transaction_request.rb +++ b/turnkey_client/lib/turnkey_client/models/sign_transaction_request.rb @@ -22,6 +22,8 @@ class SignTransactionRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/sol_send_transaction_intent.rb b/turnkey_client/lib/turnkey_client/models/sol_send_transaction_intent.rb new file mode 100644 index 0000000..879a154 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/sol_send_transaction_intent.rb @@ -0,0 +1,297 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SolSendTransactionIntent + # Base64-encoded serialized unsigned Solana transaction + attr_accessor :unsigned_transaction + + # A wallet or private key address to sign with. This does not support private key IDs. + attr_accessor :sign_with + + # Whether to sponsor this transaction via Gas Station. + attr_accessor :sponsor + + # CAIP-2 chain ID (e.g., 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' for Solana mainnet). + attr_accessor :caip2 + + # user-provided blockhash for replay protection / deadline control. If omitted and sponsor=true, we fetch a fresh blockhash during execution + attr_accessor :recent_blockhash + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'unsigned_transaction' => :'unsignedTransaction', + :'sign_with' => :'signWith', + :'sponsor' => :'sponsor', + :'caip2' => :'caip2', + :'recent_blockhash' => :'recentBlockhash' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'unsigned_transaction' => :'Object', + :'sign_with' => :'Object', + :'sponsor' => :'Object', + :'caip2' => :'Object', + :'recent_blockhash' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'sponsor', + :'recent_blockhash' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SolSendTransactionIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SolSendTransactionIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'unsigned_transaction') + self.unsigned_transaction = attributes[:'unsigned_transaction'] + end + + if attributes.key?(:'sign_with') + self.sign_with = attributes[:'sign_with'] + end + + if attributes.key?(:'sponsor') + self.sponsor = attributes[:'sponsor'] + end + + if attributes.key?(:'caip2') + self.caip2 = attributes[:'caip2'] + end + + if attributes.key?(:'recent_blockhash') + self.recent_blockhash = attributes[:'recent_blockhash'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @unsigned_transaction.nil? + invalid_properties.push('invalid value for "unsigned_transaction", unsigned_transaction cannot be nil.') + end + + if @sign_with.nil? + invalid_properties.push('invalid value for "sign_with", sign_with cannot be nil.') + end + + if @caip2.nil? + invalid_properties.push('invalid value for "caip2", caip2 cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @unsigned_transaction.nil? + return false if @sign_with.nil? + return false if @caip2.nil? + caip2_validator = EnumAttributeValidator.new('Object', ['solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG', 'solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY']) + return false unless caip2_validator.valid?(@caip2) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] caip2 Object to be assigned + def caip2=(caip2) + validator = EnumAttributeValidator.new('Object', ['solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG', 'solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY']) + unless validator.valid?(caip2) + fail ArgumentError, "invalid value for \"caip2\", must be one of #{validator.allowable_values}." + end + @caip2 = caip2 + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + unsigned_transaction == o.unsigned_transaction && + sign_with == o.sign_with && + sponsor == o.sponsor && + caip2 == o.caip2 && + recent_blockhash == o.recent_blockhash + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [unsigned_transaction, sign_with, sponsor, caip2, recent_blockhash].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/sol_send_transaction_request.rb b/turnkey_client/lib/turnkey_client/models/sol_send_transaction_request.rb new file mode 100644 index 0000000..320cbff --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/sol_send_transaction_request.rb @@ -0,0 +1,298 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SolSendTransactionRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + attr_accessor :generate_app_proofs + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'generate_app_proofs' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SolSendTransactionRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SolSendTransactionRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_SOL_SEND_TRANSACTION']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_SOL_SEND_TRANSACTION']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/sol_send_transaction_result.rb b/turnkey_client/lib/turnkey_client/models/sol_send_transaction_result.rb new file mode 100644 index 0000000..a71a595 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/sol_send_transaction_result.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class SolSendTransactionResult + # The send_transaction_status ID associated with the transaction submission + attr_accessor :send_transaction_status_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'send_transaction_status_id' => :'sendTransactionStatusId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'send_transaction_status_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::SolSendTransactionResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::SolSendTransactionResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'send_transaction_status_id') + self.send_transaction_status_id = attributes[:'send_transaction_status_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @send_transaction_status_id.nil? + invalid_properties.push('invalid value for "send_transaction_status_id", send_transaction_status_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @send_transaction_status_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + send_transaction_status_id == o.send_transaction_status_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [send_transaction_status_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/stamp_login_request.rb b/turnkey_client/lib/turnkey_client/models/stamp_login_request.rb index 539397d..2196d2f 100644 --- a/turnkey_client/lib/turnkey_client/models/stamp_login_request.rb +++ b/turnkey_client/lib/turnkey_client/models/stamp_login_request.rb @@ -22,6 +22,8 @@ class StampLoginRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/transaction_type.rb b/turnkey_client/lib/turnkey_client/models/transaction_type.rb index 9223dce..9526eb8 100644 --- a/turnkey_client/lib/turnkey_client/models/transaction_type.rb +++ b/turnkey_client/lib/turnkey_client/models/transaction_type.rb @@ -15,6 +15,8 @@ class TransactionType ETHEREUM = 'TRANSACTION_TYPE_ETHEREUM'.freeze SOLANA = 'TRANSACTION_TYPE_SOLANA'.freeze TRON = 'TRANSACTION_TYPE_TRON'.freeze + BITCOIN = 'TRANSACTION_TYPE_BITCOIN'.freeze + TEMPO = 'TRANSACTION_TYPE_TEMPO'.freeze # Builds the enum from string # @param [String] The enum value in the form of the string diff --git a/turnkey_client/lib/turnkey_client/models/tvc_manifest_approval.rb b/turnkey_client/lib/turnkey_client/models/tvc_manifest_approval.rb new file mode 100644 index 0000000..8a6bc5e --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/tvc_manifest_approval.rb @@ -0,0 +1,226 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class TvcManifestApproval + # Unique identifier of the operator providing this approval + attr_accessor :operator_id + + # Signature from the operator approving the manifest + attr_accessor :signature + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'operator_id' => :'operatorId', + :'signature' => :'signature' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'operator_id' => :'Object', + :'signature' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::TvcManifestApproval` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::TvcManifestApproval`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'operator_id') + self.operator_id = attributes[:'operator_id'] + end + + if attributes.key?(:'signature') + self.signature = attributes[:'signature'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @operator_id.nil? + invalid_properties.push('invalid value for "operator_id", operator_id cannot be nil.') + end + + if @signature.nil? + invalid_properties.push('invalid value for "signature", signature cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @operator_id.nil? + return false if @signature.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + operator_id == o.operator_id && + signature == o.signature + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [operator_id, signature].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/tvc_operator_params.rb b/turnkey_client/lib/turnkey_client/models/tvc_operator_params.rb new file mode 100644 index 0000000..0920fcf --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/tvc_operator_params.rb @@ -0,0 +1,226 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class TvcOperatorParams + # The name for this new operator + attr_accessor :name + + # Public key for this operator + attr_accessor :public_key + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'public_key' => :'publicKey' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'Object', + :'public_key' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::TvcOperatorParams` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::TvcOperatorParams`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'public_key') + self.public_key = attributes[:'public_key'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @public_key.nil? + invalid_properties.push('invalid value for "public_key", public_key cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @name.nil? + return false if @public_key.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + public_key == o.public_key + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, public_key].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/tvc_operator_set_params.rb b/turnkey_client/lib/turnkey_client/models/tvc_operator_set_params.rb new file mode 100644 index 0000000..70c1492 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/tvc_operator_set_params.rb @@ -0,0 +1,250 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class TvcOperatorSetParams + # Short description for this new operator set + attr_accessor :name + + # Operators to create as part of this new operator set + attr_accessor :new_operators + + # Existing operators to use as part of this new operator set + attr_accessor :existing_operator_ids + + # The threshold of operators needed to reach consensus in this new Operator Set + attr_accessor :threshold + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'new_operators' => :'newOperators', + :'existing_operator_ids' => :'existingOperatorIds', + :'threshold' => :'threshold' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'Object', + :'new_operators' => :'Object', + :'existing_operator_ids' => :'Object', + :'threshold' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::TvcOperatorSetParams` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::TvcOperatorSetParams`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'new_operators') + if (value = attributes[:'new_operators']).is_a?(Array) + self.new_operators = value + end + end + + if attributes.key?(:'existing_operator_ids') + if (value = attributes[:'existing_operator_ids']).is_a?(Array) + self.existing_operator_ids = value + end + end + + if attributes.key?(:'threshold') + self.threshold = attributes[:'threshold'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @threshold.nil? + invalid_properties.push('invalid value for "threshold", threshold cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @name.nil? + return false if @threshold.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + new_operators == o.new_operators && + existing_operator_ids == o.existing_operator_ids && + threshold == o.threshold + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, new_operators, existing_operator_ids, threshold].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/tx_error.rb b/turnkey_client/lib/turnkey_client/models/tx_error.rb new file mode 100644 index 0000000..bc500d2 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/tx_error.rb @@ -0,0 +1,218 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class TxError + # Human-readable error message describing what went wrong. + attr_accessor :message + + # Chain of revert errors from nested contract calls, ordered from outermost to innermost. + attr_accessor :revert_chain + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'message' => :'message', + :'revert_chain' => :'revertChain' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'message' => :'Object', + :'revert_chain' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::TxError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::TxError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'revert_chain') + if (value = attributes[:'revert_chain']).is_a?(Array) + self.revert_chain = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + message == o.message && + revert_chain == o.revert_chain + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [message, revert_chain].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/unknown_revert_error.rb b/turnkey_client/lib/turnkey_client/models/unknown_revert_error.rb new file mode 100644 index 0000000..24584e6 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/unknown_revert_error.rb @@ -0,0 +1,218 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class UnknownRevertError + # The 4-byte error selector, if available. + attr_accessor :selector + + # The raw error data, hex-encoded. + attr_accessor :data + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'selector' => :'selector', + :'data' => :'data' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'selector' => :'Object', + :'data' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'selector', + :'data' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::UnknownRevertError` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::UnknownRevertError`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'selector') + self.selector = attributes[:'selector'] + end + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + selector == o.selector && + data == o.data + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [selector, data].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/update_auth_proxy_config_intent.rb b/turnkey_client/lib/turnkey_client/models/update_auth_proxy_config_intent.rb index aae5f16..180ebfd 100644 --- a/turnkey_client/lib/turnkey_client/models/update_auth_proxy_config_intent.rb +++ b/turnkey_client/lib/turnkey_client/models/update_auth_proxy_config_intent.rb @@ -51,6 +51,12 @@ class UpdateAuthProxyConfigIntent # Desired OTP code length (6–9). attr_accessor :otp_length + # Custom 'from' email sender for auth-related emails. + attr_accessor :send_from_email_sender_name + + # Verification token required for get account with PII (email/phone number). Default false. + attr_accessor :verification_token_required_for_get_account_pii + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { @@ -67,7 +73,9 @@ def self.attribute_map :'verification_token_expiration_seconds' => :'verificationTokenExpirationSeconds', :'session_expiration_seconds' => :'sessionExpirationSeconds', :'otp_alphanumeric' => :'otpAlphanumeric', - :'otp_length' => :'otpLength' + :'otp_length' => :'otpLength', + :'send_from_email_sender_name' => :'sendFromEmailSenderName', + :'verification_token_required_for_get_account_pii' => :'verificationTokenRequiredForGetAccountPii' } end @@ -87,7 +95,9 @@ def self.openapi_types :'verification_token_expiration_seconds' => :'Object', :'session_expiration_seconds' => :'Object', :'otp_alphanumeric' => :'Object', - :'otp_length' => :'Object' + :'otp_length' => :'Object', + :'send_from_email_sender_name' => :'Object', + :'verification_token_required_for_get_account_pii' => :'Object' } end @@ -102,7 +112,9 @@ def self.openapi_nullable :'verification_token_expiration_seconds', :'session_expiration_seconds', :'otp_alphanumeric', - :'otp_length' + :'otp_length', + :'send_from_email_sender_name', + :'verification_token_required_for_get_account_pii' ]) end @@ -180,6 +192,14 @@ def initialize(attributes = {}) if attributes.key?(:'otp_length') self.otp_length = attributes[:'otp_length'] end + + if attributes.key?(:'send_from_email_sender_name') + self.send_from_email_sender_name = attributes[:'send_from_email_sender_name'] + end + + if attributes.key?(:'verification_token_required_for_get_account_pii') + self.verification_token_required_for_get_account_pii = attributes[:'verification_token_required_for_get_account_pii'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -213,7 +233,9 @@ def ==(o) verification_token_expiration_seconds == o.verification_token_expiration_seconds && session_expiration_seconds == o.session_expiration_seconds && otp_alphanumeric == o.otp_alphanumeric && - otp_length == o.otp_length + otp_length == o.otp_length && + send_from_email_sender_name == o.send_from_email_sender_name && + verification_token_required_for_get_account_pii == o.verification_token_required_for_get_account_pii end # @see the `==` method @@ -225,7 +247,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [allowed_origins, allowed_auth_methods, send_from_email_address, reply_to_email_address, email_auth_template_id, otp_template_id, email_customization_params, sms_customization_params, wallet_kit_settings, otp_expiration_seconds, verification_token_expiration_seconds, session_expiration_seconds, otp_alphanumeric, otp_length].hash + [allowed_origins, allowed_auth_methods, send_from_email_address, reply_to_email_address, email_auth_template_id, otp_template_id, email_customization_params, sms_customization_params, wallet_kit_settings, otp_expiration_seconds, verification_token_expiration_seconds, session_expiration_seconds, otp_alphanumeric, otp_length, send_from_email_sender_name, verification_token_required_for_get_account_pii].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/update_fiat_on_ramp_credential_intent.rb b/turnkey_client/lib/turnkey_client/models/update_fiat_on_ramp_credential_intent.rb new file mode 100644 index 0000000..dfdf642 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/update_fiat_on_ramp_credential_intent.rb @@ -0,0 +1,277 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class UpdateFiatOnRampCredentialIntent + # The ID of the fiat on-ramp credential to update + attr_accessor :fiat_onramp_credential_id + + attr_accessor :onramp_provider + + # Project ID for the on-ramp provider. Some providers, like Coinbase, require this additional identifier. + attr_accessor :project_id + + # Publishable API key for the on-ramp provider + attr_accessor :publishable_api_key + + # Secret API key for the on-ramp provider encrypted to our on-ramp encryption public key + attr_accessor :encrypted_secret_api_key + + # Private API key for the on-ramp provider encrypted to our on-ramp encryption public key. Some providers, like Coinbase, require this additional key. + attr_accessor :encrypted_private_api_key + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fiat_onramp_credential_id' => :'fiatOnrampCredentialId', + :'onramp_provider' => :'onrampProvider', + :'project_id' => :'projectId', + :'publishable_api_key' => :'publishableApiKey', + :'encrypted_secret_api_key' => :'encryptedSecretApiKey', + :'encrypted_private_api_key' => :'encryptedPrivateApiKey' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'fiat_onramp_credential_id' => :'Object', + :'onramp_provider' => :'Object', + :'project_id' => :'Object', + :'publishable_api_key' => :'Object', + :'encrypted_secret_api_key' => :'Object', + :'encrypted_private_api_key' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'project_id', + :'encrypted_private_api_key' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::UpdateFiatOnRampCredentialIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::UpdateFiatOnRampCredentialIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'fiat_onramp_credential_id') + self.fiat_onramp_credential_id = attributes[:'fiat_onramp_credential_id'] + end + + if attributes.key?(:'onramp_provider') + self.onramp_provider = attributes[:'onramp_provider'] + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + end + + if attributes.key?(:'publishable_api_key') + self.publishable_api_key = attributes[:'publishable_api_key'] + end + + if attributes.key?(:'encrypted_secret_api_key') + self.encrypted_secret_api_key = attributes[:'encrypted_secret_api_key'] + end + + if attributes.key?(:'encrypted_private_api_key') + self.encrypted_private_api_key = attributes[:'encrypted_private_api_key'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @fiat_onramp_credential_id.nil? + invalid_properties.push('invalid value for "fiat_onramp_credential_id", fiat_onramp_credential_id cannot be nil.') + end + + if @onramp_provider.nil? + invalid_properties.push('invalid value for "onramp_provider", onramp_provider cannot be nil.') + end + + if @publishable_api_key.nil? + invalid_properties.push('invalid value for "publishable_api_key", publishable_api_key cannot be nil.') + end + + if @encrypted_secret_api_key.nil? + invalid_properties.push('invalid value for "encrypted_secret_api_key", encrypted_secret_api_key cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @fiat_onramp_credential_id.nil? + return false if @onramp_provider.nil? + return false if @publishable_api_key.nil? + return false if @encrypted_secret_api_key.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + fiat_onramp_credential_id == o.fiat_onramp_credential_id && + onramp_provider == o.onramp_provider && + project_id == o.project_id && + publishable_api_key == o.publishable_api_key && + encrypted_secret_api_key == o.encrypted_secret_api_key && + encrypted_private_api_key == o.encrypted_private_api_key + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [fiat_onramp_credential_id, onramp_provider, project_id, publishable_api_key, encrypted_secret_api_key, encrypted_private_api_key].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/update_fiat_on_ramp_credential_request.rb b/turnkey_client/lib/turnkey_client/models/update_fiat_on_ramp_credential_request.rb new file mode 100644 index 0000000..b946557 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/update_fiat_on_ramp_credential_request.rb @@ -0,0 +1,298 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class UpdateFiatOnRampCredentialRequest + attr_accessor :type + + # Timestamp (in milliseconds) of the request, used to verify liveness of user requests. + attr_accessor :timestamp_ms + + # Unique identifier for a given Organization. + attr_accessor :organization_id + + attr_accessor :parameters + + attr_accessor :generate_app_proofs + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'timestamp_ms' => :'timestampMs', + :'organization_id' => :'organizationId', + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'Object', + :'timestamp_ms' => :'Object', + :'organization_id' => :'Object', + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'generate_app_proofs' + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::UpdateFiatOnRampCredentialRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::UpdateFiatOnRampCredentialRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'organization_id') + self.organization_id = attributes[:'organization_id'] + end + + if attributes.key?(:'parameters') + self.parameters = attributes[:'parameters'] + end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @type.nil? + invalid_properties.push('invalid value for "type", type cannot be nil.') + end + + if @timestamp_ms.nil? + invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.') + end + + if @organization_id.nil? + invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.') + end + + if @parameters.nil? + invalid_properties.push('invalid value for "parameters", parameters cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @type.nil? + type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_UPDATE_FIAT_ON_RAMP_CREDENTIAL']) + return false unless type_validator.valid?(@type) + return false if @timestamp_ms.nil? + return false if @organization_id.nil? + return false if @parameters.nil? + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_UPDATE_FIAT_ON_RAMP_CREDENTIAL']) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + timestamp_ms == o.timestamp_ms && + organization_id == o.organization_id && + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/update_fiat_on_ramp_credential_result.rb b/turnkey_client/lib/turnkey_client/models/update_fiat_on_ramp_credential_result.rb new file mode 100644 index 0000000..5c0082f --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/update_fiat_on_ramp_credential_result.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class UpdateFiatOnRampCredentialResult + # Unique identifier of the Fiat On-Ramp credential that was updated + attr_accessor :fiat_on_ramp_credential_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'fiat_on_ramp_credential_id' => :'fiatOnRampCredentialId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'fiat_on_ramp_credential_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::UpdateFiatOnRampCredentialResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::UpdateFiatOnRampCredentialResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'fiat_on_ramp_credential_id') + self.fiat_on_ramp_credential_id = attributes[:'fiat_on_ramp_credential_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @fiat_on_ramp_credential_id.nil? + invalid_properties.push('invalid value for "fiat_on_ramp_credential_id", fiat_on_ramp_credential_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @fiat_on_ramp_credential_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + fiat_on_ramp_credential_id == o.fiat_on_ramp_credential_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [fiat_on_ramp_credential_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/update_oauth2_credential_request.rb b/turnkey_client/lib/turnkey_client/models/update_oauth2_credential_request.rb index 54796a3..ba6d6d7 100644 --- a/turnkey_client/lib/turnkey_client/models/update_oauth2_credential_request.rb +++ b/turnkey_client/lib/turnkey_client/models/update_oauth2_credential_request.rb @@ -22,6 +22,8 @@ class UpdateOauth2CredentialRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/update_policy_request.rb b/turnkey_client/lib/turnkey_client/models/update_policy_request.rb index 02c21ad..ef99e8b 100644 --- a/turnkey_client/lib/turnkey_client/models/update_policy_request.rb +++ b/turnkey_client/lib/turnkey_client/models/update_policy_request.rb @@ -22,6 +22,8 @@ class UpdatePolicyRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/update_private_key_tag_request.rb b/turnkey_client/lib/turnkey_client/models/update_private_key_tag_request.rb index 39efe7d..75adc02 100644 --- a/turnkey_client/lib/turnkey_client/models/update_private_key_tag_request.rb +++ b/turnkey_client/lib/turnkey_client/models/update_private_key_tag_request.rb @@ -22,6 +22,8 @@ class UpdatePrivateKeyTagRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/update_root_quorum_request.rb b/turnkey_client/lib/turnkey_client/models/update_root_quorum_request.rb index d48029e..313421b 100644 --- a/turnkey_client/lib/turnkey_client/models/update_root_quorum_request.rb +++ b/turnkey_client/lib/turnkey_client/models/update_root_quorum_request.rb @@ -22,6 +22,8 @@ class UpdateRootQuorumRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/update_user_email_request.rb b/turnkey_client/lib/turnkey_client/models/update_user_email_request.rb index c3429aa..9f384b5 100644 --- a/turnkey_client/lib/turnkey_client/models/update_user_email_request.rb +++ b/turnkey_client/lib/turnkey_client/models/update_user_email_request.rb @@ -22,6 +22,8 @@ class UpdateUserEmailRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/update_user_name_request.rb b/turnkey_client/lib/turnkey_client/models/update_user_name_request.rb index 50f5bc6..526ba58 100644 --- a/turnkey_client/lib/turnkey_client/models/update_user_name_request.rb +++ b/turnkey_client/lib/turnkey_client/models/update_user_name_request.rb @@ -22,6 +22,8 @@ class UpdateUserNameRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/update_user_phone_number_request.rb b/turnkey_client/lib/turnkey_client/models/update_user_phone_number_request.rb index 85b234c..81ff9e0 100644 --- a/turnkey_client/lib/turnkey_client/models/update_user_phone_number_request.rb +++ b/turnkey_client/lib/turnkey_client/models/update_user_phone_number_request.rb @@ -22,6 +22,8 @@ class UpdateUserPhoneNumberRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/update_user_request.rb b/turnkey_client/lib/turnkey_client/models/update_user_request.rb index db9e63b..3ed0b96 100644 --- a/turnkey_client/lib/turnkey_client/models/update_user_request.rb +++ b/turnkey_client/lib/turnkey_client/models/update_user_request.rb @@ -22,6 +22,8 @@ class UpdateUserRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/update_user_tag_request.rb b/turnkey_client/lib/turnkey_client/models/update_user_tag_request.rb index 6c29ee1..a245130 100644 --- a/turnkey_client/lib/turnkey_client/models/update_user_tag_request.rb +++ b/turnkey_client/lib/turnkey_client/models/update_user_tag_request.rb @@ -22,6 +22,8 @@ class UpdateUserTagRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/update_wallet_request.rb b/turnkey_client/lib/turnkey_client/models/update_wallet_request.rb index 280d1bf..dacf9b6 100644 --- a/turnkey_client/lib/turnkey_client/models/update_wallet_request.rb +++ b/turnkey_client/lib/turnkey_client/models/update_wallet_request.rb @@ -22,6 +22,8 @@ class UpdateWalletRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/models/upsert_gas_usage_config_intent.rb b/turnkey_client/lib/turnkey_client/models/upsert_gas_usage_config_intent.rb new file mode 100644 index 0000000..c2fb16a --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/upsert_gas_usage_config_intent.rb @@ -0,0 +1,241 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class UpsertGasUsageConfigIntent + # Gas sponsorship USD limit for the billing organization window. + attr_accessor :org_window_limit_usd + + # Gas sponsorship USD limit for sub-organizations under the billing organization. + attr_accessor :sub_org_window_limit_usd + + # Rolling sponsorship window duration, expressed in minutes. + attr_accessor :window_duration_minutes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'org_window_limit_usd' => :'orgWindowLimitUsd', + :'sub_org_window_limit_usd' => :'subOrgWindowLimitUsd', + :'window_duration_minutes' => :'windowDurationMinutes' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'org_window_limit_usd' => :'Object', + :'sub_org_window_limit_usd' => :'Object', + :'window_duration_minutes' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::UpsertGasUsageConfigIntent` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::UpsertGasUsageConfigIntent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'org_window_limit_usd') + self.org_window_limit_usd = attributes[:'org_window_limit_usd'] + end + + if attributes.key?(:'sub_org_window_limit_usd') + self.sub_org_window_limit_usd = attributes[:'sub_org_window_limit_usd'] + end + + if attributes.key?(:'window_duration_minutes') + self.window_duration_minutes = attributes[:'window_duration_minutes'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @org_window_limit_usd.nil? + invalid_properties.push('invalid value for "org_window_limit_usd", org_window_limit_usd cannot be nil.') + end + + if @sub_org_window_limit_usd.nil? + invalid_properties.push('invalid value for "sub_org_window_limit_usd", sub_org_window_limit_usd cannot be nil.') + end + + if @window_duration_minutes.nil? + invalid_properties.push('invalid value for "window_duration_minutes", window_duration_minutes cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @org_window_limit_usd.nil? + return false if @sub_org_window_limit_usd.nil? + return false if @window_duration_minutes.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + org_window_limit_usd == o.org_window_limit_usd && + sub_org_window_limit_usd == o.sub_org_window_limit_usd && + window_duration_minutes == o.window_duration_minutes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [org_window_limit_usd, sub_org_window_limit_usd, window_duration_minutes].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/upsert_gas_usage_config_result.rb b/turnkey_client/lib/turnkey_client/models/upsert_gas_usage_config_result.rb new file mode 100644 index 0000000..f2d8da1 --- /dev/null +++ b/turnkey_client/lib/turnkey_client/models/upsert_gas_usage_config_result.rb @@ -0,0 +1,211 @@ +=begin +#API Reference + +#Review our [API Introduction](../api-introduction) to get started. + +OpenAPI spec version: 1.0 + +Generated by: https://github.com/swagger-api/swagger-codegen.git +=end + +require 'date' + +module TurnkeyClient + class UpsertGasUsageConfigResult + # Unique identifier for the gas usage configuration that was created or updated. + attr_accessor :gas_usage_config_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'gas_usage_config_id' => :'gasUsageConfigId' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'gas_usage_config_id' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::UpsertGasUsageConfigResult` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `TurnkeyClient::UpsertGasUsageConfigResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'gas_usage_config_id') + self.gas_usage_config_id = attributes[:'gas_usage_config_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @gas_usage_config_id.nil? + invalid_properties.push('invalid value for "gas_usage_config_id", gas_usage_config_id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @gas_usage_config_id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + gas_usage_config_id == o.gas_usage_config_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [gas_usage_config_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + TurnkeyClient.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end end +end diff --git a/turnkey_client/lib/turnkey_client/models/verify_otp_request.rb b/turnkey_client/lib/turnkey_client/models/verify_otp_request.rb index 3a00848..bd5729a 100644 --- a/turnkey_client/lib/turnkey_client/models/verify_otp_request.rb +++ b/turnkey_client/lib/turnkey_client/models/verify_otp_request.rb @@ -22,6 +22,8 @@ class VerifyOtpRequest attr_accessor :parameters + attr_accessor :generate_app_proofs + class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values @@ -50,7 +52,8 @@ def self.attribute_map :'type' => :'type', :'timestamp_ms' => :'timestampMs', :'organization_id' => :'organizationId', - :'parameters' => :'parameters' + :'parameters' => :'parameters', + :'generate_app_proofs' => :'generateAppProofs' } end @@ -60,13 +63,15 @@ def self.openapi_types :'type' => :'Object', :'timestamp_ms' => :'Object', :'organization_id' => :'Object', - :'parameters' => :'Object' + :'parameters' => :'Object', + :'generate_app_proofs' => :'Object' } end # List of attributes with nullable: true def self.openapi_nullable Set.new([ + :'generate_app_proofs' ]) end @@ -100,6 +105,10 @@ def initialize(attributes = {}) if attributes.key?(:'parameters') self.parameters = attributes[:'parameters'] end + + if attributes.key?(:'generate_app_proofs') + self.generate_app_proofs = attributes[:'generate_app_proofs'] + end end # Show invalid properties with the reasons. Usually used together with valid? @@ -155,7 +164,8 @@ def ==(o) type == o.type && timestamp_ms == o.timestamp_ms && organization_id == o.organization_id && - parameters == o.parameters + parameters == o.parameters && + generate_app_proofs == o.generate_app_proofs end # @see the `==` method @@ -167,7 +177,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [type, timestamp_ms, organization_id, parameters].hash + [type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash end # Builds the object from hash diff --git a/turnkey_client/lib/turnkey_client/version.rb b/turnkey_client/lib/turnkey_client/version.rb index 6aa3715..2605684 100644 --- a/turnkey_client/lib/turnkey_client/version.rb +++ b/turnkey_client/lib/turnkey_client/version.rb @@ -9,5 +9,5 @@ =end module TurnkeyClient - VERSION = '0.0.15' + VERSION = '0.0.16' end diff --git a/turnkey_client_inputs/config.json b/turnkey_client_inputs/config.json index b0a3f4e..a43465c 100644 --- a/turnkey_client_inputs/config.json +++ b/turnkey_client_inputs/config.json @@ -6,5 +6,5 @@ "gemAuthor": "Turnkey Engineering", "gemAuthorEmail": "hello@turnkey.com", "moduleName": "TurnkeyClient", - "gemVersion": "0.0.15" + "gemVersion": "0.0.16" } diff --git a/turnkey_client_inputs/public_api.swagger.json b/turnkey_client_inputs/public_api.swagger.json index 5b643fa..6f86413 100644 --- a/turnkey_client_inputs/public_api.swagger.json +++ b/turnkey_client_inputs/public_api.swagger.json @@ -37,7 +37,7 @@ }, { "name": "Users", - "description": "Users are responsible for any action taken within an Organization. They can have ApiKey or Auuthenticator credentials, allowing you to onboard teammates to the Organization, or create API-only Users to run as part of your infrastructure." + "description": "Users are responsible for any action taken within an Organization. They can have ApiKey or Authenticator credentials, allowing you to onboard teammates to the Organization, or create API-only Users to run as part of your infrastructure." }, { "name": "User Tags", @@ -57,7 +57,7 @@ }, { "name": "Consensus", - "description": "Policies can enforce consensus requirements for Activities. For example, adding a new user requires two admins to approve the request.\n\nActivities that have been proposed, but don't yet meet the Consesnsus requirements will have the status: `REQUIRES_CONSENSUS`. Activities in this state can be approved or rejected using the unique fingerprint generated when an Activity is created." + "description": "Policies can enforce consensus requirements for Activities. For example, adding a new user requires two admins to approve the request.\n\nActivities that have been proposed, but don't yet meet the Consensus requirements will have the status: `REQUIRES_CONSENSUS`. Activities in this state can be approved or rejected using the unique fingerprint generated when an Activity is created." } ], "host": "api.turnkey.com", @@ -221,6 +221,32 @@ "tags": ["Boot Proof"] } }, + "/public/v1/query/get_gas_usage": { + "post": { + "summary": "Get gas usage and limits.", + "description": "Get gas usage and gas limits for either the parent organization or a sub-organization.", + "operationId": "GetGasUsage", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetGasUsageResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GetGasUsageRequest" + } + } + ], + "tags": ["Broadcasting"] + } + }, "/public/v1/query/get_latest_boot_proof": { "post": { "summary": "Get the latest boot proof for an app", @@ -247,6 +273,32 @@ "tags": ["Boot Proof"] } }, + "/public/v1/query/get_nonces": { + "post": { + "summary": "Get nonces for an address.", + "description": "Get nonce values for an address on a given network. Can fetch the standard on-chain nonce and/or the gas station nonce used for sponsored transactions.", + "operationId": "GetNonces", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetNoncesResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GetNoncesRequest" + } + } + ], + "tags": ["Broadcasting"] + } + }, "/public/v1/query/get_oauth2_credential": { "post": { "summary": "Get OAuth 2.0 credential", @@ -298,6 +350,32 @@ "tags": ["User Auth"] } }, + "/public/v1/query/get_onramp_transaction_status": { + "post": { + "summary": "Get On Ramp transaction status", + "description": "Get the status of an on ramp transaction.", + "operationId": "GetOnRampTransactionStatus", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetOnRampTransactionStatusResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GetOnRampTransactionStatusRequest" + } + } + ], + "tags": ["On Ramp"] + } + }, "/public/v1/query/get_organization_configs": { "post": { "summary": "Get configs", @@ -402,6 +480,32 @@ "tags": ["Private Keys"] } }, + "/public/v1/query/get_send_transaction_status": { + "post": { + "summary": "Get send transaction status", + "description": "Get the status of a send transaction request.", + "operationId": "GetSendTransactionStatus", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetSendTransactionStatusResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GetSendTransactionStatusRequest" + } + } + ], + "tags": ["Send Transactions"] + } + }, "/public/v1/query/get_smart_contract_interface": { "post": { "summary": "Get smart contract interface", @@ -534,8 +638,8 @@ }, "/public/v1/query/list_app_proofs": { "post": { - "summary": "List app proofs for an activity", - "description": "List the app proofs for the given activity.", + "summary": "List App Proofs for an activity", + "description": "List the App Proofs for the given activity.", "operationId": "GetAppProofs", "responses": { "200": { @@ -558,6 +662,32 @@ "tags": ["App Proof"] } }, + "/public/v1/query/list_fiat_on_ramp_credentials": { + "post": { + "summary": "List Fiat On Ramp Credentials", + "description": "List all fiat on ramp provider credentials within an organization.", + "operationId": "ListFiatOnRampCredentials", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ListFiatOnRampCredentialsResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ListFiatOnRampCredentialsRequest" + } + } + ], + "tags": ["On Ramp"] + } + }, "/public/v1/query/list_oauth2_credentials": { "post": { "summary": "List OAuth 2.0 Credentials", @@ -948,6 +1078,32 @@ "tags": ["Authenticators"] } }, + "/public/v1/submit/create_fiat_on_ramp_credential": { + "post": { + "summary": "Create a Fiat On Ramp Credential", + "description": "Create a fiat on ramp provider credential", + "operationId": "CreateFiatOnRampCredential", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateFiatOnRampCredentialRequest" + } + } + ], + "tags": ["On Ramp"] + } + }, "/public/v1/submit/create_invitations": { "post": { "summary": "Create invitations", @@ -1390,6 +1546,32 @@ "tags": ["Authenticators"] } }, + "/public/v1/submit/delete_fiat_on_ramp_credential": { + "post": { + "summary": "Delete a Fiat On Ramp Credential", + "description": "Delete a fiat on ramp provider credential", + "operationId": "DeleteFiatOnRampCredential", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DeleteFiatOnRampCredentialRequest" + } + } + ], + "tags": ["On Ramp"] + } + }, "/public/v1/submit/delete_invitation": { "post": { "summary": "Delete invitation", @@ -1468,6 +1650,32 @@ "tags": ["User Auth"] } }, + "/public/v1/submit/delete_policies": { + "post": { + "summary": "Delete policies", + "description": "Delete existing policies.", + "operationId": "DeletePolicies", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DeletePoliciesRequest" + } + } + ], + "tags": ["Policies"] + } + }, "/public/v1/submit/delete_policy": { "post": { "summary": "Delete policy", @@ -1650,6 +1858,32 @@ "tags": ["Users"] } }, + "/public/v1/submit/delete_wallet_accounts": { + "post": { + "summary": "Delete wallet accounts", + "description": "Delete wallet accounts for an organization.", + "operationId": "DeleteWalletAccounts", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DeleteWalletAccountsRequest" + } + } + ], + "tags": ["Wallets"] + } + }, "/public/v1/submit/delete_wallets": { "post": { "summary": "Delete wallets", @@ -1702,6 +1936,32 @@ "tags": ["User Auth"] } }, + "/public/v1/submit/eth_send_transaction": { + "post": { + "summary": "Submit a transaction intent for broadcasting.", + "description": "Submit a transaction intent describing a transaction you would like to broadcast.", + "operationId": "EthSendTransaction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/EthSendTransactionRequest" + } + } + ], + "tags": ["Broadcasting"] + } + }, "/public/v1/submit/export_private_key": { "post": { "summary": "Export private key", @@ -2300,6 +2560,32 @@ "tags": ["Signing"] } }, + "/public/v1/submit/sol_send_transaction": { + "post": { + "summary": "Submit a transaction intent for broadcasting.", + "description": "Submit a transaction intent describing a transaction you would like to broadcast.", + "operationId": "SolSendTransaction", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SolSendTransactionRequest" + } + } + ], + "tags": ["Broadcasting"] + } + }, "/public/v1/submit/stamp_login": { "post": { "summary": "Login with a stamp", @@ -2326,6 +2612,32 @@ "tags": ["Sessions"] } }, + "/public/v1/submit/update_fiat_on_ramp_credential": { + "post": { + "summary": "Update a Fiat On Ramp Credential", + "description": "Update a fiat on ramp provider credential", + "operationId": "UpdateFiatOnRampCredential", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateFiatOnRampCredentialRequest" + } + } + ], + "tags": ["On Ramp"] + } + }, "/public/v1/submit/update_oauth2_credential": { "post": { "summary": "Update an OAuth 2.0 Credential", @@ -2729,7 +3041,7 @@ "type": "object", "$ref": "#/definitions/AppProof" }, - "description": "A list of app proofs generated by enclaves during activity execution, providing verifiable attestations of performed operations." + "description": "A list of App Proofs generated by enclaves during activity execution, providing verifiable attestations of performed operations." }, "fingerprint": { "type": "string", @@ -2891,7 +3203,23 @@ "ACTIVITY_TYPE_CREATE_OAUTH2_CREDENTIAL", "ACTIVITY_TYPE_UPDATE_OAUTH2_CREDENTIAL", "ACTIVITY_TYPE_DELETE_OAUTH2_CREDENTIAL", - "ACTIVITY_TYPE_OAUTH2_AUTHENTICATE" + "ACTIVITY_TYPE_OAUTH2_AUTHENTICATE", + "ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS", + "ACTIVITY_TYPE_DELETE_POLICIES", + "ACTIVITY_TYPE_ETH_SEND_RAW_TRANSACTION", + "ACTIVITY_TYPE_ETH_SEND_TRANSACTION", + "ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL", + "ACTIVITY_TYPE_UPDATE_FIAT_ON_RAMP_CREDENTIAL", + "ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL", + "ACTIVITY_TYPE_EMAIL_AUTH_V3", + "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY_V2", + "ACTIVITY_TYPE_INIT_OTP_AUTH_V3", + "ACTIVITY_TYPE_INIT_OTP_V2", + "ACTIVITY_TYPE_UPSERT_GAS_USAGE_CONFIG", + "ACTIVITY_TYPE_CREATE_TVC_APP", + "ACTIVITY_TYPE_CREATE_TVC_DEPLOYMENT", + "ACTIVITY_TYPE_CREATE_TVC_MANIFEST_APPROVALS", + "ACTIVITY_TYPE_SOL_SEND_TRANSACTION" ] }, "AddressFormat": { @@ -3064,7 +3392,7 @@ "type": "object", "properties": { "scheme": { - "$ref": "#/definitions/SignatureScheme", + "$ref": "#/definitions/data.v1.SignatureScheme", "description": "Scheme of signing key." }, "publicKey": { @@ -3109,6 +3437,10 @@ }, "parameters": { "$ref": "#/definitions/ApproveActivityIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -3327,18 +3659,44 @@ }, "required": ["bootProof"] }, - "Config": { + "ClientSignature": { "type": "object", "properties": { - "features": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/Feature" - } + "publicKey": { + "type": "string", + "description": "The public component of a cryptographic key pair used to create the signature." }, - "quorum": { - "$ref": "#/definitions/external.data.v1.Quorum" + "scheme": { + "$ref": "#/definitions/ClientSignatureScheme", + "description": "The signature scheme used to generate the client signature." + }, + "message": { + "type": "string", + "description": "The message that was signed." + }, + "signature": { + "type": "string", + "description": "The cryptographic signature over the message." + } + }, + "required": ["publicKey", "scheme", "message", "signature"] + }, + "ClientSignatureScheme": { + "type": "string", + "enum": ["CLIENT_SIGNATURE_SCHEME_API_P256"] + }, + "Config": { + "type": "object", + "properties": { + "features": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/Feature" + } + }, + "quorum": { + "$ref": "#/definitions/external.data.v1.Quorum" } } }, @@ -3395,6 +3753,10 @@ }, "parameters": { "$ref": "#/definitions/CreateApiKeysIntentV2" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -3492,6 +3854,10 @@ }, "parameters": { "$ref": "#/definitions/CreateAuthenticatorsIntentV2" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -3509,6 +3875,77 @@ }, "required": ["authenticatorIds"] }, + "CreateFiatOnRampCredentialIntent": { + "type": "object", + "properties": { + "onrampProvider": { + "$ref": "#/definitions/FiatOnRampProvider", + "description": "The fiat on-ramp provider" + }, + "projectId": { + "type": "string", + "x-nullable": true, + "description": "Project ID for the on-ramp provider. Some providers, like Coinbase, require this additional identifier" + }, + "publishableApiKey": { + "type": "string", + "description": "Publishable API key for the on-ramp provider" + }, + "encryptedSecretApiKey": { + "type": "string", + "description": "Secret API key for the on-ramp provider encrypted to our on-ramp encryption public key" + }, + "encryptedPrivateApiKey": { + "type": "string", + "x-nullable": true, + "description": "Private API key for the on-ramp provider encrypted to our on-ramp encryption public key. Some providers, like Coinbase, require this additional key." + }, + "sandboxMode": { + "type": "boolean", + "description": "If the on-ramp credential is a sandbox credential" + } + }, + "required": [ + "onrampProvider", + "publishableApiKey", + "encryptedSecretApiKey" + ] + }, + "CreateFiatOnRampCredentialRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/CreateFiatOnRampCredentialIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "CreateFiatOnRampCredentialResult": { + "type": "object", + "properties": { + "fiatOnRampCredentialId": { + "type": "string", + "description": "Unique identifier of the Fiat On-Ramp credential that was created" + } + }, + "required": ["fiatOnRampCredentialId"] + }, "CreateInvitationsIntent": { "type": "object", "properties": { @@ -3540,6 +3977,10 @@ }, "parameters": { "$ref": "#/definitions/CreateInvitationsIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -3592,6 +4033,10 @@ }, "parameters": { "$ref": "#/definitions/CreateOauth2CredentialIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -3641,6 +4086,10 @@ }, "parameters": { "$ref": "#/definitions/CreateOauthProvidersIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -3745,6 +4194,10 @@ }, "parameters": { "$ref": "#/definitions/CreatePoliciesIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -3834,10 +4287,11 @@ "description": "The consensus expression that triggers the Effect" }, "notes": { - "type": "string" + "type": "string", + "description": "Notes for a Policy." } }, - "required": ["policyName", "effect"] + "required": ["policyName", "effect", "notes"] }, "CreatePolicyRequest": { "type": "object", @@ -3856,6 +4310,10 @@ }, "parameters": { "$ref": "#/definitions/CreatePolicyIntentV3" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -3904,6 +4362,10 @@ }, "parameters": { "$ref": "#/definitions/CreatePrivateKeyTagIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -3970,6 +4432,10 @@ }, "parameters": { "$ref": "#/definitions/CreatePrivateKeysIntentV2" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -4021,6 +4487,10 @@ }, "parameters": { "$ref": "#/definitions/CreateReadOnlySessionIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -4134,6 +4604,10 @@ }, "parameters": { "$ref": "#/definitions/CreateReadWriteSessionIntentV2" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -4221,7 +4695,7 @@ }, "smartContractInterface": { "type": "string", - "description": "ABI/IDL as a JSON string" + "description": "ABI/IDL as a JSON string. Limited to 400kb" }, "type": { "$ref": "#/definitions/SmartContractInterfaceType" @@ -4259,6 +4733,10 @@ }, "parameters": { "$ref": "#/definitions/CreateSmartContractInterfaceIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -4509,6 +4987,11 @@ "type": "string", "x-nullable": true, "description": "Signed JWT containing a unique id, expiry, verification type, contact" + }, + "clientSignature": { + "$ref": "#/definitions/ClientSignature", + "x-nullable": true, + "description": "Optional signature proving authorization for this sub-organization creation. The signature is over the verification token ID and the root user parameters for the root user associated with the verification token. Only required if a public key was provided during the verification step." } }, "required": ["subOrganizationName", "rootUsers", "rootQuorumThreshold"] @@ -4530,6 +5013,10 @@ }, "parameters": { "$ref": "#/definitions/CreateSubOrganizationIntentV7" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -4648,6 +5135,185 @@ }, "required": ["subOrganizationId"] }, + "CreateTvcAppIntent": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the new TVC application" + }, + "quorumPublicKey": { + "type": "string", + "description": "Quorum public key to use for this application" + }, + "manifestSetId": { + "type": "string", + "x-nullable": true, + "description": "Unique identifier for an existing TVC operator set to use as the Manifest Set for this TVC application. If left empty, a new Manifest Set configuration is required" + }, + "manifestSetParams": { + "$ref": "#/definitions/TvcOperatorSetParams", + "x-nullable": true, + "description": "Configuration to create a new TVC operator set, used as the Manifest Set for this TVC application. If left empty, a Manifest Set ID is required" + }, + "shareSetId": { + "type": "string", + "x-nullable": true, + "description": "Unique identifier for an existing TVC operator set to use as the Share Set for this TVC application. If left empty, a new Share Set configuration is required" + }, + "shareSetParams": { + "$ref": "#/definitions/TvcOperatorSetParams", + "x-nullable": true, + "description": "Configuration to create a new TVC operator set, used as the Share Set for this TVC application. If left empty, a Share Set ID is required" + }, + "externalConnectivity": { + "type": "boolean", + "x-nullable": true, + "description": "Enables external connectivity for this TVC app. Default if not provided: false." + } + }, + "required": ["name", "quorumPublicKey"] + }, + "CreateTvcAppResult": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "The unique identifier for the TVC application" + }, + "manifestSetId": { + "type": "string", + "description": "The unique identifier for the TVC manifest set" + }, + "manifestSetOperatorIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The unique identifier(s) of the manifest set operators" + }, + "manifestSetThreshold": { + "type": "integer", + "format": "int64", + "description": "The required number of approvals for the manifest set" + } + }, + "required": [ + "appId", + "manifestSetId", + "manifestSetOperatorIds", + "manifestSetThreshold" + ] + }, + "CreateTvcDeploymentIntent": { + "type": "object", + "properties": { + "appId": { + "type": "string", + "description": "The unique identifier of the to-be-deployed TVC application" + }, + "qosVersion": { + "type": "string", + "description": "The QuorumOS version to use to deploy this application" + }, + "pivotContainerImageUrl": { + "type": "string", + "description": "URL of the container containing the pivot binary" + }, + "pivotPath": { + "type": "string", + "description": "Location of the binary in the pivot container" + }, + "pivotArgs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Arguments to pass to the pivot binary at startup. Encoded as a list of strings, for example [\"--foo\", \"bar\"]" + }, + "expectedPivotDigest": { + "type": "string", + "description": "Digest of the pivot binary in the pivot container. This value will be inserted in the QOS manifest to ensure application integrity." + }, + "hostContainerImageUrl": { + "type": "string", + "description": "URL of the container containing the host binary" + }, + "hostPath": { + "type": "string", + "description": "Location of the binary inside the host container" + }, + "hostArgs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Arguments to pass to the host binary at startup. Encoded as a list of strings, for example [\"--foo\", \"bar\"]" + }, + "nonce": { + "type": "integer", + "format": "int64", + "x-nullable": true, + "description": "Optional nonce to ensure uniqueness of the deployment manifest. If not provided, it defaults to the current Unix timestamp in seconds." + } + }, + "required": [ + "appId", + "qosVersion", + "pivotContainerImageUrl", + "pivotPath", + "pivotArgs", + "expectedPivotDigest", + "hostContainerImageUrl", + "hostPath", + "hostArgs" + ] + }, + "CreateTvcDeploymentResult": { + "type": "object", + "properties": { + "deploymentId": { + "type": "string", + "description": "The unique identifier for the TVC deployment" + }, + "manifestId": { + "type": "string", + "description": "The unique identifier for the TVC manifest" + } + }, + "required": ["deploymentId", "manifestId"] + }, + "CreateTvcManifestApprovalsIntent": { + "type": "object", + "properties": { + "manifestId": { + "type": "string", + "description": "Unique identifier of the TVC deployment to approve" + }, + "approvals": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/TvcManifestApproval" + }, + "description": "List of manifest approvals" + } + }, + "required": ["manifestId", "approvals"] + }, + "CreateTvcManifestApprovalsResult": { + "type": "object", + "properties": { + "approvalIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The unique identifier(s) for the manifest approvals" + } + }, + "required": ["approvalIds"] + }, "CreateUserTagIntent": { "type": "object", "properties": { @@ -4682,6 +5348,10 @@ }, "parameters": { "$ref": "#/definitions/CreateUserTagIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -4762,6 +5432,10 @@ }, "parameters": { "$ref": "#/definitions/CreateUsersIntentV3" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -4793,6 +5467,11 @@ "$ref": "#/definitions/WalletAccountParams" }, "description": "A list of wallet Accounts." + }, + "persist": { + "type": "boolean", + "x-nullable": true, + "description": "Indicates if the wallet accounts should be persisted. This is helpful if you'd like to see the addresses of different derivation paths without actually creating the accounts. Defaults to true." } }, "required": ["walletId", "accounts"] @@ -4814,6 +5493,10 @@ }, "parameters": { "$ref": "#/definitions/CreateWalletAccountsIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -4872,6 +5555,10 @@ }, "parameters": { "$ref": "#/definitions/CreateWalletIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -4919,7 +5606,22 @@ }, "Curve": { "type": "string", - "enum": ["CURVE_SECP256K1", "CURVE_ED25519"] + "enum": ["CURVE_SECP256K1", "CURVE_ED25519", "CURVE_P256"] + }, + "CustomRevertError": { + "type": "object", + "properties": { + "errorName": { + "type": "string", + "x-nullable": true, + "description": "The name of the custom error." + }, + "paramsJson": { + "type": "string", + "x-nullable": true, + "description": "The decoded parameters as a JSON object." + } + } }, "DeleteApiKeysIntent": { "type": "object", @@ -4955,6 +5657,10 @@ }, "parameters": { "$ref": "#/definitions/DeleteApiKeysIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -5006,6 +5712,10 @@ }, "parameters": { "$ref": "#/definitions/DeleteAuthenticatorsIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -5023,22 +5733,67 @@ }, "required": ["authenticatorIds"] }, - "DeleteInvitationIntent": { + "DeleteFiatOnRampCredentialIntent": { "type": "object", "properties": { - "invitationId": { + "fiatOnrampCredentialId": { "type": "string", - "description": "Unique identifier for a given Invitation object." + "description": "The ID of the fiat on-ramp credential to delete" } }, - "required": ["invitationId"] + "required": ["fiatOnrampCredentialId"] }, - "DeleteInvitationRequest": { + "DeleteFiatOnRampCredentialRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_DELETE_INVITATION"] + "enum": ["ACTIVITY_TYPE_DELETE_FIAT_ON_RAMP_CREDENTIAL"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/DeleteFiatOnRampCredentialIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "DeleteFiatOnRampCredentialResult": { + "type": "object", + "properties": { + "fiatOnRampCredentialId": { + "type": "string", + "description": "Unique identifier of the Fiat On-Ramp credential that was deleted" + } + }, + "required": ["fiatOnRampCredentialId"] + }, + "DeleteInvitationIntent": { + "type": "object", + "properties": { + "invitationId": { + "type": "string", + "description": "Unique identifier for a given Invitation object." + } + }, + "required": ["invitationId"] + }, + "DeleteInvitationRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_DELETE_INVITATION"] }, "timestampMs": { "type": "string", @@ -5050,6 +5805,10 @@ }, "parameters": { "$ref": "#/definitions/DeleteInvitationIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -5091,6 +5850,10 @@ }, "parameters": { "$ref": "#/definitions/DeleteOauth2CredentialIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -5139,6 +5902,10 @@ }, "parameters": { "$ref": "#/definitions/DeleteOauthProvidersIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -5197,6 +5964,57 @@ }, "required": ["paymentMethodId"] }, + "DeletePoliciesIntent": { + "type": "object", + "properties": { + "policyIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of unique identifiers for policies within an organization" + } + }, + "required": ["policyIds"] + }, + "DeletePoliciesRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_DELETE_POLICIES"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/DeletePoliciesIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "DeletePoliciesResult": { + "type": "object", + "properties": { + "policyIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of unique identifiers for the deleted policies." + } + }, + "required": ["policyIds"] + }, "DeletePolicyIntent": { "type": "object", "properties": { @@ -5224,6 +6042,10 @@ }, "parameters": { "$ref": "#/definitions/DeletePolicyIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -5268,6 +6090,10 @@ }, "parameters": { "$ref": "#/definitions/DeletePrivateKeyTagsIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -5327,6 +6153,10 @@ }, "parameters": { "$ref": "#/definitions/DeletePrivateKeysIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -5371,6 +6201,10 @@ }, "parameters": { "$ref": "#/definitions/DeleteSmartContractInterfaceIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -5412,6 +6246,10 @@ }, "parameters": { "$ref": "#/definitions/DeleteSubOrganizationIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -5456,6 +6294,10 @@ }, "parameters": { "$ref": "#/definitions/DeleteUserTagsIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -5510,6 +6352,10 @@ }, "parameters": { "$ref": "#/definitions/DeleteUsersIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -5527,6 +6373,62 @@ }, "required": ["userIds"] }, + "DeleteWalletAccountsIntent": { + "type": "object", + "properties": { + "walletAccountIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of unique identifiers for wallet accounts within an organization" + }, + "deleteWithoutExport": { + "type": "boolean", + "x-nullable": true, + "description": "Optional parameter for deleting the wallet accounts, even if any have not been previously exported. If they have been exported, this field is ignored." + } + }, + "required": ["walletAccountIds"] + }, + "DeleteWalletAccountsRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_DELETE_WALLET_ACCOUNTS"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/DeleteWalletAccountsIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "DeleteWalletAccountsResult": { + "type": "object", + "properties": { + "walletAccountIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of wallet account unique identifiers that were removed" + } + }, + "required": ["walletAccountIds"] + }, "DeleteWalletsIntent": { "type": "object", "properties": { @@ -5562,6 +6464,10 @@ }, "parameters": { "$ref": "#/definitions/DeleteWalletsIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -5609,6 +6515,36 @@ "type": "string", "enum": ["EFFECT_ALLOW", "EFFECT_DENY"] }, + "EmailAuthCustomizationParams": { + "type": "object", + "properties": { + "appName": { + "type": "string", + "description": "The name of the application. This field is required and will be used in email notifications if an email template is not provided." + }, + "logoUrl": { + "type": "string", + "x-nullable": true, + "description": "A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px." + }, + "magicLinkTemplate": { + "type": "string", + "x-nullable": true, + "description": "A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`." + }, + "templateVariables": { + "type": "string", + "x-nullable": true, + "description": "JSON object containing key/value pairs to be used with custom templates." + }, + "templateId": { + "type": "string", + "x-nullable": true, + "description": "Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template." + } + }, + "required": ["appName"] + }, "EmailAuthIntent": { "type": "object", "properties": { @@ -5707,12 +6643,60 @@ }, "required": ["email", "targetPublicKey"] }, + "EmailAuthIntentV3": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email of the authenticating user." + }, + "targetPublicKey": { + "type": "string", + "description": "Client-side public key generated by the user, to which the email auth bundle (credentials) will be encrypted." + }, + "apiKeyName": { + "type": "string", + "x-nullable": true, + "description": "Optional human-readable name for an API Key. If none provided, default to Email Auth - \u003cTimestamp\u003e" + }, + "expirationSeconds": { + "type": "string", + "x-nullable": true, + "description": "Expiration window (in seconds) indicating how long the API key is valid for. If not provided, a default of 15 minutes will be used." + }, + "emailCustomization": { + "$ref": "#/definitions/EmailAuthCustomizationParams", + "description": "Parameters for customizing emails. If not provided, the default email will be used. Note that app_name is required." + }, + "invalidateExisting": { + "type": "boolean", + "x-nullable": true, + "description": "Invalidate all other previously generated Email Auth API keys" + }, + "sendFromEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address from which to send the email" + }, + "sendFromEmailSenderName": { + "type": "string", + "x-nullable": true, + "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" + }, + "replyToEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address to use as reply-to" + } + }, + "required": ["email", "targetPublicKey", "emailCustomization"] + }, "EmailAuthRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_EMAIL_AUTH_V2"] + "enum": ["ACTIVITY_TYPE_EMAIL_AUTH_V3"] }, "timestampMs": { "type": "string", @@ -5723,7 +6707,11 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/EmailAuthIntentV2" + "$ref": "#/definitions/EmailAuthIntentV3" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -5772,6 +6760,31 @@ } } }, + "EmailCustomizationParamsV2": { + "type": "object", + "properties": { + "logoUrl": { + "type": "string", + "x-nullable": true, + "description": "A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px." + }, + "magicLinkTemplate": { + "type": "string", + "x-nullable": true, + "description": "A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`." + }, + "templateVariables": { + "type": "string", + "x-nullable": true, + "description": "JSON object containing key/value pairs to be used with custom templates." + }, + "templateId": { + "type": "string", + "x-nullable": true, + "description": "Unique identifier for a given Email Template. If not specified, the default is the most recent Email Template." + } + } + }, "EnableAuthProxyIntent": { "type": "object" }, @@ -5785,6 +6798,147 @@ }, "required": ["userId"] }, + "EthSendRawTransactionIntent": { + "type": "object", + "properties": { + "signedTransaction": { + "type": "string", + "description": "The raw, signed transaction to be sent." + }, + "caip2": { + "type": "string", + "enum": [ + "eip155:1", + "eip155:11155111", + "eip155:8453", + "eip155:84532" + ], + "description": "CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet)." + } + }, + "required": ["signedTransaction", "caip2"] + }, + "EthSendRawTransactionResult": { + "type": "object", + "properties": { + "transactionHash": { + "type": "string", + "description": "The transaction hash of the sent transaction" + } + }, + "required": ["transactionHash"] + }, + "EthSendTransactionIntent": { + "type": "object", + "properties": { + "from": { + "type": "string", + "description": "A wallet or private key address to sign with. This does not support private key IDs." + }, + "sponsor": { + "type": "boolean", + "x-nullable": true, + "description": "Whether to sponsor this transaction via Gas Station." + }, + "caip2": { + "type": "string", + "enum": [ + "eip155:1", + "eip155:11155111", + "eip155:8453", + "eip155:84532", + "eip155:137", + "eip155:80002" + ], + "description": "CAIP-2 chain ID (e.g., 'eip155:1' for Ethereum mainnet)." + }, + "to": { + "type": "string", + "description": "Recipient address as a hex string with 0x prefix." + }, + "value": { + "type": "string", + "x-nullable": true, + "description": "Amount of native asset to send in wei." + }, + "data": { + "type": "string", + "x-nullable": true, + "description": "Hex-encoded call data for contract interactions." + }, + "nonce": { + "type": "string", + "x-nullable": true, + "description": "Transaction nonce, for EIP-1559 and Turnkey Gas Station authorizations." + }, + "gasLimit": { + "type": "string", + "x-nullable": true, + "description": "Maximum amount of gas to use for this transaction, for EIP-1559 transactions." + }, + "maxFeePerGas": { + "type": "string", + "x-nullable": true, + "description": "Maximum total fee per gas unit (base fee + priority fee) in wei. Required for non-sponsored (EIP-1559) transactions. Not used for sponsored transactions." + }, + "maxPriorityFeePerGas": { + "type": "string", + "x-nullable": true, + "description": "Maximum priority fee (tip) per gas unit in wei. Required for non-sponsored (EIP-1559) transactions. Not used for sponsored transactions." + }, + "gasStationNonce": { + "type": "string", + "x-nullable": true, + "description": "The gas station delegate contract nonce. Only used when sponsor=true. Include this if you want maximal security posture." + } + }, + "required": ["from", "caip2", "to"] + }, + "EthSendTransactionRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_ETH_SEND_TRANSACTION"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/EthSendTransactionIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "EthSendTransactionResult": { + "type": "object", + "properties": { + "sendTransactionStatusId": { + "type": "string", + "description": "The send_transaction_status ID associated with the transaction submission" + } + }, + "required": ["sendTransactionStatusId"] + }, + "EthSendTransactionStatus": { + "type": "object", + "properties": { + "txHash": { + "type": "string", + "x-nullable": true, + "description": "The Ethereum transaction hash, if available." + } + } + }, "ExportPrivateKeyIntent": { "type": "object", "properties": { @@ -5816,6 +6970,10 @@ }, "parameters": { "$ref": "#/definitions/ExportPrivateKeyIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -5865,6 +7023,10 @@ }, "parameters": { "$ref": "#/definitions/ExportWalletAccountIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -5919,6 +7081,10 @@ }, "parameters": { "$ref": "#/definitions/ExportWalletIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -5971,6 +7137,60 @@ "FIAT_ON_RAMP_BLOCKCHAIN_NETWORK_BASE" ] }, + "FiatOnRampCredential": { + "type": "object", + "properties": { + "fiatOnrampCredentialId": { + "type": "string", + "description": "Unique identifier for a given Fiat On-Ramp Credential." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for an Organization." + }, + "onrampProvider": { + "$ref": "#/definitions/FiatOnRampProvider", + "description": "The fiat on-ramp provider." + }, + "projectId": { + "type": "string", + "x-nullable": true, + "description": "Project ID for the on-ramp provider. Some providers, like Coinbase, require this additional identifier." + }, + "publishableApiKey": { + "type": "string", + "description": "Publishable API key for the on-ramp provider." + }, + "encryptedSecretApiKey": { + "type": "string", + "description": "Secret API key for the on-ramp provider encrypted to our on-ramp encryption public key." + }, + "encryptedPrivateApiKey": { + "type": "string", + "x-nullable": true, + "description": "Private API key for the on-ramp provider encrypted to our on-ramp encryption public key. Some providers, like Coinbase, require this additional key." + }, + "sandboxMode": { + "type": "boolean", + "description": "If the on-ramp credential is a sandbox credential." + }, + "createdAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + }, + "updatedAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + } + }, + "required": [ + "fiatOnrampCredentialId", + "organizationId", + "onrampProvider", + "publishableApiKey", + "encryptedSecretApiKey", + "createdAt", + "updatedAt" + ] + }, "FiatOnRampCryptoCurrency": { "type": "string", "enum": [ @@ -6246,6 +7466,35 @@ }, "required": ["organizationId", "ephemeralKey"] }, + "GetGasUsageRequest": { + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + } + }, + "required": ["organizationId"] + }, + "GetGasUsageResponse": { + "type": "object", + "properties": { + "windowDurationMinutes": { + "type": "integer", + "format": "int32", + "description": "The window duration (in minutes) for the organization or sub-organization." + }, + "windowLimitUsd": { + "type": "string", + "description": "The window limit (in USD) for the organization or sub-organization." + }, + "usageUsd": { + "type": "string", + "description": "The total gas usage (in USD) of all sponsored transactions processed over the last `window_duration_minutes`" + } + }, + "required": ["windowDurationMinutes", "windowLimitUsd", "usageUsd"] + }, "GetLatestBootProofRequest": { "type": "object", "properties": { @@ -6260,6 +7509,49 @@ }, "required": ["organizationId", "appName"] }, + "GetNoncesRequest": { + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "address": { + "type": "string", + "description": "The Ethereum address to query nonces for." + }, + "caip2": { + "type": "string", + "description": "The network identifier in CAIP-2 format (e.g., 'eip155:1' for Ethereum mainnet)." + }, + "nonce": { + "type": "boolean", + "description": "Whether to fetch the standard on-chain nonce." + }, + "gasStationNonce": { + "type": "boolean", + "description": "Whether to fetch the gas station nonce used for sponsored transactions." + } + }, + "required": ["organizationId", "address", "caip2"] + }, + "GetNoncesResponse": { + "type": "object", + "properties": { + "nonce": { + "type": "string", + "format": "uint64", + "x-nullable": true, + "description": "The standard on-chain nonce for the address, if requested." + }, + "gasStationNonce": { + "type": "string", + "format": "uint64", + "x-nullable": true, + "description": "The gas station nonce for sponsored transactions, if requested." + } + } + }, "GetOauth2CredentialRequest": { "type": "object", "properties": { @@ -6312,6 +7604,35 @@ }, "required": ["oauthProviders"] }, + "GetOnRampTransactionStatusRequest": { + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "Unique identifier for a given organization." + }, + "transactionId": { + "type": "string", + "description": "The unique identifier for the fiat on ramp transaction." + }, + "refresh": { + "type": "boolean", + "x-nullable": true, + "description": "Optional flag to specify if the transaction status should be refreshed from the fiat on ramp provider. Default = false." + } + }, + "required": ["organizationId", "transactionId"] + }, + "GetOnRampTransactionStatusResponse": { + "type": "object", + "properties": { + "transactionStatus": { + "type": "string", + "description": "The status of the fiat on ramp transaction." + } + }, + "required": ["transactionStatus"] + }, "GetOrganizationConfigsRequest": { "type": "object", "properties": { @@ -6455,6 +7776,44 @@ }, "required": ["privateKeys"] }, + "GetSendTransactionStatusRequest": { + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "Unique identifier for a given organization." + }, + "sendTransactionStatusId": { + "type": "string", + "description": "The unique identifier of a send transaction request." + } + }, + "required": ["organizationId", "sendTransactionStatusId"] + }, + "GetSendTransactionStatusResponse": { + "type": "object", + "properties": { + "txStatus": { + "type": "string", + "description": "The current status of the send transaction." + }, + "eth": { + "$ref": "#/definitions/EthSendTransactionStatus", + "description": "Ethereum-specific transaction status." + }, + "txError": { + "type": "string", + "x-nullable": true, + "description": "The error encountered when broadcasting or confirming the transaction, if any." + }, + "error": { + "$ref": "#/definitions/TxError", + "x-nullable": true, + "description": "Structured error information including revert details, if available." + } + }, + "required": ["txStatus"] + }, "GetSmartContractInterfaceRequest": { "type": "object", "properties": { @@ -6473,7 +7832,7 @@ "type": "object", "properties": { "smartContractInterface": { - "$ref": "#/definitions/SmartContractInterface", + "$ref": "#/definitions/data.v1.SmartContractInterface", "description": "Object to be used in conjunction with policies to guard transaction signing." } }, @@ -6496,7 +7855,7 @@ "type": "array", "items": { "type": "object", - "$ref": "#/definitions/SmartContractInterface" + "$ref": "#/definitions/data.v1.SmartContractInterface" }, "description": "A list of smart contract interfaces." } @@ -6834,6 +8193,10 @@ }, "parameters": { "$ref": "#/definitions/ImportPrivateKeyIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -6899,6 +8262,10 @@ }, "parameters": { "$ref": "#/definitions/ImportWalletIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -6999,6 +8366,10 @@ }, "parameters": { "$ref": "#/definitions/InitFiatOnRampIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -7048,6 +8419,10 @@ }, "parameters": { "$ref": "#/definitions/InitImportPrivateKeyIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -7089,6 +8464,10 @@ }, "parameters": { "$ref": "#/definitions/InitImportWalletIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -7172,7 +8551,7 @@ "smsCustomization": { "$ref": "#/definitions/SmsCustomizationParams", "x-nullable": true, - "description": "Optional parameters for customizing SMS message. If not provided, the default sms message will be used." + "description": "Optional parameters for customizing SMS message. If not provided, the default SMS message will be used." }, "userIdentifier": { "type": "string", @@ -7202,48 +8581,176 @@ }, "required": ["otpType", "contact"] }, + "InitOtpAuthIntentV3": { + "type": "object", + "properties": { + "otpType": { + "type": "string", + "description": "Whether to send OTP via SMS or email. Possible values: OTP_TYPE_SMS, OTP_TYPE_EMAIL" + }, + "contact": { + "type": "string", + "description": "Email or phone number to send the OTP code to" + }, + "otpLength": { + "type": "integer", + "format": "int32", + "x-nullable": true, + "description": "Optional length of the OTP code. Default = 9" + }, + "appName": { + "type": "string", + "description": "The name of the application. This field is required and will be used in email notifications if an email template is not provided." + }, + "emailCustomization": { + "$ref": "#/definitions/EmailCustomizationParamsV2", + "x-nullable": true, + "description": "Optional parameters for customizing emails. If not provided, the default email will be used." + }, + "smsCustomization": { + "$ref": "#/definitions/SmsCustomizationParams", + "x-nullable": true, + "description": "Optional parameters for customizing SMS message. If not provided, the default SMS message will be used." + }, + "userIdentifier": { + "type": "string", + "x-nullable": true, + "description": "Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address." + }, + "sendFromEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address from which to send the OTP email" + }, + "alphanumeric": { + "type": "boolean", + "x-nullable": true, + "description": "Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). Default = true" + }, + "sendFromEmailSenderName": { + "type": "string", + "x-nullable": true, + "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" + }, + "expirationSeconds": { + "type": "string", + "x-nullable": true, + "description": "Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes)" + }, + "replyToEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address to use as reply-to" + } + }, + "required": ["otpType", "contact", "appName"] + }, "InitOtpAuthRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_INIT_OTP_AUTH_V2"] + "enum": ["ACTIVITY_TYPE_INIT_OTP_AUTH_V3"] }, "timestampMs": { "type": "string", "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "organizationId": { + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/InitOtpAuthIntentV3" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "InitOtpAuthResult": { + "type": "object", + "properties": { + "otpId": { + "type": "string", + "description": "Unique identifier for an OTP authentication" + } + }, + "required": ["otpId"] + }, + "InitOtpAuthResultV2": { + "type": "object", + "properties": { + "otpId": { + "type": "string", + "description": "Unique identifier for an OTP authentication" + } + }, + "required": ["otpId"] + }, + "InitOtpIntent": { + "type": "object", + "properties": { + "otpType": { + "type": "string", + "description": "Whether to send OTP via SMS or email. Possible values: OTP_TYPE_SMS, OTP_TYPE_EMAIL" + }, + "contact": { + "type": "string", + "description": "Email or phone number to send the OTP code to" + }, + "otpLength": { + "type": "integer", + "format": "int32", + "x-nullable": true, + "description": "Optional length of the OTP code. Default = 9" + }, + "emailCustomization": { + "$ref": "#/definitions/EmailCustomizationParams", + "x-nullable": true, + "description": "Optional parameters for customizing emails. If not provided, the default email will be used." + }, + "smsCustomization": { + "$ref": "#/definitions/SmsCustomizationParams", + "x-nullable": true, + "description": "Optional parameters for customizing SMS message. If not provided, the default sms message will be used." + }, + "userIdentifier": { + "type": "string", + "x-nullable": true, + "description": "Optional client-generated user identifier to enable per-user rate limiting for SMS auth. We recommend using a hash of the client-side IP address." + }, + "sendFromEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address from which to send the OTP email" + }, + "alphanumeric": { + "type": "boolean", + "x-nullable": true, + "description": "Optional flag to specify if the OTP code should be alphanumeric (Crockford’s Base32). Default = true" + }, + "sendFromEmailSenderName": { + "type": "string", + "x-nullable": true, + "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" + }, + "expirationSeconds": { "type": "string", - "description": "Unique identifier for a given Organization." + "x-nullable": true, + "description": "Expiration window (in seconds) indicating how long the OTP is valid for. If not provided, a default of 5 minutes will be used. Maximum value is 600 seconds (10 minutes)" }, - "parameters": { - "$ref": "#/definitions/InitOtpAuthIntentV2" - } - }, - "required": ["type", "timestampMs", "organizationId", "parameters"] - }, - "InitOtpAuthResult": { - "type": "object", - "properties": { - "otpId": { - "type": "string", - "description": "Unique identifier for an OTP authentication" - } - }, - "required": ["otpId"] - }, - "InitOtpAuthResultV2": { - "type": "object", - "properties": { - "otpId": { + "replyToEmailAddress": { "type": "string", - "description": "Unique identifier for an OTP authentication" + "x-nullable": true, + "description": "Optional custom email address to use as reply-to" } }, - "required": ["otpId"] + "required": ["otpType", "contact"] }, - "InitOtpIntent": { + "InitOtpIntentV2": { "type": "object", "properties": { "otpType": { @@ -7260,15 +8767,19 @@ "x-nullable": true, "description": "Optional length of the OTP code. Default = 9" }, + "appName": { + "type": "string", + "description": "The name of the application. This field is required and will be used in email notifications if an email template is not provided." + }, "emailCustomization": { - "$ref": "#/definitions/EmailCustomizationParams", + "$ref": "#/definitions/EmailCustomizationParamsV2", "x-nullable": true, "description": "Optional parameters for customizing emails. If not provided, the default email will be used." }, "smsCustomization": { "$ref": "#/definitions/SmsCustomizationParams", "x-nullable": true, - "description": "Optional parameters for customizing SMS message. If not provided, the default sms message will be used." + "description": "Optional parameters for customizing SMS message. If not provided, the default SMS message will be used." }, "userIdentifier": { "type": "string", @@ -7301,14 +8812,14 @@ "description": "Optional custom email address to use as reply-to" } }, - "required": ["otpType", "contact"] + "required": ["otpType", "contact", "appName"] }, "InitOtpRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_INIT_OTP"] + "enum": ["ACTIVITY_TYPE_INIT_OTP_V2"] }, "timestampMs": { "type": "string", @@ -7319,7 +8830,11 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/InitOtpIntent" + "$ref": "#/definitions/InitOtpIntentV2" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -7354,16 +8869,69 @@ "$ref": "#/definitions/EmailCustomizationParams", "x-nullable": true, "description": "Optional parameters for customizing emails. If not provided, the default email will be used." + }, + "sendFromEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address from which to send the OTP email" + }, + "sendFromEmailSenderName": { + "type": "string", + "x-nullable": true, + "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" + }, + "replyToEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address to use as reply-to" } }, "required": ["email", "targetPublicKey"] }, + "InitUserEmailRecoveryIntentV2": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email of the user starting recovery" + }, + "targetPublicKey": { + "type": "string", + "description": "Client-side public key generated by the user, to which the recovery bundle will be encrypted." + }, + "expirationSeconds": { + "type": "string", + "x-nullable": true, + "description": "Expiration window (in seconds) indicating how long the recovery credential is valid for. If not provided, a default of 15 minutes will be used." + }, + "emailCustomization": { + "$ref": "#/definitions/EmailAuthCustomizationParams", + "description": "Parameters for customizing emails. If not provided, the default email will be used. Note that `app_name` is required." + }, + "sendFromEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address from which to send the OTP email" + }, + "sendFromEmailSenderName": { + "type": "string", + "x-nullable": true, + "description": "Optional custom sender name for use with sendFromEmailAddress; if left empty, will default to 'Notifications'" + }, + "replyToEmailAddress": { + "type": "string", + "x-nullable": true, + "description": "Optional custom email address to use as reply-to" + } + }, + "required": ["email", "targetPublicKey", "emailCustomization"] + }, "InitUserEmailRecoveryRequest": { "type": "object", "properties": { "type": { "type": "string", - "enum": ["ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY"] + "enum": ["ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY_V2"] }, "timestampMs": { "type": "string", @@ -7374,7 +8942,11 @@ "description": "Unique identifier for a given Organization." }, "parameters": { - "$ref": "#/definitions/InitUserEmailRecoveryIntent" + "$ref": "#/definitions/InitUserEmailRecoveryIntentV2" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -7694,6 +9266,54 @@ }, "oauth2AuthenticateIntent": { "$ref": "#/definitions/Oauth2AuthenticateIntent" + }, + "deleteWalletAccountsIntent": { + "$ref": "#/definitions/DeleteWalletAccountsIntent" + }, + "deletePoliciesIntent": { + "$ref": "#/definitions/DeletePoliciesIntent" + }, + "ethSendRawTransactionIntent": { + "$ref": "#/definitions/EthSendRawTransactionIntent" + }, + "ethSendTransactionIntent": { + "$ref": "#/definitions/EthSendTransactionIntent" + }, + "createFiatOnRampCredentialIntent": { + "$ref": "#/definitions/CreateFiatOnRampCredentialIntent" + }, + "updateFiatOnRampCredentialIntent": { + "$ref": "#/definitions/UpdateFiatOnRampCredentialIntent" + }, + "deleteFiatOnRampCredentialIntent": { + "$ref": "#/definitions/DeleteFiatOnRampCredentialIntent" + }, + "emailAuthIntentV3": { + "$ref": "#/definitions/EmailAuthIntentV3" + }, + "initUserEmailRecoveryIntentV2": { + "$ref": "#/definitions/InitUserEmailRecoveryIntentV2" + }, + "initOtpIntentV2": { + "$ref": "#/definitions/InitOtpIntentV2" + }, + "initOtpAuthIntentV3": { + "$ref": "#/definitions/InitOtpAuthIntentV3" + }, + "upsertGasUsageConfigIntent": { + "$ref": "#/definitions/UpsertGasUsageConfigIntent" + }, + "createTvcAppIntent": { + "$ref": "#/definitions/CreateTvcAppIntent" + }, + "createTvcDeploymentIntent": { + "$ref": "#/definitions/CreateTvcDeploymentIntent" + }, + "createTvcManifestApprovalsIntent": { + "$ref": "#/definitions/CreateTvcManifestApprovalsIntent" + }, + "solSendTransactionIntent": { + "$ref": "#/definitions/SolSendTransactionIntent" } } }, @@ -7732,6 +9352,29 @@ "senderUserId" ] }, + "ListFiatOnRampCredentialsRequest": { + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + } + }, + "required": ["organizationId"] + }, + "ListFiatOnRampCredentialsResponse": { + "type": "object", + "properties": { + "fiatOnRampCredentials": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/FiatOnRampCredential" + } + } + }, + "required": ["fiatOnRampCredentials"] + }, "ListOauth2CredentialsRequest": { "type": "object", "properties": { @@ -7817,6 +9460,27 @@ "MNEMONIC_LANGUAGE_SPANISH" ] }, + "NativeRevertError": { + "type": "object", + "properties": { + "nativeType": { + "type": "string", + "x-nullable": true, + "description": "The type of native error: 'error_string', 'panic', or 'execution_reverted'." + }, + "message": { + "type": "string", + "x-nullable": true, + "description": "The error message for Error(string) reverts." + }, + "panicCode": { + "type": "string", + "format": "uint64", + "x-nullable": true, + "description": "The panic code for Panic(uint256) reverts." + } + } + }, "Oauth2AuthenticateIntent": { "type": "object", "properties": { @@ -7871,6 +9535,10 @@ }, "parameters": { "$ref": "#/definitions/Oauth2AuthenticateIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -7999,6 +9667,10 @@ }, "parameters": { "$ref": "#/definitions/OauthLoginIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -8084,6 +9756,10 @@ }, "parameters": { "$ref": "#/definitions/OauthIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -8172,6 +9848,10 @@ }, "parameters": { "$ref": "#/definitions/OtpAuthIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -8216,9 +9896,9 @@ "description": "Invalidate all other previously generated Login API keys" }, "clientSignature": { - "type": "string", + "$ref": "#/definitions/ClientSignature", "x-nullable": true, - "description": "Optional signature associated with the public key passed into the verification step. This must be a hex-encoded ECDSA signature over the verification token. Only required if a public key was provided during the verification step." + "description": "Optional signature proving authorization for this login. The signature is over the verification token ID and the public key. Only required if a public key was provided during the verification step." } }, "required": ["verificationToken", "publicKey"] @@ -8240,6 +9920,10 @@ }, "parameters": { "$ref": "#/definitions/OtpLoginIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -8510,6 +10194,10 @@ }, "parameters": { "$ref": "#/definitions/RecoverUserIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -8554,6 +10242,10 @@ }, "parameters": { "$ref": "#/definitions/RejectActivityIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -8585,6 +10277,10 @@ }, "parameters": { "$ref": "#/definitions/RemoveOrganizationFeatureIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -8863,6 +10559,71 @@ }, "oauth2AuthenticateResult": { "$ref": "#/definitions/Oauth2AuthenticateResult" + }, + "deleteWalletAccountsResult": { + "$ref": "#/definitions/DeleteWalletAccountsResult" + }, + "deletePoliciesResult": { + "$ref": "#/definitions/DeletePoliciesResult" + }, + "ethSendRawTransactionResult": { + "$ref": "#/definitions/EthSendRawTransactionResult" + }, + "createFiatOnRampCredentialResult": { + "$ref": "#/definitions/CreateFiatOnRampCredentialResult" + }, + "updateFiatOnRampCredentialResult": { + "$ref": "#/definitions/UpdateFiatOnRampCredentialResult" + }, + "deleteFiatOnRampCredentialResult": { + "$ref": "#/definitions/DeleteFiatOnRampCredentialResult" + }, + "ethSendTransactionResult": { + "$ref": "#/definitions/EthSendTransactionResult" + }, + "upsertGasUsageConfigResult": { + "$ref": "#/definitions/UpsertGasUsageConfigResult" + }, + "createTvcAppResult": { + "$ref": "#/definitions/CreateTvcAppResult" + }, + "createTvcDeploymentResult": { + "$ref": "#/definitions/CreateTvcDeploymentResult" + }, + "createTvcManifestApprovalsResult": { + "$ref": "#/definitions/CreateTvcManifestApprovalsResult" + }, + "solSendTransactionResult": { + "$ref": "#/definitions/SolSendTransactionResult" + } + } + }, + "RevertChainEntry": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "The contract address where the revert occurred." + }, + "errorType": { + "type": "string", + "description": "Type of error: 'unknown', 'native', or 'custom'." + }, + "displayMessage": { + "type": "string", + "description": "Human-readable message describing this revert." + }, + "unknown": { + "$ref": "#/definitions/UnknownRevertError", + "description": "Details for unknown error types." + }, + "native": { + "$ref": "#/definitions/NativeRevertError", + "description": "Details for native Solidity errors (Error, Panic, execution reverted)." + }, + "custom": { + "$ref": "#/definitions/CustomRevertError", + "description": "Details for custom contract errors." } } }, @@ -9082,6 +10843,10 @@ }, "parameters": { "$ref": "#/definitions/SetOrganizationFeatureIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -9234,6 +10999,10 @@ }, "parameters": { "$ref": "#/definitions/SignRawPayloadIntentV2" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -9298,6 +11067,10 @@ }, "parameters": { "$ref": "#/definitions/SignRawPayloadsIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -9365,6 +11138,10 @@ }, "parameters": { "$ref": "#/definitions/SignTransactionIntentV2" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -9378,10 +11155,6 @@ }, "required": ["signedTransaction"] }, - "SignatureScheme": { - "type": "string", - "enum": ["SIGNATURE_SCHEME_EPHEMERAL_KEY_P256"] - }, "SimpleClientExtensionResults": { "type": "object", "properties": { @@ -9399,72 +11172,90 @@ } } }, - "SmartContractInterface": { + "SmartContractInterfaceType": { + "type": "string", + "enum": [ + "SMART_CONTRACT_INTERFACE_TYPE_ETHEREUM", + "SMART_CONTRACT_INTERFACE_TYPE_SOLANA" + ] + }, + "SmsCustomizationParams": { "type": "object", "properties": { - "organizationId": { + "template": { "type": "string", - "description": "The Organization the Smart Contract Interface belongs to." - }, - "smartContractInterfaceId": { + "x-nullable": true, + "description": "Template containing references to .OtpCode i.e Your OTP is {{.OtpCode}}" + } + } + }, + "SolSendTransactionIntent": { + "type": "object", + "properties": { + "unsignedTransaction": { "type": "string", - "description": "Unique identifier for a given Smart Contract Interface (ABI or IDL)." + "description": "Base64-encoded serialized unsigned Solana transaction" }, - "smartContractAddress": { + "signWith": { "type": "string", - "description": "The address corresponding to the Smart Contract or Program." + "description": "A wallet or private key address to sign with. This does not support private key IDs." }, - "smartContractInterface": { + "sponsor": { + "type": "boolean", + "x-nullable": true, + "description": "Whether to sponsor this transaction via Gas Station." + }, + "caip2": { "type": "string", - "description": "The JSON corresponding to the Smart Contract Interface (ABI or IDL)." + "enum": [ + "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp", + "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG", + "solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3zQawwpjk2NsNY" + ], + "description": "CAIP-2 chain ID (e.g., 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' for Solana mainnet)." }, + "recentBlockhash": { + "type": "string", + "x-nullable": true, + "description": "user-provided blockhash for replay protection / deadline control. If omitted and sponsor=true, we fetch a fresh blockhash during execution" + } + }, + "required": ["unsignedTransaction", "signWith", "caip2"] + }, + "SolSendTransactionRequest": { + "type": "object", + "properties": { "type": { "type": "string", - "description": "The type corresponding to the Smart Contract Interface (either ETHEREUM or SOLANA)." + "enum": ["ACTIVITY_TYPE_SOL_SEND_TRANSACTION"] }, - "label": { + "timestampMs": { "type": "string", - "description": "The label corresponding to the Smart Contract Interface (either ETHEREUM or SOLANA)." + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." }, - "notes": { + "organizationId": { "type": "string", - "description": "The notes corresponding to the Smart Contract Interface (either ETHEREUM or SOLANA)." + "description": "Unique identifier for a given Organization." }, - "createdAt": { - "$ref": "#/definitions/external.data.v1.Timestamp" + "parameters": { + "$ref": "#/definitions/SolSendTransactionIntent" }, - "updatedAt": { - "$ref": "#/definitions/external.data.v1.Timestamp" + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, - "required": [ - "organizationId", - "smartContractInterfaceId", - "smartContractAddress", - "smartContractInterface", - "type", - "label", - "notes", - "createdAt", - "updatedAt" - ] - }, - "SmartContractInterfaceType": { - "type": "string", - "enum": [ - "SMART_CONTRACT_INTERFACE_TYPE_ETHEREUM", - "SMART_CONTRACT_INTERFACE_TYPE_SOLANA" - ] + "required": ["type", "timestampMs", "organizationId", "parameters"] }, - "SmsCustomizationParams": { + "SolSendTransactionResult": { "type": "object", "properties": { - "template": { + "sendTransactionStatusId": { "type": "string", - "x-nullable": true, - "description": "Template containing references to .OtpCode i.e Your OTP is {{.OtpCode}}" + "description": "The send_transaction_status ID associated with the transaction submission" } - } + }, + "required": ["sendTransactionStatusId"] }, "StampLoginIntent": { "type": "object", @@ -9503,6 +11294,10 @@ }, "parameters": { "$ref": "#/definitions/StampLoginIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -9545,9 +11340,101 @@ "enum": [ "TRANSACTION_TYPE_ETHEREUM", "TRANSACTION_TYPE_SOLANA", - "TRANSACTION_TYPE_TRON" + "TRANSACTION_TYPE_TRON", + "TRANSACTION_TYPE_BITCOIN", + "TRANSACTION_TYPE_TEMPO" ] }, + "TvcManifestApproval": { + "type": "object", + "properties": { + "operatorId": { + "type": "string", + "description": "Unique identifier of the operator providing this approval" + }, + "signature": { + "type": "string", + "description": "Signature from the operator approving the manifest" + } + }, + "required": ["operatorId", "signature"] + }, + "TvcOperatorParams": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name for this new operator" + }, + "publicKey": { + "type": "string", + "description": "Public key for this operator" + } + }, + "required": ["name", "publicKey"] + }, + "TvcOperatorSetParams": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Short description for this new operator set" + }, + "newOperators": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/TvcOperatorParams" + }, + "description": "Operators to create as part of this new operator set" + }, + "existingOperatorIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Existing operators to use as part of this new operator set" + }, + "threshold": { + "type": "integer", + "format": "int64", + "description": "The threshold of operators needed to reach consensus in this new Operator Set" + } + }, + "required": ["name", "threshold"] + }, + "TxError": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message describing what went wrong." + }, + "revertChain": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/RevertChainEntry" + }, + "description": "Chain of revert errors from nested contract calls, ordered from outermost to innermost." + } + } + }, + "UnknownRevertError": { + "type": "object", + "properties": { + "selector": { + "type": "string", + "x-nullable": true, + "description": "The 4-byte error selector, if available." + }, + "data": { + "type": "string", + "x-nullable": true, + "description": "The raw error data, hex-encoded." + } + } + }, "UpdateAllowedOriginsIntent": { "type": "object", "properties": { @@ -9604,7 +11491,7 @@ "emailCustomizationParams": { "$ref": "#/definitions/EmailCustomizationParams", "x-nullable": true, - "description": "Overrides for auth-related email content." + "description": "Optional parameters for customizing emails. If not provided, the default email will be used." }, "smsCustomizationParams": { "$ref": "#/definitions/SmsCustomizationParams", @@ -9644,6 +11531,16 @@ "format": "int32", "x-nullable": true, "description": "Desired OTP code length (6–9)." + }, + "sendFromEmailSenderName": { + "type": "string", + "x-nullable": true, + "description": "Custom 'from' email sender for auth-related emails." + }, + "verificationTokenRequiredForGetAccountPii": { + "type": "boolean", + "x-nullable": true, + "description": "Verification token required for get account with PII (email/phone number). Default false." } } }, @@ -9656,6 +11553,78 @@ } } }, + "UpdateFiatOnRampCredentialIntent": { + "type": "object", + "properties": { + "fiatOnrampCredentialId": { + "type": "string", + "description": "The ID of the fiat on-ramp credential to update" + }, + "onrampProvider": { + "$ref": "#/definitions/FiatOnRampProvider", + "description": "The fiat on-ramp provider" + }, + "projectId": { + "type": "string", + "x-nullable": true, + "description": "Project ID for the on-ramp provider. Some providers, like Coinbase, require this additional identifier." + }, + "publishableApiKey": { + "type": "string", + "description": "Publishable API key for the on-ramp provider" + }, + "encryptedSecretApiKey": { + "type": "string", + "description": "Secret API key for the on-ramp provider encrypted to our on-ramp encryption public key" + }, + "encryptedPrivateApiKey": { + "type": "string", + "x-nullable": true, + "description": "Private API key for the on-ramp provider encrypted to our on-ramp encryption public key. Some providers, like Coinbase, require this additional key." + } + }, + "required": [ + "fiatOnrampCredentialId", + "onrampProvider", + "publishableApiKey", + "encryptedSecretApiKey" + ] + }, + "UpdateFiatOnRampCredentialRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_UPDATE_FIAT_ON_RAMP_CREDENTIAL"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/UpdateFiatOnRampCredentialIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "UpdateFiatOnRampCredentialResult": { + "type": "object", + "properties": { + "fiatOnRampCredentialId": { + "type": "string", + "description": "Unique identifier of the Fiat On-Ramp credential that was updated" + } + }, + "required": ["fiatOnRampCredentialId"] + }, "UpdateOauth2CredentialIntent": { "type": "object", "properties": { @@ -9700,6 +11669,10 @@ }, "parameters": { "$ref": "#/definitions/UpdateOauth2CredentialIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -9801,6 +11774,10 @@ }, "parameters": { "$ref": "#/definitions/UpdatePolicyIntentV2" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -9871,6 +11848,10 @@ }, "parameters": { "$ref": "#/definitions/UpdatePrivateKeyTagIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -9920,6 +11901,10 @@ }, "parameters": { "$ref": "#/definitions/UpdateRootQuorumIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -9963,6 +11948,10 @@ }, "parameters": { "$ref": "#/definitions/UpdateUserEmailIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -10040,6 +12029,10 @@ }, "parameters": { "$ref": "#/definitions/UpdateUserNameIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -10090,6 +12083,10 @@ }, "parameters": { "$ref": "#/definitions/UpdateUserPhoneNumberIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -10121,6 +12118,10 @@ }, "parameters": { "$ref": "#/definitions/UpdateUserIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -10181,6 +12182,10 @@ }, "parameters": { "$ref": "#/definitions/UpdateUserTagIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -10226,6 +12231,10 @@ }, "parameters": { "$ref": "#/definitions/UpdateWalletIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -10240,6 +12249,38 @@ }, "required": ["walletId"] }, + "UpsertGasUsageConfigIntent": { + "type": "object", + "properties": { + "orgWindowLimitUsd": { + "type": "string", + "description": "Gas sponsorship USD limit for the billing organization window." + }, + "subOrgWindowLimitUsd": { + "type": "string", + "description": "Gas sponsorship USD limit for sub-organizations under the billing organization." + }, + "windowDurationMinutes": { + "type": "string", + "description": "Rolling sponsorship window duration, expressed in minutes." + } + }, + "required": [ + "orgWindowLimitUsd", + "subOrgWindowLimitUsd", + "windowDurationMinutes" + ] + }, + "UpsertGasUsageConfigResult": { + "type": "object", + "properties": { + "gasUsageConfigId": { + "type": "string", + "description": "Unique identifier for the gas usage configuration that was created or updated." + } + }, + "required": ["gasUsageConfigId"] + }, "User": { "type": "object", "properties": { @@ -10494,6 +12535,10 @@ }, "parameters": { "$ref": "#/definitions/VerifyOtpIntent" + }, + "generateAppProofs": { + "type": "boolean", + "x-nullable": true } }, "required": ["type", "timestampMs", "organizationId", "parameters"] @@ -10825,6 +12870,60 @@ } } }, + "data.v1.SignatureScheme": { + "type": "string", + "enum": ["SIGNATURE_SCHEME_EPHEMERAL_KEY_P256"] + }, + "data.v1.SmartContractInterface": { + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "The Organization the Smart Contract Interface belongs to." + }, + "smartContractInterfaceId": { + "type": "string", + "description": "Unique identifier for a given Smart Contract Interface (ABI or IDL)." + }, + "smartContractAddress": { + "type": "string", + "description": "The address corresponding to the Smart Contract or Program." + }, + "smartContractInterface": { + "type": "string", + "description": "The JSON corresponding to the Smart Contract Interface (ABI or IDL)." + }, + "type": { + "type": "string", + "description": "The type corresponding to the Smart Contract Interface (either ETHEREUM or SOLANA)." + }, + "label": { + "type": "string", + "description": "The label corresponding to the Smart Contract Interface (either ETHEREUM or SOLANA)." + }, + "notes": { + "type": "string", + "description": "The notes corresponding to the Smart Contract Interface (either ETHEREUM or SOLANA)." + }, + "createdAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + }, + "updatedAt": { + "$ref": "#/definitions/external.data.v1.Timestamp" + } + }, + "required": [ + "organizationId", + "smartContractInterfaceId", + "smartContractAddress", + "smartContractInterface", + "type", + "label", + "notes", + "createdAt", + "updatedAt" + ] + }, "external.data.v1.Credential": { "type": "object", "properties": {