Module: Moneybird::Traits::MarkAsUncollectible

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

Instance Method Summary collapse

Instance Method Details

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



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

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

#mark_as_uncollectible_path(resource) ⇒ Object



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

def mark_as_uncollectible_path(resource)
  [path, resource.path, '/mark_as_uncollectible'].join('')
end