class Beaver::PricingByCurrency
PricingByCurrency
Model.
Attributes
credit_card[RW]
TODO: Write general description for this method @return [CreditCard]
payment_bank[RW]
TODO: Write general description for this method @return [PaymentBank]
Public Class Methods
from_hash(hash)
click to toggle source
Creates an instance of the object from a hash.
# File lib/beaver/models/pricing_by_currency.rb, line 32 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. credit_card = CreditCard.from_hash(hash['credit_card']) if hash['credit_card'] payment_bank = PaymentBank.from_hash(hash['payment_bank']) if hash['payment_bank'] # Create object from extracted values. PricingByCurrency.new(credit_card, payment_bank) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/beaver/models/pricing_by_currency.rb, line 18 def self.names @_hash = {} if @_hash.nil? @_hash['credit_card'] = 'credit_card' @_hash['payment_bank'] = 'payment_bank' @_hash end
new(credit_card = nil, payment_bank = nil)
click to toggle source
# File lib/beaver/models/pricing_by_currency.rb, line 25 def initialize(credit_card = nil, payment_bank = nil) @credit_card = credit_card @payment_bank = payment_bank end