files.com 1.0.14 → 1.0.15

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b743e417d5c30d42dac3fa85be72f36d566d8eebc4b43788b725c50b85a729b
4
- data.tar.gz: 8221f13609ee14a1fd4a2317919f66bb7fb5c47635e09d87187089da08c1350c
3
+ metadata.gz: d33719015bdad22a7ad9ae28c3fc1e62d17b166cc1cdcac9fb961e2c9dfb9855
4
+ data.tar.gz: 4bbc134f2c96695ce5b60307ed70b592da242b09ed12e7e2d70969b86dd94d2a
5
5
  SHA512:
6
- metadata.gz: 80fdd2db6e02427e5a39a9e7f987f6c0a12b1bad22bde393c01603c0fc9e63b7c78d0e00378f837f213dd8311879cb0ab38db78e86976ef63faee23b2f63d419
7
- data.tar.gz: 62f0830e5a78f6e41c30eaa1177fdf634af5463a28bb950f4a8f7c96a87227772a50c52608b3e3b42ade68ff89ca06c6c795a323d2d29cd0a1715dc9ce1a3165
6
+ metadata.gz: c456e73c2f289abeb06701835cd389572634c13270de4fde9f049e273debc99cbf73dad8c45372d9e1053e63a55637e24bd153a5cb6d0447c3602435685bca96
7
+ data.tar.gz: 43857799974164dd1fb14c225e579fef94b9dd89206f52ac8b3ece91c642daee6e100b1234d49cafc711dab969d130d7e8640df4a01c8b6b2f72af108f7beba4
data/_VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.14
1
+ 1.0.15
data/docs/behavior.md CHANGED
@@ -103,19 +103,17 @@ Files::Behavior.create(
103
103
 
104
104
  ```
105
105
  Files::Behavior.webhook_test(
106
+ url: "https://www.site.com/...",
106
107
  method: "GET",
107
- encoding: "RAW",
108
- test_webhook[url]: "https://www.site.com/...",
109
- url: "https://www.site.com/..."
108
+ encoding: "RAW"
110
109
  )
111
110
  ```
112
111
 
113
112
  ### Parameters
114
113
 
114
+ * `url` (string): Required - URL for testing the webhook.
115
115
  * `method` (string): HTTP method(GET or POST).
116
116
  * `encoding` (string): HTTP encoding method. Can be JSON, XML, or RAW (form data).
117
- * `test_webhook[url]` (string): URL for testing the webhook.
118
- * `url` (string): URL for testing the webhook.
119
117
 
120
118
 
121
119
  ---
@@ -174,14 +174,14 @@ module Files
174
174
  end
175
175
 
176
176
  # Parameters:
177
+ # url (required) - string - URL for testing the webhook.
177
178
  # method - string - HTTP method(GET or POST).
178
179
  # encoding - string - HTTP encoding method. Can be JSON, XML, or RAW (form data).
179
- # test_webhook[url] (required) - string - URL for testing the webhook.
180
- # url - string - URL for testing the webhook.
181
180
  def self.webhook_test(params = {}, options = {})
181
+ raise InvalidParameterError.new("Bad parameter: url must be an String") if params.dig(:url) and !params.dig(:url).is_a?(String)
182
182
  raise InvalidParameterError.new("Bad parameter: method must be an String") if params.dig(:method) and !params.dig(:method).is_a?(String)
183
183
  raise InvalidParameterError.new("Bad parameter: encoding must be an String") if params.dig(:encoding) and !params.dig(:encoding).is_a?(String)
184
- raise InvalidParameterError.new("Bad parameter: url must be an String") if params.dig(:url) and !params.dig(:url).is_a?(String)
184
+ raise MissingParameterError.new("Parameter missing: url") unless params.dig(:url)
185
185
 
186
186
  response, _options = Api.send_request("/behaviors/webhook/test", :post, params, options)
187
187
  response.data
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: files.com
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.14
4
+ version: 1.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - files.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-17 00:00:00.000000000 Z
11
+ date: 2020-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday