2020-08-25 01:50:39 -07:00
import {
INodeProperties ,
} from 'n8n-workflow' ;
2021-12-03 00:44:16 -08:00
export const couponOperations : INodeProperties [ ] = [
2020-08-25 01:50:39 -07:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
displayOptions : {
show : {
resource : [
'coupon' ,
] ,
} ,
} ,
options : [
{
name : 'Create' ,
value : 'create' ,
description : 'Create a coupon.' ,
} ,
{
name : 'Get All' ,
value : 'getAll' ,
description : 'Get all coupons.' ,
} ,
{
name : 'Update' ,
value : 'update' ,
description : 'Update a coupon.' ,
} ,
] ,
default : 'create' ,
description : 'The operation to perform.' ,
} ,
2021-12-03 00:44:16 -08:00
] ;
2020-08-25 01:50:39 -07:00
2021-12-03 00:44:16 -08:00
export const couponFields : INodeProperties [ ] = [
2020-08-25 01:51:16 -07:00
/* -------------------------------------------------------------------------- */
/* coupon:create */
/* -------------------------------------------------------------------------- */
2020-08-25 01:50:39 -07:00
{
displayName : 'Coupon Type' ,
name : 'couponType' ,
type : 'options' ,
displayOptions : {
show : {
resource : [
'coupon' ,
] ,
operation : [
2020-10-22 06:46:03 -07:00
` create ` ,
2020-08-25 01:50:39 -07:00
] ,
jsonParameters : [
2020-10-22 06:46:03 -07:00
false ,
] ,
2020-08-25 01:50:39 -07:00
} ,
} ,
default : 'checkout' ,
description : 'Either product (valid for specified products or subscription plans) or checkout (valid for any checkout).' ,
options : [
{
name : 'Checkout' ,
2020-10-22 06:46:03 -07:00
value : 'checkout' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'Product' ,
2020-10-22 06:46:03 -07:00
value : 'product' ,
2020-08-25 01:50:39 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-08-25 01:50:39 -07:00
} ,
{
displayName : 'Product IDs' ,
name : 'productIds' ,
type : 'multiOptions' ,
typeOptions : {
loadOptionsMethod : 'getProducts' ,
} ,
displayOptions : {
show : {
resource : [
'coupon' ,
] ,
operation : [
2020-10-22 06:46:03 -07:00
` create ` ,
2020-08-25 01:50:39 -07:00
] ,
couponType : [
'product' ,
] ,
jsonParameters : [
2020-10-22 06:46:03 -07:00
false ,
] ,
2020-08-25 01:50:39 -07:00
} ,
} ,
2022-04-22 09:29:51 -07:00
default : [ ] ,
2020-08-25 01:50:39 -07:00
description : 'Comma-separated list of product IDs. Required if coupon_type is product.' ,
required : true ,
} ,
{
displayName : 'Discount Type' ,
name : 'discountType' ,
type : 'options' ,
displayOptions : {
show : {
resource : [
'coupon' ,
] ,
operation : [
2020-10-22 06:46:03 -07:00
` create ` ,
2020-08-25 01:50:39 -07:00
] ,
jsonParameters : [
2020-10-22 06:46:03 -07:00
false ,
] ,
2020-08-25 01:50:39 -07:00
} ,
} ,
default : 'flat' ,
description : 'Either flat or percentage.' ,
options : [
{
name : 'Flat' ,
2020-10-22 06:46:03 -07:00
value : 'flat' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'Percentage' ,
2020-10-22 06:46:03 -07:00
value : 'percentage' ,
2020-08-25 01:50:39 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-08-25 01:50:39 -07:00
} ,
{
displayName : 'Discount Amount Currency' ,
name : 'discountAmount' ,
type : 'number' ,
2020-09-17 07:22:24 -07:00
default : 1 ,
2020-08-25 01:50:39 -07:00
description : 'Discount amount in currency.' ,
typeOptions : {
2020-10-22 06:46:03 -07:00
minValue : 1 ,
2020-08-25 01:50:39 -07:00
} ,
displayOptions : {
show : {
resource : [
'coupon' ,
] ,
operation : [
2020-10-22 06:46:03 -07:00
` create ` ,
2020-08-25 01:50:39 -07:00
] ,
discountType : [
'flat' ,
] ,
jsonParameters : [
2020-10-22 06:46:03 -07:00
false ,
] ,
2020-08-25 01:50:39 -07:00
} ,
} ,
} ,
{
displayName : 'Discount Amount %' ,
name : 'discountAmount' ,
type : 'number' ,
2020-09-17 07:22:24 -07:00
default : 1 ,
2020-08-25 01:50:39 -07:00
description : 'Discount amount in percentage.' ,
typeOptions : {
minValue : 1 ,
2020-10-22 06:46:03 -07:00
maxValue : 100 ,
2020-08-25 01:50:39 -07:00
} ,
displayOptions : {
show : {
resource : [
'coupon' ,
] ,
operation : [
2020-10-22 06:46:03 -07:00
` create ` ,
2020-08-25 01:50:39 -07:00
] ,
discountType : [
'percentage' ,
] ,
jsonParameters : [
2020-10-22 06:46:03 -07:00
false ,
] ,
2020-08-25 01:50:39 -07:00
} ,
} ,
} ,
{
displayName : 'Currency' ,
name : 'currency' ,
type : 'options' ,
default : 'EUR' ,
description : 'The currency must match the balance currency specified in your account.' ,
options : [
{
name : 'ARS' ,
2020-10-22 06:46:03 -07:00
value : 'ARS' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'AUD' ,
2020-10-22 06:46:03 -07:00
value : 'AUD' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'BRL' ,
2020-10-22 06:46:03 -07:00
value : 'BRL' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'CAD' ,
2020-10-22 06:46:03 -07:00
value : 'CAD' ,
2020-08-25 01:50:39 -07:00
} ,
2020-08-25 01:51:16 -07:00
{
name : 'CHF' ,
2020-10-22 06:46:03 -07:00
value : 'CHF' ,
2020-08-25 01:51:16 -07:00
} ,
2020-08-25 01:50:39 -07:00
{
name : 'CNY' ,
2020-10-22 06:46:03 -07:00
value : 'CNY' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'CZK' ,
2020-10-22 06:46:03 -07:00
value : 'CZK' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'DKK' ,
2020-10-22 06:46:03 -07:00
value : 'DKK' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'EUR' ,
2020-10-22 06:46:03 -07:00
value : 'EUR' ,
2020-08-25 01:50:39 -07:00
} ,
2020-08-25 01:51:16 -07:00
{
name : 'GBP' ,
2020-10-22 06:46:03 -07:00
value : 'GBP' ,
2020-08-25 01:51:16 -07:00
} ,
2020-08-25 01:50:39 -07:00
{
name : 'HKD' ,
2020-10-22 06:46:03 -07:00
value : 'HKD' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'HUF' ,
2020-10-22 06:46:03 -07:00
value : 'HUF' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'INR' ,
2020-10-22 06:46:03 -07:00
value : 'INR' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'JPY' ,
2020-10-22 06:46:03 -07:00
value : 'JPY' ,
2020-08-25 01:50:39 -07:00
} ,
2020-08-25 01:51:16 -07:00
{
name : 'KRW' ,
2020-10-22 06:46:03 -07:00
value : 'KRW' ,
2020-08-25 01:51:16 -07:00
} ,
2020-08-25 01:50:39 -07:00
{
name : 'MXN' ,
2020-10-22 06:46:03 -07:00
value : 'MXN' ,
2020-08-25 01:50:39 -07:00
} ,
{
2020-08-25 01:51:16 -07:00
name : 'NOK' ,
2020-10-22 06:46:03 -07:00
value : 'NOK' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'NZD' ,
2020-10-22 06:46:03 -07:00
value : 'NZD' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'PLN' ,
2020-10-22 06:46:03 -07:00
value : 'PLN' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'RUB' ,
2020-10-22 06:46:03 -07:00
value : 'RUB' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'SEK' ,
2020-10-22 06:46:03 -07:00
value : 'SEK' ,
2020-08-25 01:50:39 -07:00
} ,
{
2020-08-25 01:51:16 -07:00
name : 'SGD' ,
2020-10-22 06:46:03 -07:00
value : 'SGD' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'THB' ,
2020-10-22 06:46:03 -07:00
value : 'THB' ,
2020-08-25 01:50:39 -07:00
} ,
{
2020-08-25 01:51:16 -07:00
name : 'TWD' ,
2020-10-22 06:46:03 -07:00
value : 'TWD' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'USD' ,
2020-10-22 06:46:03 -07:00
value : 'USD' ,
2020-08-25 01:50:39 -07:00
} ,
2020-08-25 01:51:16 -07:00
{
name : 'ZAR' ,
2020-10-22 06:46:03 -07:00
value : 'ZAR' ,
2020-08-25 01:51:16 -07:00
} ,
2020-08-25 01:50:39 -07:00
] ,
displayOptions : {
show : {
resource : [
'coupon' ,
] ,
operation : [
2020-10-22 06:46:03 -07:00
` create ` ,
2020-08-25 01:50:39 -07:00
] ,
discountType : [
'flat' ,
] ,
jsonParameters : [
2020-10-22 06:46:03 -07:00
false ,
] ,
2020-08-25 01:50:39 -07:00
} ,
} ,
} ,
{
displayName : 'JSON Parameters' ,
name : 'jsonParameters' ,
type : 'boolean' ,
default : false ,
displayOptions : {
show : {
resource : [
'coupon' ,
] ,
operation : [
'create' ,
] ,
} ,
} ,
} ,
{
displayName : ' Additional Fields' ,
name : 'additionalFieldsJson' ,
type : 'json' ,
typeOptions : {
alwaysOpenEditWindow : true ,
} ,
default : '' ,
displayOptions : {
show : {
resource : [
'coupon' ,
] ,
operation : [
'create' ,
] ,
jsonParameters : [
true ,
] ,
} ,
} ,
description : ` Attributes in JSON form. ` ,
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
displayOptions : {
show : {
resource : [
'coupon' ,
] ,
operation : [
'create' ,
] ,
jsonParameters : [
2020-10-22 06:46:03 -07:00
false ,
] ,
2020-08-25 01:50:39 -07:00
} ,
} ,
default : { } ,
options : [
{
displayName : 'Allowed Uses' ,
name : 'allowedUses' ,
type : 'number' ,
default : 1 ,
description : 'Number of times a coupon can be used in a checkout. This will be set to 999,999 by default, if not specified.' ,
} ,
{
displayName : 'Coupon Code' ,
name : 'couponCode' ,
type : 'string' ,
default : '' ,
description : 'Will be randomly generated if not specified.' ,
} ,
{
displayName : 'Coupon Prefix' ,
name : 'couponPrefix' ,
type : 'string' ,
default : '' ,
description : 'Prefix for generated codes. Not valid if coupon_code is specified.' ,
} ,
2020-08-25 01:51:16 -07:00
{
displayName : 'Description' ,
name : 'description' ,
type : 'string' ,
default : '' ,
description : 'Description of the coupon. This will be displayed in the Seller Dashboard.' ,
} ,
2020-08-25 01:50:39 -07:00
{
displayName : 'Expires' ,
name : 'expires' ,
type : 'dateTime' ,
default : '' ,
description : 'The coupon will expire on the date at 00:00:00 UTC.' ,
} ,
{
displayName : 'Group' ,
name : 'group' ,
type : 'string' ,
typeOptions : {
minValue : 1 ,
2020-10-22 06:46:03 -07:00
maxValue : 50 ,
2020-08-25 01:50:39 -07:00
} ,
default : '' ,
description : 'The name of the coupon group this coupon should be assigned to.' ,
} ,
{
displayName : 'Number of Coupons' ,
name : 'numberOfCoupons' ,
type : 'number' ,
default : 1 ,
description : 'Number of coupons to generate. Not valid if coupon_code is specified.' ,
} ,
{
2020-08-25 01:51:16 -07:00
displayName : 'Recurring' ,
name : 'recurring' ,
type : 'boolean' ,
default : false ,
description : 'If the coupon is used on subscription products, this indicates whether the discount should apply to recurring payments after the initial purchase.' ,
2020-08-25 01:50:39 -07:00
} ,
] ,
} ,
2020-08-25 01:51:16 -07:00
/* -------------------------------------------------------------------------- */
/* coupon:getAll */
/* -------------------------------------------------------------------------- */
2020-08-25 01:50:39 -07:00
{
displayName : 'Product ID' ,
name : 'productId' ,
type : 'string' ,
displayOptions : {
show : {
resource : [
'coupon' ,
] ,
operation : [
2020-10-22 06:46:03 -07:00
` getAll ` ,
] ,
2020-08-25 01:50:39 -07:00
} ,
} ,
default : '' ,
required : true ,
description : 'The specific product/subscription ID.' ,
} ,
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
displayOptions : {
show : {
operation : [
'getAll' ,
] ,
resource : [
'coupon' ,
] ,
} ,
} ,
default : false ,
description : 'If all results should be returned or only up to a given limit.' ,
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
displayOptions : {
show : {
operation : [
'getAll' ,
] ,
resource : [
'coupon' ,
] ,
returnAll : [
false ,
] ,
} ,
} ,
typeOptions : {
minValue : 1 ,
maxValue : 500 ,
} ,
default : 100 ,
description : 'How many results to return.' ,
} ,
2020-08-25 01:51:16 -07:00
/* -------------------------------------------------------------------------- */
/* coupon:update */
/* -------------------------------------------------------------------------- */
2020-08-25 01:50:39 -07:00
{
displayName : 'Update by' ,
name : 'updateBy' ,
type : 'options' ,
displayOptions : {
show : {
resource : [
'coupon' ,
] ,
operation : [
2020-10-22 06:46:03 -07:00
` update ` ,
2020-08-25 01:50:39 -07:00
] ,
jsonParameters : [
false ,
] ,
} ,
} ,
default : 'couponCode' ,
description : 'Either flat or percentage.' ,
options : [
{
name : 'Coupon Code' ,
2020-10-22 06:46:03 -07:00
value : 'couponCode' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'Group' ,
2020-10-22 06:46:03 -07:00
value : 'group' ,
2020-08-25 01:50:39 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-08-25 01:50:39 -07:00
} ,
{
displayName : 'Coupon Code' ,
name : 'couponCode' ,
type : 'string' ,
displayOptions : {
show : {
resource : [
'coupon' ,
] ,
operation : [
2020-10-22 06:46:03 -07:00
'update' ,
2020-08-25 01:50:39 -07:00
] ,
updateBy : [
2020-10-22 06:46:03 -07:00
'couponCode' ,
2020-08-25 01:50:39 -07:00
] ,
jsonParameters : [
false ,
] ,
} ,
} ,
default : '' ,
description : 'Identify the coupon to update' ,
} ,
{
displayName : 'Group' ,
name : 'group' ,
type : 'string' ,
displayOptions : {
show : {
resource : [
'coupon' ,
] ,
operation : [
2020-10-22 06:46:03 -07:00
'update' ,
2020-08-25 01:50:39 -07:00
] ,
updateBy : [
2020-10-22 06:46:03 -07:00
'group' ,
2020-08-25 01:50:39 -07:00
] ,
jsonParameters : [
false ,
] ,
} ,
} ,
default : '' ,
description : 'The name of the group of coupons you want to update.' ,
} ,
{
displayName : 'JSON Parameters' ,
name : 'jsonParameters' ,
type : 'boolean' ,
default : false ,
displayOptions : {
show : {
resource : [
'coupon' ,
] ,
operation : [
'update' ,
] ,
} ,
} ,
} ,
{
2020-08-25 01:51:16 -07:00
displayName : 'Additional Fields' ,
2020-08-25 01:50:39 -07:00
name : 'additionalFieldsJson' ,
type : 'json' ,
typeOptions : {
alwaysOpenEditWindow : true ,
} ,
default : '' ,
displayOptions : {
show : {
resource : [
'coupon' ,
] ,
operation : [
'update' ,
] ,
jsonParameters : [
true ,
] ,
} ,
} ,
description : ` Attributes in JSON form. ` ,
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
displayOptions : {
show : {
resource : [
'coupon' ,
] ,
operation : [
'update' ,
] ,
jsonParameters : [
2020-10-22 06:46:03 -07:00
false ,
] ,
2020-08-25 01:50:39 -07:00
} ,
} ,
default : { } ,
options : [
{
displayName : 'Allowed Uses' ,
name : 'allowedUses' ,
type : 'number' ,
default : 1 ,
description : 'Number of times a coupon can be used in a checkout. This will be set to 999,999 by default, if not specified.' ,
} ,
{
displayName : 'Discount' ,
name : 'discount' ,
type : 'fixedCollection' ,
2022-04-22 09:29:51 -07:00
default : { } ,
2020-08-25 01:50:39 -07:00
options : [
{
displayName : 'Discount Properties' ,
name : 'discountProperties' ,
values : [
{
displayName : 'Currency' ,
name : 'currency' ,
type : 'options' ,
default : 'EUR' ,
description : 'The currency must match the balance currency specified in your account.' ,
displayOptions : {
show : {
discountType : [
'flat' ,
] ,
} ,
} ,
options : [
{
name : 'ARS' ,
2020-10-22 06:46:03 -07:00
value : 'ARS' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'AUD' ,
2020-10-22 06:46:03 -07:00
value : 'AUD' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'BRL' ,
2020-10-22 06:46:03 -07:00
value : 'BRL' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'CAD' ,
2020-10-22 06:46:03 -07:00
value : 'CAD' ,
2020-08-25 01:50:39 -07:00
} ,
2020-08-25 01:51:16 -07:00
{
name : 'CHF' ,
2020-10-22 06:46:03 -07:00
value : 'CHF' ,
2020-08-25 01:51:16 -07:00
} ,
2020-08-25 01:50:39 -07:00
{
name : 'CNY' ,
2020-10-22 06:46:03 -07:00
value : 'CNY' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'CZK' ,
2020-10-22 06:46:03 -07:00
value : 'CZK' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'DKK' ,
2020-10-22 06:46:03 -07:00
value : 'DKK' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'EUR' ,
2020-10-22 06:46:03 -07:00
value : 'EUR' ,
2020-08-25 01:50:39 -07:00
} ,
2020-08-25 01:51:16 -07:00
{
name : 'GBP' ,
2020-10-22 06:46:03 -07:00
value : 'GBP' ,
2020-08-25 01:51:16 -07:00
} ,
2020-08-25 01:50:39 -07:00
{
name : 'HKD' ,
2020-10-22 06:46:03 -07:00
value : 'HKD' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'HUF' ,
2020-10-22 06:46:03 -07:00
value : 'HUF' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'INR' ,
2020-10-22 06:46:03 -07:00
value : 'INR' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'JPY' ,
2020-10-22 06:46:03 -07:00
value : 'JPY' ,
2020-08-25 01:50:39 -07:00
} ,
2020-08-25 01:51:16 -07:00
{
name : 'KRW' ,
2020-10-22 06:46:03 -07:00
value : 'KRW' ,
2020-08-25 01:51:16 -07:00
} ,
2020-08-25 01:50:39 -07:00
{
name : 'MXN' ,
2020-10-22 06:46:03 -07:00
value : 'MXN' ,
2020-08-25 01:50:39 -07:00
} ,
{
2020-08-25 01:51:16 -07:00
name : 'NOK' ,
2020-10-22 06:46:03 -07:00
value : 'NOK' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'NZD' ,
2020-10-22 06:46:03 -07:00
value : 'NZD' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'PLN' ,
2020-10-22 06:46:03 -07:00
value : 'PLN' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'RUB' ,
2020-10-22 06:46:03 -07:00
value : 'RUB' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'SEK' ,
2020-10-22 06:46:03 -07:00
value : 'SEK' ,
2020-08-25 01:50:39 -07:00
} ,
{
2020-08-25 01:51:16 -07:00
name : 'SGD' ,
2020-10-22 06:46:03 -07:00
value : 'SGD' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'THB' ,
2020-10-22 06:46:03 -07:00
value : 'THB' ,
2020-08-25 01:50:39 -07:00
} ,
{
2020-08-25 01:51:16 -07:00
name : 'TWD' ,
2020-10-22 06:46:03 -07:00
value : 'TWD' ,
2020-08-25 01:50:39 -07:00
} ,
{
name : 'USD' ,
2020-10-22 06:46:03 -07:00
value : 'USD' ,
2020-08-25 01:50:39 -07:00
} ,
{
2020-08-25 01:51:16 -07:00
name : 'ZAR' ,
2020-10-22 06:46:03 -07:00
value : 'ZAR' ,
2020-08-25 01:50:39 -07:00
} ,
2020-08-25 01:51:16 -07:00
] ,
2020-08-25 01:50:39 -07:00
} ,
{
displayName : 'Discount Amount Currency' ,
name : 'discountAmount' ,
type : 'number' ,
default : '' ,
description : 'Discount amount.' ,
displayOptions : {
show : {
discountType : [
'flat' ,
] ,
} ,
} ,
typeOptions : {
2020-10-22 06:46:03 -07:00
minValue : 0 ,
2020-08-25 01:50:39 -07:00
} ,
} ,
{
displayName : 'Discount Amount Percentage' ,
name : 'discountAmount' ,
type : 'number' ,
default : '' ,
description : 'Discount amount.' ,
displayOptions : {
show : {
discountType : [
'percentage' ,
] ,
} ,
} ,
typeOptions : {
minValue : 0 ,
2020-10-22 06:46:03 -07:00
maxValue : 100 ,
2020-08-25 01:50:39 -07:00
} ,
} ,
2020-08-25 01:51:16 -07:00
{
displayName : 'Discount Type' ,
name : 'discountType' ,
type : 'options' ,
default : 'flat' ,
description : 'Either flat or percentage.' ,
options : [
{
name : 'Flat' ,
2020-10-22 06:46:03 -07:00
value : 'flat' ,
2020-08-25 01:51:16 -07:00
} ,
{
name : 'Percentage' ,
2020-10-22 06:46:03 -07:00
value : 'percentage' ,
2020-08-25 01:51:16 -07:00
} ,
2020-10-22 06:46:03 -07:00
] ,
2020-08-25 01:51:16 -07:00
} ,
2020-08-25 01:50:39 -07:00
] ,
} ,
] ,
} ,
{
displayName : 'Expires' ,
name : 'expires' ,
type : 'dateTime' ,
default : '' ,
description : 'The coupon will expire on the date at 00:00:00 UTC.' ,
} ,
{
displayName : 'New Coupon Code' ,
name : 'newCouponCode' ,
type : 'string' ,
default : '' ,
description : 'New code to rename the coupon to.' ,
} ,
{
displayName : 'New Group Name' ,
name : 'newGroup' ,
type : 'string' ,
typeOptions : {
minValue : 1 ,
2020-10-22 06:46:03 -07:00
maxValue : 50 ,
2020-08-25 01:50:39 -07:00
} ,
default : '' ,
description : 'New group name to move coupon to.' ,
} ,
{
displayName : 'Product IDs' ,
name : 'productIds' ,
type : 'string' ,
default : '' ,
description : 'Comma-separated list of products e.g. 499531,1234,123546. If blank then remove associated products.' ,
} ,
{
displayName : 'Recurring' ,
name : 'recurring' ,
type : 'boolean' ,
default : false ,
description : 'If the coupon is used on subscription products, this indicates whether the discount should apply to recurring payments after the initial purchase.' ,
} ,
] ,
} ,
2021-12-03 00:44:16 -08:00
] ;