Class: FsApi::Resource::Invoice

Inherits:
Object
  • Object
show all
Extended by:
ClassMethods
Includes:
FsApi::Resource
Defined in:
lib/fs_api/resource/invoice.rb

Instance Attribute Summary

Attributes included from ClassMethods

#attributes, #nillable_attributes

Attributes included from FsApi::Resource

#attributes, #errors

Instance Method Summary collapse

Methods included from ClassMethods

has_attributes, has_boolean_attributes, has_datetime_attributes, has_nillable_attributes

Methods included from FsApi::Resource

#from_api=, #initialize, #persisted?, #to_json

Instance Method Details

#pathObject



58
59
60
# File 'lib/fs_api/resource/invoice.rb', line 58

def path
  persisted? ? "/#{id}" : ""
end

#saved?Boolean

Returns:

  • (Boolean)


62
63
64
# File 'lib/fs_api/resource/invoice.rb', line 62

def saved?
  !datesaved.nil? && datesaved != ''
end

#updateable?Boolean

invoices cannot be updated

Returns:

  • (Boolean)


67
68
69
# File 'lib/fs_api/resource/invoice.rb', line 67

def updateable?
  false
end