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.
65080 65081 65082 65083 65084 65085 65086 65087 65088 65089 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65080 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.
65078 65079 65080 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65078 def hour @hour end |
#minute ⇒ Object (readonly)
Returns the value of attribute minute.
65078 65079 65080 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65078 def minute @minute end |
#organization_q ⇒ Object (readonly)
Returns the value of attribute organization_q.
65078 65079 65080 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65078 def organization_q @organization_q end |
#timezone ⇒ Object (readonly)
Returns the value of attribute timezone.
65078 65079 65080 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65078 def timezone @timezone end |
#types ⇒ Object (readonly)
Returns the value of attribute types.
65078 65079 65080 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65078 def types @types end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
65078 65079 65080 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65078 def user_id @user_id end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
65095 65096 65097 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65095 def copy(incoming={}) ScheduledExportForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
65099 65100 65101 65102 65103 65104 65105 65106 65107 65108 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65099 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
65091 65092 65093 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 65091 def to_json JSON.dump(to_hash) end |