Add resource definitions for all 22 API tags, wire client accessors and require tree
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Fiken
|
||||
module Resources
|
||||
# /companies/{slug}/creditNotes
|
||||
class CreditNotes < Resource::Base
|
||||
include Resource::Listable
|
||||
include Resource::Findable
|
||||
include Resource::Sendable
|
||||
include Resource::HasCounter
|
||||
include Resource::Draftable
|
||||
|
||||
def resource_path
|
||||
"creditNotes"
|
||||
end
|
||||
|
||||
def draft_create_action
|
||||
"createCreditNote"
|
||||
end
|
||||
|
||||
# POST /creditNotes/full — credit a whole invoice.
|
||||
def create_full(attributes)
|
||||
post_create("#{base_path}/full", attributes)
|
||||
end
|
||||
|
||||
# POST /creditNotes/partial — credit selected lines/amounts.
|
||||
def create_partial(attributes)
|
||||
post_create("#{base_path}/partial", attributes)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user