Class: ZohoInvoice::Customer
- Inherits:
-
Base
- Object
- Base
- ZohoInvoice::Customer
show all
- Defined in:
- lib/zoho_invoice/customer.rb
Instance Attribute Summary
Attributes inherited from Base
#client
Class Method Summary
collapse
Methods inherited from Base
#attributes, create, create_attributes, define_object_attrs, has_many, #initialize, #reflections, #save, search, #to_xml
Class Method Details
.all(client, options = {}) ⇒ Object
25
26
27
|
# File 'lib/zoho_invoice/customer.rb', line 25
def self.all(client, options = {})
self.all_active(client, options) + self.all_inactive(client, options)
end
|
.all_active(client, options = {}) ⇒ Object
29
30
31
|
# File 'lib/zoho_invoice/customer.rb', line 29
def self.all_active(client, options = {})
retrieve(client, '/api/customers').each { |c| c.active = true }
end
|
.all_inactive(client, options = {}) ⇒ Object
33
34
35
|
# File 'lib/zoho_invoice/customer.rb', line 33
def self.all_inactive(client, options = {})
retrieve(client, '/api/customers/inactive').each { |c| c.active = false }
end
|