@@ -500,6 +500,11 @@ public Trigger createTrigger(Trigger trigger) {
500
500
return complete (submit (req ("POST" , cnst ("/triggers.json" ), JSON , json (Collections .singletonMap ("trigger" , trigger ))),
501
501
handle (Trigger .class , "trigger" )));
502
502
}
503
+
504
+ public Trigger updateTrigger (Long triggerId , Trigger trigger ) {
505
+ return complete (submit (req ("PUT" , tmpl ("/triggers/{id}.json" ).set ("id" , triggerId ), JSON , json (Collections .singletonMap ("trigger" , trigger ))),
506
+ handle (Trigger .class , "trigger" )));
507
+ }
503
508
504
509
public void deleteTrigger (long triggerId ) {
505
510
complete (submit (req ("DELETE" , tmpl ("/triggers/{id}.json" ).set ("id" , triggerId )), handleStatus ()));
@@ -932,6 +937,23 @@ public Iterable<Macro> getMacros(){
932
937
return new PagedIterable <Macro >(cnst ("/macros.json" ),
933
938
handleList (Macro .class , "macros" ));
934
939
}
940
+
941
+ public Macro getMacro (long macroId ){
942
+
943
+ return complete (submit (req ("GET" , tmpl ("/macros/{id}.json" ).set ("id" , macroId )), handle (Macro .class , "macro" )));
944
+ }
945
+
946
+ public Macro createMacro (Macro macro ) {
947
+ return complete (submit (
948
+ req ("POST" , cnst ("/macros.json" ), JSON , json (Collections .singletonMap ("macro" , macro ))),
949
+ handle (Macro .class , "macro" )));
950
+ }
951
+
952
+ public Macro updateMacro (Long macroId , Macro macro ) {
953
+ return complete (submit (req ("PUT" , tmpl ("/macros/{id}.json" ).set ("id" , macroId ), JSON ,
954
+ json (Collections .singletonMap ("macro" , macro ))), handle (Macro .class , "macro" )));
955
+ }
956
+
935
957
936
958
public List <String > addTagToTicket (long id , String ... tags ) {
937
959
return complete (submit (
0 commit comments