Class: Io::Flow::V0::Models::ScheduledExportForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ScheduledExportForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#hour ⇒ Object
readonly
Returns the value of attribute hour.
-
#minute ⇒ Object
readonly
Returns the value of attribute minute.
-
#organization_q ⇒ Object
readonly
Returns the value of attribute organization_q.
-
#timezone ⇒ Object
readonly
Returns the value of attribute timezone.
-
#types ⇒ Object
readonly
Returns the value of attribute types.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ScheduledExportForm
constructor
A new instance of ScheduledExportForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ScheduledExportForm
Returns a new instance of ScheduledExportForm.
35531 35532 35533 35534 35535 35536 35537 35538 35539 35540 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35531 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:user_id, :organization_q, :hour, :minute, :timezone, :types], 'ScheduledExportForm') @user_id = HttpClient::Preconditions.assert_class('user_id', opts.delete(:user_id), String) @organization_q = HttpClient::Preconditions.assert_class('organization_q', opts.delete(:organization_q), String) @hour = HttpClient::Preconditions.assert_class('hour', opts.delete(:hour), Integer) @minute = HttpClient::Preconditions.assert_class('minute', opts.delete(:minute), Integer) @timezone = HttpClient::Preconditions.assert_class('timezone', opts.delete(:timezone), String) @types = HttpClient::Preconditions.assert_class('types', opts.delete(:types), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ExportType) ? x : ::Io::Flow::V0::Models::ExportType.from_json(x)) } end |
Instance Attribute Details
#hour ⇒ Object (readonly)
Returns the value of attribute hour.
35529 35530 35531 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35529 def hour @hour end |
#minute ⇒ Object (readonly)
Returns the value of attribute minute.
35529 35530 35531 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35529 def minute @minute end |
#organization_q ⇒ Object (readonly)
Returns the value of attribute organization_q.
35529 35530 35531 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35529 def organization_q @organization_q end |
#timezone ⇒ Object (readonly)
Returns the value of attribute timezone.
35529 35530 35531 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35529 def timezone @timezone end |
#types ⇒ Object (readonly)
Returns the value of attribute types.
35529 35530 35531 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35529 def types @types end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
35529 35530 35531 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35529 def user_id @user_id end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
35546 35547 35548 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35546 def copy(incoming={}) ScheduledExportForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
35550 35551 35552 35553 35554 35555 35556 35557 35558 35559 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35550 def to_hash { :user_id => user_id, :organization_q => organization_q, :hour => hour, :minute => minute, :timezone => timezone, :types => types.map { |o| o.to_hash } } end |
#to_json ⇒ Object
35542 35543 35544 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35542 def to_json JSON.dump(to_hash) end |