Class: VisaAcceptanceMergedSpec::ProcessingInformation23
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::ProcessingInformation23
- Defined in:
- lib/visa_acceptance_merged_spec/models/processing_information23.rb
Overview
ProcessingInformation23 Model.
Instance Attribute Summary collapse
-
#action_list ⇒ Array[String]
Possible values are one or more of follows: -
AP_SESSIONS: Use this when Alternative Payment Sessions service is requested. -
#payment_flow_mode ⇒ String
Whether merchant wants to pass the flow Inline or want to invoke Klarna Hosted Page.
-
#session_type ⇒ String
Will have 2 values, 'U' (Update) , 'N' (New).
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(session_type: SKIP, payment_flow_mode: SKIP, action_list: SKIP, additional_properties: nil) ⇒ ProcessingInformation23
constructor
A new instance of ProcessingInformation23.
-
#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(session_type: SKIP, payment_flow_mode: SKIP, action_list: SKIP, additional_properties: nil) ⇒ ProcessingInformation23
Returns a new instance of ProcessingInformation23.
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/visa_acceptance_merged_spec/models/processing_information23.rb', line 51 def initialize(session_type: SKIP, payment_flow_mode: SKIP, action_list: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @session_type = session_type unless session_type == SKIP @payment_flow_mode = payment_flow_mode unless payment_flow_mode == SKIP @action_list = action_list unless action_list == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#action_list ⇒ Array[String]
Possible values are one or more of follows:
AP_SESSIONS: Use this when Alternative Payment Sessions service is requested.
26 27 28 |
# File 'lib/visa_acceptance_merged_spec/models/processing_information23.rb', line 26 def action_list @action_list end |
#payment_flow_mode ⇒ String
Whether merchant wants to pass the flow Inline or want to invoke Klarna Hosted Page
20 21 22 |
# File 'lib/visa_acceptance_merged_spec/models/processing_information23.rb', line 20 def payment_flow_mode @payment_flow_mode end |
#session_type ⇒ String
Will have 2 values, 'U' (Update) , 'N' (New). Any other values will be rejected. Default will be 'N'
15 16 17 |
# File 'lib/visa_acceptance_merged_spec/models/processing_information23.rb', line 15 def session_type @session_type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/visa_acceptance_merged_spec/models/processing_information23.rb', line 63 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. session_type = hash.key?('sessionType') ? hash['sessionType'] : SKIP payment_flow_mode = hash.key?('paymentFlowMode') ? hash['paymentFlowMode'] : SKIP action_list = hash.key?('actionList') ? hash['actionList'] : 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. ProcessingInformation23.new(session_type: session_type, payment_flow_mode: payment_flow_mode, action_list: action_list, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 |
# File 'lib/visa_acceptance_merged_spec/models/processing_information23.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['session_type'] = 'sessionType' @_hash['payment_flow_mode'] = 'paymentFlowMode' @_hash['action_list'] = 'actionList' @_hash end |
.nullables ⇒ Object
An array for nullable fields
47 48 49 |
# File 'lib/visa_acceptance_merged_spec/models/processing_information23.rb', line 47 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
38 39 40 41 42 43 44 |
# File 'lib/visa_acceptance_merged_spec/models/processing_information23.rb', line 38 def self.optionals %w[ session_type payment_flow_mode action_list ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
94 95 96 97 98 99 |
# File 'lib/visa_acceptance_merged_spec/models/processing_information23.rb', line 94 def inspect class_name = self.class.name.split('::').last "<#{class_name} session_type: #{@session_type.inspect}, payment_flow_mode:"\ " #{@payment_flow_mode.inspect}, action_list: #{@action_list.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
87 88 89 90 91 |
# File 'lib/visa_acceptance_merged_spec/models/processing_information23.rb', line 87 def to_s class_name = self.class.name.split('::').last "<#{class_name} session_type: #{@session_type}, payment_flow_mode: #{@payment_flow_mode},"\ " action_list: #{@action_list}, additional_properties: #{@additional_properties}>" end |