Class: Moneybird::Resource::SalesInvoice

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

Instance Attribute Summary collapse

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=, #initialize, #link_booking, #path, #persisted?, #to_json

Instance Attribute Details

#contactObject

Returns the value of attribute contact.



61
62
63
# File 'lib/moneybird/resource/sales_invoice.rb', line 61

def contact
  @contact
end

#custom_fieldsObject

Returns the value of attribute custom_fields.



61
62
63
# File 'lib/moneybird/resource/sales_invoice.rb', line 61

def custom_fields
  @custom_fields
end

#detailsObject

Returns the value of attribute details.



61
62
63
# File 'lib/moneybird/resource/sales_invoice.rb', line 61

def details
  @details
end

#eventsObject

Returns the value of attribute events.



61
62
63
# File 'lib/moneybird/resource/sales_invoice.rb', line 61

def events
  @events
end

#notesObject

Returns the value of attribute notes.



61
62
63
# File 'lib/moneybird/resource/sales_invoice.rb', line 61

def notes
  @notes
end

#paymentsObject

Returns the value of attribute payments.



61
62
63
# File 'lib/moneybird/resource/sales_invoice.rb', line 61

def payments
  @payments
end

Instance Method Details

#mark_as_uncollectible(options = {}) ⇒ Object



76
77
78
79
# File 'lib/moneybird/resource/sales_invoice.rb', line 76

def mark_as_uncollectible(options = {})
  invoice_service = Moneybird::Service::SalesInvoice.new(client, administration_id)
  invoice_service.mark_as_uncollectible(self, options)
end

#send_invoice(options = {}) ⇒ Object



71
72
73
74
# File 'lib/moneybird/resource/sales_invoice.rb', line 71

def send_invoice(options = {})
  invoice_service = Moneybird::Service::SalesInvoice.new(client, administration_id)
  invoice_service.send_invoice(self, options)
end