class Beaver::CaptureAmounts
CaptureAmounts
Model.
Attributes
amount[RW]
TODO: Write general description for this method @return [Integer]
currency[RW]
TODO: Write general description for this method @return [CurrencyEnum]
fee_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/capture_amounts.rb, line 39 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. amount = hash['amount'] currency = hash['currency'] fee_amount = hash['fee_amount'] # Create object from extracted values. CaptureAmounts.new(amount, currency, fee_amount) end
names()
click to toggle source
A mapping from model property names to API property names.
# File lib/beaver/models/capture_amounts.rb, line 22 def self.names @_hash = {} if @_hash.nil? @_hash['amount'] = 'amount' @_hash['currency'] = 'currency' @_hash['fee_amount'] = 'fee_amount' @_hash end
new(amount = nil, currency = nil, fee_amount = nil)
click to toggle source
# File lib/beaver/models/capture_amounts.rb, line 30 def initialize(amount = nil, currency = nil, fee_amount = nil) @amount = amount @currency = currency @fee_amount = fee_amount end