Class: VisaAcceptanceMergedSpec::Morphing
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::Morphing
- Defined in:
- lib/visa_acceptance_merged_spec/models/morphing.rb
Overview
Morphing Model.
Instance Attribute Summary collapse
-
#count ⇒ Integer
Morphing count specified by the number #.
-
#field_name ⇒ String
Field name of the morphing element.
-
#information_code ⇒ String
Identifier that Visa Acceptance assigned to the velocity rule specified by the number #.
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(count: SKIP, field_name: SKIP, information_code: SKIP, additional_properties: nil) ⇒ Morphing
constructor
A new instance of Morphing.
-
#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(count: SKIP, field_name: SKIP, information_code: SKIP, additional_properties: nil) ⇒ Morphing
Returns a new instance of Morphing.
61 62 63 64 65 66 67 68 69 70 |
# File 'lib/visa_acceptance_merged_spec/models/morphing.rb', line 61 def initialize(count: SKIP, field_name: SKIP, information_code: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @count = count unless count == SKIP @field_name = field_name unless field_name == SKIP @information_code = information_code unless information_code == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#count ⇒ Integer
Morphing count specified by the number #. Note The count is not returned for the initial transaction.
15 16 17 |
# File 'lib/visa_acceptance_merged_spec/models/morphing.rb', line 15 def count @count end |
#field_name ⇒ String
Field name of the morphing element. specified by the setting that you
chose in the
Velocity Editor.
For all possible values, see the
decisionReply_morphingElement_#_fieldName field description in the
Decision Manager Using the SCMP API Developer Guide on the [Visa
Acceptance Business Center.]( Click Decision Manager >
Documentation > Guides > Decision Manager Using the SCMP API
Developer Guide (PDF link).
27 28 29 |
# File 'lib/visa_acceptance_merged_spec/models/morphing.rb', line 27 def field_name @field_name end |
#information_code ⇒ String
Identifier that Visa Acceptance assigned to the velocity rule specified by
the number #.
For all possible values, see the decision_velocity_morphing_#_info_code
field description in the Decision Manager Using the SCMP API Developer
Guide on the [Visa Acceptance Business Center.]( Click Decision
Manager >
36 37 38 |
# File 'lib/visa_acceptance_merged_spec/models/morphing.rb', line 36 def information_code @information_code end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/visa_acceptance_merged_spec/models/morphing.rb', line 73 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. count = hash.key?('count') ? hash['count'] : SKIP field_name = hash.key?('fieldName') ? hash['fieldName'] : SKIP information_code = hash.key?('informationCode') ? hash['informationCode'] : 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. Morphing.new(count: count, field_name: field_name, information_code: information_code, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
39 40 41 42 43 44 45 |
# File 'lib/visa_acceptance_merged_spec/models/morphing.rb', line 39 def self.names @_hash = {} if @_hash.nil? @_hash['count'] = 'count' @_hash['field_name'] = 'fieldName' @_hash['information_code'] = 'informationCode' @_hash end |
.nullables ⇒ Object
An array for nullable fields
57 58 59 |
# File 'lib/visa_acceptance_merged_spec/models/morphing.rb', line 57 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
48 49 50 51 52 53 54 |
# File 'lib/visa_acceptance_merged_spec/models/morphing.rb', line 48 def self.optionals %w[ count field_name information_code ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
104 105 106 107 108 109 |
# File 'lib/visa_acceptance_merged_spec/models/morphing.rb', line 104 def inspect class_name = self.class.name.split('::').last "<#{class_name} count: #{@count.inspect}, field_name: #{@field_name.inspect},"\ " information_code: #{@information_code.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
97 98 99 100 101 |
# File 'lib/visa_acceptance_merged_spec/models/morphing.rb', line 97 def to_s class_name = self.class.name.split('::').last "<#{class_name} count: #{@count}, field_name: #{@field_name}, information_code:"\ " #{@information_code}, additional_properties: #{@additional_properties}>" end |