Minor improvements to Paddle-Node

This commit is contained in:
Jan Oberhauser 2020-08-25 10:51:16 +02:00
parent 72102faed5
commit 5def03855b
7 changed files with 106 additions and 114 deletions

View file

@ -199,14 +199,14 @@ export const couponFields = [
name: 'BRL',
value: 'BRL'
},
{
name: 'GBP',
value: 'GBP'
},
{
name: 'CAD',
value: 'CAD'
},
{
name: 'CHF',
value: 'CHF'
},
{
name: 'CNY',
value: 'CNY'
@ -223,6 +223,10 @@ export const couponFields = [
name: 'EUR',
value: 'EUR'
},
{
name: 'GBP',
value: 'GBP'
},
{
name: 'HKD',
value: 'HKD'
@ -239,22 +243,22 @@ export const couponFields = [
name: 'JPY',
value: 'JPY'
},
{
name: 'KRW',
value: 'KRW'
},
{
name: 'MXN',
value: 'MXN'
},
{
name: 'TWD',
value: 'TWD'
name: 'NOK',
value: 'NOK'
},
{
name: 'NZD',
value: 'NZD'
},
{
name: 'NOK',
value: 'NOK'
},
{
name: 'PLN',
value: 'PLN'
@ -263,38 +267,30 @@ export const couponFields = [
name: 'RUB',
value: 'RUB'
},
{
name: 'SGD',
value: 'SGD'
},
{
name: 'ZAR',
value: 'ZAR'
},
{
name: 'KRW',
value: 'KRW'
},
{
name: 'SEK',
value: 'SEK'
},
{
name: 'CHF',
value: 'CHF'
name: 'SGD',
value: 'SGD'
},
{
name: 'THB',
value: 'THB'
},
{
name: 'CHF',
value: 'CHF'
name: 'TWD',
value: 'TWD'
},
{
name: 'USD',
value: 'USD'
},
{
name: 'ZAR',
value: 'ZAR'
},
],
displayOptions: {
show: {
@ -394,6 +390,13 @@ export const couponFields = [
default: '',
description: 'Prefix for generated codes. Not valid if coupon_code is specified.',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
default: '',
description: 'Description of the coupon. This will be displayed in the Seller Dashboard.',
},
{
displayName: 'Expires',
name: 'expires',
@ -412,13 +415,6 @@ export const couponFields = [
default: '',
description: 'The name of the coupon group this coupon should be assigned to.',
},
{
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.',
},
{
displayName: 'Number of Coupons',
name: 'numberOfCoupons',
@ -427,11 +423,11 @@ export const couponFields = [
description: 'Number of coupons to generate. Not valid if coupon_code is specified.',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
default: '',
description: 'Description of the coupon. This will be displayed in the Seller Dashboard.',
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.',
},
],
},
@ -679,14 +675,14 @@ export const couponFields = [
name: 'BRL',
value: 'BRL'
},
{
name: 'GBP',
value: 'GBP'
},
{
name: 'CAD',
value: 'CAD'
},
{
name: 'CHF',
value: 'CHF'
},
{
name: 'CNY',
value: 'CNY'
@ -703,6 +699,10 @@ export const couponFields = [
name: 'EUR',
value: 'EUR'
},
{
name: 'GBP',
value: 'GBP'
},
{
name: 'HKD',
value: 'HKD'
@ -719,22 +719,22 @@ export const couponFields = [
name: 'JPY',
value: 'JPY'
},
{
name: 'KRW',
value: 'KRW'
},
{
name: 'MXN',
value: 'MXN'
},
{
name: 'TWD',
value: 'TWD'
name: 'NOK',
value: 'NOK'
},
{
name: 'NZD',
value: 'NZD'
},
{
name: 'NOK',
value: 'NOK'
},
{
name: 'PLN',
value: 'PLN'
@ -743,57 +743,32 @@ export const couponFields = [
name: 'RUB',
value: 'RUB'
},
{
name: 'SGD',
value: 'SGD'
},
{
name: 'ZAR',
value: 'ZAR'
},
{
name: 'KRW',
value: 'KRW'
},
{
name: 'SEK',
value: 'SEK'
},
{
name: 'CHF',
value: 'CHF'
name: 'SGD',
value: 'SGD'
},
{
name: 'THB',
value: 'THB'
},
{
name: 'CHF',
value: 'CHF'
name: 'TWD',
value: 'TWD'
},
{
name: 'USD',
value: 'USD'
},
{
name: 'ZAR',
value: 'ZAR'
},
],
},
{
displayName: 'Discount Type',
name: 'discountType',
type: 'options',
default: 'flat',
description: 'Either flat or percentage.',
options: [
{
name: 'Flat',
value: 'flat'
},
{
name: 'Percentage',
value: 'percentage'
},
]
},
{
displayName: 'Discount Amount Currency',
name: 'discountAmount',
@ -829,6 +804,23 @@ export const couponFields = [
maxValue: 100
},
},
{
displayName: 'Discount Type',
name: 'discountType',
type: 'options',
default: 'flat',
description: 'Either flat or percentage.',
options: [
{
name: 'Flat',
value: 'flat'
},
{
name: 'Percentage',
value: 'percentage'
},
]
},
],
},
],

View file

@ -4,11 +4,11 @@ import {
import {
IDataObject,
ILoadOptionsFunctions,
INodeExecutionData,
INodePropertyOptions,
INodeType,
INodeTypeDescription,
ILoadOptionsFunctions,
INodePropertyOptions
} from 'n8n-workflow';
import {

View file

@ -51,7 +51,7 @@ export const userFields = [
displayName: 'Limit',
name: 'limit',
type: 'number',
default: 1,
default: 100,
required: true,
typeOptions: {
minValue: 1,