class Io::Flow::V0::Models::SettlementPayout
Attributes
amount[R]
sent_on[R]
status[R]
Public Class Methods
new(incoming={})
click to toggle source
Calls superclass method
Io::Flow::V0::Models::Settlement::new
# File lib/flow_commerce/flow_api_v0_client.rb, line 65731 def initialize(incoming={}) super(:discriminator => Settlement::Types::SETTLEMENT_PAYOUT) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:status, :amount], 'SettlementPayout') @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::PayoutStatus) ? x : ::Io::Flow::V0::Models::PayoutStatus.from_json(x)) @amount = HttpClient::Preconditions.assert_class('amount', HttpClient::Helper.to_big_decimal(opts.delete(:amount)), BigDecimal) @sent_on = (x = opts.delete(:sent_on); x.nil? ? nil : HttpClient::Preconditions.assert_class('sent_on', HttpClient::Helper.to_date_time_iso8601(x), DateTime)) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 65744 def copy(incoming={}) SettlementPayout.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end
subtype_to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 65748 def subtype_to_hash { :status => status.to_hash, :amount => amount.to_f.to_s, :sent_on => sent_on } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 65740 def to_json JSON.dump(to_hash) end