Module: Moneybird::Traits::SendInvoice

Included in:
Service::SalesInvoice
Defined in:
lib/moneybird/traits/send_invoice.rb

Instance Method Summary collapse

Instance Method Details

#send_invoice(resource, options = {}) ⇒ Object



8
9
10
11
12
# File 'lib/moneybird/traits/send_invoice.rb', line 8

def send_invoice(resource, options = {})
  response = client.patch(send_invoice_path(resource), options.to_json)
  resource.attributes = response
  resource
end

#send_invoice_path(resource) ⇒ Object



4
5
6
# File 'lib/moneybird/traits/send_invoice.rb', line 4

def send_invoice_path(resource)
  [path, resource.path, '/send_invoice'].join('')
end