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



23096
23097
23098
23099
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23096

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.



23094
23095
23096
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23094

def last_incoming_date
  @last_incoming_date
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



23105
23106
23107
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23105

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

#to_hashObject



23109
23110
23111
23112
23113
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23109

def to_hash
  {
    :last_incoming_date => last_incoming_date
  }
end

#to_jsonObject



23101
23102
23103
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 23101

def to_json
  JSON.dump(to_hash)
end