class Beaver::InterchangeFee
InterchangeFee
Model.
Attributes
Transaction fee category. @return [CurrencyEnum]
Transaction fee category. @return [String]
TODO: Write general description for this method @return [FeeTypeEnum]
Fixed fee amount. @return [Integer]
Fixed fee markup amount. @return [Integer]
Number of transactions in a billing statement for the given fee type and fee category. @return [Integer]
Total transaction amount in a billing statement for the given fee type and fee category. @return [Integer]
Total fee amount, sum of interchange fee amount, markup fee amount, and fee amount for other types. @return [Integer]
Total interchange fee amount. @return [Integer]
Total markup fee amount. @return [Integer]
Basis points to calculate variable fee amount. @return [Integer]
Basis points to calculate variable markup fee amount. @return [Integer]
Public Class Methods
Creates an instance of the object from a hash.
# File lib/beaver/models/interchange_fee.rb, line 105 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. fee_type = hash['fee_type'] fee_category = hash['fee_category'] currency = hash['currency'] total_amount = hash['total_amount'] item_count = hash['item_count'] total_fees = hash['total_fees'] variable_fee_bps = hash['variable_fee_bps'] fixed_fee_amount = hash['fixed_fee_amount'] variable_fee_markup_bps = hash['variable_fee_markup_bps'] fixed_fee_markup_amount = hash['fixed_fee_markup_amount'] total_interchange_fee = hash['total_interchange_fee'] total_markup = hash['total_markup'] # Create object from extracted values. InterchangeFee.new(fee_type, fee_category, currency, total_amount, item_count, total_fees, variable_fee_bps, fixed_fee_amount, variable_fee_markup_bps, fixed_fee_markup_amount, total_interchange_fee, total_markup) end
A mapping from model property names to API property names.
# File lib/beaver/models/interchange_fee.rb, line 61 def self.names @_hash = {} if @_hash.nil? @_hash['fee_type'] = 'fee_type' @_hash['fee_category'] = 'fee_category' @_hash['currency'] = 'currency' @_hash['total_amount'] = 'total_amount' @_hash['item_count'] = 'item_count' @_hash['variable_fee_bps'] = 'variable_fee_bps' @_hash['fixed_fee_amount'] = 'fixed_fee_amount' @_hash['variable_fee_markup_bps'] = 'variable_fee_markup_bps' @_hash['fixed_fee_markup_amount'] = 'fixed_fee_markup_amount' @_hash['total_interchange_fee'] = 'total_interchange_fee' @_hash['total_markup'] = 'total_markup' @_hash['total_fees'] = 'total_fees' @_hash end
# File lib/beaver/models/interchange_fee.rb, line 78 def initialize(fee_type = nil, fee_category = nil, currency = nil, total_amount = nil, item_count = nil, total_fees = nil, variable_fee_bps = nil, fixed_fee_amount = nil, variable_fee_markup_bps = nil, fixed_fee_markup_amount = nil, total_interchange_fee = nil, total_markup = nil) @fee_type = fee_type @fee_category = fee_category @currency = currency @total_amount = total_amount @item_count = item_count @variable_fee_bps = variable_fee_bps @fixed_fee_amount = fixed_fee_amount @variable_fee_markup_bps = variable_fee_markup_bps @fixed_fee_markup_amount = fixed_fee_markup_amount @total_interchange_fee = total_interchange_fee @total_markup = total_markup @total_fees = total_fees end