/** * Paddle Node - Version 1 * Discriminator: resource=coupon, operation=update */ interface Credentials { paddleApi: CredentialReference; } /** Update a coupon */ export type PaddleV1CouponUpdateParams = { resource: 'coupon'; operation: 'update'; /** * Either flat or percentage * @displayOptions.show { jsonParameters: [false] } * @default couponCode */ updateBy?: 'couponCode' | 'group' | Expression; /** * Identify the coupon to update * @displayOptions.show { updateBy: ["couponCode"], jsonParameters: [false] } */ couponCode?: string | Expression | PlaceholderValue; /** * The name of the group of coupons you want to update * @displayOptions.show { updateBy: ["group"], jsonParameters: [false] } */ group?: string | Expression | PlaceholderValue; /** * JSON Parameters * @default false */ jsonParameters?: boolean | Expression; /** * Attributes in JSON form * @displayOptions.show { jsonParameters: [true] } */ additionalFieldsJson?: IDataObject | string | Expression; /** * Additional Fields * @displayOptions.show { jsonParameters: [false] } * @default {} */ additionalFields?: { /** Number of times a coupon can be used in a checkout. This will be set to 999,999 by default, if not specified. * @default 1 */ allowedUses?: number | Expression; /** Discount * @default {} */ discount?: { /** Discount Properties */ discountProperties?: { /** The currency must match the balance currency specified in your account * @displayOptions.show { discountType: ["flat"] } * @default EUR */ currency?: 'ARS' | 'AUD' | 'BRL' | 'CAD' | 'CHF' | 'CNY' | 'CZK' | 'DKK' | 'EUR' | 'GBP' | 'HKD' | 'HUF' | 'INR' | 'JPY' | 'KRW' | 'MXN' | 'NOK' | 'NZD' | 'PLN' | 'RUB' | 'SEK' | 'SGD' | 'THB' | 'TWD' | 'USD' | 'ZAR' | Expression; /** Discount amount * @displayOptions.show { discountType: ["flat"] } */ discountAmount?: number | Expression; /** Discount amount * @displayOptions.show { discountType: ["percentage"] } */ discountAmount?: number | Expression; /** Either flat or percentage * @default flat */ discountType?: 'flat' | 'percentage' | Expression; }; }; /** The coupon will expire on the date at 00:00:00 UTC */ expires?: string | Expression; /** New code to rename the coupon to */ newCouponCode?: string | Expression | PlaceholderValue; /** New group name to move coupon to */ newGroup?: string | Expression | PlaceholderValue; /** Comma-separated list of products e.g. 499531,1234,123546. If blank then remove associated products. */ productIds?: string | Expression | PlaceholderValue; /** If the coupon is used on subscription products, this indicates whether the discount should apply to recurring payments after the initial purchase * @default false */ recurring?: boolean | Expression; }; }; export type PaddleV1CouponUpdateNode = { type: 'n8n-nodes-base.paddle'; version: 1; credentials?: Credentials; config: NodeConfig; };