Add resource definitions for all 22 API tags, wire client accessors and require tree
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Fiken
|
||||
module Resources
|
||||
# /companies/{slug}/orderConfirmations
|
||||
class OrderConfirmations < Resource::Base
|
||||
include Resource::Listable
|
||||
include Resource::Findable
|
||||
include Resource::HasCounter
|
||||
include Resource::Draftable
|
||||
|
||||
def resource_path
|
||||
"orderConfirmations"
|
||||
end
|
||||
|
||||
def draft_create_action
|
||||
"createOrderConfirmation"
|
||||
end
|
||||
|
||||
# POST /{id}/createInvoiceDraft — turn a confirmation into an invoice draft.
|
||||
def create_invoice_draft(confirmation_id)
|
||||
post_create("#{base_path}/#{confirmation_id}/createInvoiceDraft", nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user