Class: VisaAcceptanceMergedSpec::InstallmentInformation3

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/visa_acceptance_merged_spec/models/installment_information3.rb

Overview

InstallmentInformation3 Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(plan_type: SKIP, additional_properties: nil) ⇒ InstallmentInformation3

Returns a new instance of InstallmentInformation3.



79
80
81
82
83
84
85
# File 'lib/visa_acceptance_merged_spec/models/installment_information3.rb', line 79

def initialize(plan_type: SKIP, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @plan_type = plan_type unless plan_type == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#plan_typeString

American Express Direct, Cielo, and Visa Acceptance Latin American

Processing Flag that indicates the type of funding for the installment plan associated with the payment. Possible values:

  • 1: Merchant-funded installment plan
  • 2: Issuer-funded installment plan If you do not include this field in the request, Visa Acceptance uses the value in your Visa Acceptance account. To change the value in your Visa Acceptance account, contact Visa Acceptance Customer Service.

Visa Acceptance through VisaNet and American Express

Defined code that indicates the type of installment plan for this transaction. Contact American Express for:

  • Information about the kinds of installment plans that American Express provides
  • Values for this field For installment payments with American Express in Brazil, the value for this field corresponds to the following data in the TC 33 capture file*:
  • Record: CP07 TCR3
  • Position: 5-6
  • Field: Plan Type
  • The TC 33 Capture file contains information about the purchases and refunds that a merchant submits to Visa Acceptance. Visa Acceptance through VisaNet creates the TC 33 Capture file at the end of the day and sends it to the merchant’s acquirer, who uses this information to facilitate end-of-day clearing processing with payment card companies.

Visa Acceptance through VisaNet with Visa or Mastercard

Flag indicating the type of funding for the installment plan associated with the payment. Possible values:

  • 1 or 01: Merchant-funded installment plan
  • 2 or 02: Issuer-funded installment plan
  • 43: Crediario installment plan—only with Visa in Brazil For installment payments with Visa in Brazil, the value for this field corresponds to the following data in the TC 33 capture file5:
  • Record: CP07 TCR1
  • Position: 5-6
  • Field: Installment Type For all other kinds of installment payments, the value for this field corresponds to the following data in the TC 33 capture file5:
  • Record: CP01 TCR5
  • Position: 39-40
  • Field: Installment Plan Type (Issuer or Merchant)

Returns:

  • (String)


58
59
60
# File 'lib/visa_acceptance_merged_spec/models/installment_information3.rb', line 58

def plan_type
  @plan_type
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/visa_acceptance_merged_spec/models/installment_information3.rb', line 88

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  plan_type = hash.key?('planType') ? hash['planType'] : 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.
  InstallmentInformation3.new(plan_type: plan_type,
                              additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



61
62
63
64
65
# File 'lib/visa_acceptance_merged_spec/models/installment_information3.rb', line 61

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['plan_type'] = 'planType'
  @_hash
end

.nullablesObject

An array for nullable fields



75
76
77
# File 'lib/visa_acceptance_merged_spec/models/installment_information3.rb', line 75

def self.nullables
  []
end

.optionalsObject

An array for optional fields



68
69
70
71
72
# File 'lib/visa_acceptance_merged_spec/models/installment_information3.rb', line 68

def self.optionals
  %w[
    plan_type
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



114
115
116
117
118
# File 'lib/visa_acceptance_merged_spec/models/installment_information3.rb', line 114

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} plan_type: #{@plan_type.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



107
108
109
110
111
# File 'lib/visa_acceptance_merged_spec/models/installment_information3.rb', line 107

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} plan_type: #{@plan_type}, additional_properties:"\
  " #{@additional_properties}>"
end