Class: VisaAcceptanceMergedSpec::FluidData4
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::FluidData4
- Defined in:
- lib/visa_acceptance_merged_spec/models/fluid_data4.rb
Overview
FluidData4 Model.
Instance Attribute Summary collapse
-
#descriptor ⇒ String
The identifier for a payment solution, which is sending the encrypted payment data for decryption.
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(descriptor: SKIP, additional_properties: nil) ⇒ FluidData4
constructor
A new instance of FluidData4.
-
#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(descriptor: SKIP, additional_properties: nil) ⇒ FluidData4
Returns a new instance of FluidData4.
52 53 54 55 56 57 58 |
# File 'lib/visa_acceptance_merged_spec/models/fluid_data4.rb', line 52 def initialize(descriptor: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @descriptor = descriptor unless descriptor == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#descriptor ⇒ String
The identifier for a payment solution, which is sending the encrypted
payment data for decryption. Valid values:
Samsung Pay: RklEPUNPTU1PTi5TQU1TVU5HLklOQVBQLlBBWU1FTlQ=
Note: For other payment solutions, the value may be specific to the
terminal or device initiatinf the payment. For example, the descriptor for
a Bluefin payment encryption would be a device-generated descriptor.
Used by Authorization and Standalone Credits. Required for authorizations
and standalone credits.
Card Present processing:
Format of the encrypted payment data.
The value for Bluefin PCI P2PE is Ymx1ZWZpbg==.
paymentInformation.fluidData.encoding must be Base64.
The value for Visa Acceptance P2PE decryption depends on the encoding
method used and identified in encoding field.
If paymentInformation.fluidData.encoding is Base64, the value is:
RklEPUVNVi5QQVlNRU5ULkFQSQ==
If paymentInformation.fluidData.encoding is HEX, the value is:
4649443D454D562E5041594D454E542E41504
31 32 33 |
# File 'lib/visa_acceptance_merged_spec/models/fluid_data4.rb', line 31 def descriptor @descriptor end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/visa_acceptance_merged_spec/models/fluid_data4.rb', line 61 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. descriptor = hash.key?('descriptor') ? hash['descriptor'] : 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. FluidData4.new(descriptor: descriptor, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
34 35 36 37 38 |
# File 'lib/visa_acceptance_merged_spec/models/fluid_data4.rb', line 34 def self.names @_hash = {} if @_hash.nil? @_hash['descriptor'] = 'descriptor' @_hash end |
.nullables ⇒ Object
An array for nullable fields
48 49 50 |
# File 'lib/visa_acceptance_merged_spec/models/fluid_data4.rb', line 48 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
41 42 43 44 45 |
# File 'lib/visa_acceptance_merged_spec/models/fluid_data4.rb', line 41 def self.optionals %w[ descriptor ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
87 88 89 90 91 |
# File 'lib/visa_acceptance_merged_spec/models/fluid_data4.rb', line 87 def inspect class_name = self.class.name.split('::').last "<#{class_name} descriptor: #{@descriptor.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
80 81 82 83 84 |
# File 'lib/visa_acceptance_merged_spec/models/fluid_data4.rb', line 80 def to_s class_name = self.class.name.split('::').last "<#{class_name} descriptor: #{@descriptor}, additional_properties:"\ " #{@additional_properties}>" end |