Class: VisaAcceptanceMergedSpec::Consumerauthentication
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::Consumerauthentication
- Defined in:
- lib/visa_acceptance_merged_spec/models/consumerauthentication.rb
Overview
Consumerauthentication Model.
Instance Attribute Summary collapse
-
#message ⇒ String
The message describing the reason of the status.
-
#reason ⇒ String
The reason of the status.
-
#status ⇒ String
The status for payerAuthentication 201 enroll and validate calls.
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.
Instance Method Summary collapse
-
#initialize(status: SKIP, reason: SKIP, message: SKIP, additional_properties: nil) ⇒ Consumerauthentication
constructor
A new instance of Consumerauthentication.
-
#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(status: SKIP, reason: SKIP, message: SKIP, additional_properties: nil) ⇒ Consumerauthentication
Returns a new instance of Consumerauthentication.
57 58 59 60 61 62 63 64 65 66 |
# File 'lib/visa_acceptance_merged_spec/models/consumerauthentication.rb', line 57 def initialize(status: SKIP, reason: SKIP, message: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @status = status unless status == SKIP @reason = reason unless reason == SKIP @message = unless == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#message ⇒ String
The message describing the reason of the status. Value is:
- Encountered a Payer Authentication problem. Payer could not be authenticated.
32 33 34 |
# File 'lib/visa_acceptance_merged_spec/models/consumerauthentication.rb', line 32 def @message end |
#reason ⇒ String
The reason of the status. Possible values are:
INVALID_MERCHANT_CONFIGURATIONCONSUMER_AUTHENTICATION_REQUIREDCONSUMER_AUTHENTICATION_FAILEDAUTHENTICATION_FAILED
26 27 28 |
# File 'lib/visa_acceptance_merged_spec/models/consumerauthentication.rb', line 26 def reason @reason end |
#status ⇒ String
The status for payerAuthentication 201 enroll and validate calls. Possible values are:
AUTHENTICATION_SUCCESSFULPENDING_AUTHENTICATIONAUTHENTICATION_FAILED
18 19 20 |
# File 'lib/visa_acceptance_merged_spec/models/consumerauthentication.rb', line 18 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/visa_acceptance_merged_spec/models/consumerauthentication.rb', line 69 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. status = hash.key?('status') ? hash['status'] : SKIP reason = hash.key?('reason') ? hash['reason'] : SKIP = hash.key?('message') ? hash['message'] : 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. Consumerauthentication.new(status: status, reason: reason, message: , additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
35 36 37 38 39 40 41 |
# File 'lib/visa_acceptance_merged_spec/models/consumerauthentication.rb', line 35 def self.names @_hash = {} if @_hash.nil? @_hash['status'] = 'status' @_hash['reason'] = 'reason' @_hash['message'] = 'message' @_hash end |
.nullables ⇒ Object
An array for nullable fields
53 54 55 |
# File 'lib/visa_acceptance_merged_spec/models/consumerauthentication.rb', line 53 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
44 45 46 47 48 49 50 |
# File 'lib/visa_acceptance_merged_spec/models/consumerauthentication.rb', line 44 def self.optionals %w[ status reason message ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
99 100 101 102 103 |
# File 'lib/visa_acceptance_merged_spec/models/consumerauthentication.rb', line 99 def inspect class_name = self.class.name.split('::').last "<#{class_name} status: #{@status.inspect}, reason: #{@reason.inspect}, message:"\ " #{@message.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
92 93 94 95 96 |
# File 'lib/visa_acceptance_merged_spec/models/consumerauthentication.rb', line 92 def to_s class_name = self.class.name.split('::').last "<#{class_name} status: #{@status}, reason: #{@reason}, message: #{@message},"\ " additional_properties: #{@additional_properties}>" end |