Class: CyberSourceMergedSpec::MerchantDefinedSecureInformation
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::MerchantDefinedSecureInformation
- Defined in:
- lib/cyber_source_merged_spec/models/merchant_defined_secure_information.rb
Overview
The object containing the secure data that the merchant defines.
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_element(root) ⇒ Object
-
.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) ⇒ MerchantDefinedSecureInformation
constructor
A new instance of MerchantDefinedSecureInformation.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
- #to_xml_element(doc, root_name) ⇒ 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) ⇒ MerchantDefinedSecureInformation
Returns a new instance of MerchantDefinedSecureInformation.
53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/cyber_source_merged_spec/models/merchant_defined_secure_information.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/cyber_source_merged_spec/models/merchant_defined_secure_information.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/cyber_source_merged_spec/models/merchant_defined_secure_information.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/cyber_source_merged_spec/models/merchant_defined_secure_information.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/cyber_source_merged_spec/models/merchant_defined_secure_information.rb', line 26 def secure4 @secure4 end |
Class Method Details
.from_element(root) ⇒ Object
90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/cyber_source_merged_spec/models/merchant_defined_secure_information.rb', line 90 def self.from_element(root) secure1 = XmlUtilities.from_element(root, 'secure1', String) secure2 = XmlUtilities.from_element(root, 'secure2', String) secure3 = XmlUtilities.from_element(root, 'secure3', String) secure4 = XmlUtilities.from_element(root, 'secure4', String) new(secure1: secure1, secure2: secure2, secure3: secure3, secure4: secure4, additional_properties: additional_properties) end |
.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/cyber_source_merged_spec/models/merchant_defined_secure_information.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. MerchantDefinedSecureInformation.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/cyber_source_merged_spec/models/merchant_defined_secure_information.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/cyber_source_merged_spec/models/merchant_defined_secure_information.rb', line 49 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 45 46 |
# File 'lib/cyber_source_merged_spec/models/merchant_defined_secure_information.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.
124 125 126 127 128 129 |
# File 'lib/cyber_source_merged_spec/models/merchant_defined_secure_information.rb', line 124 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.
117 118 119 120 121 |
# File 'lib/cyber_source_merged_spec/models/merchant_defined_secure_information.rb', line 117 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 |
#to_xml_element(doc, root_name) ⇒ Object
103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/cyber_source_merged_spec/models/merchant_defined_secure_information.rb', line 103 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'secure1', secure1) XmlUtilities.add_as_subelement(doc, root, 'secure2', secure2) XmlUtilities.add_as_subelement(doc, root, 'secure3', secure3) XmlUtilities.add_as_subelement(doc, root, 'secure4', secure4) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |