@commercelayer/cli-plugin-triggers 3.13.0 → 3.14.0

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.
Files changed (60) hide show
  1. package/README.md +486 -3
  2. package/lib/commands/buy_x_pay_y_promotion/disable.d.ts +9 -0
  3. package/lib/commands/buy_x_pay_y_promotion/disable.js +21 -0
  4. package/lib/commands/buy_x_pay_y_promotion/enable.d.ts +9 -0
  5. package/lib/commands/buy_x_pay_y_promotion/enable.js +21 -0
  6. package/lib/commands/buy_x_pay_y_promotion/index.d.ts +9 -0
  7. package/lib/commands/buy_x_pay_y_promotion/index.js +38 -0
  8. package/lib/commands/external_promotion/disable.d.ts +9 -0
  9. package/lib/commands/external_promotion/disable.js +21 -0
  10. package/lib/commands/external_promotion/enable.d.ts +9 -0
  11. package/lib/commands/external_promotion/enable.js +21 -0
  12. package/lib/commands/external_promotion/index.d.ts +9 -0
  13. package/lib/commands/external_promotion/index.js +38 -0
  14. package/lib/commands/fixed_amount_promotion/disable.d.ts +9 -0
  15. package/lib/commands/fixed_amount_promotion/disable.js +21 -0
  16. package/lib/commands/fixed_amount_promotion/enable.d.ts +9 -0
  17. package/lib/commands/fixed_amount_promotion/enable.js +21 -0
  18. package/lib/commands/fixed_amount_promotion/index.d.ts +9 -0
  19. package/lib/commands/fixed_amount_promotion/index.js +38 -0
  20. package/lib/commands/fixed_price_promotion/disable.d.ts +9 -0
  21. package/lib/commands/fixed_price_promotion/disable.js +21 -0
  22. package/lib/commands/fixed_price_promotion/enable.d.ts +9 -0
  23. package/lib/commands/fixed_price_promotion/enable.js +21 -0
  24. package/lib/commands/fixed_price_promotion/index.d.ts +9 -0
  25. package/lib/commands/fixed_price_promotion/index.js +38 -0
  26. package/lib/commands/free_gift_promotion/disable.d.ts +9 -0
  27. package/lib/commands/free_gift_promotion/disable.js +21 -0
  28. package/lib/commands/free_gift_promotion/enable.d.ts +9 -0
  29. package/lib/commands/free_gift_promotion/enable.js +21 -0
  30. package/lib/commands/free_gift_promotion/index.d.ts +9 -0
  31. package/lib/commands/free_gift_promotion/index.js +38 -0
  32. package/lib/commands/free_shipping_promotion/disable.d.ts +9 -0
  33. package/lib/commands/free_shipping_promotion/disable.js +21 -0
  34. package/lib/commands/free_shipping_promotion/enable.d.ts +9 -0
  35. package/lib/commands/free_shipping_promotion/enable.js +21 -0
  36. package/lib/commands/free_shipping_promotion/index.d.ts +9 -0
  37. package/lib/commands/free_shipping_promotion/index.js +38 -0
  38. package/lib/commands/percentage_discount_promotion/disable.d.ts +9 -0
  39. package/lib/commands/percentage_discount_promotion/disable.js +21 -0
  40. package/lib/commands/percentage_discount_promotion/enable.d.ts +9 -0
  41. package/lib/commands/percentage_discount_promotion/enable.js +21 -0
  42. package/lib/commands/percentage_discount_promotion/index.d.ts +9 -0
  43. package/lib/commands/percentage_discount_promotion/index.js +38 -0
  44. package/lib/triggers/buy_x_pay_y_promotions.d.ts +3 -0
  45. package/lib/triggers/buy_x_pay_y_promotions.js +15 -0
  46. package/lib/triggers/external_promotions.d.ts +3 -0
  47. package/lib/triggers/external_promotions.js +15 -0
  48. package/lib/triggers/fixed_amount_promotions.d.ts +3 -0
  49. package/lib/triggers/fixed_amount_promotions.js +15 -0
  50. package/lib/triggers/fixed_price_promotions.d.ts +3 -0
  51. package/lib/triggers/fixed_price_promotions.js +15 -0
  52. package/lib/triggers/free_gift_promotions.d.ts +3 -0
  53. package/lib/triggers/free_gift_promotions.js +15 -0
  54. package/lib/triggers/free_shipping_promotions.d.ts +3 -0
  55. package/lib/triggers/free_shipping_promotions.js +15 -0
  56. package/lib/triggers/orders.js +1 -1
  57. package/lib/triggers/percentage_discount_promotions.d.ts +3 -0
  58. package/lib/triggers/percentage_discount_promotions.js +15 -0
  59. package/oclif.manifest.json +1535 -23
  60. package/package.json +16 -17
