class Io::Flow::V0::Models::ShopifySyncStatus
Attributes
buckets[R]
interval_seconds[R]
range[R]
sync_check[R]
total[R]
Public Class Methods
new(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 68382 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:sync_check, :range, :interval_seconds, :total, :buckets], 'ShopifySyncStatus') @sync_check = (x = opts.delete(:sync_check); x.is_a?(::Io::Flow::V0::Models::ShopifySyncCheck) ? x : ::Io::Flow::V0::Models::ShopifySyncCheck.apply(x)) @range = (x = opts.delete(:range); x.is_a?(::Io::Flow::V0::Models::DatetimeRange) ? x : ::Io::Flow::V0::Models::DatetimeRange.new(x)) @interval_seconds = HttpClient::Preconditions.assert_class('interval_seconds', opts.delete(:interval_seconds), Integer) @total = HttpClient::Preconditions.assert_class('total', opts.delete(:total), Integer) @buckets = HttpClient::Preconditions.assert_class('buckets', opts.delete(:buckets), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ShopifyEventBucket) ? x : ::Io::Flow::V0::Models::ShopifyEventBucket.from_json(x)) } end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 68396 def copy(incoming={}) ShopifySyncStatus.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end
to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 68400 def to_hash { :sync_check => sync_check.value, :range => range.to_hash, :interval_seconds => interval_seconds, :total => total, :buckets => buckets.map { |o| o.to_hash } } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 68392 def to_json JSON.dump(to_hash) end