Class: Io::Flow::V0::Models::AnalyticsExportType
- Inherits:
-
ExportType
- Object
- ExportType
- Io::Flow::V0::Models::AnalyticsExportType
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#interval ⇒ Object
readonly
Returns the value of attribute interval.
-
#region ⇒ Object
readonly
Returns the value of attribute region.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
Attributes inherited from ExportType
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ AnalyticsExportType
constructor
A new instance of AnalyticsExportType.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from ExportType
Constructor Details
#initialize(incoming = {}) ⇒ AnalyticsExportType
Returns a new instance of AnalyticsExportType.
28318 28319 28320 28321 28322 28323 28324 28325 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28318 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 |
Instance Attribute Details
#from ⇒ Object (readonly)
Returns the value of attribute from.
28316 28317 28318 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28316 def from @from end |
#interval ⇒ Object (readonly)
Returns the value of attribute interval.
28316 28317 28318 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28316 def interval @interval end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
28316 28317 28318 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28316 def region @region end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
28316 28317 28318 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28316 def to @to end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
28331 28332 28333 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28331 def copy(incoming={}) AnalyticsExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
28335 28336 28337 28338 28339 28340 28341 28342 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28335 def subtype_to_hash { :from => from, :to => to, :region => region, :interval => interval.nil? ? nil : interval.value } end |
#to_json ⇒ Object
28327 28328 28329 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28327 def to_json JSON.dump(to_hash) end |