zendesk_apps_support 4.30.1 → 4.31.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbc9fd13362aa145c08d79257d11b41d61df1ae6e40ad4ce9dd849343d79b43d
|
4
|
+
data.tar.gz: 351f8e6f2e5da95f28a950581c744149e4d445de1a5e1054ff6a652bdef326f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf545fb8709e9183891d82c4eeb3bafbc4aab436f658c956591e205390abe5119670c647b848c9a2d25c770571d1f136daa0b9c9ae4fd9cea864bc3e6b41f30d
|
7
|
+
data.tar.gz: 5f2724bf3b60e2de9affb773176de16effa2617d5876f7afa798b8c2aa0bcbfceafa81f9db959a3d004dd5577107e204d12ab7f568aae14cf306748be723c283
|
@@ -29,6 +29,7 @@ module ZendeskAppsSupport
|
|
29
29
|
errors << invalid_channel_integrations(requirements)
|
30
30
|
errors << invalid_custom_fields(requirements)
|
31
31
|
errors << invalid_custom_objects(requirements)
|
32
|
+
errors << invalid_webhooks(requirements)
|
32
33
|
errors << missing_required_fields(requirements)
|
33
34
|
errors.flatten!
|
34
35
|
errors.compact!
|
@@ -107,6 +108,26 @@ module ZendeskAppsSupport
|
|
107
108
|
end
|
108
109
|
end
|
109
110
|
|
111
|
+
def invalid_webhooks(requirements)
|
112
|
+
webhook_requirements = requirements[AppRequirement::WEBHOOKS_KEY]
|
113
|
+
|
114
|
+
return if webhook_requirements.nil?
|
115
|
+
|
116
|
+
validate_webhook_keys(webhook_requirements)
|
117
|
+
end
|
118
|
+
|
119
|
+
def validate_webhook_keys(webhook_requirements)
|
120
|
+
required_keys = %w[name status endpoint http_method request_format]
|
121
|
+
|
122
|
+
missing_keys = required_keys - webhook_requirements.keys
|
123
|
+
|
124
|
+
missing_keys.map do |key|
|
125
|
+
ValidationError.new(:missing_required_fields,
|
126
|
+
field: key,
|
127
|
+
identifier: AppRequirement::WEBHOOKS_KEY)
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
110
131
|
def invalid_custom_objects(requirements)
|
111
132
|
custom_objects = requirements[AppRequirement::CUSTOM_OBJECTS_KEY]
|
112
133
|
return if custom_objects.nil?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zendesk_apps_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.31.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James A. Rosen
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2022-02-
|
14
|
+
date: 2022-02-03 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: i18n
|