Class: Elmas::SalesInvoice

Inherits:
Object
  • Object
show all
Includes:
Resource, SharedSalesAttributes
Defined in:
lib/elmas/resources/sales_invoice.rb

Constant Summary

Constants included from SharedSalesAttributes

Elmas::SharedSalesAttributes::SHARED_LINE_ATTRIBUTES, Elmas::SharedSalesAttributes::SHARED_SALES_ATTRIBUTES

Instance Attribute Summary

Attributes included from Resource

#attributes, #response, #url

Instance Method Summary collapse

Methods included from Resource

#delete, #find, #find_all, #find_by, #get, #id, #id?, #initialize, #method_missing, #save, #valid?

Methods included from Resource::Sanitizer

#sanitize, #sanitize_date_time, #sanitize_has_many, #sanitize_relationship

Methods included from Resource::UriMethods

#apply_filters, #apply_order, #apply_select, #base_filter, #basic_identifier_uri, #query_attribute, #sanitize_value, #uri

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Elmas::Resource

Instance Method Details

#base_pathObject



8
9
10
# File 'lib/elmas/resources/sales_invoice.rb', line 8

def base_path
  "salesinvoice/SalesInvoices"
end

#mandatory_attributesObject



12
13
14
# File 'lib/elmas/resources/sales_invoice.rb', line 12

def mandatory_attributes
  [:journal, :ordered_by]
end

#other_attributesObject



16
17
18
19
20
21
22
23
24
# File 'lib/elmas/resources/sales_invoice.rb', line 16

def other_attributes
  SHARED_SALES_ATTRIBUTES.inject(
    [
      :sales_invoice_lines, :due_date, :sales_person,
      :starter_sales_invoice_status, :type
    ],
    :<<
  )
end