Add resource framework: Base, CRUD mixins, and shared drafts/attachments/payments concerns
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Fiken
|
||||
module Resources
|
||||
module Concerns
|
||||
# /<parent>/payments — shared by sales and purchases.
|
||||
class Payments < Resource::Base
|
||||
include Resource::Listable
|
||||
include Resource::Findable
|
||||
include Resource::Creatable
|
||||
|
||||
def initialize(client, company_slug, parent_path)
|
||||
super(client, company_slug)
|
||||
@parent_path = parent_path
|
||||
end
|
||||
|
||||
def base_path
|
||||
"#{@parent_path}/payments"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user