Class: Fakturan::Invoice

Inherits:
Base
  • Object
show all
Defined in:
lib/fakturan_nu/invoice.rb

Instance Method Summary collapse

Methods inherited from Base

#add_errors_to_model, #add_to_errors, connection, create, create!, request, #save, #save!

Instance Method Details

#address=(attrs_or_obj) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/fakturan_nu/invoice.rb', line 24

def address=(attrs_or_obj)
  if attrs_or_obj.respond_to?(:each)
    send(:address_attributes=, attrs_or_obj)
  else
    super
  end
end

#client=(attrs_or_obj) ⇒ Object



32
33
34
35
36
37
38
# File 'lib/fakturan_nu/invoice.rb', line 32

def client=(attrs_or_obj)
  if attrs_or_obj.respond_to?(:each)
    send(:client_attributes=, attrs_or_obj)
  else
    super
  end
end

#rows=(attrs_or_obj_array) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/fakturan_nu/invoice.rb', line 16

def rows=(attrs_or_obj_array)
  if attrs_or_obj_array.first.respond_to?(:each)
    send(:rows_attributes=, attrs_or_obj_array)
  else
    super
  end
end