Class: VisaAcceptanceMergedSpec::MerchantDefinedSecureInformation2
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::MerchantDefinedSecureInformation2
- Defined in:
- lib/visa_acceptance_merged_spec/models/merchant_defined_secure_information2.rb
Overview
MerchantDefinedSecureInformation2 Model.
Instance Attribute Summary collapse
-
#secure1 ⇒ String
The value you assign for your merchant-secure data field 1.
-
#secure2 ⇒ String
The value you assign for your merchant-secure data field 2.
-
#secure3 ⇒ String
The value you assign for your merchant-secure data field 3.
-
#secure4 ⇒ String
The value you assign for your merchant-secure data field 4.
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(secure1: SKIP, secure2: SKIP, secure3: SKIP, secure4: SKIP, additional_properties: nil) ⇒ MerchantDefinedSecureInformation2
constructor
A new instance of MerchantDefinedSecureInformation2.
-
#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(secure1: SKIP, secure2: SKIP, secure3: SKIP, secure4: SKIP, additional_properties: nil) ⇒ MerchantDefinedSecureInformation2
Returns a new instance of MerchantDefinedSecureInformation2.
53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_defined_secure_information2.rb', line 53 def initialize(secure1: SKIP, secure2: SKIP, secure3: SKIP, secure4: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @secure1 = secure1 unless secure1 == SKIP @secure2 = secure2 unless secure2 == SKIP @secure3 = secure3 unless secure3 == SKIP @secure4 = secure4 unless secure4 == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#secure1 ⇒ String
The value you assign for your merchant-secure data field 1.
14 15 16 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_defined_secure_information2.rb', line 14 def secure1 @secure1 end |
#secure2 ⇒ String
The value you assign for your merchant-secure data field 2.
18 19 20 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_defined_secure_information2.rb', line 18 def secure2 @secure2 end |
#secure3 ⇒ String
The value you assign for your merchant-secure data field 3.
22 23 24 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_defined_secure_information2.rb', line 22 def secure3 @secure3 end |
#secure4 ⇒ String
The value you assign for your merchant-secure data field 4.
26 27 28 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_defined_secure_information2.rb', line 26 def secure4 @secure4 end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_defined_secure_information2.rb', line 66 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. secure1 = hash.key?('secure1') ? hash['secure1'] : SKIP secure2 = hash.key?('secure2') ? hash['secure2'] : SKIP secure3 = hash.key?('secure3') ? hash['secure3'] : SKIP secure4 = hash.key?('secure4') ? hash['secure4'] : 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. MerchantDefinedSecureInformation2.new(secure1: secure1, secure2: secure2, secure3: secure3, secure4: secure4, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_defined_secure_information2.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['secure1'] = 'secure1' @_hash['secure2'] = 'secure2' @_hash['secure3'] = 'secure3' @_hash['secure4'] = 'secure4' @_hash end |
.nullables ⇒ Object
An array for nullable fields
49 50 51 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_defined_secure_information2.rb', line 49 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 45 46 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_defined_secure_information2.rb', line 39 def self.optionals %w[ secure1 secure2 secure3 secure4 ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
98 99 100 101 102 103 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_defined_secure_information2.rb', line 98 def inspect class_name = self.class.name.split('::').last "<#{class_name} secure1: #{@secure1.inspect}, secure2: #{@secure2.inspect}, secure3:"\ " #{@secure3.inspect}, secure4: #{@secure4.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
91 92 93 94 95 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_defined_secure_information2.rb', line 91 def to_s class_name = self.class.name.split('::').last "<#{class_name} secure1: #{@secure1}, secure2: #{@secure2}, secure3: #{@secure3}, secure4:"\ " #{@secure4}, additional_properties: #{@additional_properties}>" end |