- Add Strike API credentials configuration - Implement Strike node with 9 resources (Account, Balance, Currency Exchange, Deposit, Invoice, Payment, Payment Method, Payout, Rates) - Add comprehensive operation descriptions for all resources - Include CLAUDE.MD documentation - Set up build configuration with TypeScript, ESLint, and Prettier 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
168 lines
3.4 KiB
TypeScript
168 lines
3.4 KiB
TypeScript
import type { INodeProperties } from 'n8n-workflow';
|
|
|
|
export const paymentMethodOperations: INodeProperties[] = [
|
|
{
|
|
displayName: 'Operation',
|
|
name: 'operation',
|
|
type: 'options',
|
|
noDataExpression: true,
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['paymentMethod'],
|
|
},
|
|
},
|
|
options: [
|
|
{
|
|
name: 'Create Bank Account',
|
|
value: 'createBank',
|
|
description: 'Create a bank payment method',
|
|
action: 'Create a bank payment method',
|
|
},
|
|
{
|
|
name: 'Get',
|
|
value: 'get',
|
|
description: 'Get a bank payment method by ID',
|
|
action: 'Get a bank payment method',
|
|
},
|
|
{
|
|
name: 'Get Many',
|
|
value: 'getAll',
|
|
description: 'Get many bank payment methods',
|
|
action: 'Get many bank payment methods',
|
|
},
|
|
{
|
|
name: 'Delete',
|
|
value: 'delete',
|
|
description: 'Delete a bank payment method',
|
|
action: 'Delete a bank payment method',
|
|
},
|
|
],
|
|
default: 'getAll',
|
|
},
|
|
];
|
|
|
|
export const paymentMethodFields: INodeProperties[] = [
|
|
// ----------------------------------
|
|
// paymentMethod:createBank
|
|
// ----------------------------------
|
|
{
|
|
displayName: 'Account Number',
|
|
name: 'accountNumber',
|
|
type: 'string',
|
|
required: true,
|
|
default: '',
|
|
description: 'Bank account number',
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['paymentMethod'],
|
|
operation: ['createBank'],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
displayName: 'Routing Number',
|
|
name: 'routingNumber',
|
|
type: 'string',
|
|
required: true,
|
|
default: '',
|
|
description: 'Bank routing number',
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['paymentMethod'],
|
|
operation: ['createBank'],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
displayName: 'Account Type',
|
|
name: 'accountType',
|
|
type: 'options',
|
|
options: [
|
|
{ name: 'Checking', value: 'CHECKING' },
|
|
{ name: 'Savings', value: 'SAVINGS' },
|
|
],
|
|
default: 'CHECKING',
|
|
description: 'Type of bank account',
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['paymentMethod'],
|
|
operation: ['createBank'],
|
|
},
|
|
},
|
|
},
|
|
|
|
// ----------------------------------
|
|
// paymentMethod:get & delete
|
|
// ----------------------------------
|
|
{
|
|
displayName: 'Payment Method ID',
|
|
name: 'paymentMethodId',
|
|
type: 'string',
|
|
required: true,
|
|
default: '',
|
|
description: 'The ID of the payment method',
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['paymentMethod'],
|
|
operation: ['get', 'delete'],
|
|
},
|
|
},
|
|
},
|
|
|
|
// ----------------------------------
|
|
// paymentMethod:getAll
|
|
// ----------------------------------
|
|
{
|
|
displayName: 'Return All',
|
|
name: 'returnAll',
|
|
type: 'boolean',
|
|
default: false,
|
|
description: 'Whether to return all results or only up to a given limit',
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['paymentMethod'],
|
|
operation: ['getAll'],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
displayName: 'Limit',
|
|
name: 'limit',
|
|
type: 'number',
|
|
typeOptions: {
|
|
minValue: 1,
|
|
},
|
|
default: 50,
|
|
description: 'Max number of results to return',
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['paymentMethod'],
|
|
operation: ['getAll'],
|
|
returnAll: [false],
|
|
},
|
|
},
|
|
},
|
|
{
|
|
displayName: 'Options',
|
|
name: 'options',
|
|
type: 'collection',
|
|
placeholder: 'Add Option',
|
|
default: {},
|
|
displayOptions: {
|
|
show: {
|
|
resource: ['paymentMethod'],
|
|
operation: ['getAll'],
|
|
},
|
|
},
|
|
options: [
|
|
{
|
|
displayName: 'Deposit Eligible Only',
|
|
name: 'depositEligible',
|
|
type: 'boolean',
|
|
default: false,
|
|
description: 'Whether to only return deposit-eligible payment methods',
|
|
},
|
|
],
|
|
},
|
|
];
|