Module: PandaDoc::DocumentSection

Extended by:
DocumentSection
Included in:
DocumentSection
Defined in:
lib/panda_doc/document_section.rb

Instance Method Summary collapse

Instance Method Details

#create(document_uuid, **data) ⇒ Object



14
15
16
17
18
19
# File 'lib/panda_doc/document_section.rb', line 14

def create(document_uuid, **data)
  respond(
    ApiClient.request(:post, "/documents/#{document_uuid}/sections/uploads", **data),
    type: :document_section
  )
end

#delete(document_uuid, section_uuid) ⇒ Object



21
22
23
24
25
26
# File 'lib/panda_doc/document_section.rb', line 21

def delete(document_uuid, section_uuid)
  respond(
    ApiClient.request(:delete, "/documents/#{document_uuid}/sections/#{section_uuid}"),
    type: :empty
  )
end

#list(document_uuid, **options) ⇒ Object



7
8
9
10
11
12
# File 'lib/panda_doc/document_section.rb', line 7

def list(document_uuid, **options)
  respond(
    ApiClient.request(:get, "/documents/#{document_uuid}/sections", **options),
    type: :document_sections_list
  )
end