Class: VisaAcceptanceMergedSpec::ProcessorInformation5
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::ProcessorInformation5
- Defined in:
- lib/visa_acceptance_merged_spec/models/processor_information5.rb
Overview
ProcessorInformation5 Model.
Instance Attribute Summary collapse
-
#authorization_options ⇒ AuthorizationOptions1
Token received in original session service.
-
#pre_approval_token ⇒ String
Token received in original session service.
-
#reversal ⇒ Reversal
Token received in original session service.
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(pre_approval_token: SKIP, authorization_options: SKIP, reversal: SKIP, additional_properties: nil) ⇒ ProcessorInformation5
constructor
A new instance of ProcessorInformation5.
-
#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(pre_approval_token: SKIP, authorization_options: SKIP, reversal: SKIP, additional_properties: nil) ⇒ ProcessorInformation5
Returns a new instance of ProcessorInformation5.
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information5.rb', line 47 def initialize(pre_approval_token: SKIP, authorization_options: SKIP, reversal: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @pre_approval_token = pre_approval_token unless pre_approval_token == SKIP @authorization_options = unless == SKIP @reversal = reversal unless reversal == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#authorization_options ⇒ AuthorizationOptions1
Token received in original session service.
18 19 20 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information5.rb', line 18 def @authorization_options end |
#pre_approval_token ⇒ String
Token received in original session service.
14 15 16 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information5.rb', line 14 def pre_approval_token @pre_approval_token end |
#reversal ⇒ Reversal
Token received in original session service.
22 23 24 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information5.rb', line 22 def reversal @reversal end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information5.rb', line 59 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. pre_approval_token = hash.key?('preApprovalToken') ? hash['preApprovalToken'] : SKIP = AuthorizationOptions1.from_hash(hash['authorizationOptions']) if hash['authorizationOptions'] reversal = Reversal.from_hash(hash['reversal']) if hash['reversal'] # 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. ProcessorInformation5.new(pre_approval_token: pre_approval_token, authorization_options: , reversal: reversal, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 31 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information5.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['pre_approval_token'] = 'preApprovalToken' @_hash['authorization_options'] = 'authorizationOptions' @_hash['reversal'] = 'reversal' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information5.rb', line 43 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 37 38 39 40 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information5.rb', line 34 def self.optionals %w[ pre_approval_token authorization_options reversal ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
92 93 94 95 96 97 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information5.rb', line 92 def inspect class_name = self.class.name.split('::').last "<#{class_name} pre_approval_token: #{@pre_approval_token.inspect}, authorization_options:"\ " #{@authorization_options.inspect}, reversal: #{@reversal.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
84 85 86 87 88 89 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information5.rb', line 84 def to_s class_name = self.class.name.split('::').last "<#{class_name} pre_approval_token: #{@pre_approval_token}, authorization_options:"\ " #{@authorization_options}, reversal: #{@reversal}, additional_properties:"\ " #{@additional_properties}>" end |