Class: CyberSourceMergedSpec::MerchantDefinedInformation13
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::MerchantDefinedInformation13
- Defined in:
- lib/cyber_source_merged_spec/models/merchant_defined_information13.rb
Overview
Contains merchant-defined key-value pairs.
Instance Attribute Summary collapse
-
#key ⇒ String
Fields that you can use to store information.
-
#value ⇒ String
String value for the key.
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(key: SKIP, value: SKIP, additional_properties: nil) ⇒ MerchantDefinedInformation13
constructor
A new instance of MerchantDefinedInformation13.
-
#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(key: SKIP, value: SKIP, additional_properties: nil) ⇒ MerchantDefinedInformation13
Returns a new instance of MerchantDefinedInformation13.
62 63 64 65 66 67 68 69 |
# File 'lib/cyber_source_merged_spec/models/merchant_defined_information13.rb', line 62 def initialize(key: SKIP, value: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @key = key unless key == SKIP @value = value unless value == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#key ⇒ String
Fields that you can use to store information. The value appears in the Case Management Details window in the Business Center. The first four fields are the same fields that are used by the Secure Data services. See request code examples. Warning Merchant-defined data fields are not intended to and must not be used to capture personally identifying information. Accordingly, merchants are prohibited from capturing, obtaining, and/or transmitting any personally identifying information in or via the merchant-defined data fields. Personally identifying information includes, but is not limited to, address, credit card number, social security number, driver's license number, state-issued identification number, passport number, and card verification numbers (CVV, CVC2, CVV2, CID, CVN). In the event CyberSource discovers that a merchant is capturing and/or transmitting personally identifying information via the merchant-defined data fields, whether or not intentionally, CyberSource will immediately suspend the merchant's account, which will result in a rejection of any and all transaction requests submitted by the merchant after the point of suspension.
35 36 37 |
# File 'lib/cyber_source_merged_spec/models/merchant_defined_information13.rb', line 35 def key @key end |
#value ⇒ String
String value for the key
39 40 41 |
# File 'lib/cyber_source_merged_spec/models/merchant_defined_information13.rb', line 39 def value @value end |
Class Method Details
.from_element(root) ⇒ Object
92 93 94 95 96 97 98 99 |
# File 'lib/cyber_source_merged_spec/models/merchant_defined_information13.rb', line 92 def self.from_element(root) key = XmlUtilities.from_element(root, 'key', String) value = XmlUtilities.from_element(root, 'value', String) new(key: key, value: value, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/cyber_source_merged_spec/models/merchant_defined_information13.rb', line 72 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. key = hash.key?('key') ? hash['key'] : SKIP value = hash.key?('value') ? hash['value'] : 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. MerchantDefinedInformation13.new(key: key, value: value, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
42 43 44 45 46 47 |
# File 'lib/cyber_source_merged_spec/models/merchant_defined_information13.rb', line 42 def self.names @_hash = {} if @_hash.nil? @_hash['key'] = 'key' @_hash['value'] = 'value' @_hash end |
.nullables ⇒ Object
An array for nullable fields
58 59 60 |
# File 'lib/cyber_source_merged_spec/models/merchant_defined_information13.rb', line 58 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
50 51 52 53 54 55 |
# File 'lib/cyber_source_merged_spec/models/merchant_defined_information13.rb', line 50 def self.optionals %w[ key value ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
120 121 122 123 124 |
# File 'lib/cyber_source_merged_spec/models/merchant_defined_information13.rb', line 120 def inspect class_name = self.class.name.split('::').last "<#{class_name} key: #{@key.inspect}, value: #{@value.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
113 114 115 116 117 |
# File 'lib/cyber_source_merged_spec/models/merchant_defined_information13.rb', line 113 def to_s class_name = self.class.name.split('::').last "<#{class_name} key: #{@key}, value: #{@value}, additional_properties:"\ " #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
101 102 103 104 105 106 107 108 109 110 |
# File 'lib/cyber_source_merged_spec/models/merchant_defined_information13.rb', line 101 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'key', key) XmlUtilities.add_as_subelement(doc, root, 'value', value) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |