Module: PandaDoc::Document

Extended by:
Document
Included in:
Document
Defined in:
lib/panda_doc/document.rb

Instance Method Summary collapse

Instance Method Details

#create(data) ⇒ Object



15
16
17
# File 'lib/panda_doc/document.rb', line 15

def create(data)
  respond(ApiClient.request(:post, "/documents", **data))
end

#details(uuid) ⇒ Object



34
35
36
# File 'lib/panda_doc/document.rb', line 34

def details(uuid)
  respond(ApiClient.request(:get, "/documents/#{uuid}/details"))
end

#download(uuid) ⇒ Object



49
50
51
# File 'lib/panda_doc/document.rb', line 49

def download(uuid)
  stream(ApiClient.request(:get, "/documents/#{uuid}/download"))
end

#find(uuid) ⇒ Object



30
31
32
# File 'lib/panda_doc/document.rb', line 30

def find(uuid)
  respond(ApiClient.request(:get, "/documents/#{uuid}"))
end

#list(**options) ⇒ Object

Parameters:

  • options (Hash)


8
9
10
11
12
13
# File 'lib/panda_doc/document.rb', line 8

def list(**options)
  respond(
    ApiClient.request(:get, "/documents", **options),
    type: :documents_list
  )
end

#move_to_draft(uuid) ⇒ Object



38
39
40
# File 'lib/panda_doc/document.rb', line 38

def move_to_draft(uuid)
  respond(ApiClient.request(:post, "/documents/#{uuid}/draft"))
end

#send(uuid, **data) ⇒ Object



26
27
28
# File 'lib/panda_doc/document.rb', line 26

def send(uuid, **data)
  respond(ApiClient.request(:post, "/documents/#{uuid}/send", **data))
end

#session(uuid, **data) ⇒ Object



42
43
44
45
46
47
# File 'lib/panda_doc/document.rb', line 42

def session(uuid, **data)
  respond(
    ApiClient.request(:post, "/documents/#{uuid}/session", **data),
    type: :session
  )
end

#update(uuid, **data) ⇒ Object



19
20
21
22
23
24
# File 'lib/panda_doc/document.rb', line 19

def update(uuid, **data)
  respond(
    ApiClient.request(:patch, "/documents/#{uuid}", **data),
    type: :empty
  )
end