Class: VisaAcceptanceMergedSpec::TmsPaymentInstrumentProcessingInfo

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

Overview

TmsPaymentInstrumentProcessingInfo 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(bill_payment_program_enabled: SKIP, bank_transfer_options: SKIP, additional_properties: nil) ⇒ TmsPaymentInstrumentProcessingInfo

Returns a new instance of TmsPaymentInstrumentProcessingInfo.



53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/visa_acceptance_merged_spec/models/tms_payment_instrument_processing_info.rb', line 53

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

  unless bill_payment_program_enabled == SKIP
    @bill_payment_program_enabled =
      bill_payment_program_enabled
  end
  @bank_transfer_options = bank_transfer_options unless bank_transfer_options == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#bank_transfer_options ⇒ BankTransferOptions4

Flag that indicates that this is a payment for a bill or for an existing contractual loan. Possible Values:

  • true: Bill payment or loan payment.
  • false (default): Not a bill payment or loan payment.

For processor-specific details, see the bill_payment field description

in [Credit Card Services Using the SCMP API.](



30
31
32
# File 'lib/visa_acceptance_merged_spec/models/tms_payment_instrument_processing_info.rb', line 30

def bank_transfer_options
  @bank_transfer_options
end

#bill_payment_program_enabled ⇒ TrueClass | FalseClass

Flag that indicates that this is a payment for a bill or for an existing contractual loan. Possible Values:

  • true: Bill payment or loan payment.
  • false (default): Not a bill payment or loan payment.

For processor-specific details, see the bill_payment field description

in [Credit Card Services Using the SCMP API.](

Returns:

  • (TrueClass | FalseClass)


20
21
22
# File 'lib/visa_acceptance_merged_spec/models/tms_payment_instrument_processing_info.rb', line 20

def bill_payment_program_enabled
  @bill_payment_program_enabled
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/visa_acceptance_merged_spec/models/tms_payment_instrument_processing_info.rb', line 67

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  bill_payment_program_enabled =
    hash.key?('billPaymentProgramEnabled') ? hash['billPaymentProgramEnabled'] : SKIP
  bank_transfer_options = BankTransferOptions4.from_hash(hash['bankTransferOptions']) if
    hash['bankTransferOptions']

  # 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.
  TmsPaymentInstrumentProcessingInfo.new(bill_payment_program_enabled: bill_payment_program_enabled,
                                         bank_transfer_options: bank_transfer_options,
                                         additional_properties: additional_properties)
end

.names ⇒ Object

A mapping from model property names to API property names.



33
34
35
36
37
38
# File 'lib/visa_acceptance_merged_spec/models/tms_payment_instrument_processing_info.rb', line 33

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['bill_payment_program_enabled'] = 'billPaymentProgramEnabled'
  @_hash['bank_transfer_options'] = 'bankTransferOptions'
  @_hash
end

.nullables ⇒ Object

An array for nullable fields



49
50
51
# File 'lib/visa_acceptance_merged_spec/models/tms_payment_instrument_processing_info.rb', line 49

def self.nullables
  []
end

.optionals ⇒ Object

An array for optional fields



41
42
43
44
45
46
# File 'lib/visa_acceptance_merged_spec/models/tms_payment_instrument_processing_info.rb', line 41

def self.optionals
  %w[
    bill_payment_program_enabled
    bank_transfer_options
  ]
end

Instance Method Details

#inspect ⇒ Object

Provides a debugging-friendly string with detailed object information.



98
99
100
101
102
103
# File 'lib/visa_acceptance_merged_spec/models/tms_payment_instrument_processing_info.rb', line 98

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

#to_s ⇒ Object

Provides a human-readable string representation of the object.



90
91
92
93
94
95
# File 'lib/visa_acceptance_merged_spec/models/tms_payment_instrument_processing_info.rb', line 90

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