2021-07-10 04:15:14 -07:00
|
|
|
import {
|
|
|
|
INodeProperties,
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
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',
|
|
|
|
default: 'create',
|
|
|
|
description: 'Operation to perform',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Create',
|
|
|
|
value: 'create',
|
|
|
|
description: 'Create a token',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'token',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
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: {
|
|
|
|
resource: [
|
|
|
|
'token',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2021-07-10 04:15:14 -07:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Card Number',
|
|
|
|
name: 'number',
|
|
|
|
type: 'string',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'token',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
type: [
|
2021-07-10 04:50:04 -07:00
|
|
|
'cardToken',
|
2021-07-10 04:15:14 -07:00
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
placeholder: '4242424242424242',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'CVC',
|
|
|
|
name: 'cvc',
|
|
|
|
type: 'string',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'token',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
type: [
|
2021-07-10 04:50:04 -07:00
|
|
|
'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: {
|
|
|
|
resource: [
|
|
|
|
'token',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
type: [
|
2021-07-10 04:50:04 -07:00
|
|
|
'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: {
|
|
|
|
resource: [
|
|
|
|
'token',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'create',
|
|
|
|
],
|
|
|
|
type: [
|
2021-07-10 04:50:04 -07:00
|
|
|
'cardToken',
|
2021-07-10 04:15:14 -07:00
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
placeholder: '2022',
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|