Class: VisaAcceptanceMergedSpec::CompleteMandate2
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::CompleteMandate2
- Defined in:
- lib/visa_acceptance_merged_spec/models/complete_mandate2.rb
Overview
CompleteMandate2 Model.
Instance Attribute Summary collapse
-
#consumer_authentication ⇒ TrueClass | FalseClass
Configure Unified Checkout to determine whether Consumer Authentication is invoked during service orchestration.
-
#decision_manager ⇒ TrueClass | FalseClass
Configure Unified Checkout to determine whether Decision Manager is invoked during service orchestration.
-
#type ⇒ String
This field is used to indicate how a payment should be processed.
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(type: SKIP, decision_manager: SKIP, consumer_authentication: SKIP, additional_properties: nil) ⇒ CompleteMandate2
constructor
A new instance of CompleteMandate2.
-
#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(type: SKIP, decision_manager: SKIP, consumer_authentication: SKIP, additional_properties: nil) ⇒ CompleteMandate2
Returns a new instance of CompleteMandate2.
82 83 84 85 86 87 88 89 90 91 |
# File 'lib/visa_acceptance_merged_spec/models/complete_mandate2.rb', line 82 def initialize(type: SKIP, decision_manager: SKIP, consumer_authentication: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @type = type unless type == SKIP @decision_manager = decision_manager unless decision_manager == SKIP @consumer_authentication = consumer_authentication unless consumer_authentication == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#consumer_authentication ⇒ TrueClass | FalseClass
Configure Unified Checkout to determine whether Consumer Authentication is invoked during service orchestration. Possible values:
- True
- False
Setting this value to True will attempt to perform authentication using the Payer Authentication Service. Setting this value to False (or not provided) indicates that you do not wish to perform authentication using the Payer Authentication Service.
57 58 59 |
# File 'lib/visa_acceptance_merged_spec/models/complete_mandate2.rb', line 57 def consumer_authentication @consumer_authentication end |
#decision_manager ⇒ TrueClass | FalseClass
Configure Unified Checkout to determine whether Decision Manager is invoked during service orchestration. Possible values:
- True
- False
Setting this value to True indicates that device fingerprinting will be executed to add additional information for risk service Setting this value to False (or not provided) indicates that you do not wish to run device fingerprinting and skip decision manager services.
45 46 47 |
# File 'lib/visa_acceptance_merged_spec/models/complete_mandate2.rb', line 45 def decision_manager @decision_manager end |
#type ⇒ String
This field is used to indicate how a payment should be processed. Possible values:
- AUTH: Use this value when you want to authorize a payment within Unified
Checkout without capturing it immediately. Payment types that initiate an
immediate transfer of funds are NOT allowed. If a capture context request
includes a payment type incompatible with this mode, a 400 error will be
returned. A merchant would need to perform their own capture via API
where applicable.
- CAPTURE: Use this value when you want to perform a sale within Unified
Checkout and capture the payment immediately during the transaction.
Note: Some payment types may return a PENDING status, requiring an
additional status check call to determine the final outcome of the
payment.
- PREFER_AUTH: Use this value to offer multiple alternative payment options during the Unified Checkout experience. This option authorizes the payment without immediate capture, where available. It will perform a "CAPTURE" where an "AUTH" is not allowed by the payment type. Transactions can be AUTHORIZED, CAPTURED, or PENDING. If an "AUTH" is performed, a merchant would need to perform their own capture via API where applicable.
33 34 35 |
# File 'lib/visa_acceptance_merged_spec/models/complete_mandate2.rb', line 33 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/visa_acceptance_merged_spec/models/complete_mandate2.rb', line 94 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. type = hash.key?('type') ? hash['type'] : SKIP decision_manager = hash.key?('decisionManager') ? hash['decisionManager'] : SKIP consumer_authentication = hash.key?('consumerAuthentication') ? hash['consumerAuthentication'] : 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. CompleteMandate2.new(type: type, decision_manager: decision_manager, consumer_authentication: consumer_authentication, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
60 61 62 63 64 65 66 |
# File 'lib/visa_acceptance_merged_spec/models/complete_mandate2.rb', line 60 def self.names @_hash = {} if @_hash.nil? @_hash['type'] = 'type' @_hash['decision_manager'] = 'decisionManager' @_hash['consumer_authentication'] = 'consumerAuthentication' @_hash end |
.nullables ⇒ Object
An array for nullable fields
78 79 80 |
# File 'lib/visa_acceptance_merged_spec/models/complete_mandate2.rb', line 78 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
69 70 71 72 73 74 75 |
# File 'lib/visa_acceptance_merged_spec/models/complete_mandate2.rb', line 69 def self.optionals %w[ type decision_manager consumer_authentication ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
127 128 129 130 131 132 |
# File 'lib/visa_acceptance_merged_spec/models/complete_mandate2.rb', line 127 def inspect class_name = self.class.name.split('::').last "<#{class_name} type: #{@type.inspect}, decision_manager: #{@decision_manager.inspect},"\ " consumer_authentication: #{@consumer_authentication.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
119 120 121 122 123 124 |
# File 'lib/visa_acceptance_merged_spec/models/complete_mandate2.rb', line 119 def to_s class_name = self.class.name.split('::').last "<#{class_name} type: #{@type}, decision_manager: #{@decision_manager},"\ " consumer_authentication: #{@consumer_authentication}, additional_properties:"\ " #{@additional_properties}>" end |