Class: Elmas::PrintedSalesInvoice

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

Overview

We can use the PrintedSalesInvoice to change the status of SalesInvoices from Open to ‘Verwerkt’ while at the same time sending a PDF of the invoice to the end user by e-mail.

This endpoint only supports the POST method.

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



15
16
17
# File 'lib/elmas/resources/printed_sales_invoice.rb', line 15

def base_path
  "salesinvoice/PrintedSalesInvoices"
end

#mandatory_attributesObject



19
20
21
# File 'lib/elmas/resources/printed_sales_invoice.rb', line 19

def mandatory_attributes
  [:invoice_ID]
end

#other_attributesObject



24
25
26
27
28
29
30
31
32
33
# File 'lib/elmas/resources/printed_sales_invoice.rb', line 24

def other_attributes
  [
    :division, :document, :document_creation_error, :document_creation_success,
    :document_layout, :email_creation_error, :email_creation_success, :email_layout,
    :extra_text, :invoice_date, :postbox_message_creation_error,
    :postbox_message_creation_success, :postbox_sender, :reporting_period,
    :reporting_year, :send_email_to_customer, :send_invoice_to_customer_postbox,
    :send_output_based_on_account
  ]
end

#valid_actionsObject



11
12
13
# File 'lib/elmas/resources/printed_sales_invoice.rb', line 11

def valid_actions
  [:post]
end