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.
22587 22588 22589 22590 22591 22592 22593 22594 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22587 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.
22585 22586 22587 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22585 def from @from end |
#interval ⇒ Object (readonly)
Returns the value of attribute interval.
22585 22586 22587 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22585 def interval @interval end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
22585 22586 22587 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22585 def region @region end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
22585 22586 22587 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22585 def to @to end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
22600 22601 22602 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22600 def copy(incoming={}) AnalyticsExportType.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
22604 22605 22606 22607 22608 22609 22610 22611 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22604 def subtype_to_hash { :from => from, :to => to, :region => region, :interval => interval.nil? ? nil : interval.value } end |
#to_json ⇒ Object
22596 22597 22598 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22596 def to_json JSON.dump(to_hash) end |