@commercelayer/cli-plugin-triggers 3.14.0 → 4.0.0-oclif3.1
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.
- package/README.md +308 -2
- package/bin/dev +0 -0
- package/bin/run +0 -0
- package/lib/base.d.ts +5 -4
- package/lib/base.js +46 -41
- package/lib/commands/adyen_payment/details.d.ts +1 -1
- package/lib/commands/adyen_payment/details.js +6 -5
- package/lib/commands/adyen_payment/index.d.ts +1 -1
- package/lib/commands/adyen_payment/index.js +5 -3
- package/lib/commands/authorization/capture.d.ts +1 -1
- package/lib/commands/authorization/capture.js +6 -5
- package/lib/commands/authorization/capture_amount_cents.d.ts +1 -1
- package/lib/commands/authorization/capture_amount_cents.js +6 -5
- package/lib/commands/authorization/index.d.ts +1 -1
- package/lib/commands/authorization/index.js +5 -3
- package/lib/commands/authorization/void.d.ts +1 -1
- package/lib/commands/authorization/void.js +6 -5
- package/lib/commands/axerve_payment/index.d.ts +1 -1
- package/lib/commands/axerve_payment/index.js +5 -3
- package/lib/commands/axerve_payment/update.d.ts +1 -1
- package/lib/commands/axerve_payment/update.js +6 -5
- package/lib/commands/bundle/compute_compare_at_amount.d.ts +1 -1
- package/lib/commands/bundle/compute_compare_at_amount.js +6 -5
- package/lib/commands/bundle/compute_price_amount.d.ts +1 -1
- package/lib/commands/bundle/compute_price_amount.js +6 -5
- package/lib/commands/bundle/index.d.ts +1 -1
- package/lib/commands/bundle/index.js +5 -3
- package/lib/commands/buy_x_pay_y_promotion/disable.d.ts +1 -1
- package/lib/commands/buy_x_pay_y_promotion/disable.js +6 -5
- package/lib/commands/buy_x_pay_y_promotion/enable.d.ts +1 -1
- package/lib/commands/buy_x_pay_y_promotion/enable.js +6 -5
- package/lib/commands/buy_x_pay_y_promotion/index.d.ts +1 -1
- package/lib/commands/buy_x_pay_y_promotion/index.js +5 -3
- package/lib/commands/capture/index.d.ts +1 -1
- package/lib/commands/capture/index.js +5 -3
- package/lib/commands/capture/refund.d.ts +1 -1
- package/lib/commands/capture/refund.js +6 -5
- package/lib/commands/capture/refund_amount_cents.d.ts +1 -1
- package/lib/commands/capture/refund_amount_cents.js +6 -5
- package/lib/commands/checkout_com_payment/details.d.ts +1 -1
- package/lib/commands/checkout_com_payment/details.js +6 -5
- package/lib/commands/checkout_com_payment/index.d.ts +1 -1
- package/lib/commands/checkout_com_payment/index.js +5 -3
- package/lib/commands/checkout_com_payment/refresh.d.ts +1 -1
- package/lib/commands/checkout_com_payment/refresh.js +6 -5
- package/lib/commands/customer_password_reset/index.d.ts +1 -1
- package/lib/commands/customer_password_reset/index.js +5 -3
- package/lib/commands/customer_password_reset/reset_password_token.d.ts +1 -1
- package/lib/commands/customer_password_reset/reset_password_token.js +6 -5
- package/lib/commands/external_promotion/disable.d.ts +1 -1
- package/lib/commands/external_promotion/disable.js +6 -5
- package/lib/commands/external_promotion/enable.d.ts +1 -1
- package/lib/commands/external_promotion/enable.js +6 -5
- package/lib/commands/external_promotion/index.d.ts +1 -1
- package/lib/commands/external_promotion/index.js +5 -3
- package/lib/commands/fixed_amount_promotion/disable.d.ts +1 -1
- package/lib/commands/fixed_amount_promotion/disable.js +6 -5
- package/lib/commands/fixed_amount_promotion/enable.d.ts +1 -1
- package/lib/commands/fixed_amount_promotion/enable.js +6 -5
- package/lib/commands/fixed_amount_promotion/index.d.ts +1 -1
- package/lib/commands/fixed_amount_promotion/index.js +5 -3
- package/lib/commands/fixed_price_promotion/disable.d.ts +1 -1
- package/lib/commands/fixed_price_promotion/disable.js +6 -5
- package/lib/commands/fixed_price_promotion/enable.d.ts +1 -1
- package/lib/commands/fixed_price_promotion/enable.js +6 -5
- package/lib/commands/fixed_price_promotion/index.d.ts +1 -1
- package/lib/commands/fixed_price_promotion/index.js +5 -3
- package/lib/commands/free_gift_promotion/disable.d.ts +1 -1
- package/lib/commands/free_gift_promotion/disable.js +6 -5
- package/lib/commands/free_gift_promotion/enable.d.ts +1 -1
- package/lib/commands/free_gift_promotion/enable.js +6 -5
- package/lib/commands/free_gift_promotion/index.d.ts +1 -1
- package/lib/commands/free_gift_promotion/index.js +5 -3
- package/lib/commands/free_shipping_promotion/disable.d.ts +1 -1
- package/lib/commands/free_shipping_promotion/disable.js +6 -5
- package/lib/commands/free_shipping_promotion/enable.d.ts +1 -1
- package/lib/commands/free_shipping_promotion/enable.js +6 -5
- package/lib/commands/free_shipping_promotion/index.d.ts +1 -1
- package/lib/commands/free_shipping_promotion/index.js +5 -3
- package/lib/commands/gift_card/activate.d.ts +1 -1
- package/lib/commands/gift_card/activate.js +6 -5
- package/lib/commands/gift_card/balance_change_cents.d.ts +1 -1
- package/lib/commands/gift_card/balance_change_cents.js +6 -5
- package/lib/commands/gift_card/deactivate.d.ts +1 -1
- package/lib/commands/gift_card/deactivate.js +6 -5
- package/lib/commands/gift_card/index.d.ts +1 -1
- package/lib/commands/gift_card/index.js +5 -3
- package/lib/commands/gift_card/purchase.d.ts +1 -1
- package/lib/commands/gift_card/purchase.js +6 -5
- package/lib/commands/in_stock_subscription/activate.d.ts +1 -1
- package/lib/commands/in_stock_subscription/activate.js +6 -5
- package/lib/commands/in_stock_subscription/deactivate.d.ts +1 -1
- package/lib/commands/in_stock_subscription/deactivate.js +6 -5
- package/lib/commands/in_stock_subscription/index.d.ts +1 -1
- package/lib/commands/in_stock_subscription/index.js +5 -3
- package/lib/commands/klarna_payment/index.d.ts +1 -1
- package/lib/commands/klarna_payment/index.js +5 -3
- package/lib/commands/klarna_payment/update.d.ts +1 -1
- package/lib/commands/klarna_payment/update.js +6 -5
- package/lib/commands/line_item/external_price.d.ts +1 -1
- package/lib/commands/line_item/external_price.js +6 -5
- package/lib/commands/line_item/index.d.ts +1 -1
- package/lib/commands/line_item/index.js +5 -3
- package/lib/commands/line_item/reserve_stock.d.ts +1 -1
- package/lib/commands/line_item/reserve_stock.js +6 -5
- package/lib/commands/market/disable.d.ts +1 -1
- package/lib/commands/market/disable.js +6 -5
- package/lib/commands/market/enable.d.ts +1 -1
- package/lib/commands/market/enable.js +6 -5
- package/lib/commands/market/index.d.ts +1 -1
- package/lib/commands/market/index.js +5 -3
- package/lib/commands/noc.js +2 -2
- package/lib/commands/order/approve.d.ts +1 -1
- package/lib/commands/order/approve.js +6 -5
- package/lib/commands/order/approve_and_capture.d.ts +1 -1
- package/lib/commands/order/approve_and_capture.js +6 -5
- package/lib/commands/order/archive.d.ts +1 -1
- package/lib/commands/order/archive.js +6 -5
- package/lib/commands/order/authorization_amount_cents.d.ts +1 -1
- package/lib/commands/order/authorization_amount_cents.js +6 -5
- package/lib/commands/order/authorize.d.ts +1 -1
- package/lib/commands/order/authorize.js +6 -5
- package/lib/commands/order/billing_address_clone_id.d.ts +2 -2
- package/lib/commands/order/billing_address_clone_id.js +13 -12
- package/lib/commands/order/billing_address_same_as_shipping.d.ts +1 -1
- package/lib/commands/order/billing_address_same_as_shipping.js +6 -5
- package/lib/commands/order/cancel.d.ts +1 -1
- package/lib/commands/order/cancel.js +6 -5
- package/lib/commands/order/capture.d.ts +1 -1
- package/lib/commands/order/capture.js +6 -5
- package/lib/commands/order/commit_invoice.d.ts +1 -1
- package/lib/commands/order/commit_invoice.js +6 -5
- package/lib/commands/order/create_subscriptions.d.ts +1 -1
- package/lib/commands/order/create_subscriptions.js +6 -5
- package/lib/commands/order/customer_payment_source_id.d.ts +2 -2
- package/lib/commands/order/customer_payment_source_id.js +13 -12
- package/lib/commands/order/index.d.ts +1 -1
- package/lib/commands/order/index.js +5 -3
- package/lib/commands/order/nullify_payment_source.d.ts +1 -1
- package/lib/commands/order/nullify_payment_source.js +6 -5
- package/lib/commands/order/place.d.ts +1 -1
- package/lib/commands/order/place.js +6 -5
- package/lib/commands/order/refresh.d.ts +1 -1
- package/lib/commands/order/refresh.js +6 -5
- package/lib/commands/order/refund.d.ts +1 -1
- package/lib/commands/order/refund.js +6 -5
- package/lib/commands/order/refund_invoice.d.ts +1 -1
- package/lib/commands/order/refund_invoice.js +6 -5
- package/lib/commands/order/save_billing_address_to_customer_address_book.d.ts +1 -1
- package/lib/commands/order/save_billing_address_to_customer_address_book.js +6 -5
- package/lib/commands/order/save_payment_source_to_customer_wallet.d.ts +1 -1
- package/lib/commands/order/save_payment_source_to_customer_wallet.js +6 -5
- package/lib/commands/order/save_shipping_address_to_customer_address_book.d.ts +1 -1
- package/lib/commands/order/save_shipping_address_to_customer_address_book.js +6 -5
- package/lib/commands/order/shipping_address_clone_id.d.ts +2 -2
- package/lib/commands/order/shipping_address_clone_id.js +13 -12
- package/lib/commands/order/shipping_address_same_as_billing.d.ts +1 -1
- package/lib/commands/order/shipping_address_same_as_billing.js +6 -5
- package/lib/commands/order/start_editing.d.ts +1 -1
- package/lib/commands/order/start_editing.js +6 -5
- package/lib/commands/order/stop_editing.d.ts +1 -1
- package/lib/commands/order/stop_editing.js +6 -5
- package/lib/commands/order/unarchive.d.ts +1 -1
- package/lib/commands/order/unarchive.js +6 -5
- package/lib/commands/order/update_taxes.d.ts +1 -1
- package/lib/commands/order/update_taxes.js +6 -5
- package/lib/commands/order/validate.d.ts +1 -1
- package/lib/commands/order/validate.js +6 -5
- package/lib/commands/order_subscription/activate.d.ts +1 -1
- package/lib/commands/order_subscription/activate.js +6 -5
- package/lib/commands/order_subscription/cancel.d.ts +1 -1
- package/lib/commands/order_subscription/cancel.js +6 -5
- package/lib/commands/order_subscription/deactivate.d.ts +1 -1
- package/lib/commands/order_subscription/deactivate.js +6 -5
- package/lib/commands/order_subscription/index.d.ts +1 -1
- package/lib/commands/order_subscription/index.js +5 -3
- package/lib/commands/payment_method/disable.d.ts +1 -1
- package/lib/commands/payment_method/disable.js +6 -5
- package/lib/commands/payment_method/enable.d.ts +1 -1
- package/lib/commands/payment_method/enable.js +6 -5
- package/lib/commands/payment_method/index.d.ts +1 -1
- package/lib/commands/payment_method/index.js +5 -3
- package/lib/commands/percentage_discount_promotion/disable.d.ts +1 -1
- package/lib/commands/percentage_discount_promotion/disable.js +6 -5
- package/lib/commands/percentage_discount_promotion/enable.d.ts +1 -1
- package/lib/commands/percentage_discount_promotion/enable.js +6 -5
- package/lib/commands/percentage_discount_promotion/index.d.ts +1 -1
- package/lib/commands/percentage_discount_promotion/index.js +5 -3
- package/lib/commands/return/approve.d.ts +1 -1
- package/lib/commands/return/approve.js +6 -5
- package/lib/commands/return/archive.d.ts +1 -1
- package/lib/commands/return/archive.js +6 -5
- package/lib/commands/return/cancel.d.ts +1 -1
- package/lib/commands/return/cancel.js +6 -5
- package/lib/commands/return/index.d.ts +1 -1
- package/lib/commands/return/index.js +5 -3
- package/lib/commands/return/receive.d.ts +1 -1
- package/lib/commands/return/receive.js +6 -5
- package/lib/commands/return/reject.d.ts +1 -1
- package/lib/commands/return/reject.js +6 -5
- package/lib/commands/return/request.d.ts +1 -1
- package/lib/commands/return/request.js +6 -5
- package/lib/commands/return/restock.d.ts +1 -1
- package/lib/commands/return/restock.js +6 -5
- package/lib/commands/return/ship.d.ts +1 -1
- package/lib/commands/return/ship.js +6 -5
- package/lib/commands/return/unarchive.d.ts +1 -1
- package/lib/commands/return/unarchive.js +6 -5
- package/lib/commands/return_line_item/index.d.ts +1 -1
- package/lib/commands/return_line_item/index.js +5 -3
- package/lib/commands/return_line_item/restock.d.ts +1 -1
- package/lib/commands/return_line_item/restock.js +6 -5
- package/lib/commands/satispay_payment/index.d.ts +1 -1
- package/lib/commands/satispay_payment/index.js +5 -3
- package/lib/commands/satispay_payment/refresh.d.ts +1 -1
- package/lib/commands/satispay_payment/refresh.js +6 -5
- package/lib/commands/shipment/decrement_stock.d.ts +9 -0
- package/lib/commands/shipment/decrement_stock.js +22 -0
- package/lib/commands/shipment/get_rates.d.ts +1 -1
- package/lib/commands/shipment/get_rates.js +6 -5
- package/lib/commands/shipment/index.d.ts +1 -1
- package/lib/commands/shipment/index.js +5 -3
- package/lib/commands/shipment/on_hold.d.ts +1 -1
- package/lib/commands/shipment/on_hold.js +6 -5
- package/lib/commands/shipment/packing.d.ts +1 -1
- package/lib/commands/shipment/packing.js +6 -5
- package/lib/commands/shipment/picking.d.ts +1 -1
- package/lib/commands/shipment/picking.js +6 -5
- package/lib/commands/shipment/purchase.d.ts +1 -1
- package/lib/commands/shipment/purchase.js +6 -5
- package/lib/commands/shipment/ready_to_ship.d.ts +1 -1
- package/lib/commands/shipment/ready_to_ship.js +6 -5
- package/lib/commands/shipment/release_stock.d.ts +9 -0
- package/lib/commands/shipment/release_stock.js +22 -0
- package/lib/commands/shipment/reserve_stock.d.ts +9 -0
- package/lib/commands/shipment/reserve_stock.js +22 -0
- package/lib/commands/shipment/ship.d.ts +1 -1
- package/lib/commands/shipment/ship.js +6 -5
- package/lib/commands/shipment/upcoming.d.ts +9 -0
- package/lib/commands/shipment/upcoming.js +22 -0
- package/lib/commands/shipping_method/disable.d.ts +1 -1
- package/lib/commands/shipping_method/disable.js +6 -5
- package/lib/commands/shipping_method/enable.d.ts +1 -1
- package/lib/commands/shipping_method/enable.js +6 -5
- package/lib/commands/shipping_method/index.d.ts +1 -1
- package/lib/commands/shipping_method/index.js +5 -3
- package/lib/commands/stock_line_item/decrement_stock.d.ts +9 -0
- package/lib/commands/stock_line_item/decrement_stock.js +22 -0
- package/lib/commands/stock_line_item/index.d.ts +9 -0
- package/lib/commands/stock_line_item/index.js +40 -0
- package/lib/commands/stock_line_item/release_stock.d.ts +9 -0
- package/lib/commands/stock_line_item/release_stock.js +22 -0
- package/lib/commands/stock_line_item/reserve_stock.d.ts +9 -0
- package/lib/commands/stock_line_item/reserve_stock.js +22 -0
- package/lib/commands/stock_reservation/index.d.ts +9 -0
- package/lib/commands/stock_reservation/index.js +40 -0
- package/lib/commands/stock_reservation/pending.d.ts +9 -0
- package/lib/commands/stock_reservation/pending.js +22 -0
- package/lib/commands/stock_transfer/cancel.d.ts +1 -1
- package/lib/commands/stock_transfer/cancel.js +6 -5
- package/lib/commands/stock_transfer/complete.d.ts +1 -1
- package/lib/commands/stock_transfer/complete.js +6 -5
- package/lib/commands/stock_transfer/in_transit.d.ts +1 -1
- package/lib/commands/stock_transfer/in_transit.js +6 -5
- package/lib/commands/stock_transfer/index.d.ts +1 -1
- package/lib/commands/stock_transfer/index.js +5 -3
- package/lib/commands/stock_transfer/on_hold.d.ts +9 -0
- package/lib/commands/stock_transfer/on_hold.js +22 -0
- package/lib/commands/stock_transfer/picking.d.ts +1 -1
- package/lib/commands/stock_transfer/picking.js +6 -5
- package/lib/commands/stock_transfer/upcoming.d.ts +1 -1
- package/lib/commands/stock_transfer/upcoming.js +6 -5
- package/lib/commands/stripe_payment/index.d.ts +1 -1
- package/lib/commands/stripe_payment/index.js +5 -3
- package/lib/commands/stripe_payment/refresh.d.ts +1 -1
- package/lib/commands/stripe_payment/refresh.js +6 -5
- package/lib/commands/stripe_payment/update.d.ts +1 -1
- package/lib/commands/stripe_payment/update.js +6 -5
- package/lib/commands/webhook/disable.d.ts +9 -0
- package/lib/commands/webhook/disable.js +22 -0
- package/lib/commands/webhook/enable.d.ts +9 -0
- package/lib/commands/webhook/enable.js +22 -0
- package/lib/commands/webhook/index.d.ts +1 -1
- package/lib/commands/webhook/index.js +5 -3
- package/lib/commands/webhook/reset_circuit.d.ts +1 -1
- package/lib/commands/webhook/reset_circuit.js +6 -5
- package/lib/exec.d.ts +4 -2
- package/lib/exec.js +7 -4
- package/lib/triggers/line_items.js +1 -1
- package/lib/triggers/shipments.d.ts +1 -1
- package/lib/triggers/shipments.js +20 -0
- package/lib/triggers/stock_line_items.d.ts +3 -0
- package/lib/triggers/stock_line_items.js +20 -0
- package/lib/triggers/stock_reservations.d.ts +3 -0
- package/lib/triggers/stock_reservations.js +10 -0
- package/lib/triggers/stock_transfers.d.ts +1 -1
- package/lib/triggers/stock_transfers.js +5 -0
- package/lib/triggers/webhooks.d.ts +1 -1
- package/lib/triggers/webhooks.js +10 -0
- package/oclif.manifest.json +7560 -4372
- package/package.json +37 -31
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
-
const exec_1 = tslib_1.__importDefault(require("../../exec"));
|
|
6
5
|
const orders_1 = require("../../triggers/orders");
|
|
7
6
|
const TRIGGER = 'save_payment_source_to_customer_wallet';
|
|
8
7
|
class OrderSavePaymentSourceToCustomerWallet extends base_1.default {
|
|
8
|
+
static description = orders_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
9
13
|
async run() {
|
|
10
14
|
const { args, flags } = await this.parse(OrderSavePaymentSourceToCustomerWallet);
|
|
11
|
-
const res = await
|
|
15
|
+
const res = await this.executeAction('orders', args.id, TRIGGER, flags);
|
|
12
16
|
if (flags.print)
|
|
13
17
|
this.printOutput(res, flags);
|
|
14
18
|
this.successMessage('order', TRIGGER, res.id);
|
|
15
19
|
return res;
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
|
-
OrderSavePaymentSourceToCustomerWallet.description = orders_1.triggers[TRIGGER].description;
|
|
19
|
-
OrderSavePaymentSourceToCustomerWallet.flags = {};
|
|
20
|
-
OrderSavePaymentSourceToCustomerWallet.args = Object.assign({}, base_1.default.args);
|
|
21
22
|
exports.default = OrderSavePaymentSourceToCustomerWallet;
|
|
@@ -3,7 +3,7 @@ export default class OrderSaveShippingAddressToCustomerAddressBook extends Comma
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {};
|
|
5
5
|
static args: {
|
|
6
|
-
id: import("@oclif/core/lib/interfaces
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<any>;
|
|
9
9
|
}
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
-
const exec_1 = tslib_1.__importDefault(require("../../exec"));
|
|
6
5
|
const orders_1 = require("../../triggers/orders");
|
|
7
6
|
const TRIGGER = 'save_shipping_address_to_customer_address_book';
|
|
8
7
|
class OrderSaveShippingAddressToCustomerAddressBook extends base_1.default {
|
|
8
|
+
static description = orders_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
9
13
|
async run() {
|
|
10
14
|
const { args, flags } = await this.parse(OrderSaveShippingAddressToCustomerAddressBook);
|
|
11
|
-
const res = await
|
|
15
|
+
const res = await this.executeAction('orders', args.id, TRIGGER, flags);
|
|
12
16
|
if (flags.print)
|
|
13
17
|
this.printOutput(res, flags);
|
|
14
18
|
this.successMessage('order', TRIGGER, res.id);
|
|
15
19
|
return res;
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
|
-
OrderSaveShippingAddressToCustomerAddressBook.description = orders_1.triggers[TRIGGER].description;
|
|
19
|
-
OrderSaveShippingAddressToCustomerAddressBook.flags = {};
|
|
20
|
-
OrderSaveShippingAddressToCustomerAddressBook.args = Object.assign({}, base_1.default.args);
|
|
21
22
|
exports.default = OrderSaveShippingAddressToCustomerAddressBook;
|
|
@@ -2,10 +2,10 @@ import Command from '../../base';
|
|
|
2
2
|
export default class OrderShippingAddressCloneId extends Command {
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
|
-
value: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces
|
|
5
|
+
value: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
6
6
|
};
|
|
7
7
|
static args: {
|
|
8
|
-
id: import("@oclif/core/lib/interfaces
|
|
8
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
9
9
|
};
|
|
10
10
|
run(): Promise<any>;
|
|
11
11
|
}
|
|
@@ -2,27 +2,28 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const base_1 = tslib_1.__importStar(require("../../base"));
|
|
5
|
-
const exec_1 = tslib_1.__importDefault(require("../../exec"));
|
|
6
5
|
const orders_1 = require("../../triggers/orders");
|
|
7
6
|
const TRIGGER = 'shipping_address_clone_id';
|
|
8
7
|
class OrderShippingAddressCloneId extends base_1.default {
|
|
8
|
+
static description = orders_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {
|
|
10
|
+
value: base_1.Flags.string({
|
|
11
|
+
char: 'v',
|
|
12
|
+
description: 'the trigger attribute value',
|
|
13
|
+
multiple: false,
|
|
14
|
+
required: true,
|
|
15
|
+
}),
|
|
16
|
+
};
|
|
17
|
+
static args = {
|
|
18
|
+
...base_1.default.args,
|
|
19
|
+
};
|
|
9
20
|
async run() {
|
|
10
21
|
const { args, flags } = await this.parse(OrderShippingAddressCloneId);
|
|
11
|
-
const res = await
|
|
22
|
+
const res = await this.executeAction('orders', args.id, TRIGGER, flags);
|
|
12
23
|
if (flags.print)
|
|
13
24
|
this.printOutput(res, flags);
|
|
14
25
|
this.successMessage('order', TRIGGER, res.id);
|
|
15
26
|
return res;
|
|
16
27
|
}
|
|
17
28
|
}
|
|
18
|
-
OrderShippingAddressCloneId.description = orders_1.triggers[TRIGGER].description;
|
|
19
|
-
OrderShippingAddressCloneId.flags = {
|
|
20
|
-
value: base_1.Flags.string({
|
|
21
|
-
char: 'v',
|
|
22
|
-
description: 'the trigger attribute value',
|
|
23
|
-
multiple: false,
|
|
24
|
-
required: true,
|
|
25
|
-
}),
|
|
26
|
-
};
|
|
27
|
-
OrderShippingAddressCloneId.args = Object.assign({}, base_1.default.args);
|
|
28
29
|
exports.default = OrderShippingAddressCloneId;
|
|
@@ -3,7 +3,7 @@ export default class OrderShippingAddressSameAsBilling extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {};
|
|
5
5
|
static args: {
|
|
6
|
-
id: import("@oclif/core/lib/interfaces
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<any>;
|
|
9
9
|
}
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
-
const exec_1 = tslib_1.__importDefault(require("../../exec"));
|
|
6
5
|
const orders_1 = require("../../triggers/orders");
|
|
7
6
|
const TRIGGER = 'shipping_address_same_as_billing';
|
|
8
7
|
class OrderShippingAddressSameAsBilling extends base_1.default {
|
|
8
|
+
static description = orders_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
9
13
|
async run() {
|
|
10
14
|
const { args, flags } = await this.parse(OrderShippingAddressSameAsBilling);
|
|
11
|
-
const res = await
|
|
15
|
+
const res = await this.executeAction('orders', args.id, TRIGGER, flags);
|
|
12
16
|
if (flags.print)
|
|
13
17
|
this.printOutput(res, flags);
|
|
14
18
|
this.successMessage('order', TRIGGER, res.id);
|
|
15
19
|
return res;
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
|
-
OrderShippingAddressSameAsBilling.description = orders_1.triggers[TRIGGER].description;
|
|
19
|
-
OrderShippingAddressSameAsBilling.flags = {};
|
|
20
|
-
OrderShippingAddressSameAsBilling.args = Object.assign({}, base_1.default.args);
|
|
21
22
|
exports.default = OrderShippingAddressSameAsBilling;
|
|
@@ -3,7 +3,7 @@ export default class OrderStartEditing extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {};
|
|
5
5
|
static args: {
|
|
6
|
-
id: import("@oclif/core/lib/interfaces
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<any>;
|
|
9
9
|
}
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
-
const exec_1 = tslib_1.__importDefault(require("../../exec"));
|
|
6
5
|
const orders_1 = require("../../triggers/orders");
|
|
7
6
|
const TRIGGER = 'start_editing';
|
|
8
7
|
class OrderStartEditing extends base_1.default {
|
|
8
|
+
static description = orders_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
9
13
|
async run() {
|
|
10
14
|
const { args, flags } = await this.parse(OrderStartEditing);
|
|
11
|
-
const res = await
|
|
15
|
+
const res = await this.executeAction('orders', args.id, TRIGGER, flags);
|
|
12
16
|
if (flags.print)
|
|
13
17
|
this.printOutput(res, flags);
|
|
14
18
|
this.successMessage('order', TRIGGER, res.id);
|
|
15
19
|
return res;
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
|
-
OrderStartEditing.description = orders_1.triggers[TRIGGER].description;
|
|
19
|
-
OrderStartEditing.flags = {};
|
|
20
|
-
OrderStartEditing.args = Object.assign({}, base_1.default.args);
|
|
21
22
|
exports.default = OrderStartEditing;
|
|
@@ -3,7 +3,7 @@ export default class OrderStopEditing extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {};
|
|
5
5
|
static args: {
|
|
6
|
-
id: import("@oclif/core/lib/interfaces
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<any>;
|
|
9
9
|
}
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
-
const exec_1 = tslib_1.__importDefault(require("../../exec"));
|
|
6
5
|
const orders_1 = require("../../triggers/orders");
|
|
7
6
|
const TRIGGER = 'stop_editing';
|
|
8
7
|
class OrderStopEditing extends base_1.default {
|
|
8
|
+
static description = orders_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
9
13
|
async run() {
|
|
10
14
|
const { args, flags } = await this.parse(OrderStopEditing);
|
|
11
|
-
const res = await
|
|
15
|
+
const res = await this.executeAction('orders', args.id, TRIGGER, flags);
|
|
12
16
|
if (flags.print)
|
|
13
17
|
this.printOutput(res, flags);
|
|
14
18
|
this.successMessage('order', TRIGGER, res.id);
|
|
15
19
|
return res;
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
|
-
OrderStopEditing.description = orders_1.triggers[TRIGGER].description;
|
|
19
|
-
OrderStopEditing.flags = {};
|
|
20
|
-
OrderStopEditing.args = Object.assign({}, base_1.default.args);
|
|
21
22
|
exports.default = OrderStopEditing;
|
|
@@ -3,7 +3,7 @@ export default class OrderUnarchive extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {};
|
|
5
5
|
static args: {
|
|
6
|
-
id: import("@oclif/core/lib/interfaces
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<any>;
|
|
9
9
|
}
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
-
const exec_1 = tslib_1.__importDefault(require("../../exec"));
|
|
6
5
|
const orders_1 = require("../../triggers/orders");
|
|
7
6
|
const TRIGGER = 'unarchive';
|
|
8
7
|
class OrderUnarchive extends base_1.default {
|
|
8
|
+
static description = orders_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
9
13
|
async run() {
|
|
10
14
|
const { args, flags } = await this.parse(OrderUnarchive);
|
|
11
|
-
const res = await
|
|
15
|
+
const res = await this.executeAction('orders', args.id, TRIGGER, flags);
|
|
12
16
|
if (flags.print)
|
|
13
17
|
this.printOutput(res, flags);
|
|
14
18
|
this.successMessage('order', TRIGGER, res.id);
|
|
15
19
|
return res;
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
|
-
OrderUnarchive.description = orders_1.triggers[TRIGGER].description;
|
|
19
|
-
OrderUnarchive.flags = {};
|
|
20
|
-
OrderUnarchive.args = Object.assign({}, base_1.default.args);
|
|
21
22
|
exports.default = OrderUnarchive;
|
|
@@ -3,7 +3,7 @@ export default class OrderUpdateTaxes extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {};
|
|
5
5
|
static args: {
|
|
6
|
-
id: import("@oclif/core/lib/interfaces
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<any>;
|
|
9
9
|
}
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
-
const exec_1 = tslib_1.__importDefault(require("../../exec"));
|
|
6
5
|
const orders_1 = require("../../triggers/orders");
|
|
7
6
|
const TRIGGER = 'update_taxes';
|
|
8
7
|
class OrderUpdateTaxes extends base_1.default {
|
|
8
|
+
static description = orders_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
9
13
|
async run() {
|
|
10
14
|
const { args, flags } = await this.parse(OrderUpdateTaxes);
|
|
11
|
-
const res = await
|
|
15
|
+
const res = await this.executeAction('orders', args.id, TRIGGER, flags);
|
|
12
16
|
if (flags.print)
|
|
13
17
|
this.printOutput(res, flags);
|
|
14
18
|
this.successMessage('order', TRIGGER, res.id);
|
|
15
19
|
return res;
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
|
-
OrderUpdateTaxes.description = orders_1.triggers[TRIGGER].description;
|
|
19
|
-
OrderUpdateTaxes.flags = {};
|
|
20
|
-
OrderUpdateTaxes.args = Object.assign({}, base_1.default.args);
|
|
21
22
|
exports.default = OrderUpdateTaxes;
|
|
@@ -3,7 +3,7 @@ export default class OrderValidate extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {};
|
|
5
5
|
static args: {
|
|
6
|
-
id: import("@oclif/core/lib/interfaces
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<any>;
|
|
9
9
|
}
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
-
const exec_1 = tslib_1.__importDefault(require("../../exec"));
|
|
6
5
|
const orders_1 = require("../../triggers/orders");
|
|
7
6
|
const TRIGGER = 'validate';
|
|
8
7
|
class OrderValidate extends base_1.default {
|
|
8
|
+
static description = orders_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
9
13
|
async run() {
|
|
10
14
|
const { args, flags } = await this.parse(OrderValidate);
|
|
11
|
-
const res = await
|
|
15
|
+
const res = await this.executeAction('orders', args.id, TRIGGER, flags);
|
|
12
16
|
if (flags.print)
|
|
13
17
|
this.printOutput(res, flags);
|
|
14
18
|
this.successMessage('order', TRIGGER, res.id);
|
|
15
19
|
return res;
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
|
-
OrderValidate.description = orders_1.triggers[TRIGGER].description;
|
|
19
|
-
OrderValidate.flags = {};
|
|
20
|
-
OrderValidate.args = Object.assign({}, base_1.default.args);
|
|
21
22
|
exports.default = OrderValidate;
|
|
@@ -3,7 +3,7 @@ export default class OrderSubscriptionActivate extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {};
|
|
5
5
|
static args: {
|
|
6
|
-
id: import("@oclif/core/lib/interfaces
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<any>;
|
|
9
9
|
}
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
-
const exec_1 = tslib_1.__importDefault(require("../../exec"));
|
|
6
5
|
const order_subscriptions_1 = require("../../triggers/order_subscriptions");
|
|
7
6
|
const TRIGGER = 'activate';
|
|
8
7
|
class OrderSubscriptionActivate extends base_1.default {
|
|
8
|
+
static description = order_subscriptions_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
9
13
|
async run() {
|
|
10
14
|
const { args, flags } = await this.parse(OrderSubscriptionActivate);
|
|
11
|
-
const res = await
|
|
15
|
+
const res = await this.executeAction('order_subscriptions', args.id, TRIGGER, flags);
|
|
12
16
|
if (flags.print)
|
|
13
17
|
this.printOutput(res, flags);
|
|
14
18
|
this.successMessage('order_subscription', TRIGGER, res.id);
|
|
15
19
|
return res;
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
|
-
OrderSubscriptionActivate.description = order_subscriptions_1.triggers[TRIGGER].description;
|
|
19
|
-
OrderSubscriptionActivate.flags = {};
|
|
20
|
-
OrderSubscriptionActivate.args = Object.assign({}, base_1.default.args);
|
|
21
22
|
exports.default = OrderSubscriptionActivate;
|
|
@@ -3,7 +3,7 @@ export default class OrderSubscriptionCancel extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {};
|
|
5
5
|
static args: {
|
|
6
|
-
id: import("@oclif/core/lib/interfaces
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<any>;
|
|
9
9
|
}
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
-
const exec_1 = tslib_1.__importDefault(require("../../exec"));
|
|
6
5
|
const order_subscriptions_1 = require("../../triggers/order_subscriptions");
|
|
7
6
|
const TRIGGER = 'cancel';
|
|
8
7
|
class OrderSubscriptionCancel extends base_1.default {
|
|
8
|
+
static description = order_subscriptions_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
9
13
|
async run() {
|
|
10
14
|
const { args, flags } = await this.parse(OrderSubscriptionCancel);
|
|
11
|
-
const res = await
|
|
15
|
+
const res = await this.executeAction('order_subscriptions', args.id, TRIGGER, flags);
|
|
12
16
|
if (flags.print)
|
|
13
17
|
this.printOutput(res, flags);
|
|
14
18
|
this.successMessage('order_subscription', TRIGGER, res.id);
|
|
15
19
|
return res;
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
|
-
OrderSubscriptionCancel.description = order_subscriptions_1.triggers[TRIGGER].description;
|
|
19
|
-
OrderSubscriptionCancel.flags = {};
|
|
20
|
-
OrderSubscriptionCancel.args = Object.assign({}, base_1.default.args);
|
|
21
22
|
exports.default = OrderSubscriptionCancel;
|
|
@@ -3,7 +3,7 @@ export default class OrderSubscriptionDeactivate extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {};
|
|
5
5
|
static args: {
|
|
6
|
-
id: import("@oclif/core/lib/interfaces
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<any>;
|
|
9
9
|
}
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
-
const exec_1 = tslib_1.__importDefault(require("../../exec"));
|
|
6
5
|
const order_subscriptions_1 = require("../../triggers/order_subscriptions");
|
|
7
6
|
const TRIGGER = 'deactivate';
|
|
8
7
|
class OrderSubscriptionDeactivate extends base_1.default {
|
|
8
|
+
static description = order_subscriptions_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
9
13
|
async run() {
|
|
10
14
|
const { args, flags } = await this.parse(OrderSubscriptionDeactivate);
|
|
11
|
-
const res = await
|
|
15
|
+
const res = await this.executeAction('order_subscriptions', args.id, TRIGGER, flags);
|
|
12
16
|
if (flags.print)
|
|
13
17
|
this.printOutput(res, flags);
|
|
14
18
|
this.successMessage('order_subscription', TRIGGER, res.id);
|
|
15
19
|
return res;
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
|
-
OrderSubscriptionDeactivate.description = order_subscriptions_1.triggers[TRIGGER].description;
|
|
19
|
-
OrderSubscriptionDeactivate.flags = {};
|
|
20
|
-
OrderSubscriptionDeactivate.args = Object.assign({}, base_1.default.args);
|
|
21
22
|
exports.default = OrderSubscriptionDeactivate;
|
|
@@ -3,7 +3,7 @@ export default class OrderSubscriptionIndex extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {};
|
|
5
5
|
static args: {
|
|
6
|
-
id: import("@oclif/core/lib/interfaces
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<any>;
|
|
9
9
|
}
|
|
@@ -20,6 +20,11 @@ const promptAction = async (id) => {
|
|
|
20
20
|
return answers.trigger;
|
|
21
21
|
};
|
|
22
22
|
class OrderSubscriptionIndex extends base_1.default {
|
|
23
|
+
static description = 'execute an action on a resource of type order_subscriptions';
|
|
24
|
+
static flags = {};
|
|
25
|
+
static args = {
|
|
26
|
+
...base_1.default.args,
|
|
27
|
+
};
|
|
23
28
|
async run() {
|
|
24
29
|
const { args, flags } = await this.parse(OrderSubscriptionIndex);
|
|
25
30
|
const id = args.id;
|
|
@@ -32,7 +37,4 @@ class OrderSubscriptionIndex extends base_1.default {
|
|
|
32
37
|
return res;
|
|
33
38
|
}
|
|
34
39
|
}
|
|
35
|
-
OrderSubscriptionIndex.description = 'execute an action on a resource of type order_subscriptions';
|
|
36
|
-
OrderSubscriptionIndex.flags = {};
|
|
37
|
-
OrderSubscriptionIndex.args = Object.assign({}, base_1.default.args);
|
|
38
40
|
exports.default = OrderSubscriptionIndex;
|
|
@@ -3,7 +3,7 @@ export default class PaymentMethodDisable extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {};
|
|
5
5
|
static args: {
|
|
6
|
-
id: import("@oclif/core/lib/interfaces
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<any>;
|
|
9
9
|
}
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
-
const exec_1 = tslib_1.__importDefault(require("../../exec"));
|
|
6
5
|
const payment_methods_1 = require("../../triggers/payment_methods");
|
|
7
6
|
const TRIGGER = 'disable';
|
|
8
7
|
class PaymentMethodDisable extends base_1.default {
|
|
8
|
+
static description = payment_methods_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
9
13
|
async run() {
|
|
10
14
|
const { args, flags } = await this.parse(PaymentMethodDisable);
|
|
11
|
-
const res = await
|
|
15
|
+
const res = await this.executeAction('payment_methods', args.id, TRIGGER, flags);
|
|
12
16
|
if (flags.print)
|
|
13
17
|
this.printOutput(res, flags);
|
|
14
18
|
this.successMessage('payment_method', TRIGGER, res.id);
|
|
15
19
|
return res;
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
|
-
PaymentMethodDisable.description = payment_methods_1.triggers[TRIGGER].description;
|
|
19
|
-
PaymentMethodDisable.flags = {};
|
|
20
|
-
PaymentMethodDisable.args = Object.assign({}, base_1.default.args);
|
|
21
22
|
exports.default = PaymentMethodDisable;
|
|
@@ -3,7 +3,7 @@ export default class PaymentMethodEnable extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {};
|
|
5
5
|
static args: {
|
|
6
|
-
id: import("@oclif/core/lib/interfaces
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<any>;
|
|
9
9
|
}
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
-
const exec_1 = tslib_1.__importDefault(require("../../exec"));
|
|
6
5
|
const payment_methods_1 = require("../../triggers/payment_methods");
|
|
7
6
|
const TRIGGER = 'enable';
|
|
8
7
|
class PaymentMethodEnable extends base_1.default {
|
|
8
|
+
static description = payment_methods_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
9
13
|
async run() {
|
|
10
14
|
const { args, flags } = await this.parse(PaymentMethodEnable);
|
|
11
|
-
const res = await
|
|
15
|
+
const res = await this.executeAction('payment_methods', args.id, TRIGGER, flags);
|
|
12
16
|
if (flags.print)
|
|
13
17
|
this.printOutput(res, flags);
|
|
14
18
|
this.successMessage('payment_method', TRIGGER, res.id);
|
|
15
19
|
return res;
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
|
-
PaymentMethodEnable.description = payment_methods_1.triggers[TRIGGER].description;
|
|
19
|
-
PaymentMethodEnable.flags = {};
|
|
20
|
-
PaymentMethodEnable.args = Object.assign({}, base_1.default.args);
|
|
21
22
|
exports.default = PaymentMethodEnable;
|
|
@@ -3,7 +3,7 @@ export default class PaymentMethodIndex extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {};
|
|
5
5
|
static args: {
|
|
6
|
-
id: import("@oclif/core/lib/interfaces
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<any>;
|
|
9
9
|
}
|
|
@@ -20,6 +20,11 @@ const promptAction = async (id) => {
|
|
|
20
20
|
return answers.trigger;
|
|
21
21
|
};
|
|
22
22
|
class PaymentMethodIndex extends base_1.default {
|
|
23
|
+
static description = 'execute an action on a resource of type payment_methods';
|
|
24
|
+
static flags = {};
|
|
25
|
+
static args = {
|
|
26
|
+
...base_1.default.args,
|
|
27
|
+
};
|
|
23
28
|
async run() {
|
|
24
29
|
const { args, flags } = await this.parse(PaymentMethodIndex);
|
|
25
30
|
const id = args.id;
|
|
@@ -32,7 +37,4 @@ class PaymentMethodIndex extends base_1.default {
|
|
|
32
37
|
return res;
|
|
33
38
|
}
|
|
34
39
|
}
|
|
35
|
-
PaymentMethodIndex.description = 'execute an action on a resource of type payment_methods';
|
|
36
|
-
PaymentMethodIndex.flags = {};
|
|
37
|
-
PaymentMethodIndex.args = Object.assign({}, base_1.default.args);
|
|
38
40
|
exports.default = PaymentMethodIndex;
|
|
@@ -3,7 +3,7 @@ export default class PercentageDiscountPromotionDisable extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {};
|
|
5
5
|
static args: {
|
|
6
|
-
id: import("@oclif/core/lib/interfaces
|
|
6
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
run(): Promise<any>;
|
|
9
9
|
}
|
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const base_1 = tslib_1.__importDefault(require("../../base"));
|
|
5
|
-
const exec_1 = tslib_1.__importDefault(require("../../exec"));
|
|
6
5
|
const percentage_discount_promotions_1 = require("../../triggers/percentage_discount_promotions");
|
|
7
6
|
const TRIGGER = 'disable';
|
|
8
7
|
class PercentageDiscountPromotionDisable extends base_1.default {
|
|
8
|
+
static description = percentage_discount_promotions_1.triggers[TRIGGER].description;
|
|
9
|
+
static flags = {};
|
|
10
|
+
static args = {
|
|
11
|
+
...base_1.default.args,
|
|
12
|
+
};
|
|
9
13
|
async run() {
|
|
10
14
|
const { args, flags } = await this.parse(PercentageDiscountPromotionDisable);
|
|
11
|
-
const res = await
|
|
15
|
+
const res = await this.executeAction('percentage_discount_promotions', args.id, TRIGGER, flags);
|
|
12
16
|
if (flags.print)
|
|
13
17
|
this.printOutput(res, flags);
|
|
14
18
|
this.successMessage('percentage_discount_promotion', TRIGGER, res.id);
|
|
15
19
|
return res;
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
|
-
PercentageDiscountPromotionDisable.description = percentage_discount_promotions_1.triggers[TRIGGER].description;
|
|
19
|
-
PercentageDiscountPromotionDisable.flags = {};
|
|
20
|
-
PercentageDiscountPromotionDisable.args = Object.assign({}, base_1.default.args);
|
|
21
22
|
exports.default = PercentageDiscountPromotionDisable;
|