files.com 1.0.190 → 1.0.191
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_VERSION +1 -1
- data/docs/webhook_test.md +3 -0
- data/lib/files.com/models/webhook_test.rb +11 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '09700d9455caaa943050ad7f915b1d8e6628815a3289db0a52da00e200998f14'
|
4
|
+
data.tar.gz: 18bb834b8e6f163b00570813def6dcb6e67f115c669be621da7ce66e41e3f669
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a561f6535df53e9def152cd3ab94753ca32dc0a16ccff4217024eab98da26bc5464e5a08ec1086ad14e837e160cf68f43686b5a40a02dc2b5349e293c3d298e9
|
7
|
+
data.tar.gz: b0b366a3beb759767fb1af3a698e79d995215c6499b600e9b50ac62108b6eb03b10972f5795fab341cda55f19d25157ac6ee410628270e81439e7914e7510b60
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.191
|
data/docs/webhook_test.md
CHANGED
@@ -22,6 +22,7 @@
|
|
22
22
|
* `encoding` (string): HTTP encoding method. Can be JSON, XML, or RAW (form data).
|
23
23
|
* `headers` (object): Additional request headers.
|
24
24
|
* `body` (object): Additional body parameters.
|
25
|
+
* `raw_body` (string): raw body text
|
25
26
|
* `action` (string): action for test body
|
26
27
|
|
27
28
|
|
@@ -36,6 +37,7 @@ Files::WebhookTest.create(
|
|
36
37
|
encoding: "RAW",
|
37
38
|
headers: "x-test-header => testvalue",
|
38
39
|
body: "test-param => testvalue",
|
40
|
+
raw_body: "test body",
|
39
41
|
action: "test"
|
40
42
|
)
|
41
43
|
```
|
@@ -47,4 +49,5 @@ Files::WebhookTest.create(
|
|
47
49
|
* `encoding` (string): HTTP encoding method. Can be JSON, XML, or RAW (form data).
|
48
50
|
* `headers` (object): Additional request headers.
|
49
51
|
* `body` (object): Additional body parameters.
|
52
|
+
* `raw_body` (string): raw body text
|
50
53
|
* `action` (string): action for test body
|
@@ -99,6 +99,15 @@ module Files
|
|
99
99
|
@attributes[:body] = value
|
100
100
|
end
|
101
101
|
|
102
|
+
# string - raw body text
|
103
|
+
def raw_body
|
104
|
+
@attributes[:raw_body]
|
105
|
+
end
|
106
|
+
|
107
|
+
def raw_body=(value)
|
108
|
+
@attributes[:raw_body] = value
|
109
|
+
end
|
110
|
+
|
102
111
|
# string - action for test body
|
103
112
|
def action
|
104
113
|
@attributes[:action]
|
@@ -123,6 +132,7 @@ module Files
|
|
123
132
|
# encoding - string - HTTP encoding method. Can be JSON, XML, or RAW (form data).
|
124
133
|
# headers - object - Additional request headers.
|
125
134
|
# body - object - Additional body parameters.
|
135
|
+
# raw_body - string - raw body text
|
126
136
|
# action - string - action for test body
|
127
137
|
def self.create(params = {}, options = {})
|
128
138
|
raise InvalidParameterError.new("Bad parameter: url must be an String") if params.dig(:url) and !params.dig(:url).is_a?(String)
|
@@ -130,6 +140,7 @@ module Files
|
|
130
140
|
raise InvalidParameterError.new("Bad parameter: encoding must be an String") if params.dig(:encoding) and !params.dig(:encoding).is_a?(String)
|
131
141
|
raise InvalidParameterError.new("Bad parameter: headers must be an Hash") if params.dig(:headers) and !params.dig(:headers).is_a?(Hash)
|
132
142
|
raise InvalidParameterError.new("Bad parameter: body must be an Hash") if params.dig(:body) and !params.dig(:body).is_a?(Hash)
|
143
|
+
raise InvalidParameterError.new("Bad parameter: raw_body must be an String") if params.dig(:raw_body) and !params.dig(:raw_body).is_a?(String)
|
133
144
|
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
134
145
|
raise MissingParameterError.new("Parameter missing: url") unless params.dig(:url)
|
135
146
|
|