class Beaver::Pricing
The pricing strategy to collect payment fees for each merchant.
Attributes
currencies[RW]
TODO: Write general description for this method @return [Currencies]
Public Class Methods
from_hash(hash)
click to toggle source
Creates an instance of the object from a hash.
# File lib/beaver/models/pricing.rb, line 25 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. currencies = Currencies.from_hash(hash['currencies']) if hash['currencies'] # Create object from extracted values. Pricing.new(currencies) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/beaver/models/pricing.rb, line 14 def self.names @_hash = {} if @_hash.nil? @_hash['currencies'] = 'currencies' @_hash end
new(currencies = nil)
click to toggle source
# File lib/beaver/models/pricing.rb, line 20 def initialize(currencies = nil) @currencies = currencies end