Class: CyberSourceMergedSpec::PointOfSaleInformation6
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::PointOfSaleInformation6
- Defined in:
- lib/cyber_source_merged_spec/models/point_of_sale_information6.rb
Overview
PointOfSaleInformation6 Model.
Instance Attribute Summary collapse
-
#amex_capn_data ⇒ String
Point-of-sale details for the transaction.
-
#emv ⇒ Emv6
TODO: Write general description for this method.
-
#encrypted_key_id ⇒ String
Identifies the Zone PIN Key (ZPK) used for Online PIN processing by providing the 10‑digit Key Set Identifier (KSI).
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(emv: SKIP, amex_capn_data: SKIP, encrypted_key_id: SKIP, additional_properties: nil) ⇒ PointOfSaleInformation6
constructor
A new instance of PointOfSaleInformation6.
-
#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(emv: SKIP, amex_capn_data: SKIP, encrypted_key_id: SKIP, additional_properties: nil) ⇒ PointOfSaleInformation6
Returns a new instance of PointOfSaleInformation6.
67 68 69 70 71 72 73 74 75 76 |
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information6.rb', line 67 def initialize(emv: SKIP, amex_capn_data: SKIP, encrypted_key_id: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @emv = emv unless emv == SKIP @amex_capn_data = amex_capn_data unless amex_capn_data == SKIP @encrypted_key_id = encrypted_key_id unless encrypted_key_id == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#amex_capn_data ⇒ String
Point-of-sale details for the transaction. This value is returned only for American Express Direct. CyberSource generates this value, which consists of a series of codes that identify terminal capability, security data, and specific conditions present at the time the transaction occurred. To comply with the CAPN requirements, this value must be included in all subsequent follow-on requests, such as captures and follow-on credits. When you perform authorizations, captures, and credits through CyberSource, CyberSource passes this value from the authorization service to the subsequent services for you. However, when you perform authorizations through CyberSource and perform subsequent services through other financial institutions, you must ensure that your requests for captures and credits include this value.
33 34 35 |
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information6.rb', line 33 def amex_capn_data @amex_capn_data end |
#emv ⇒ Emv6
TODO: Write general description for this method
14 15 16 |
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information6.rb', line 14 def emv @emv end |
#encrypted_key_id ⇒ String
Identifies the Zone PIN Key (ZPK) used for Online PIN processing by providing the 10‑digit Key Set Identifier (KSI). This value indicates that the PIN block is encrypted under a ZPK and enables the Payment Security Service (PSS) to perform the correct ZPK→ZPK PIN translation during card‑present EMV PIN transactions.
42 43 44 |
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information6.rb', line 42 def encrypted_key_id @encrypted_key_id end |
Class Method Details
.from_element(root) ⇒ Object
102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information6.rb', line 102 def self.from_element(root) emv = XmlUtilities.from_element(root, 'Emv6', Emv6) amex_capn_data = XmlUtilities.from_element(root, 'amexCapnData', String) encrypted_key_id = XmlUtilities.from_element(root, 'encryptedKeyId', String) new(emv: emv, amex_capn_data: amex_capn_data, encrypted_key_id: encrypted_key_id, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information6.rb', line 79 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. emv = Emv6.from_hash(hash['emv']) if hash['emv'] amex_capn_data = hash.key?('amexCapnData') ? hash['amexCapnData'] : SKIP encrypted_key_id = hash.key?('encryptedKeyId') ? hash['encryptedKeyId'] : 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. PointOfSaleInformation6.new(emv: emv, amex_capn_data: amex_capn_data, encrypted_key_id: encrypted_key_id, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
45 46 47 48 49 50 51 |
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information6.rb', line 45 def self.names @_hash = {} if @_hash.nil? @_hash['emv'] = 'emv' @_hash['amex_capn_data'] = 'amexCapnData' @_hash['encrypted_key_id'] = 'encryptedKeyId' @_hash end |
.nullables ⇒ Object
An array for nullable fields
63 64 65 |
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information6.rb', line 63 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
54 55 56 57 58 59 60 |
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information6.rb', line 54 def self.optionals %w[ emv amex_capn_data encrypted_key_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
135 136 137 138 139 140 |
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information6.rb', line 135 def inspect class_name = self.class.name.split('::').last "<#{class_name} emv: #{@emv.inspect}, amex_capn_data: #{@amex_capn_data.inspect},"\ " encrypted_key_id: #{@encrypted_key_id.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
128 129 130 131 132 |
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information6.rb', line 128 def to_s class_name = self.class.name.split('::').last "<#{class_name} emv: #{@emv}, amex_capn_data: #{@amex_capn_data}, encrypted_key_id:"\ " #{@encrypted_key_id}, additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/cyber_source_merged_spec/models/point_of_sale_information6.rb', line 114 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'Emv6', emv) XmlUtilities.add_as_subelement(doc, root, 'amexCapnData', amex_capn_data) XmlUtilities.add_as_subelement(doc, root, 'encryptedKeyId', encrypted_key_id) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |