Class: VisaAcceptanceMergedSpec::MerchantDefinedInformation
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::MerchantDefinedInformation
- Defined in:
- lib/visa_acceptance_merged_spec/models/merchant_defined_information.rb
Overview
MerchantDefinedInformation Model.
Instance Attribute Summary collapse
-
#key ⇒ String
The number you assign for as the key for your merchant-defined data field.
-
#value ⇒ String
The value you assign for your merchant-defined data field.
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(key: SKIP, value: SKIP, additional_properties: nil) ⇒ MerchantDefinedInformation
constructor
A new instance of MerchantDefinedInformation.
-
#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(key: SKIP, value: SKIP, additional_properties: nil) ⇒ MerchantDefinedInformation
Returns a new instance of MerchantDefinedInformation.
82 83 84 85 86 87 88 89 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_defined_information.rb', line 82 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
The number you assign for as the key for your merchant-defined data field.
Valid values are 0 to 100.
For example, to set or access the key for the 2nd merchant-defined data
field in the array, you would reference
merchantDefinedInformation[1].key.
Visa Acceptance through VisaNet
For installment payments with Mastercard in Brazil, use
merchantDefinedInformation[0].key and
merchantDefinedInformation[1].key for data that you want to provide to
the issuer to identify the
transaction.
24 25 26 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_defined_information.rb', line 24 def key @key end |
#value ⇒ String
The value you assign for your merchant-defined data field. 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 Visa Acceptance discovers that a merchant is capturing and/or transmitting personally identifying information via the merchant-defined data fields, whether or not intentionally, Visa Acceptance 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.
Visa Acceptance through VisaNet
For installment payments with Mastercard in Brazil, use
merchantDefinedInformation[0].value and
merchantDefinedInformation[1].value for data that you want to provide to
the issuer to identify the
transaction.
For installment payments with Mastercard in Brazil:
- The value for merchantDefinedInformation.value corresponds to the
following data in the TC 33 capture file5:
- Record: CP07 TCR5
- Position: 25-44
- Field: Reference Field 2
- The value for merchantDefinedInformation.value corresponds to the
following data in the TC 33 capture file5:
- Record: CP07 TCR5
- Position: 45-64
- Field: Reference Field 3
59 60 61 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_defined_information.rb', line 59 def value @value end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_defined_information.rb', line 92 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. MerchantDefinedInformation.new(key: key, value: value, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
62 63 64 65 66 67 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_defined_information.rb', line 62 def self.names @_hash = {} if @_hash.nil? @_hash['key'] = 'key' @_hash['value'] = 'value' @_hash end |
.nullables ⇒ Object
An array for nullable fields
78 79 80 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_defined_information.rb', line 78 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
70 71 72 73 74 75 |
# File 'lib/visa_acceptance_merged_spec/models/merchant_defined_information.rb', line 70 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/visa_acceptance_merged_spec/models/merchant_defined_information.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/visa_acceptance_merged_spec/models/merchant_defined_information.rb', line 113 def to_s class_name = self.class.name.split('::').last "<#{class_name} key: #{@key}, value: #{@value}, additional_properties:"\ " #{@additional_properties}>" end |