turnkey_client 0.0.15 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +39 -0
- data/.rspec +2 -0
- data/.swagger-codegen/VERSION +1 -0
- data/.swagger-codegen-ignore +23 -0
- data/lib/turnkey_client/api/app_proof_api.rb +4 -4
- data/lib/turnkey_client/api/broadcasting_api.rb +251 -0
- data/lib/turnkey_client/api/on_ramp_api.rb +290 -0
- data/lib/turnkey_client/api/policies_api.rb +58 -0
- data/lib/turnkey_client/api/send_transactions_api.rb +77 -0
- data/lib/turnkey_client/api/wallets_api.rb +58 -0
- data/lib/turnkey_client/models/activity.rb +1 -1
- data/lib/turnkey_client/models/activity_type.rb +16 -0
- data/lib/turnkey_client/models/approve_activity_request.rb +14 -4
- data/lib/turnkey_client/models/client_signature.rb +255 -0
- data/lib/turnkey_client/models/client_signature_scheme.rb +26 -0
- data/lib/turnkey_client/models/create_api_keys_request.rb +14 -4
- data/lib/turnkey_client/models/create_authenticators_request.rb +14 -4
- data/lib/turnkey_client/models/create_fiat_on_ramp_credential_intent.rb +272 -0
- data/lib/turnkey_client/models/create_fiat_on_ramp_credential_request.rb +298 -0
- data/lib/turnkey_client/models/create_fiat_on_ramp_credential_result.rb +211 -0
- data/lib/turnkey_client/models/create_invitations_request.rb +14 -4
- data/lib/turnkey_client/models/create_oauth2_credential_request.rb +14 -4
- data/lib/turnkey_client/models/create_oauth_providers_request.rb +14 -4
- data/lib/turnkey_client/models/create_policies_request.rb +14 -4
- data/lib/turnkey_client/models/create_policy_intent_v3.rb +6 -0
- data/lib/turnkey_client/models/create_policy_request.rb +14 -4
- data/lib/turnkey_client/models/create_private_key_tag_request.rb +14 -4
- data/lib/turnkey_client/models/create_private_keys_request.rb +14 -4
- data/lib/turnkey_client/models/create_read_only_session_request.rb +14 -4
- data/lib/turnkey_client/models/create_read_write_session_request.rb +14 -4
- data/lib/turnkey_client/models/create_smart_contract_interface_intent.rb +1 -1
- data/lib/turnkey_client/models/create_smart_contract_interface_request.rb +14 -4
- data/lib/turnkey_client/models/create_sub_organization_intent_v7.rb +14 -5
- data/lib/turnkey_client/models/create_sub_organization_request.rb +14 -4
- data/lib/turnkey_client/models/create_tvc_app_intent.rb +277 -0
- data/lib/turnkey_client/models/create_tvc_app_result.rb +258 -0
- data/lib/turnkey_client/models/create_tvc_deployment_intent.rb +346 -0
- data/lib/turnkey_client/models/create_tvc_deployment_result.rb +226 -0
- data/lib/turnkey_client/models/create_tvc_manifest_approvals_intent.rb +228 -0
- data/lib/turnkey_client/models/create_tvc_manifest_approvals_result.rb +213 -0
- data/lib/turnkey_client/models/create_user_tag_request.rb +14 -4
- data/lib/turnkey_client/models/create_users_request.rb +14 -4
- data/lib/turnkey_client/models/create_wallet_accounts_intent.rb +15 -4
- data/lib/turnkey_client/models/create_wallet_accounts_request.rb +14 -4
- data/lib/turnkey_client/models/create_wallet_request.rb +14 -4
- data/lib/turnkey_client/models/curve.rb +1 -0
- data/lib/turnkey_client/models/custom_revert_error.rb +218 -0
- data/lib/turnkey_client/models/data_v1_signature_scheme.rb +26 -0
- data/lib/turnkey_client/models/delete_api_keys_request.rb +14 -4
- data/lib/turnkey_client/models/delete_authenticators_request.rb +14 -4
- data/lib/turnkey_client/models/delete_fiat_on_ramp_credential_intent.rb +211 -0
- data/lib/turnkey_client/models/delete_fiat_on_ramp_credential_request.rb +298 -0
- data/lib/turnkey_client/models/delete_fiat_on_ramp_credential_result.rb +211 -0
- data/lib/turnkey_client/models/delete_invitation_request.rb +14 -4
- data/lib/turnkey_client/models/delete_oauth2_credential_request.rb +14 -4
- data/lib/turnkey_client/models/delete_oauth_providers_request.rb +14 -4
- data/lib/turnkey_client/models/delete_policies_intent.rb +213 -0
- data/lib/turnkey_client/models/delete_policies_request.rb +298 -0
- data/lib/turnkey_client/models/delete_policies_result.rb +213 -0
- data/lib/turnkey_client/models/delete_policy_request.rb +14 -4
- data/lib/turnkey_client/models/delete_private_key_tags_request.rb +14 -4
- data/lib/turnkey_client/models/delete_private_keys_request.rb +14 -4
- data/lib/turnkey_client/models/delete_smart_contract_interface_request.rb +14 -4
- data/lib/turnkey_client/models/delete_sub_organization_request.rb +14 -4
- data/lib/turnkey_client/models/delete_user_tags_request.rb +14 -4
- data/lib/turnkey_client/models/delete_users_request.rb +14 -4
- data/lib/turnkey_client/models/delete_wallet_accounts_intent.rb +224 -0
- data/lib/turnkey_client/models/delete_wallet_accounts_request.rb +298 -0
- data/lib/turnkey_client/models/delete_wallet_accounts_result.rb +213 -0
- data/lib/turnkey_client/models/delete_wallets_request.rb +14 -4
- data/lib/turnkey_client/models/email_auth_customization_params.rb +255 -0
- data/lib/turnkey_client/models/email_auth_intent_v3.rb +306 -0
- data/lib/turnkey_client/models/email_auth_request.rb +16 -6
- data/lib/turnkey_client/models/email_customization_params_v2.rb +240 -0
- data/lib/turnkey_client/models/eth_send_raw_transaction_intent.rb +260 -0
- data/lib/turnkey_client/models/eth_send_raw_transaction_result.rb +211 -0
- data/lib/turnkey_client/models/eth_send_transaction_intent.rb +363 -0
- data/lib/turnkey_client/models/eth_send_transaction_request.rb +298 -0
- data/lib/turnkey_client/models/eth_send_transaction_result.rb +211 -0
- data/lib/turnkey_client/models/eth_send_transaction_status.rb +207 -0
- data/lib/turnkey_client/models/export_private_key_request.rb +14 -4
- data/lib/turnkey_client/models/export_wallet_account_request.rb +14 -4
- data/lib/turnkey_client/models/export_wallet_request.rb +14 -4
- data/lib/turnkey_client/models/fiat_on_ramp_credential.rb +330 -0
- data/lib/turnkey_client/models/get_gas_usage_request.rb +211 -0
- data/lib/turnkey_client/models/get_gas_usage_response.rb +241 -0
- data/lib/turnkey_client/models/get_nonces_request.rb +261 -0
- data/lib/turnkey_client/models/get_nonces_response.rb +218 -0
- data/lib/turnkey_client/models/get_on_ramp_transaction_status_request.rb +237 -0
- data/lib/turnkey_client/models/get_on_ramp_transaction_status_response.rb +211 -0
- data/lib/turnkey_client/models/get_send_transaction_status_request.rb +226 -0
- data/lib/turnkey_client/models/get_send_transaction_status_response.rb +240 -0
- data/lib/turnkey_client/models/import_private_key_request.rb +14 -4
- data/lib/turnkey_client/models/import_wallet_request.rb +14 -4
- data/lib/turnkey_client/models/init_fiat_on_ramp_request.rb +14 -4
- data/lib/turnkey_client/models/init_import_private_key_request.rb +14 -4
- data/lib/turnkey_client/models/init_import_wallet_request.rb +14 -4
- data/lib/turnkey_client/models/init_otp_auth_intent_v3.rb +336 -0
- data/lib/turnkey_client/models/init_otp_auth_request.rb +16 -6
- data/lib/turnkey_client/models/init_otp_intent_v2.rb +336 -0
- data/lib/turnkey_client/models/init_otp_request.rb +16 -6
- data/lib/turnkey_client/models/init_user_email_recovery_intent.rb +37 -4
- data/lib/turnkey_client/models/init_user_email_recovery_intent_v2.rb +284 -0
- data/lib/turnkey_client/models/init_user_email_recovery_request.rb +16 -6
- data/lib/turnkey_client/models/intent.rb +148 -4
- data/lib/turnkey_client/models/list_fiat_on_ramp_credentials_request.rb +211 -0
- data/lib/turnkey_client/models/list_fiat_on_ramp_credentials_response.rb +212 -0
- data/lib/turnkey_client/models/native_revert_error.rb +229 -0
- data/lib/turnkey_client/models/oauth2_authenticate_request.rb +14 -4
- data/lib/turnkey_client/models/oauth_login_request.rb +14 -4
- data/lib/turnkey_client/models/oauth_request.rb +14 -4
- data/lib/turnkey_client/models/otp_auth_request.rb +14 -4
- data/lib/turnkey_client/models/otp_login_intent.rb +0 -2
- data/lib/turnkey_client/models/otp_login_request.rb +14 -4
- data/lib/turnkey_client/models/recover_user_request.rb +14 -4
- data/lib/turnkey_client/models/reject_activity_request.rb +14 -4
- data/lib/turnkey_client/models/remove_organization_feature_request.rb +14 -4
- data/lib/turnkey_client/models/result.rb +112 -4
- data/lib/turnkey_client/models/revert_chain_entry.rb +253 -0
- data/lib/turnkey_client/models/set_organization_feature_request.rb +14 -4
- data/lib/turnkey_client/models/sign_raw_payload_request.rb +14 -4
- data/lib/turnkey_client/models/sign_raw_payloads_request.rb +14 -4
- data/lib/turnkey_client/models/sign_transaction_request.rb +14 -4
- data/lib/turnkey_client/models/sol_send_transaction_intent.rb +297 -0
- data/lib/turnkey_client/models/sol_send_transaction_request.rb +298 -0
- data/lib/turnkey_client/models/sol_send_transaction_result.rb +211 -0
- data/lib/turnkey_client/models/stamp_login_request.rb +14 -4
- data/lib/turnkey_client/models/transaction_type.rb +2 -0
- data/lib/turnkey_client/models/tvc_manifest_approval.rb +226 -0
- data/lib/turnkey_client/models/tvc_operator_params.rb +226 -0
- data/lib/turnkey_client/models/tvc_operator_set_params.rb +250 -0
- data/lib/turnkey_client/models/tx_error.rb +218 -0
- data/lib/turnkey_client/models/unknown_revert_error.rb +218 -0
- data/lib/turnkey_client/models/update_auth_proxy_config_intent.rb +27 -5
- data/lib/turnkey_client/models/update_fiat_on_ramp_credential_intent.rb +277 -0
- data/lib/turnkey_client/models/update_fiat_on_ramp_credential_request.rb +298 -0
- data/lib/turnkey_client/models/update_fiat_on_ramp_credential_result.rb +211 -0
- data/lib/turnkey_client/models/update_oauth2_credential_request.rb +14 -4
- data/lib/turnkey_client/models/update_policy_request.rb +14 -4
- data/lib/turnkey_client/models/update_private_key_tag_request.rb +14 -4
- data/lib/turnkey_client/models/update_root_quorum_request.rb +14 -4
- data/lib/turnkey_client/models/update_user_email_request.rb +14 -4
- data/lib/turnkey_client/models/update_user_name_request.rb +14 -4
- data/lib/turnkey_client/models/update_user_phone_number_request.rb +14 -4
- data/lib/turnkey_client/models/update_user_request.rb +14 -4
- data/lib/turnkey_client/models/update_user_tag_request.rb +14 -4
- data/lib/turnkey_client/models/update_wallet_request.rb +14 -4
- data/lib/turnkey_client/models/upsert_gas_usage_config_intent.rb +241 -0
- data/lib/turnkey_client/models/upsert_gas_usage_config_result.rb +211 -0
- data/lib/turnkey_client/models/verify_otp_request.rb +14 -4
- data/lib/turnkey_client/version.rb +1 -1
- data/lib/turnkey_client.rb +63 -2
- data/turnkey_client.gemspec +1 -1
- metadata +90 -33
- data/turnkey_client-0.0.12.gem +0 -0
- data/turnkey_client-0.0.13.gem +0 -0
- data/turnkey_client-0.0.14.gem +0 -0
- data/turnkey_client-0.0.2.gem +0 -0
- data/turnkey_client-0.0.3.gem +0 -0
- data/turnkey_client-0.0.4.gem +0 -0
- data/turnkey_client-0.0.7.gem +0 -0
- data/turnkey_client-0.0.8.gem +0 -0
- data/turnkey_client-0.0.9.gem +0 -0
|
@@ -22,6 +22,8 @@ module TurnkeyClient
|
|
|
22
22
|
|
|
23
23
|
attr_accessor :parameters
|
|
24
24
|
|
|
25
|
+
attr_accessor :generate_app_proofs
|
|
26
|
+
|
|
25
27
|
class EnumAttributeValidator
|
|
26
28
|
attr_reader :datatype
|
|
27
29
|
attr_reader :allowable_values
|
|
@@ -50,7 +52,8 @@ module TurnkeyClient
|
|
|
50
52
|
:'type' => :'type',
|
|
51
53
|
:'timestamp_ms' => :'timestampMs',
|
|
52
54
|
:'organization_id' => :'organizationId',
|
|
53
|
-
:'parameters' => :'parameters'
|
|
55
|
+
:'parameters' => :'parameters',
|
|
56
|
+
:'generate_app_proofs' => :'generateAppProofs'
|
|
54
57
|
}
|
|
55
58
|
end
|
|
56
59
|
|
|
@@ -60,13 +63,15 @@ module TurnkeyClient
|
|
|
60
63
|
:'type' => :'Object',
|
|
61
64
|
:'timestamp_ms' => :'Object',
|
|
62
65
|
:'organization_id' => :'Object',
|
|
63
|
-
:'parameters' => :'Object'
|
|
66
|
+
:'parameters' => :'Object',
|
|
67
|
+
:'generate_app_proofs' => :'Object'
|
|
64
68
|
}
|
|
65
69
|
end
|
|
66
70
|
|
|
67
71
|
# List of attributes with nullable: true
|
|
68
72
|
def self.openapi_nullable
|
|
69
73
|
Set.new([
|
|
74
|
+
:'generate_app_proofs'
|
|
70
75
|
])
|
|
71
76
|
end
|
|
72
77
|
|
|
@@ -100,6 +105,10 @@ module TurnkeyClient
|
|
|
100
105
|
if attributes.key?(:'parameters')
|
|
101
106
|
self.parameters = attributes[:'parameters']
|
|
102
107
|
end
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'generate_app_proofs')
|
|
110
|
+
self.generate_app_proofs = attributes[:'generate_app_proofs']
|
|
111
|
+
end
|
|
103
112
|
end
|
|
104
113
|
|
|
105
114
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -155,7 +164,8 @@ module TurnkeyClient
|
|
|
155
164
|
type == o.type &&
|
|
156
165
|
timestamp_ms == o.timestamp_ms &&
|
|
157
166
|
organization_id == o.organization_id &&
|
|
158
|
-
parameters == o.parameters
|
|
167
|
+
parameters == o.parameters &&
|
|
168
|
+
generate_app_proofs == o.generate_app_proofs
|
|
159
169
|
end
|
|
160
170
|
|
|
161
171
|
# @see the `==` method
|
|
@@ -167,7 +177,7 @@ module TurnkeyClient
|
|
|
167
177
|
# Calculates hash code according to all attributes.
|
|
168
178
|
# @return [Integer] Hash code
|
|
169
179
|
def hash
|
|
170
|
-
[type, timestamp_ms, organization_id, parameters].hash
|
|
180
|
+
[type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash
|
|
171
181
|
end
|
|
172
182
|
|
|
173
183
|
# Builds the object from hash
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#API Reference
|
|
3
|
+
|
|
4
|
+
#Review our [API Introduction](../api-introduction) to get started.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
=end
|
|
10
|
+
|
|
11
|
+
require 'date'
|
|
12
|
+
|
|
13
|
+
module TurnkeyClient
|
|
14
|
+
class CreateFiatOnRampCredentialIntent
|
|
15
|
+
attr_accessor :onramp_provider
|
|
16
|
+
|
|
17
|
+
# Project ID for the on-ramp provider. Some providers, like Coinbase, require this additional identifier
|
|
18
|
+
attr_accessor :project_id
|
|
19
|
+
|
|
20
|
+
# Publishable API key for the on-ramp provider
|
|
21
|
+
attr_accessor :publishable_api_key
|
|
22
|
+
|
|
23
|
+
# Secret API key for the on-ramp provider encrypted to our on-ramp encryption public key
|
|
24
|
+
attr_accessor :encrypted_secret_api_key
|
|
25
|
+
|
|
26
|
+
# Private API key for the on-ramp provider encrypted to our on-ramp encryption public key. Some providers, like Coinbase, require this additional key.
|
|
27
|
+
attr_accessor :encrypted_private_api_key
|
|
28
|
+
|
|
29
|
+
# If the on-ramp credential is a sandbox credential
|
|
30
|
+
attr_accessor :sandbox_mode
|
|
31
|
+
|
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
|
+
def self.attribute_map
|
|
34
|
+
{
|
|
35
|
+
:'onramp_provider' => :'onrampProvider',
|
|
36
|
+
:'project_id' => :'projectId',
|
|
37
|
+
:'publishable_api_key' => :'publishableApiKey',
|
|
38
|
+
:'encrypted_secret_api_key' => :'encryptedSecretApiKey',
|
|
39
|
+
:'encrypted_private_api_key' => :'encryptedPrivateApiKey',
|
|
40
|
+
:'sandbox_mode' => :'sandboxMode'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute type mapping.
|
|
45
|
+
def self.openapi_types
|
|
46
|
+
{
|
|
47
|
+
:'onramp_provider' => :'Object',
|
|
48
|
+
:'project_id' => :'Object',
|
|
49
|
+
:'publishable_api_key' => :'Object',
|
|
50
|
+
:'encrypted_secret_api_key' => :'Object',
|
|
51
|
+
:'encrypted_private_api_key' => :'Object',
|
|
52
|
+
:'sandbox_mode' => :'Object'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
def self.openapi_nullable
|
|
58
|
+
Set.new([
|
|
59
|
+
:'project_id',
|
|
60
|
+
:'encrypted_private_api_key',
|
|
61
|
+
])
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Initializes the object
|
|
65
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
66
|
+
def initialize(attributes = {})
|
|
67
|
+
if (!attributes.is_a?(Hash))
|
|
68
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateFiatOnRampCredentialIntent` initialize method"
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
72
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
73
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
74
|
+
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
|
|
75
|
+
end
|
|
76
|
+
h[k.to_sym] = v
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'onramp_provider')
|
|
80
|
+
self.onramp_provider = attributes[:'onramp_provider']
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'project_id')
|
|
84
|
+
self.project_id = attributes[:'project_id']
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'publishable_api_key')
|
|
88
|
+
self.publishable_api_key = attributes[:'publishable_api_key']
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'encrypted_secret_api_key')
|
|
92
|
+
self.encrypted_secret_api_key = attributes[:'encrypted_secret_api_key']
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'encrypted_private_api_key')
|
|
96
|
+
self.encrypted_private_api_key = attributes[:'encrypted_private_api_key']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'sandbox_mode')
|
|
100
|
+
self.sandbox_mode = attributes[:'sandbox_mode']
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
105
|
+
# @return Array for valid properties with the reasons
|
|
106
|
+
def list_invalid_properties
|
|
107
|
+
invalid_properties = Array.new
|
|
108
|
+
if @onramp_provider.nil?
|
|
109
|
+
invalid_properties.push('invalid value for "onramp_provider", onramp_provider cannot be nil.')
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if @publishable_api_key.nil?
|
|
113
|
+
invalid_properties.push('invalid value for "publishable_api_key", publishable_api_key cannot be nil.')
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if @encrypted_secret_api_key.nil?
|
|
117
|
+
invalid_properties.push('invalid value for "encrypted_secret_api_key", encrypted_secret_api_key cannot be nil.')
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
invalid_properties
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Check to see if the all the properties in the model are valid
|
|
124
|
+
# @return true if the model is valid
|
|
125
|
+
def valid?
|
|
126
|
+
return false if @onramp_provider.nil?
|
|
127
|
+
return false if @publishable_api_key.nil?
|
|
128
|
+
return false if @encrypted_secret_api_key.nil?
|
|
129
|
+
true
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Checks equality by comparing each attribute.
|
|
133
|
+
# @param [Object] Object to be compared
|
|
134
|
+
def ==(o)
|
|
135
|
+
return true if self.equal?(o)
|
|
136
|
+
self.class == o.class &&
|
|
137
|
+
onramp_provider == o.onramp_provider &&
|
|
138
|
+
project_id == o.project_id &&
|
|
139
|
+
publishable_api_key == o.publishable_api_key &&
|
|
140
|
+
encrypted_secret_api_key == o.encrypted_secret_api_key &&
|
|
141
|
+
encrypted_private_api_key == o.encrypted_private_api_key &&
|
|
142
|
+
sandbox_mode == o.sandbox_mode
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# @see the `==` method
|
|
146
|
+
# @param [Object] Object to be compared
|
|
147
|
+
def eql?(o)
|
|
148
|
+
self == o
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Calculates hash code according to all attributes.
|
|
152
|
+
# @return [Integer] Hash code
|
|
153
|
+
def hash
|
|
154
|
+
[onramp_provider, project_id, publishable_api_key, encrypted_secret_api_key, encrypted_private_api_key, sandbox_mode].hash
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Builds the object from hash
|
|
158
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
159
|
+
# @return [Object] Returns the model itself
|
|
160
|
+
def self.build_from_hash(attributes)
|
|
161
|
+
new.build_from_hash(attributes)
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Builds the object from hash
|
|
165
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
166
|
+
# @return [Object] Returns the model itself
|
|
167
|
+
def build_from_hash(attributes)
|
|
168
|
+
return nil unless attributes.is_a?(Hash)
|
|
169
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
170
|
+
if type =~ /\AArray<(.*)>/i
|
|
171
|
+
# check to ensure the input is an array given that the attribute
|
|
172
|
+
# is documented as an array but the input is not
|
|
173
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
174
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
175
|
+
end
|
|
176
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
177
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
178
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
179
|
+
self.send("#{key}=", nil)
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
self
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Deserializes the data based on type
|
|
187
|
+
# @param string type Data type
|
|
188
|
+
# @param string value Value to be deserialized
|
|
189
|
+
# @return [Object] Deserialized data
|
|
190
|
+
def _deserialize(type, value)
|
|
191
|
+
case type.to_sym
|
|
192
|
+
when :DateTime
|
|
193
|
+
DateTime.parse(value)
|
|
194
|
+
when :Date
|
|
195
|
+
Date.parse(value)
|
|
196
|
+
when :String
|
|
197
|
+
value.to_s
|
|
198
|
+
when :Integer
|
|
199
|
+
value.to_i
|
|
200
|
+
when :Float
|
|
201
|
+
value.to_f
|
|
202
|
+
when :Boolean
|
|
203
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
204
|
+
true
|
|
205
|
+
else
|
|
206
|
+
false
|
|
207
|
+
end
|
|
208
|
+
when :Object
|
|
209
|
+
# generic object (usually a Hash), return directly
|
|
210
|
+
value
|
|
211
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
212
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
213
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
214
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
215
|
+
k_type = Regexp.last_match[:k_type]
|
|
216
|
+
v_type = Regexp.last_match[:v_type]
|
|
217
|
+
{}.tap do |hash|
|
|
218
|
+
value.each do |k, v|
|
|
219
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
else # model
|
|
223
|
+
TurnkeyClient.const_get(type).build_from_hash(value)
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Returns the string representation of the object
|
|
228
|
+
# @return [String] String presentation of the object
|
|
229
|
+
def to_s
|
|
230
|
+
to_hash.to_s
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
234
|
+
# @return [Hash] Returns the object in the form of hash
|
|
235
|
+
def to_body
|
|
236
|
+
to_hash
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Returns the object in the form of hash
|
|
240
|
+
# @return [Hash] Returns the object in the form of hash
|
|
241
|
+
def to_hash
|
|
242
|
+
hash = {}
|
|
243
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
244
|
+
value = self.send(attr)
|
|
245
|
+
if value.nil?
|
|
246
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
247
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
hash[param] = _to_hash(value)
|
|
251
|
+
end
|
|
252
|
+
hash
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Outputs non-array value in the form of hash
|
|
256
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
257
|
+
# @param [Object] value Any valid value
|
|
258
|
+
# @return [Hash] Returns the value in the form of hash
|
|
259
|
+
def _to_hash(value)
|
|
260
|
+
if value.is_a?(Array)
|
|
261
|
+
value.compact.map { |v| _to_hash(v) }
|
|
262
|
+
elsif value.is_a?(Hash)
|
|
263
|
+
{}.tap do |hash|
|
|
264
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
265
|
+
end
|
|
266
|
+
elsif value.respond_to? :to_hash
|
|
267
|
+
value.to_hash
|
|
268
|
+
else
|
|
269
|
+
value
|
|
270
|
+
end
|
|
271
|
+
end end
|
|
272
|
+
end
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#API Reference
|
|
3
|
+
|
|
4
|
+
#Review our [API Introduction](../api-introduction) to get started.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
=end
|
|
10
|
+
|
|
11
|
+
require 'date'
|
|
12
|
+
|
|
13
|
+
module TurnkeyClient
|
|
14
|
+
class CreateFiatOnRampCredentialRequest
|
|
15
|
+
attr_accessor :type
|
|
16
|
+
|
|
17
|
+
# Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
|
|
18
|
+
attr_accessor :timestamp_ms
|
|
19
|
+
|
|
20
|
+
# Unique identifier for a given Organization.
|
|
21
|
+
attr_accessor :organization_id
|
|
22
|
+
|
|
23
|
+
attr_accessor :parameters
|
|
24
|
+
|
|
25
|
+
attr_accessor :generate_app_proofs
|
|
26
|
+
|
|
27
|
+
class EnumAttributeValidator
|
|
28
|
+
attr_reader :datatype
|
|
29
|
+
attr_reader :allowable_values
|
|
30
|
+
|
|
31
|
+
def initialize(datatype, allowable_values)
|
|
32
|
+
@allowable_values = allowable_values.map do |value|
|
|
33
|
+
case datatype.to_s
|
|
34
|
+
when /Integer/i
|
|
35
|
+
value.to_i
|
|
36
|
+
when /Float/i
|
|
37
|
+
value.to_f
|
|
38
|
+
else
|
|
39
|
+
value
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def valid?(value)
|
|
45
|
+
!value || allowable_values.include?(value)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
50
|
+
def self.attribute_map
|
|
51
|
+
{
|
|
52
|
+
:'type' => :'type',
|
|
53
|
+
:'timestamp_ms' => :'timestampMs',
|
|
54
|
+
:'organization_id' => :'organizationId',
|
|
55
|
+
:'parameters' => :'parameters',
|
|
56
|
+
:'generate_app_proofs' => :'generateAppProofs'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Attribute type mapping.
|
|
61
|
+
def self.openapi_types
|
|
62
|
+
{
|
|
63
|
+
:'type' => :'Object',
|
|
64
|
+
:'timestamp_ms' => :'Object',
|
|
65
|
+
:'organization_id' => :'Object',
|
|
66
|
+
:'parameters' => :'Object',
|
|
67
|
+
:'generate_app_proofs' => :'Object'
|
|
68
|
+
}
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# List of attributes with nullable: true
|
|
72
|
+
def self.openapi_nullable
|
|
73
|
+
Set.new([
|
|
74
|
+
:'generate_app_proofs'
|
|
75
|
+
])
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Initializes the object
|
|
79
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
80
|
+
def initialize(attributes = {})
|
|
81
|
+
if (!attributes.is_a?(Hash))
|
|
82
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TurnkeyClient::CreateFiatOnRampCredentialRequest` initialize method"
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
86
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
87
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
88
|
+
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
|
|
89
|
+
end
|
|
90
|
+
h[k.to_sym] = v
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'type')
|
|
94
|
+
self.type = attributes[:'type']
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'timestamp_ms')
|
|
98
|
+
self.timestamp_ms = attributes[:'timestamp_ms']
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes.key?(:'organization_id')
|
|
102
|
+
self.organization_id = attributes[:'organization_id']
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'parameters')
|
|
106
|
+
self.parameters = attributes[:'parameters']
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'generate_app_proofs')
|
|
110
|
+
self.generate_app_proofs = attributes[:'generate_app_proofs']
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
115
|
+
# @return Array for valid properties with the reasons
|
|
116
|
+
def list_invalid_properties
|
|
117
|
+
invalid_properties = Array.new
|
|
118
|
+
if @type.nil?
|
|
119
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if @timestamp_ms.nil?
|
|
123
|
+
invalid_properties.push('invalid value for "timestamp_ms", timestamp_ms cannot be nil.')
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if @organization_id.nil?
|
|
127
|
+
invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if @parameters.nil?
|
|
131
|
+
invalid_properties.push('invalid value for "parameters", parameters cannot be nil.')
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
invalid_properties
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Check to see if the all the properties in the model are valid
|
|
138
|
+
# @return true if the model is valid
|
|
139
|
+
def valid?
|
|
140
|
+
return false if @type.nil?
|
|
141
|
+
type_validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL'])
|
|
142
|
+
return false unless type_validator.valid?(@type)
|
|
143
|
+
return false if @timestamp_ms.nil?
|
|
144
|
+
return false if @organization_id.nil?
|
|
145
|
+
return false if @parameters.nil?
|
|
146
|
+
true
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
150
|
+
# @param [Object] type Object to be assigned
|
|
151
|
+
def type=(type)
|
|
152
|
+
validator = EnumAttributeValidator.new('Object', ['ACTIVITY_TYPE_CREATE_FIAT_ON_RAMP_CREDENTIAL'])
|
|
153
|
+
unless validator.valid?(type)
|
|
154
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
155
|
+
end
|
|
156
|
+
@type = type
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Checks equality by comparing each attribute.
|
|
160
|
+
# @param [Object] Object to be compared
|
|
161
|
+
def ==(o)
|
|
162
|
+
return true if self.equal?(o)
|
|
163
|
+
self.class == o.class &&
|
|
164
|
+
type == o.type &&
|
|
165
|
+
timestamp_ms == o.timestamp_ms &&
|
|
166
|
+
organization_id == o.organization_id &&
|
|
167
|
+
parameters == o.parameters &&
|
|
168
|
+
generate_app_proofs == o.generate_app_proofs
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# @see the `==` method
|
|
172
|
+
# @param [Object] Object to be compared
|
|
173
|
+
def eql?(o)
|
|
174
|
+
self == o
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Calculates hash code according to all attributes.
|
|
178
|
+
# @return [Integer] Hash code
|
|
179
|
+
def hash
|
|
180
|
+
[type, timestamp_ms, organization_id, parameters, generate_app_proofs].hash
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Builds the object from hash
|
|
184
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
185
|
+
# @return [Object] Returns the model itself
|
|
186
|
+
def self.build_from_hash(attributes)
|
|
187
|
+
new.build_from_hash(attributes)
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Builds the object from hash
|
|
191
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
192
|
+
# @return [Object] Returns the model itself
|
|
193
|
+
def build_from_hash(attributes)
|
|
194
|
+
return nil unless attributes.is_a?(Hash)
|
|
195
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
196
|
+
if type =~ /\AArray<(.*)>/i
|
|
197
|
+
# check to ensure the input is an array given that the attribute
|
|
198
|
+
# is documented as an array but the input is not
|
|
199
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
200
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
201
|
+
end
|
|
202
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
203
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
204
|
+
elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
205
|
+
self.send("#{key}=", nil)
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
self
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Deserializes the data based on type
|
|
213
|
+
# @param string type Data type
|
|
214
|
+
# @param string value Value to be deserialized
|
|
215
|
+
# @return [Object] Deserialized data
|
|
216
|
+
def _deserialize(type, value)
|
|
217
|
+
case type.to_sym
|
|
218
|
+
when :DateTime
|
|
219
|
+
DateTime.parse(value)
|
|
220
|
+
when :Date
|
|
221
|
+
Date.parse(value)
|
|
222
|
+
when :String
|
|
223
|
+
value.to_s
|
|
224
|
+
when :Integer
|
|
225
|
+
value.to_i
|
|
226
|
+
when :Float
|
|
227
|
+
value.to_f
|
|
228
|
+
when :Boolean
|
|
229
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
230
|
+
true
|
|
231
|
+
else
|
|
232
|
+
false
|
|
233
|
+
end
|
|
234
|
+
when :Object
|
|
235
|
+
# generic object (usually a Hash), return directly
|
|
236
|
+
value
|
|
237
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
238
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
239
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
240
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
241
|
+
k_type = Regexp.last_match[:k_type]
|
|
242
|
+
v_type = Regexp.last_match[:v_type]
|
|
243
|
+
{}.tap do |hash|
|
|
244
|
+
value.each do |k, v|
|
|
245
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
246
|
+
end
|
|
247
|
+
end
|
|
248
|
+
else # model
|
|
249
|
+
TurnkeyClient.const_get(type).build_from_hash(value)
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Returns the string representation of the object
|
|
254
|
+
# @return [String] String presentation of the object
|
|
255
|
+
def to_s
|
|
256
|
+
to_hash.to_s
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
260
|
+
# @return [Hash] Returns the object in the form of hash
|
|
261
|
+
def to_body
|
|
262
|
+
to_hash
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# Returns the object in the form of hash
|
|
266
|
+
# @return [Hash] Returns the object in the form of hash
|
|
267
|
+
def to_hash
|
|
268
|
+
hash = {}
|
|
269
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
270
|
+
value = self.send(attr)
|
|
271
|
+
if value.nil?
|
|
272
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
273
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
hash[param] = _to_hash(value)
|
|
277
|
+
end
|
|
278
|
+
hash
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Outputs non-array value in the form of hash
|
|
282
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
283
|
+
# @param [Object] value Any valid value
|
|
284
|
+
# @return [Hash] Returns the value in the form of hash
|
|
285
|
+
def _to_hash(value)
|
|
286
|
+
if value.is_a?(Array)
|
|
287
|
+
value.compact.map { |v| _to_hash(v) }
|
|
288
|
+
elsif value.is_a?(Hash)
|
|
289
|
+
{}.tap do |hash|
|
|
290
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
291
|
+
end
|
|
292
|
+
elsif value.respond_to? :to_hash
|
|
293
|
+
value.to_hash
|
|
294
|
+
else
|
|
295
|
+
value
|
|
296
|
+
end
|
|
297
|
+
end end
|
|
298
|
+
end
|