Class: VisaAcceptanceMergedSpec::InvoiceDetails2
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::InvoiceDetails2
- Defined in:
- lib/visa_acceptance_merged_spec/models/invoice_details2.rb
Overview
InvoiceDetails2 Model.
Instance Attribute Summary collapse
-
#level3_transmission_status ⇒ TrueClass | FalseClass
Indicates whether Visa Acceptance sent the Level III information to the processor.
-
#sales_slip_number ⇒ Integer
Transaction identifier that is generated.
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(level3_transmission_status: SKIP, sales_slip_number: SKIP, additional_properties: nil) ⇒ InvoiceDetails2
constructor
A new instance of InvoiceDetails2.
-
#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(level3_transmission_status: SKIP, sales_slip_number: SKIP, additional_properties: nil) ⇒ InvoiceDetails2
Returns a new instance of InvoiceDetails2.
64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/visa_acceptance_merged_spec/models/invoice_details2.rb', line 64 def initialize(level3_transmission_status: SKIP, sales_slip_number: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? unless level3_transmission_status == SKIP @level3_transmission_status = level3_transmission_status end @sales_slip_number = sales_slip_number unless sales_slip_number == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#level3_transmission_status ⇒ TrueClass | FalseClass
Indicates whether Visa Acceptance sent the Level III information to the processor. The possible values are: If your account is not enabled for Level III data or if you did not include the purchasing level field in your request, Visa Acceptance does not include the Level III data in the request sent to the processor. Possible values:
- true
- false
22 23 24 |
# File 'lib/visa_acceptance_merged_spec/models/invoice_details2.rb', line 22 def level3_transmission_status @level3_transmission_status end |
#sales_slip_number ⇒ Integer
Transaction identifier that is generated. You have the option of printing the sales slip number on the receipt. This field is supported only on Visa Acceptance through Visanet and JCN gateway. Optional field.
Card Present processing message
If you included this field in the request, the returned value is the value
that you sent in the request.
If you did not include this field in the request, the system generated
this value for you.
The difference between this reply field and the
processorInformation.systemTraceAuditNumber field is that the
system generates the system trace audit number (STAN), and you must print
the receipt number on the receipt;
whereas you can generate the sales slip number, and you can choose to
print the sales slip number on the receipt.
41 42 43 |
# File 'lib/visa_acceptance_merged_spec/models/invoice_details2.rb', line 41 def sales_slip_number @sales_slip_number end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/visa_acceptance_merged_spec/models/invoice_details2.rb', line 78 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. level3_transmission_status = hash.key?('level3TransmissionStatus') ? hash['level3TransmissionStatus'] : SKIP sales_slip_number = hash.key?('salesSlipNumber') ? hash['salesSlipNumber'] : 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. InvoiceDetails2.new(level3_transmission_status: level3_transmission_status, sales_slip_number: sales_slip_number, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
44 45 46 47 48 49 |
# File 'lib/visa_acceptance_merged_spec/models/invoice_details2.rb', line 44 def self.names @_hash = {} if @_hash.nil? @_hash['level3_transmission_status'] = 'level3TransmissionStatus' @_hash['sales_slip_number'] = 'salesSlipNumber' @_hash end |
.nullables ⇒ Object
An array for nullable fields
60 61 62 |
# File 'lib/visa_acceptance_merged_spec/models/invoice_details2.rb', line 60 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
52 53 54 55 56 57 |
# File 'lib/visa_acceptance_merged_spec/models/invoice_details2.rb', line 52 def self.optionals %w[ level3_transmission_status sales_slip_number ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
109 110 111 112 113 114 |
# File 'lib/visa_acceptance_merged_spec/models/invoice_details2.rb', line 109 def inspect class_name = self.class.name.split('::').last "<#{class_name} level3_transmission_status: #{@level3_transmission_status.inspect},"\ " sales_slip_number: #{@sales_slip_number.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
101 102 103 104 105 106 |
# File 'lib/visa_acceptance_merged_spec/models/invoice_details2.rb', line 101 def to_s class_name = self.class.name.split('::').last "<#{class_name} level3_transmission_status: #{@level3_transmission_status},"\ " sales_slip_number: #{@sales_slip_number}, additional_properties:"\ " #{@additional_properties}>" end |