class Beaver::DeferredAuthorization

Configuration settings for deferred authorization functionality.

Attributes

enabled[RW]

Determines if deferred authorization functionality is enabled. @return [Boolean]

international_enabled[RW]

Determines if international payment methods are allowed for deferred authorizations. @return [Boolean]

max_total_amount[RW]

The maximum total amount of transaction volume that can be processed as deferred authorizations. Once exceeded, the terminal will no longer process transactions until connectivity has been restored. @return [Integer]

max_transaction_amount[RW]

The maximum total amount of transaction volume that can be processed as deferred authorizations. Once exceeded, the terminal will no longer process transactions until connectivity has been restored. @return [Integer]

max_transaction_count[RW]

The maximum number of transactions that can be processed as deferred authorizations. Once exceeded, the terminal will no longer process transactions until connectivity has been restored. @return [Integer]

supported_card_entry_modes[RW]

The card entry modes that are allowed in deferred authorizations. @return [List of SupportedCardEntryModeEnum]

Public Class Methods

from_hash(hash) click to toggle source

Creates an instance of the object from a hash.

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

  # Extract variables from the hash.
  enabled = hash['enabled']
  international_enabled = hash['international_enabled']
  max_transaction_count = hash['max_transaction_count']
  max_total_amount = hash['max_total_amount']
  max_transaction_amount = hash['max_transaction_amount']
  supported_card_entry_modes = hash['supported_card_entry_modes']

  # Create object from extracted values.
  DeferredAuthorization.new(enabled,
                            international_enabled,
                            max_transaction_count,
                            max_total_amount,
                            max_transaction_amount,
                            supported_card_entry_modes)
end
names() click to toggle source

A mapping from model property names to API property names.

# File lib/beaver/models/deferred_authorization.rb, line 41
def self.names
  @_hash = {} if @_hash.nil?
  @_hash['enabled'] = 'enabled'
  @_hash['international_enabled'] = 'international_enabled'
  @_hash['max_transaction_count'] = 'max_transaction_count'
  @_hash['max_total_amount'] = 'max_total_amount'
  @_hash['max_transaction_amount'] = 'max_transaction_amount'
  @_hash['supported_card_entry_modes'] = 'supported_card_entry_modes'
  @_hash
end
new(enabled = nil, international_enabled = nil, max_transaction_count = nil, max_total_amount = nil, max_transaction_amount = nil, supported_card_entry_modes = nil) click to toggle source
# File lib/beaver/models/deferred_authorization.rb, line 52
def initialize(enabled = nil,
               international_enabled = nil,
               max_transaction_count = nil,
               max_total_amount = nil,
               max_transaction_amount = nil,
               supported_card_entry_modes = nil)
  @enabled = enabled
  @international_enabled = international_enabled
  @max_transaction_count = max_transaction_count
  @max_total_amount = max_total_amount
  @max_transaction_amount = max_transaction_amount
  @supported_card_entry_modes = supported_card_entry_modes
end