class Beaver::TerminalConfiguration2

TerminalConfiguration2 Model.

Attributes

address[RW]

TODO: Write general description for this method @return [AddressTerminalsReq]

contactless_payments[RW]

The request schema for modifying contactless payments configuration settings. @return [ContactlessPaymentsReq]

credit_debit_preference[RW]

Determines how the terminal should prefer credit vs debit when a card is dipped. “credit” indicates credit is the preferred application selection, whereas “debit” would prefer the debit application. “prompt” will perform the EMV default behavior, which is to prompt if multiple applications exist. @return [CreditDebitPreference1Enum]

currency[RW]

TODO: Write general description for this method @return [CurrencyEnum]

deferred_authorization[RW]

Configuration settings for deferred authorization functionality. @return [DeferredAuthorization]

quick_chip[RW]

Configuration settings for quick chip functionality. @return [QuickChip]

signature_required[RW]

Whether or not this terminal requires signature verification from payers. @return [Boolean]

sim_card_id[RW]

The identifier of the SIM card installed in the terminal. Nullable if terminal does not have a SIM card. @return [String]

supported_card_brands[RW]

The collection of card brands that are supported by the terminal. Must provide at least one. @return [List of TerminalsSupportedCardBrandEnum]

timezone[RW]

Timezone of the terminal' @return [TimezoneEnum]

tip[RW]

Timezone of the terminal' @return [TerminalsTip]

Public Class Methods

from_hash(hash) click to toggle source

Creates an instance of the object from a hash.

# File lib/beaver/models/terminal_configuration2.rb, line 102
def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  address = AddressTerminalsReq.from_hash(hash['address']) if
    hash['address']
  currency = hash['currency']
  supported_card_brands = hash['supported_card_brands']
  credit_debit_preference = hash['credit_debit_preference']
  sim_card_id = hash['sim_card_id']
  timezone = hash['timezone']
  tip = TerminalsTip.from_hash(hash['tip']) if hash['tip']
  signature_required = hash['signature_required']
  if hash['contactless_payments']
    contactless_payments = ContactlessPaymentsReq.from_hash(hash['contactless_payments'])
  end
  quick_chip = QuickChip.from_hash(hash['quick_chip']) if
    hash['quick_chip']
  if hash['deferred_authorization']
    deferred_authorization = DeferredAuthorization.from_hash(hash['deferred_authorization'])
  end

  # Create object from extracted values.
  TerminalConfiguration2.new(address,
                             currency,
                             supported_card_brands,
                             credit_debit_preference,
                             sim_card_id,
                             timezone,
                             tip,
                             signature_required,
                             contactless_payments,
                             quick_chip,
                             deferred_authorization)
end
names() click to toggle source

A mapping from model property names to API property names.

# File lib/beaver/models/terminal_configuration2.rb, line 61
def self.names
  @_hash = {} if @_hash.nil?
  @_hash['address'] = 'address'
  @_hash['currency'] = 'currency'
  @_hash['supported_card_brands'] = 'supported_card_brands'
  @_hash['credit_debit_preference'] = 'credit_debit_preference'
  @_hash['sim_card_id'] = 'sim_card_id'
  @_hash['timezone'] = 'timezone'
  @_hash['tip'] = 'tip'
  @_hash['signature_required'] = 'signature_required'
  @_hash['contactless_payments'] = 'contactless_payments'
  @_hash['quick_chip'] = 'quick_chip'
  @_hash['deferred_authorization'] = 'deferred_authorization'
  @_hash
end
new(address = nil, currency = nil, supported_card_brands = nil, credit_debit_preference = nil, sim_card_id = nil, timezone = nil, tip = nil, signature_required = nil, contactless_payments = nil, quick_chip = nil, deferred_authorization = nil) click to toggle source
# File lib/beaver/models/terminal_configuration2.rb, line 77
def initialize(address = nil,
               currency = nil,
               supported_card_brands = nil,
               credit_debit_preference = nil,
               sim_card_id = nil,
               timezone = nil,
               tip = nil,
               signature_required = nil,
               contactless_payments = nil,
               quick_chip = nil,
               deferred_authorization = nil)
  @address = address
  @currency = currency
  @supported_card_brands = supported_card_brands
  @credit_debit_preference = credit_debit_preference
  @sim_card_id = sim_card_id
  @timezone = timezone
  @tip = tip
  @signature_required = signature_required
  @contactless_payments = contactless_payments
  @quick_chip = quick_chip
  @deferred_authorization = deferred_authorization
end