class Beaver::RefundAmounts
RefundAmounts
Model.
Attributes
currency[RW]
TODO: Write general description for this method @return [CurrencyEnum]
fee_refund_amount[RW]
TODO: Write general description for this method @return [Integer]
total_amount[RW]
TODO: Write general description for this method @return [Integer]
Public Class Methods
from_hash(hash)
click to toggle source
Creates an instance of the object from a hash.
# File lib/beaver/models/refund_amounts.rb, line 39 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. total_amount = hash['total_amount'] currency = hash['currency'] fee_refund_amount = hash['fee_refund_amount'] # Create object from extracted values. RefundAmounts.new(total_amount, currency, fee_refund_amount) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/beaver/models/refund_amounts.rb, line 22 def self.names @_hash = {} if @_hash.nil? @_hash['total_amount'] = 'total_amount' @_hash['currency'] = 'currency' @_hash['fee_refund_amount'] = 'fee_refund_amount' @_hash end
new(total_amount = nil, currency = nil, fee_refund_amount = nil)
click to toggle source
# File lib/beaver/models/refund_amounts.rb, line 30 def initialize(total_amount = nil, currency = nil, fee_refund_amount = nil) @total_amount = total_amount @currency = currency @fee_refund_amount = fee_refund_amount end