embulk-input-zendesk-all 0.3.8 → 0.3.9

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
  SHA1:
3
- metadata.gz: 422951a5f5906d490c4204506002a2ee3918580a
4
- data.tar.gz: e8941d91ceec940f0ce1c622479e57f1ecf36715
3
+ metadata.gz: 66b582f9b7eb1e5b3269b334e7c8dd46fb8bcd01
4
+ data.tar.gz: 1fd7ead56fc82aa40b9d9c9786491b9de5d20fe3
5
5
  SHA512:
6
- metadata.gz: d2fcdf1e772fc48c75bc645d2acf739347b7709c5dd7364450a7d2465dde33c50ee6a3983786395603b72ef7f56b3d07ee450e2d44c6d11c16e6716644d78ad7
7
- data.tar.gz: 1fadf052172cc2700ff559bb78c02485870ca295c65a7efcb2da8ab044b136c725e656c64091fbbf2f1567e9d7f0dae9f39fe3f278069788b02f4a696de6e94a
6
+ metadata.gz: 7f8b5f051215b0cc328a96b1a7d5c6729102283821f0fbc5a9e9cf0f8a58d45e32a2d9da240a97924a6bcc0b7ccef16c35cd36936b934a96cba46f365845d25e
7
+ data.tar.gz: c06cf6a71c462fe6e598d2977745ec129dc5c32130c0fa63d05015b2f08c8942ed1803edb391338f760ab2652a0a3c485596672d5c842a24a2b872e546055dd8
data/README.md CHANGED
@@ -11,7 +11,11 @@ Embulk input plugin for loading [Zendesk](https://www.zendesk.com/) records.
11
11
 
12
12
  Required Embulk version >= 0.9.6.
13
13
 
14
- **NOTE** This plugin don't support JSON type columns e.g. custom fields, tags, etc for now. But they will be supported soon.
14
+ **NOTE** This plugin differs from original plugin to following:
15
+ * DOES support JSON type columns
16
+ * Supports satisfaction_ratings API
17
+ * Supports ticket_metric_events API
18
+
15
19
 
16
20
  * **Plugin type**: input
17
21
  * **Resume supported**: no
data/build.gradle CHANGED
@@ -15,7 +15,7 @@ configurations {
15
15
  provided
16
16
  }
17
17
 
18
- version = "0.3.8"
18
+ version = "0.3.9"
19
19
 
20
20
  sourceCompatibility = 1.8
21
21
  targetCompatibility = 1.8
@@ -364,6 +364,7 @@ public class ZendeskInputPlugin implements InputPlugin
364
364
  case TICKET_FIELDS:
365
365
  case TICKET_METRIC_EVENTS:
366
366
  case SATISFACTION_RATINGS:
367
+ case SLA_POLICIES:
367
368
  return new ZendeskSupportAPIService(task);
368
369
  case RECIPIENTS:
369
370
  case SCORES:
@@ -13,7 +13,8 @@ public enum Target
13
13
  TICKETS("tickets"), USERS("users"), ORGANIZATIONS("organizations"), TICKET_EVENTS("ticket_events"),
14
14
  TICKET_METRICS("metric_sets"), TICKET_FIELDS("ticket_fields"), TICKET_FORMS("ticket_forms"),
15
15
  TICKET_METRIC_EVENTS("ticket_metric_events"), SATISFACTION_RATINGS("satisfaction_ratings"),
16
- RECIPIENTS("recipients"), SCORES("responses"), OBJECT_RECORDS("data"), RELATIONSHIP_RECORDS("data"), USER_EVENTS("data");
16
+ SLA_POLICIES("sla_policies"), SCORES("responses"), OBJECT_RECORDS("data"),
17
+ RECIPIENTS("recipients"), RELATIONSHIP_RECORDS("data"), USER_EVENTS("data");
17
18
 
18
19
  String jsonName;
19
20
 
@@ -16,6 +16,7 @@ public class ZendeskSupportAPIService extends ZendeskNormalServices
16
16
  public boolean isSupportIncremental()
17
17
  {
18
18
  return !(task.getTarget().equals(Target.TICKET_FORMS)
19
+ || task.getTarget().equals(Target.SLA_POLICIES)
19
20
  || task.getTarget().equals(Target.TICKET_FIELDS)
20
21
  || task.getTarget().equals(Target.SATISFACTION_RATINGS));
21
22
  }
@@ -51,13 +52,19 @@ public class ZendeskSupportAPIService extends ZendeskNormalServices
51
52
 
52
53
  private String buildPath()
53
54
  {
54
- return (isSupportIncremental() && !(Target.SATISFACTION_RATINGS.equals(task.getTarget()))
55
- ? ZendeskConstants.Url.API_INCREMENTAL
56
- : ZendeskConstants.Url.API) +
57
- "/" +
58
- (Target.TICKET_METRICS.equals(task.getTarget())
59
- ? Target.TICKETS.toString()
60
- : task.getTarget().toString())
61
- + ".json";
55
+ if(Target.SLA_POLICIES.equals(task.getTarget()))
56
+ {
57
+ return ZendeskConstants.Url.API+"/slas/policies";
58
+ }
59
+ else{
60
+ return (isSupportIncremental() && !(Target.SATISFACTION_RATINGS.equals(task.getTarget()))
61
+ ? ZendeskConstants.Url.API_INCREMENTAL
62
+ : ZendeskConstants.Url.API) +
63
+ "/" +
64
+ (Target.TICKET_METRICS.equals(task.getTarget())
65
+ ? Target.TICKETS.toString()
66
+ : task.getTarget().toString())
67
+ + ".json";
68
+ }
62
69
  }
63
70
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-input-zendesk-all
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - hieu.duong
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-21 00:00:00.000000000 Z
11
+ date: 2019-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -140,7 +140,7 @@ files:
140
140
  - classpath/httpcore-4.4.10.jar
141
141
  - classpath/httpclient-4.5.6.jar
142
142
  - classpath/commons-codec-1.10.jar
143
- - classpath/embulk-input-zendesk-all-0.3.8.jar
143
+ - classpath/embulk-input-zendesk-all-0.3.9.jar
144
144
  homepage: https://github.com/treasure-data/embulk-input-zendesk
145
145
  licenses:
146
146
  - MIT