Class: Io::Flow::V0::Models::FeedStatisticsSummary

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

Overview

A brief packet of statistics about a live feed. Will be blank for most new feeds.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ FeedStatisticsSummary

Returns a new instance of FeedStatisticsSummary.



15994
15995
15996
15997
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15994

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @last_incoming_date = (x = opts.delete(:last_incoming_date); x.nil? ? nil : HttpClient::Preconditions.assert_class('last_incoming_date', HttpClient::Helper.to_date_time_iso8601(x), DateTime))
end

Instance Attribute Details

#last_incoming_dateObject (readonly)

Returns the value of attribute last_incoming_date.



15992
15993
15994
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15992

def last_incoming_date
  @last_incoming_date
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



16003
16004
16005
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16003

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

#to_hashObject



16007
16008
16009
16010
16011
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16007

def to_hash
  {
    :last_incoming_date => last_incoming_date
  }
end

#to_jsonObject



15999
16000
16001
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15999

def to_json
  JSON.dump(to_hash)
end