panda_doc 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +12 -12
- data/lib/panda_doc/document_section.rb +34 -0
- data/lib/panda_doc/objects/document_section.rb +16 -0
- data/lib/panda_doc/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de6d8cc1931b7740e723e533b971ebb962c9b3914b6bdd0a259f91d9d9cf13e6
|
4
|
+
data.tar.gz: 66938632918f5cbdcaecc60d0e493e32466374211e12a63b323b185453e3c71c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f610544867b299d098e3adbce4371a127af29b5f9117220ed16fad5ddd0c21f21237ea0d98c002d232dc13d8aa8941184de100354488aefdd48fa7c7722d15e
|
7
|
+
data.tar.gz: e49d4bbd18f4a554f9f3cb43c78e27a077a15f734eb966d30f8b5664c8d6f9db9abd498831d8b3721e529e2375a367eef824061fb81dc7fffe759faf4c636533
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.4.
|
1
|
+
3.4.3
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
panda_doc (0.
|
4
|
+
panda_doc (0.12.0)
|
5
5
|
dry-configurable
|
6
6
|
dry-struct
|
7
7
|
faraday (>= 2.0.1, < 3.0)
|
@@ -14,7 +14,7 @@ GEM
|
|
14
14
|
bigdecimal (3.1.9)
|
15
15
|
byebug (12.0.0)
|
16
16
|
concurrent-ruby (1.3.5)
|
17
|
-
diff-lcs (1.6.
|
17
|
+
diff-lcs (1.6.2)
|
18
18
|
docile (1.4.1)
|
19
19
|
dry-configurable (1.3.0)
|
20
20
|
dry-core (~> 1.1)
|
@@ -41,34 +41,34 @@ GEM
|
|
41
41
|
dry-inflector (~> 1.0)
|
42
42
|
dry-logic (~> 1.4)
|
43
43
|
zeitwerk (~> 2.6)
|
44
|
-
faraday (2.13.
|
44
|
+
faraday (2.13.1)
|
45
45
|
faraday-net_http (>= 2.0, < 3.5)
|
46
46
|
json
|
47
47
|
logger
|
48
|
-
faraday-multipart (1.1.
|
48
|
+
faraday-multipart (1.1.1)
|
49
49
|
multipart-post (~> 2.0)
|
50
50
|
faraday-net_http (3.4.0)
|
51
51
|
net-http (>= 0.5.0)
|
52
52
|
ice_nine (0.11.2)
|
53
|
-
json (2.
|
53
|
+
json (2.11.3)
|
54
54
|
logger (1.7.0)
|
55
55
|
multipart-post (2.4.1)
|
56
56
|
net-http (0.6.0)
|
57
57
|
uri
|
58
|
-
rake (13.
|
59
|
-
rspec (3.13.
|
58
|
+
rake (13.3.0)
|
59
|
+
rspec (3.13.1)
|
60
60
|
rspec-core (~> 3.13.0)
|
61
61
|
rspec-expectations (~> 3.13.0)
|
62
62
|
rspec-mocks (~> 3.13.0)
|
63
|
-
rspec-core (3.13.
|
63
|
+
rspec-core (3.13.4)
|
64
64
|
rspec-support (~> 3.13.0)
|
65
|
-
rspec-expectations (3.13.
|
65
|
+
rspec-expectations (3.13.5)
|
66
66
|
diff-lcs (>= 1.2.0, < 2.0)
|
67
67
|
rspec-support (~> 3.13.0)
|
68
|
-
rspec-mocks (3.13.
|
68
|
+
rspec-mocks (3.13.5)
|
69
69
|
diff-lcs (>= 1.2.0, < 2.0)
|
70
70
|
rspec-support (~> 3.13.0)
|
71
|
-
rspec-support (3.13.
|
71
|
+
rspec-support (3.13.4)
|
72
72
|
simplecov (0.22.0)
|
73
73
|
docile (~> 1.1)
|
74
74
|
simplecov-html (~> 0.11)
|
@@ -90,4 +90,4 @@ DEPENDENCIES
|
|
90
90
|
simplecov (~> 0.22.0)
|
91
91
|
|
92
92
|
BUNDLED WITH
|
93
|
-
2.6.
|
93
|
+
2.6.9
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module PandaDoc
|
4
|
+
module DocumentSection
|
5
|
+
extend self
|
6
|
+
|
7
|
+
def create(document_uuid, **data)
|
8
|
+
respond(
|
9
|
+
ApiClient.request(:post, "/documents/#{document_uuid}/sections/uploads", **data),
|
10
|
+
type: :document_section
|
11
|
+
)
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def respond(response, type: :document)
|
17
|
+
failure(response)
|
18
|
+
|
19
|
+
SuccessResult.new(
|
20
|
+
ResponseFactory.build(type).new(response.body)
|
21
|
+
)
|
22
|
+
end
|
23
|
+
|
24
|
+
def stream(response)
|
25
|
+
failure(response)
|
26
|
+
|
27
|
+
SuccessResult.new(response)
|
28
|
+
end
|
29
|
+
|
30
|
+
def failure(response)
|
31
|
+
raise FailureResult.new(response) unless response.success?
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module PandaDoc
|
2
|
+
module Objects
|
3
|
+
class DocumentSection < Base
|
4
|
+
attribute :uuid, Types::String
|
5
|
+
attribute :document_uuid, Types::String
|
6
|
+
attribute :status, Types::Custom::DocumentStatus
|
7
|
+
attribute :name, Types::String
|
8
|
+
|
9
|
+
attribute :date_created, Types::Params::DateTime
|
10
|
+
attribute :date_modified, Types::Params::DateTime
|
11
|
+
|
12
|
+
alias_method :created_at, :date_created
|
13
|
+
alias_method :updated_at, :date_modified
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/panda_doc/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: panda_doc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Pstyga
|
@@ -119,9 +119,11 @@ files:
|
|
119
119
|
- lib/panda_doc/coercions.rb
|
120
120
|
- lib/panda_doc/configuration.rb
|
121
121
|
- lib/panda_doc/document.rb
|
122
|
+
- lib/panda_doc/document_section.rb
|
122
123
|
- lib/panda_doc/failure_result.rb
|
123
124
|
- lib/panda_doc/objects/base.rb
|
124
125
|
- lib/panda_doc/objects/document.rb
|
126
|
+
- lib/panda_doc/objects/document_section.rb
|
125
127
|
- lib/panda_doc/objects/documents_list.rb
|
126
128
|
- lib/panda_doc/objects/editing_session.rb
|
127
129
|
- lib/panda_doc/objects/empty.rb
|
@@ -153,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
155
|
- !ruby/object:Gem::Version
|
154
156
|
version: '0'
|
155
157
|
requirements: []
|
156
|
-
rubygems_version: 3.6.
|
158
|
+
rubygems_version: 3.6.9
|
157
159
|
specification_version: 4
|
158
160
|
summary: Ruby wrapper for PandaDoc.com API
|
159
161
|
test_files: []
|