class Io::Flow::V0::Models::AnalyticsExportType
Attributes
from[R]
interval[R]
region[R]
to[R]
Public Class Methods
new(incoming={})
click to toggle source
Calls superclass method
Io::Flow::V0::Models::ExportType::new
# File lib/flow_commerce/flow_api_v0_client.rb, line 30522 def initialize(incoming={}) super(:discriminator => ExportType::Types::ANALYTICS_EXPORT_TYPE) opts = HttpClient::Helper.symbolize_keys(incoming) @from = (x = opts.delete(:from); x.nil? ? nil : HttpClient::Preconditions.assert_class('from', HttpClient::Helper.to_date_time_iso8601(x), DateTime)) @to = (x = opts.delete(:to); x.nil? ? nil : HttpClient::Preconditions.assert_class('to', HttpClient::Helper.to_date_time_iso8601(x), DateTime)) @region = (x = opts.delete(:region); x.nil? ? nil : HttpClient::Preconditions.assert_class('region', x, String)) @interval = (x = opts.delete(:interval); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::UnitOfTime) ? x : ::Io::Flow::V0::Models::UnitOfTime.apply(x))) end
Public Instance Methods
copy(incoming={})
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 30535 def copy(incoming={}) AnalyticsExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end
subtype_to_hash()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 30539 def subtype_to_hash { :from => from, :to => to, :region => region, :interval => interval.nil? ? nil : interval.value } end
to_json()
click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 30531 def to_json JSON.dump(to_hash) end