Class: Moneybird::Resource::Documents::PurchaseInvoice

Inherits:
Object
  • Object
show all
Extended by:
ClassMethods
Includes:
Moneybird::Resource
Defined in:
lib/moneybird/resource/documents/purchase_invoice.rb

Instance Attribute Summary

Attributes included from ClassMethods

#attributes, #logger, #nillable_attributes

Attributes included from Moneybird::Resource

#client, #errors

Instance Method Summary collapse

Methods included from ClassMethods

build, has_attributes, has_boolean_attributes, has_datetime_attributes, has_integer_attributes, has_nillable_attributes, resource

Methods included from Moneybird::Resource

#attributes, #attributes=, #custom_fields=, #initialize, #link_booking, #path, #persisted?, #to_json

Instance Method Details

#contact=(attributes) ⇒ Object



41
42
43
# File 'lib/moneybird/resource/documents/purchase_invoice.rb', line 41

def contact=(attributes)
  @contact = Moneybird::Resource::Contact.build(attributes)
end

#details=(line_items) ⇒ Object



45
46
47
# File 'lib/moneybird/resource/documents/purchase_invoice.rb', line 45

def details=(line_items)
  @details = line_items.map{ |line_item| Moneybird::Resource::Invoice::Details.build(line_item) }
end

#events=(events) ⇒ Object



49
50
51
# File 'lib/moneybird/resource/documents/purchase_invoice.rb', line 49

def events=(events)
  @events = events.map{ |event| Moneybird::Resource::Generic::Event.build(event) }
end

#notes=(notes) ⇒ Object



37
38
39
# File 'lib/moneybird/resource/documents/purchase_invoice.rb', line 37

def notes=(notes)
  @notes = notes.map{ |note| Moneybird::Resource::Generic::Note.build(note) }
end

#payments=(payments) ⇒ Object



53
54
55
# File 'lib/moneybird/resource/documents/purchase_invoice.rb', line 53

def payments=(payments)
  @payments = payments.map{ |payment| Moneybird::Resource::Invoice::Payment.build(payment) }
end