Class: Io::Flow::V0::Models::InvoiceExportForm

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ InvoiceExportForm

Returns a new instance of InvoiceExportForm.



35928
35929
35930
35931
35932
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35928

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_fromObject (readonly)

Returns the value of attribute date_from.



35926
35927
35928
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35926

def date_from
  @date_from
end

#date_toObject (readonly)

Returns the value of attribute date_to.



35926
35927
35928
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35926

def date_to
  @date_to
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



35938
35939
35940
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35938

def copy(incoming={})
  InvoiceExportForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



35942
35943
35944
35945
35946
35947
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35942

def to_hash
  {
    :date_from => date_from,
    :date_to => date_to
  }
end

#to_jsonObject



35934
35935
35936
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35934

def to_json
  JSON.dump(to_hash)
end