Class: Io::Flow::V0::Models::PayoutStatusSent

Inherits:
PayoutStatus
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Attributes inherited from PayoutStatus

#code

Instance Method Summary collapse

Methods inherited from PayoutStatus

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ PayoutStatusSent

Returns a new instance of PayoutStatusSent.



59273
59274
59275
59276
59277
59278
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59273

def initialize(incoming={})
  super(:code => PayoutStatus::Types::PAYOUT_STATUS_SENT)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:timestamp], 'PayoutStatusSent')
  @timestamp = HttpClient::Preconditions.assert_class('timestamp', HttpClient::Helper.to_date_time_iso8601(opts.delete(:timestamp)), DateTime)
end

Instance Attribute Details

#timestampObject (readonly)

Returns the value of attribute timestamp.



59271
59272
59273
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59271

def timestamp
  @timestamp
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



59284
59285
59286
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59284

def copy(incoming={})
  PayoutStatusSent.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#subtype_to_hashObject



59288
59289
59290
59291
59292
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59288

def subtype_to_hash
  {
    :timestamp => timestamp
  }
end

#to_jsonObject



59280
59281
59282
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59280

def to_json
  JSON.dump(to_hash)
end