Class: UnivapayClientSdk::TokenResponseCardDataCvvAuthorize
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- UnivapayClientSdk::TokenResponseCardDataCvvAuthorize
- Defined in:
- lib/univapay_client_sdk/models/token_response_card_data_cvv_authorize.rb
Overview
Token Response Card Data Cvv Authorize schema.
Instance Attribute Summary collapse
-
#charge_id ⇒ UUID | String
Charge identifier.
-
#credentials_id ⇒ UUID | String
Credentials identifier.
-
#currency ⇒ String
ISO-4217 currency code.
-
#enabled ⇒ TrueClass | FalseClass
Enabled value.
-
#status ⇒ String
Current status of the resource.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(enabled: SKIP, status: SKIP, charge_id: SKIP, credentials_id: SKIP, currency: SKIP, additional_properties: nil) ⇒ TokenResponseCardDataCvvAuthorize
constructor
A new instance of TokenResponseCardDataCvvAuthorize.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(enabled: SKIP, status: SKIP, charge_id: SKIP, credentials_id: SKIP, currency: SKIP, additional_properties: nil) ⇒ TokenResponseCardDataCvvAuthorize
Returns a new instance of TokenResponseCardDataCvvAuthorize.
64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/univapay_client_sdk/models/token_response_card_data_cvv_authorize.rb', line 64 def initialize(enabled: SKIP, status: SKIP, charge_id: SKIP, credentials_id: SKIP, currency: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @enabled = enabled unless enabled == SKIP @status = status unless status == SKIP @charge_id = charge_id unless charge_id == SKIP @credentials_id = credentials_id unless credentials_id == SKIP @currency = currency unless currency == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#charge_id ⇒ UUID | String
Charge identifier.
22 23 24 |
# File 'lib/univapay_client_sdk/models/token_response_card_data_cvv_authorize.rb', line 22 def charge_id @charge_id end |
#credentials_id ⇒ UUID | String
Credentials identifier.
26 27 28 |
# File 'lib/univapay_client_sdk/models/token_response_card_data_cvv_authorize.rb', line 26 def credentials_id @credentials_id end |
#currency ⇒ String
ISO-4217 currency code.
30 31 32 |
# File 'lib/univapay_client_sdk/models/token_response_card_data_cvv_authorize.rb', line 30 def currency @currency end |
#enabled ⇒ TrueClass | FalseClass
Enabled value.
14 15 16 |
# File 'lib/univapay_client_sdk/models/token_response_card_data_cvv_authorize.rb', line 14 def enabled @enabled end |
#status ⇒ String
Current status of the resource.
18 19 20 |
# File 'lib/univapay_client_sdk/models/token_response_card_data_cvv_authorize.rb', line 18 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/univapay_client_sdk/models/token_response_card_data_cvv_authorize.rb', line 79 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. enabled = hash.key?('enabled') ? hash['enabled'] : SKIP status = hash.key?('status') ? hash['status'] : SKIP charge_id = hash.key?('charge_id') ? hash['charge_id'] : SKIP credentials_id = hash.key?('credentials_id') ? hash['credentials_id'] : SKIP currency = hash.key?('currency') ? hash['currency'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. TokenResponseCardDataCvvAuthorize.new(enabled: enabled, status: status, charge_id: charge_id, credentials_id: credentials_id, currency: currency, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 41 |
# File 'lib/univapay_client_sdk/models/token_response_card_data_cvv_authorize.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['enabled'] = 'enabled' @_hash['status'] = 'status' @_hash['charge_id'] = 'charge_id' @_hash['credentials_id'] = 'credentials_id' @_hash['currency'] = 'currency' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 58 59 60 61 62 |
# File 'lib/univapay_client_sdk/models/token_response_card_data_cvv_authorize.rb', line 55 def self.nullables %w[ status charge_id credentials_id currency ] end |
.optionals ⇒ Object
An array for optional fields
44 45 46 47 48 49 50 51 52 |
# File 'lib/univapay_client_sdk/models/token_response_card_data_cvv_authorize.rb', line 44 def self.optionals %w[ enabled status charge_id credentials_id currency ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
108 109 110 111 112 113 114 |
# File 'lib/univapay_client_sdk/models/token_response_card_data_cvv_authorize.rb', line 108 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
125 126 127 128 129 130 |
# File 'lib/univapay_client_sdk/models/token_response_card_data_cvv_authorize.rb', line 125 def inspect class_name = self.class.name.split('::').last "<#{class_name} enabled: #{@enabled.inspect}, status: #{@status.inspect}, charge_id:"\ " #{@charge_id.inspect}, credentials_id: #{@credentials_id.inspect}, currency:"\ " #{@currency.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
117 118 119 120 121 122 |
# File 'lib/univapay_client_sdk/models/token_response_card_data_cvv_authorize.rb', line 117 def to_s class_name = self.class.name.split('::').last "<#{class_name} enabled: #{@enabled}, status: #{@status}, charge_id: #{@charge_id},"\ " credentials_id: #{@credentials_id}, currency: #{@currency}, additional_properties:"\ " #{@additional_properties}>" end |