Class: Io::Flow::V0::Models::ChannelPayoutUpserted
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#channel_id ⇒ Object
readonly
Returns the value of attribute channel_id.
-
#event_id ⇒ Object
readonly
Returns the value of attribute event_id.
-
#payout ⇒ Object
readonly
Returns the value of attribute payout.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Attributes inherited from Event
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ChannelPayoutUpserted
constructor
A new instance of ChannelPayoutUpserted.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from Event
Constructor Details
#initialize(incoming = {}) ⇒ ChannelPayoutUpserted
Returns a new instance of ChannelPayoutUpserted.
35360 35361 35362 35363 35364 35365 35366 35367 35368 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35360 def initialize(incoming={}) super(:discriminator => Event::Types::CHANNEL_PAYOUT_UPSERTED) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:event_id, :timestamp, :channel_id, :payout], 'ChannelPayoutUpserted') @event_id = HttpClient::Preconditions.assert_class('event_id', opts.delete(:event_id), String) @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime) @channel_id = HttpClient::Preconditions.assert_class('channel_id', opts.delete(:channel_id), String) @payout = (x = opts.delete(:payout); x.is_a?(::Io::Flow::V0::Models::ChannelPayout) ? x : ::Io::Flow::V0::Models::ChannelPayout.new(x)) end |
Instance Attribute Details
#channel_id ⇒ Object (readonly)
Returns the value of attribute channel_id.
35358 35359 35360 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35358 def channel_id @channel_id end |
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
35358 35359 35360 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35358 def event_id @event_id end |
#payout ⇒ Object (readonly)
Returns the value of attribute payout.
35358 35359 35360 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35358 def payout @payout end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
35358 35359 35360 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35358 def @timestamp end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
35374 35375 35376 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35374 def copy(incoming={}) ChannelPayoutUpserted.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
35378 35379 35380 35381 35382 35383 35384 35385 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35378 def subtype_to_hash { :event_id => event_id, :timestamp => , :channel_id => channel_id, :payout => payout.to_hash } end |
#to_json ⇒ Object
35370 35371 35372 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35370 def to_json JSON.dump(to_hash) end |