Class: Io::Flow::V0::Models::InvoiceExportForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::InvoiceExportForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#date_from ⇒ Object
readonly
Returns the value of attribute date_from.
-
#date_to ⇒ Object
readonly
Returns the value of attribute date_to.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ InvoiceExportForm
constructor
A new instance of InvoiceExportForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ InvoiceExportForm
Returns a new instance of InvoiceExportForm.
35299 35300 35301 35302 35303 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35299 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) @date_from = (x = opts.delete(:date_from); x.nil? ? nil : HttpClient::Preconditions.assert_class('date_from', HttpClient::Helper.to_date_iso8601(x), Date)) @date_to = (x = opts.delete(:date_to); x.nil? ? nil : HttpClient::Preconditions.assert_class('date_to', HttpClient::Helper.to_date_iso8601(x), Date)) end |
Instance Attribute Details
#date_from ⇒ Object (readonly)
Returns the value of attribute date_from.
35297 35298 35299 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35297 def date_from @date_from end |
#date_to ⇒ Object (readonly)
Returns the value of attribute date_to.
35297 35298 35299 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35297 def date_to @date_to end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
35309 35310 35311 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35309 def copy(incoming={}) InvoiceExportForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
35313 35314 35315 35316 35317 35318 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35313 def to_hash { :date_from => date_from, :date_to => date_to } end |
#to_json ⇒ Object
35305 35306 35307 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35305 def to_json JSON.dump(to_hash) end |