package/README.md CHANGED
@@ -41,6 +41,9 @@ $ commercelayer plugins:install triggers
41
41
  * [`commercelayer bundle ID`](#commercelayer-bundle-id)
42
42
  * [`commercelayer bundle:compute_compare_at_amount ID`](#commercelayer-bundlecompute_compare_at_amount-id)
43
43
  * [`commercelayer bundle:compute_price_amount ID`](#commercelayer-bundlecompute_price_amount-id)
44
+ * [`commercelayer buy_x_pay_y_promotion ID`](#commercelayer-buy_x_pay_y_promotion-id)
45
+ * [`commercelayer buy_x_pay_y_promotion:disable ID`](#commercelayer-buy_x_pay_y_promotiondisable-id)
46
+ * [`commercelayer buy_x_pay_y_promotion:enable ID`](#commercelayer-buy_x_pay_y_promotionenable-id)
44
47
  * [`commercelayer capture ID`](#commercelayer-capture-id)
45
48
  * [`commercelayer capture:refund ID`](#commercelayer-capturerefund-id)
46
49
  * [`commercelayer capture:refund_amount_cents ID`](#commercelayer-capturerefund_amount_cents-id)
@@ -49,6 +52,21 @@ $ commercelayer plugins:install triggers
49
52
  * [`commercelayer checkout_com_payment:refresh ID`](#commercelayer-checkout_com_paymentrefresh-id)
50
53
  * [`commercelayer customer_password_reset ID`](#commercelayer-customer_password_reset-id)
51
54
  * [`commercelayer customer_password_reset:reset_password_token ID`](#commercelayer-customer_password_resetreset_password_token-id)
55
+ * [`commercelayer external_promotion ID`](#commercelayer-external_promotion-id)
56
+ * [`commercelayer external_promotion:disable ID`](#commercelayer-external_promotiondisable-id)
57
+ * [`commercelayer external_promotion:enable ID`](#commercelayer-external_promotionenable-id)
58
+ * [`commercelayer fixed_amount_promotion ID`](#commercelayer-fixed_amount_promotion-id)
59
+ * [`commercelayer fixed_amount_promotion:disable ID`](#commercelayer-fixed_amount_promotiondisable-id)
60
+ * [`commercelayer fixed_amount_promotion:enable ID`](#commercelayer-fixed_amount_promotionenable-id)
61
+ * [`commercelayer fixed_price_promotion ID`](#commercelayer-fixed_price_promotion-id)
62
+ * [`commercelayer fixed_price_promotion:disable ID`](#commercelayer-fixed_price_promotiondisable-id)
63
+ * [`commercelayer fixed_price_promotion:enable ID`](#commercelayer-fixed_price_promotionenable-id)
64
+ * [`commercelayer free_gift_promotion ID`](#commercelayer-free_gift_promotion-id)
65
+ * [`commercelayer free_gift_promotion:disable ID`](#commercelayer-free_gift_promotiondisable-id)
66
+ * [`commercelayer free_gift_promotion:enable ID`](#commercelayer-free_gift_promotionenable-id)
67
+ * [`commercelayer free_shipping_promotion ID`](#commercelayer-free_shipping_promotion-id)
68
+ * [`commercelayer free_shipping_promotion:disable ID`](#commercelayer-free_shipping_promotiondisable-id)
69
+ * [`commercelayer free_shipping_promotion:enable ID`](#commercelayer-free_shipping_promotionenable-id)
52
70
  * [`commercelayer gift_card ID`](#commercelayer-gift_card-id)
53
71
  * [`commercelayer gift_card:activate ID`](#commercelayer-gift_cardactivate-id)
54
72
  * [`commercelayer gift_card:balance_change_cents ID`](#commercelayer-gift_cardbalance_change_cents-id)
@@ -100,6 +118,9 @@ $ commercelayer plugins:install triggers
100
118
  * [`commercelayer payment_method ID`](#commercelayer-payment_method-id)
101
119
  * [`commercelayer payment_method:disable ID`](#commercelayer-payment_methoddisable-id)
102
120
  * [`commercelayer payment_method:enable ID`](#commercelayer-payment_methodenable-id)
121
+ * [`commercelayer percentage_discount_promotion ID`](#commercelayer-percentage_discount_promotion-id)
122
+ * [`commercelayer percentage_discount_promotion:disable ID`](#commercelayer-percentage_discount_promotiondisable-id)
123
+ * [`commercelayer percentage_discount_promotion:enable ID`](#commercelayer-percentage_discount_promotionenable-id)
103
124
  * [`commercelayer return ID`](#commercelayer-return-id)
104
125
  * [`commercelayer return:approve ID`](#commercelayer-returnapprove-id)
105
126
  * [`commercelayer return:archive ID`](#commercelayer-returnarchive-id)
@@ -381,6 +402,72 @@ DESCRIPTION
381
402
 
382
403
  _See code: [src/commands/bundle/compute_price_amount.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/bundle/compute_price_amount.ts)_
383
404
 
405
+ ### `commercelayer buy_x_pay_y_promotion ID`
406
+
407
+ Execute an action on a resource of type buy_x_pay_y_promotions.
408
+
409
+ ```sh-session
410
+ USAGE
411
+ $ commercelayer buy_x_pay_y_promotion ID [-u [-j -p]]
412
+
413
+ ARGUMENTS
414
+ ID the unique id of the resource
415
+
416
+ FLAGS
417
+ -j, --json print result in JSON format
418
+ -p, --print print out the modified resource
419
+ -u, --unformatted print JSON output without indentation
420
+
421
+ DESCRIPTION
422
+ execute an action on a resource of type buy_x_pay_y_promotions
423
+ ```
424
+
425
+ _See code: [src/commands/buy_x_pay_y_promotion/index.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/buy_x_pay_y_promotion/index.ts)_
426
+
427
+ ### `commercelayer buy_x_pay_y_promotion:disable ID`
428
+
429
+ Send this attribute if you want to mark the promotion as disabled.
430
+
431
+ ```sh-session
432
+ USAGE
433
+ $ commercelayer buy_x_pay_y_promotion:disable ID [-u [-j -p]]
434
+
435
+ ARGUMENTS
436
+ ID the unique id of the resource
437
+
438
+ FLAGS
439
+ -j, --json print result in JSON format
440
+ -p, --print print out the modified resource
441
+ -u, --unformatted print JSON output without indentation
442
+
443
+ DESCRIPTION
444
+ Send this attribute if you want to mark the promotion as disabled.
445
+ ```
446
+
447
+ _See code: [src/commands/buy_x_pay_y_promotion/disable.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/buy_x_pay_y_promotion/disable.ts)_
448
+
449
+ ### `commercelayer buy_x_pay_y_promotion:enable ID`
450
+
451
+ Send this attribute if you want to mark the promotion as enabled.
452
+
453
+ ```sh-session
454
+ USAGE
455
+ $ commercelayer buy_x_pay_y_promotion:enable ID [-u [-j -p]]
456
+
457
+ ARGUMENTS
458
+ ID the unique id of the resource
459
+
460
+ FLAGS
461
+ -j, --json print result in JSON format
462
+ -p, --print print out the modified resource
463
+ -u, --unformatted print JSON output without indentation
464
+
465
+ DESCRIPTION
466
+ Send this attribute if you want to mark the promotion as enabled.
467
+ ```
468
+
469
+ _See code: [src/commands/buy_x_pay_y_promotion/enable.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/buy_x_pay_y_promotion/enable.ts)_
470
+
384
471
  ### `commercelayer capture ID`
385
472
 
386
473
  Execute an action on a resource of type captures.
@@ -557,6 +644,336 @@ DESCRIPTION
557
644
 
558
645
  _See code: [src/commands/customer_password_reset/reset_password_token.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/customer_password_reset/reset_password_token.ts)_
559
646
 
647
+ ### `commercelayer external_promotion ID`
648
+
649
+ Execute an action on a resource of type external_promotions.
650
+
651
+ ```sh-session
652
+ USAGE
653
+ $ commercelayer external_promotion ID [-u [-j -p]]
654
+
655
+ ARGUMENTS
656
+ ID the unique id of the resource
657
+
658
+ FLAGS
659
+ -j, --json print result in JSON format
660
+ -p, --print print out the modified resource
661
+ -u, --unformatted print JSON output without indentation
662
+
663
+ DESCRIPTION
664
+ execute an action on a resource of type external_promotions
665
+ ```
666
+
667
+ _See code: [src/commands/external_promotion/index.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/external_promotion/index.ts)_
668
+
669
+ ### `commercelayer external_promotion:disable ID`
670
+
671
+ Send this attribute if you want to mark the promotion as disabled.
672
+
673
+ ```sh-session
674
+ USAGE
675
+ $ commercelayer external_promotion:disable ID [-u [-j -p]]
676
+
677
+ ARGUMENTS
678
+ ID the unique id of the resource
679
+
680
+ FLAGS
681
+ -j, --json print result in JSON format
682
+ -p, --print print out the modified resource
683
+ -u, --unformatted print JSON output without indentation
684
+
685
+ DESCRIPTION
686
+ Send this attribute if you want to mark the promotion as disabled.
687
+ ```
688
+
689
+ _See code: [src/commands/external_promotion/disable.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/external_promotion/disable.ts)_
690
+
691
+ ### `commercelayer external_promotion:enable ID`
692
+
693
+ Send this attribute if you want to mark the promotion as enabled.
694
+
695
+ ```sh-session
696
+ USAGE
697
+ $ commercelayer external_promotion:enable ID [-u [-j -p]]
698
+
699
+ ARGUMENTS
700
+ ID the unique id of the resource
701
+
702
+ FLAGS
703
+ -j, --json print result in JSON format
704
+ -p, --print print out the modified resource
705
+ -u, --unformatted print JSON output without indentation
706
+
707
+ DESCRIPTION
708
+ Send this attribute if you want to mark the promotion as enabled.
709
+ ```
710
+
711
+ _See code: [src/commands/external_promotion/enable.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/external_promotion/enable.ts)_
712
+
713
+ ### `commercelayer fixed_amount_promotion ID`
714
+
715
+ Execute an action on a resource of type fixed_amount_promotions.
716
+
717
+ ```sh-session
718
+ USAGE
719
+ $ commercelayer fixed_amount_promotion ID [-u [-j -p]]
720
+
721
+ ARGUMENTS
722
+ ID the unique id of the resource
723
+
724
+ FLAGS
725
+ -j, --json print result in JSON format
726
+ -p, --print print out the modified resource
727
+ -u, --unformatted print JSON output without indentation
728
+
729
+ DESCRIPTION
730
+ execute an action on a resource of type fixed_amount_promotions
731
+ ```
732
+
733
+ _See code: [src/commands/fixed_amount_promotion/index.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/fixed_amount_promotion/index.ts)_
734
+
735
+ ### `commercelayer fixed_amount_promotion:disable ID`
736
+
737
+ Send this attribute if you want to mark the promotion as disabled.
738
+
739
+ ```sh-session
740
+ USAGE
741
+ $ commercelayer fixed_amount_promotion:disable ID [-u [-j -p]]
742
+
743
+ ARGUMENTS
744
+ ID the unique id of the resource
745
+
746
+ FLAGS
747
+ -j, --json print result in JSON format
748
+ -p, --print print out the modified resource
749
+ -u, --unformatted print JSON output without indentation
750
+
751
+ DESCRIPTION
752
+ Send this attribute if you want to mark the promotion as disabled.
753
+ ```
754
+
755
+ _See code: [src/commands/fixed_amount_promotion/disable.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/fixed_amount_promotion/disable.ts)_
756
+
757
+ ### `commercelayer fixed_amount_promotion:enable ID`
758
+
759
+ Send this attribute if you want to mark the promotion as enabled.
760
+
761
+ ```sh-session
762
+ USAGE
763
+ $ commercelayer fixed_amount_promotion:enable ID [-u [-j -p]]
764
+
765
+ ARGUMENTS
766
+ ID the unique id of the resource
767
+
768
+ FLAGS
769
+ -j, --json print result in JSON format
770
+ -p, --print print out the modified resource
771
+ -u, --unformatted print JSON output without indentation
772
+
773
+ DESCRIPTION
774
+ Send this attribute if you want to mark the promotion as enabled.
775
+ ```
776
+
777
+ _See code: [src/commands/fixed_amount_promotion/enable.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/fixed_amount_promotion/enable.ts)_
778
+
779
+ ### `commercelayer fixed_price_promotion ID`
780
+
781
+ Execute an action on a resource of type fixed_price_promotions.
782
+
783
+ ```sh-session
784
+ USAGE
785
+ $ commercelayer fixed_price_promotion ID [-u [-j -p]]
786
+
787
+ ARGUMENTS
788
+ ID the unique id of the resource
789
+
790
+ FLAGS
791
+ -j, --json print result in JSON format
792
+ -p, --print print out the modified resource
793
+ -u, --unformatted print JSON output without indentation
794
+
795
+ DESCRIPTION
796
+ execute an action on a resource of type fixed_price_promotions
797
+ ```
798
+
799
+ _See code: [src/commands/fixed_price_promotion/index.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/fixed_price_promotion/index.ts)_
800
+
801
+ ### `commercelayer fixed_price_promotion:disable ID`
802
+
803
+ Send this attribute if you want to mark the promotion as disabled.
804
+
805
+ ```sh-session
806
+ USAGE
807
+ $ commercelayer fixed_price_promotion:disable ID [-u [-j -p]]
808
+
809
+ ARGUMENTS
810
+ ID the unique id of the resource
811
+
812
+ FLAGS
813
+ -j, --json print result in JSON format
814
+ -p, --print print out the modified resource
815
+ -u, --unformatted print JSON output without indentation
816
+
817
+ DESCRIPTION
818
+ Send this attribute if you want to mark the promotion as disabled.
819
+ ```
820
+
821
+ _See code: [src/commands/fixed_price_promotion/disable.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/fixed_price_promotion/disable.ts)_
822
+
823
+ ### `commercelayer fixed_price_promotion:enable ID`
824
+
825
+ Send this attribute if you want to mark the promotion as enabled.
826
+
827
+ ```sh-session
828
+ USAGE
829
+ $ commercelayer fixed_price_promotion:enable ID [-u [-j -p]]
830
+
831
+ ARGUMENTS
832
+ ID the unique id of the resource
833
+
834
+ FLAGS
835
+ -j, --json print result in JSON format
836
+ -p, --print print out the modified resource
837
+ -u, --unformatted print JSON output without indentation
838
+
839
+ DESCRIPTION
840
+ Send this attribute if you want to mark the promotion as enabled.
841
+ ```
842
+
843
+ _See code: [src/commands/fixed_price_promotion/enable.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/fixed_price_promotion/enable.ts)_
844
+
845
+ ### `commercelayer free_gift_promotion ID`
846
+
847
+ Execute an action on a resource of type free_gift_promotions.
848
+
849
+ ```sh-session
850
+ USAGE
851
+ $ commercelayer free_gift_promotion ID [-u [-j -p]]
852
+
853
+ ARGUMENTS
854
+ ID the unique id of the resource
855
+
856
+ FLAGS
857
+ -j, --json print result in JSON format
858
+ -p, --print print out the modified resource
859
+ -u, --unformatted print JSON output without indentation
860
+
861
+ DESCRIPTION
862
+ execute an action on a resource of type free_gift_promotions
863
+ ```
864
+
865
+ _See code: [src/commands/free_gift_promotion/index.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/free_gift_promotion/index.ts)_
866
+
867
+ ### `commercelayer free_gift_promotion:disable ID`
868
+
869
+ Send this attribute if you want to mark the promotion as disabled.
870
+
871
+ ```sh-session
872
+ USAGE
873
+ $ commercelayer free_gift_promotion:disable ID [-u [-j -p]]
874
+
875
+ ARGUMENTS
876
+ ID the unique id of the resource
877
+
878
+ FLAGS
879
+ -j, --json print result in JSON format
880
+ -p, --print print out the modified resource
881
+ -u, --unformatted print JSON output without indentation
882
+
883
+ DESCRIPTION
884
+ Send this attribute if you want to mark the promotion as disabled.
885
+ ```
886
+
887
+ _See code: [src/commands/free_gift_promotion/disable.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/free_gift_promotion/disable.ts)_
888
+
889
+ ### `commercelayer free_gift_promotion:enable ID`
890
+
891
+ Send this attribute if you want to mark the promotion as enabled.
892
+
893
+ ```sh-session
894
+ USAGE
895
+ $ commercelayer free_gift_promotion:enable ID [-u [-j -p]]
896
+
897
+ ARGUMENTS
898
+ ID the unique id of the resource
899
+
900
+ FLAGS
901
+ -j, --json print result in JSON format
902
+ -p, --print print out the modified resource
903
+ -u, --unformatted print JSON output without indentation
904
+
905
+ DESCRIPTION
906
+ Send this attribute if you want to mark the promotion as enabled.
907
+ ```
908
+
909
+ _See code: [src/commands/free_gift_promotion/enable.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/free_gift_promotion/enable.ts)_
910
+
911
+ ### `commercelayer free_shipping_promotion ID`
912
+
913
+ Execute an action on a resource of type free_shipping_promotions.
914
+
915
+ ```sh-session
916
+ USAGE
917
+ $ commercelayer free_shipping_promotion ID [-u [-j -p]]
918
+
919
+ ARGUMENTS
920
+ ID the unique id of the resource
921
+
922
+ FLAGS
923
+ -j, --json print result in JSON format
924
+ -p, --print print out the modified resource
925
+ -u, --unformatted print JSON output without indentation
926
+
927
+ DESCRIPTION
928
+ execute an action on a resource of type free_shipping_promotions
929
+ ```
930
+
931
+ _See code: [src/commands/free_shipping_promotion/index.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/free_shipping_promotion/index.ts)_
932
+
933
+ ### `commercelayer free_shipping_promotion:disable ID`
934
+
935
+ Send this attribute if you want to mark the promotion as disabled.
936
+
937
+ ```sh-session
938
+ USAGE
939
+ $ commercelayer free_shipping_promotion:disable ID [-u [-j -p]]
940
+
941
+ ARGUMENTS
942
+ ID the unique id of the resource
943
+
944
+ FLAGS
945
+ -j, --json print result in JSON format
946
+ -p, --print print out the modified resource
947
+ -u, --unformatted print JSON output without indentation
948
+
949
+ DESCRIPTION
950
+ Send this attribute if you want to mark the promotion as disabled.
951
+ ```
952
+
953
+ _See code: [src/commands/free_shipping_promotion/disable.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/free_shipping_promotion/disable.ts)_
954
+
955
+ ### `commercelayer free_shipping_promotion:enable ID`
956
+
957
+ Send this attribute if you want to mark the promotion as enabled.
958
+
959
+ ```sh-session
960
+ USAGE
961
+ $ commercelayer free_shipping_promotion:enable ID [-u [-j -p]]
962
+
963
+ ARGUMENTS
964
+ ID the unique id of the resource
965
+
966
+ FLAGS
967
+ -j, --json print result in JSON format
968
+ -p, --print print out the modified resource
969
+ -u, --unformatted print JSON output without indentation
970
+
971
+ DESCRIPTION
972
+ Send this attribute if you want to mark the promotion as enabled.
973
+ ```
974
+
975
+ _See code: [src/commands/free_shipping_promotion/enable.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/free_shipping_promotion/enable.ts)_
976
+
560
977
  ### `commercelayer gift_card ID`
561
978
 
562
979
  Execute an action on a resource of type gift_cards.
@@ -1159,7 +1576,7 @@ _See code: [src/commands/order/commit_invoice.ts](https://github.com/commercelay
1159
1576
 
1160
1577
  ### `commercelayer order:create_subscriptions ID`
1161
1578
 
1162
- Send this attribute if you want to create order subscriptions from the recurring line items upon/after placing the order. Subscriptions are generated according to associated subscription model strategy.
1579
+ Send this attribute upon/after placing the order if you want to create order subscriptions from the line items that have a frequency.
1163
1580
 
1164
1581
  ```sh-session
1165
1582
  USAGE
@@ -1174,8 +1591,8 @@ FLAGS
1174
1591
  -u, --unformatted print JSON output without indentation
1175
1592
 
1176
1593
  DESCRIPTION
1177
- Send this attribute if you want to create order subscriptions from the recurring line items upon/after placing the
1178
- order. Subscriptions are generated according to associated subscription model strategy.
1594
+ Send this attribute upon/after placing the order if you want to create order subscriptions from the line items that
1595
+ have a frequency.
1179
1596
  ```
1180
1597
 
1181
1598
  _See code: [src/commands/order/create_subscriptions.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/order/create_subscriptions.ts)_
@@ -1694,6 +2111,72 @@ DESCRIPTION
1694
2111
 
1695
2112
  _See code: [src/commands/payment_method/enable.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/payment_method/enable.ts)_
1696
2113
 
2114
+ ### `commercelayer percentage_discount_promotion ID`
2115
+
2116
+ Execute an action on a resource of type percentage_discount_promotions.
2117
+
2118
+ ```sh-session
2119
+ USAGE
2120
+ $ commercelayer percentage_discount_promotion ID [-u [-j -p]]
2121
+
2122
+ ARGUMENTS
2123
+ ID the unique id of the resource
2124
+
2125
+ FLAGS
2126
+ -j, --json print result in JSON format
2127
+ -p, --print print out the modified resource
2128
+ -u, --unformatted print JSON output without indentation
2129
+
2130
+ DESCRIPTION
2131
+ execute an action on a resource of type percentage_discount_promotions
2132
+ ```
2133
+
2134
+ _See code: [src/commands/percentage_discount_promotion/index.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/percentage_discount_promotion/index.ts)_
2135
+
2136
+ ### `commercelayer percentage_discount_promotion:disable ID`
2137
+
2138
+ Send this attribute if you want to mark the promotion as disabled.
2139
+
2140
+ ```sh-session
2141
+ USAGE
2142
+ $ commercelayer percentage_discount_promotion:disable ID [-u [-j -p]]
2143
+
2144
+ ARGUMENTS
2145
+ ID the unique id of the resource
2146
+
2147
+ FLAGS
2148
+ -j, --json print result in JSON format
2149
+ -p, --print print out the modified resource
2150
+ -u, --unformatted print JSON output without indentation
2151
+
2152
+ DESCRIPTION
2153
+ Send this attribute if you want to mark the promotion as disabled.
2154
+ ```
2155
+
2156
+ _See code: [src/commands/percentage_discount_promotion/disable.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/percentage_discount_promotion/disable.ts)_
2157
+
2158
+ ### `commercelayer percentage_discount_promotion:enable ID`
2159
+
2160
+ Send this attribute if you want to mark the promotion as enabled.
2161
+
2162
+ ```sh-session
2163
+ USAGE
2164
+ $ commercelayer percentage_discount_promotion:enable ID [-u [-j -p]]
2165
+
2166
+ ARGUMENTS
2167
+ ID the unique id of the resource
2168
+
2169
+ FLAGS
2170
+ -j, --json print result in JSON format
2171
+ -p, --print print out the modified resource
2172
+ -u, --unformatted print JSON output without indentation
2173
+
2174
+ DESCRIPTION
2175
+ Send this attribute if you want to mark the promotion as enabled.
2176
+ ```
2177
+
2178
+ _See code: [src/commands/percentage_discount_promotion/enable.ts](https://github.com/commercelayer/commercelayer-cli-plugin-triggers/blob/main/src/commands/percentage_discount_promotion/enable.ts)_
2179
+
1697
2180
  ### `commercelayer return ID`
1698
2181
 
1699
2182
  Execute an action on a resource of type returns.
@@ -0,0 +1,9 @@
1
+ import Command from '../../base';
2
+ export default class BuyXPayYPromotionDisable extends Command {
3
+ static description: string;
4
+ static flags: {};
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
7
+ };
8
+ run(): Promise<any>;
9
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const base_1 = tslib_1.__importDefault(require("../../base"));
5
+ const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
+ const buy_x_pay_y_promotions_1 = require("../../triggers/buy_x_pay_y_promotions");
7
+ const TRIGGER = 'disable';
8
+ class BuyXPayYPromotionDisable extends base_1.default {
9
+ async run() {
10
+ const { args, flags } = await this.parse(BuyXPayYPromotionDisable);
11
+ const res = await (0, exec_1.default)('buy_x_pay_y_promotions', args.id, TRIGGER, flags);
12
+ if (flags.print)
13
+ this.printOutput(res, flags);
14
+ this.successMessage('buy_x_pay_y_promotion', TRIGGER, res.id);
15
+ return res;
16
+ }
17
+ }
18
+ BuyXPayYPromotionDisable.description = buy_x_pay_y_promotions_1.triggers[TRIGGER].description;
19
+ BuyXPayYPromotionDisable.flags = {};
20
+ BuyXPayYPromotionDisable.args = Object.assign({}, base_1.default.args);
21
+ exports.default = BuyXPayYPromotionDisable;
@@ -0,0 +1,9 @@
1
+ import Command from '../../base';
2
+ export default class BuyXPayYPromotionEnable extends Command {
3
+ static description: string;
4
+ static flags: {};
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
7
+ };
8
+ run(): Promise<any>;
9
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const base_1 = tslib_1.__importDefault(require("../../base"));
5
+ const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
+ const buy_x_pay_y_promotions_1 = require("../../triggers/buy_x_pay_y_promotions");
7
+ const TRIGGER = 'enable';
8
+ class BuyXPayYPromotionEnable extends base_1.default {
9
+ async run() {
10
+ const { args, flags } = await this.parse(BuyXPayYPromotionEnable);
11
+ const res = await (0, exec_1.default)('buy_x_pay_y_promotions', args.id, TRIGGER, flags);
12
+ if (flags.print)
13
+ this.printOutput(res, flags);
14
+ this.successMessage('buy_x_pay_y_promotion', TRIGGER, res.id);
15
+ return res;
16
+ }
17
+ }
18
+ BuyXPayYPromotionEnable.description = buy_x_pay_y_promotions_1.triggers[TRIGGER].description;
19
+ BuyXPayYPromotionEnable.flags = {};
20
+ BuyXPayYPromotionEnable.args = Object.assign({}, base_1.default.args);
21
+ exports.default = BuyXPayYPromotionEnable;
@@ -0,0 +1,9 @@
1
+ import Command from '../../base';
2
+ export default class BuyXPayYPromotionIndex extends Command {
3
+ static description: string;
4
+ static flags: {};
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
7
+ };
8
+ run(): Promise<any>;
9
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const base_1 = tslib_1.__importDefault(require("../../base"));
5
+ const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
+ const inquirer_1 = tslib_1.__importDefault(require("inquirer"));
7
+ const cli_core_1 = require("@commercelayer/cli-core");
8
+ const buy_x_pay_y_promotions_1 = require("../../triggers/buy_x_pay_y_promotions");
9
+ const promptAction = async (id) => {
10
+ const answers = await inquirer_1.default.prompt([{
11
+ type: 'list',
12
+ name: 'trigger',
13
+ message: `Select an action to execute on buy x pay y promotion ${cli_core_1.clColor.api.id(id)}:`,
14
+ choices: Object.keys(buy_x_pay_y_promotions_1.triggers).sort().map(a => {
15
+ return { name: a, value: a };
16
+ }),
17
+ loop: false,
18
+ pageSize: 10,
19
+ }]);
20
+ return answers.trigger;
21
+ };
22
+ class BuyXPayYPromotionIndex extends base_1.default {
23
+ async run() {
24
+ const { args, flags } = await this.parse(BuyXPayYPromotionIndex);
25
+ const id = args.id;
26
+ const action = await promptAction(id);
27
+ const fields = [];
28
+ const res = await (0, exec_1.default)('buy_x_pay_y_promotions', id, action, flags, fields);
29
+ this.log();
30
+ this.printOutput(res, flags);
31
+ this.successMessage('buy x pay y promotion', action, res.id);
32
+ return res;
33
+ }
34
+ }
35
+ BuyXPayYPromotionIndex.description = 'execute an action on a resource of type buy_x_pay_y_promotions';
36
+ BuyXPayYPromotionIndex.flags = {};
37
+ BuyXPayYPromotionIndex.args = Object.assign({}, base_1.default.args);
38
+ exports.default = BuyXPayYPromotionIndex;
@@ -0,0 +1,9 @@
1
+ import Command from '../../base';
2
+ export default class ExternalPromotionDisable extends Command {
3
+ static description: string;
4
+ static flags: {};
5
+ static args: {
6
+ id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
7
+ };
8
+ run(): Promise<any>;
9
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const base_1 = tslib_1.__importDefault(require("../../base"));
5
+ const exec_1 = tslib_1.__importDefault(require("../../exec"));
6
+ const external_promotions_1 = require("../../triggers/external_promotions");
7
+ const TRIGGER = 'disable';
8
+ class ExternalPromotionDisable extends base_1.default {
9
+ async run() {
10
+ const { args, flags } = await this.parse(ExternalPromotionDisable);
11
+ const res = await (0, exec_1.default)('external_promotions', args.id, TRIGGER, flags);
12
+ if (flags.print)
13
+ this.printOutput(res, flags);
14
+ this.successMessage('external_promotion', TRIGGER, res.id);
15
+ return res;
16
+ }
17
+ }
18
+ ExternalPromotionDisable.description = external_promotions_1.triggers[TRIGGER].description;
19
+ ExternalPromotionDisable.flags = {};
20
+ ExternalPromotionDisable.args = Object.assign({}, base_1.default.args);
21
+ exports.default = ExternalPromotionDisable;