2023-01-27 03:22:44 -08:00
|
|
|
import type { INodeProperties } from 'n8n-workflow';
|
2021-07-10 04:15:14 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const tokenOperations: INodeProperties[] = [
|
2021-07-10 04:15:14 -07:00
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
2022-05-20 14:47:24 -07:00
|
|
|
noDataExpression: true,
|
2021-07-10 04:15:14 -07:00
|
|
|
default: 'create',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Create',
|
|
|
|
value: 'create',
|
|
|
|
description: 'Create a token',
|
2022-07-10 13:50:51 -07:00
|
|
|
action: 'Create a token',
|
2021-07-10 04:15:14 -07:00
|
|
|
},
|
|
|
|
],
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['token'],
|
2021-07-10 04:15:14 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|
2021-07-10 04:15:14 -07:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const tokenFields: INodeProperties[] = [
|
2021-07-10 04:15:14 -07:00
|
|
|
// ----------------------------------
|
|
|
|
// token: create
|
|
|
|
// ----------------------------------
|
|
|
|
{
|
|
|
|
displayName: 'Type',
|
|
|
|
name: 'type',
|
|
|
|
type: 'options',
|
|
|
|
required: true,
|
|
|
|
default: 'cardToken',
|
|
|
|
description: 'Type of token to create',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Card Token',
|
|
|
|
value: 'cardToken',
|
|
|
|
},
|
|
|
|
],
|
2021-11-03 17:42:57 -07:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['token'],
|
|
|
|
operation: ['create'],
|
2021-11-03 17:42:57 -07:00
|
|
|
},
|
|
|
|
},
|
2021-07-10 04:15:14 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Card Number',
|
|
|
|
name: 'number',
|
|
|
|
type: 'string',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['token'],
|
|
|
|
operation: ['create'],
|
|
|
|
type: ['cardToken'],
|
2021-07-10 04:15:14 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
placeholder: '4242424242424242',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'CVC',
|
|
|
|
name: 'cvc',
|
|
|
|
type: 'string',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['token'],
|
|
|
|
operation: ['create'],
|
|
|
|
type: ['cardToken'],
|
2021-07-10 04:15:14 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
placeholder: '314',
|
|
|
|
description: 'Security code printed on the back of the card',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Expiration Month',
|
|
|
|
description: 'Number of the month when the card will expire',
|
|
|
|
name: 'expirationMonth',
|
|
|
|
type: 'string',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['token'],
|
|
|
|
operation: ['create'],
|
|
|
|
type: ['cardToken'],
|
2021-07-10 04:15:14 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
placeholder: '10',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Expiration Year',
|
|
|
|
description: 'Year when the card will expire',
|
|
|
|
name: 'expirationYear',
|
|
|
|
type: 'string',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-08-17 08:50:24 -07:00
|
|
|
resource: ['token'],
|
|
|
|
operation: ['create'],
|
|
|
|
type: ['cardToken'],
|
2021-07-10 04:15:14 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
placeholder: '2022',
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|