1017 lines
24 KiB
TypeScript
1017 lines
24 KiB
TypeScript
// Generated from the OpenAPI specification. Do not edit by hand: regenerate.
|
|
import type { INodeProperties } from 'n8n-workflow';
|
|
|
|
export const billingOperations: INodeProperties[] = [{
|
|
"displayName": "Operation",
|
|
"name": "operation",
|
|
"type": "options",
|
|
"noDataExpression": true,
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
]
|
|
}
|
|
},
|
|
"options": [
|
|
{
|
|
"name": "List the invoices",
|
|
"value": "invoicesList",
|
|
"description": "Needs `billing:read`. The newest first. `total` includes what was paid with credit; `balance_due` is what is still to pay.",
|
|
"action": "List the invoices",
|
|
"routing": {
|
|
"request": {
|
|
"method": "GET",
|
|
"url": "=/v1/invoices"
|
|
},
|
|
"output": {
|
|
"postReceive": [
|
|
{
|
|
"type": "rootProperty",
|
|
"properties": {
|
|
"property": "data"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "See an invoice",
|
|
"value": "invoicesGet",
|
|
"description": "Needs `billing:read`. With the lines of the invoice.",
|
|
"action": "See an invoice",
|
|
"routing": {
|
|
"request": {
|
|
"method": "GET",
|
|
"url": "=/v1/invoices/{{encodeURIComponent(String($parameter[\"id\"]))}}"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "See the credit",
|
|
"value": "creditGet",
|
|
"description": "Needs `billing:read`. The credit available on the account.",
|
|
"action": "See the credit",
|
|
"routing": {
|
|
"request": {
|
|
"method": "GET",
|
|
"url": "=/v1/billing/credit"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "List the transactions",
|
|
"value": "transactionsList",
|
|
"description": "Needs `billing:read`. The payments and refunds of the account, the newest first.",
|
|
"action": "List the transactions",
|
|
"routing": {
|
|
"request": {
|
|
"method": "GET",
|
|
"url": "=/v1/billing/transactions"
|
|
},
|
|
"output": {
|
|
"postReceive": [
|
|
{
|
|
"type": "rootProperty",
|
|
"properties": {
|
|
"property": "data"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Get the PDF of an invoice",
|
|
"value": "invoicesPdf",
|
|
"description": "Needs `billing:read`. The PDF comes in `content`, in base64. When `pdf_available` is `false`, use `url`; `reason` says why: `internal_text`, `temporary_address`, `not_generated` or `too_large`....",
|
|
"action": "Get the PDF of an invoice",
|
|
"routing": {
|
|
"request": {
|
|
"method": "GET",
|
|
"url": "=/v1/invoices/{{encodeURIComponent(String($parameter[\"id\"]))}}/pdf"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Pay an invoice with credit",
|
|
"value": "invoicesPay",
|
|
"description": "Needs `billing:pay`. Pays what is still due, with the credit of the account and nothing else. Needs the `Idempotency-Key` header. The invoice total counts towards the spending limit of the key....",
|
|
"action": "Pay an invoice with credit",
|
|
"routing": {
|
|
"request": {
|
|
"method": "POST",
|
|
"url": "=/v1/invoices/{{encodeURIComponent(String($parameter[\"id\"]))}}/pay",
|
|
"headers": {
|
|
"Idempotency-Key": "={{ \"n8n-\" + Date.now().toString(36) + \"-\" + Math.random().toString(36).slice(2, 12) }}"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "List the orders",
|
|
"value": "ordersList",
|
|
"description": "Needs `billing:read`. The most recent first.",
|
|
"action": "List the orders",
|
|
"routing": {
|
|
"request": {
|
|
"method": "GET",
|
|
"url": "=/v1/orders"
|
|
},
|
|
"output": {
|
|
"postReceive": [
|
|
{
|
|
"type": "rootProperty",
|
|
"properties": {
|
|
"property": "data"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "See an order",
|
|
"value": "ordersGet",
|
|
"description": "Needs `billing:read`. With what came in the order: services, domains, addons and upgrades. A temporary address only appears when the service is active.",
|
|
"action": "See an order",
|
|
"routing": {
|
|
"request": {
|
|
"method": "GET",
|
|
"url": "=/v1/orders/{{encodeURIComponent(String($parameter[\"id\"]))}}"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "List the quotes",
|
|
"value": "quotesList",
|
|
"description": "Needs `billing:read`. Only the quotes delivered to the account.",
|
|
"action": "List the quotes",
|
|
"routing": {
|
|
"request": {
|
|
"method": "GET",
|
|
"url": "=/v1/quotes"
|
|
},
|
|
"output": {
|
|
"postReceive": [
|
|
{
|
|
"type": "rootProperty",
|
|
"properties": {
|
|
"property": "data"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "See a quote",
|
|
"value": "quotesGet",
|
|
"description": "Needs `billing:read`. With the proposal, the notes for you and the lines.",
|
|
"action": "See a quote",
|
|
"routing": {
|
|
"request": {
|
|
"method": "GET",
|
|
"url": "=/v1/quotes/{{encodeURIComponent(String($parameter[\"id\"]))}}"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "See the renewal cycles of a service",
|
|
"value": "servicesBillingCyclesList",
|
|
"description": "Needs `billing:read`. Only the cycles on sale, with the price of each renewal. A cycle where a paid option of the service has no price is not on sale. Nothing changes. `blocked_reason` says why it...",
|
|
"action": "See the renewal cycles of a service",
|
|
"routing": {
|
|
"request": {
|
|
"method": "GET",
|
|
"url": "=/v1/services/{{encodeURIComponent(String($parameter[\"id\"]))}}/billing-cycles"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Change the cycle of the next renewal",
|
|
"value": "servicesBillingCycleUpdate",
|
|
"description": "Needs `billing:write`. Nothing is charged now and the next due date stays. Give in `expected_amount` the price from the query: if it changed, it answers `409` with `price_changed`. A VPS or server...",
|
|
"action": "Change the cycle of the next renewal",
|
|
"routing": {
|
|
"request": {
|
|
"method": "PUT",
|
|
"url": "=/v1/services/{{encodeURIComponent(String($parameter[\"id\"]))}}/billing-cycle"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Get the upgrade link of a service",
|
|
"value": "servicesUpgradeLinkGet",
|
|
"description": "Needs `billing:read`. On that page you choose the new plan and see the amount before paying. Nothing changes here.",
|
|
"action": "Get the upgrade link of a service",
|
|
"routing": {
|
|
"request": {
|
|
"method": "GET",
|
|
"url": "=/v1/services/{{encodeURIComponent(String($parameter[\"id\"]))}}/upgrade-link"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Request the cancellation of a service",
|
|
"value": "servicesCancellationCreate",
|
|
"description": "Needs `services:cancel`. Always at the end of the paid period, never right away. The service stays active until `service_ends_at`. A service with no paid period still running answers `409` with...",
|
|
"action": "Request the cancellation of a service",
|
|
"routing": {
|
|
"request": {
|
|
"method": "POST",
|
|
"url": "=/v1/services/{{encodeURIComponent(String($parameter[\"id\"]))}}/cancellation"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "List plan upgrades",
|
|
"value": "servicesUpgradesList",
|
|
"description": "Needs `billing:read`. The bigger plans this service can move to, the same as in your account, and for each one the cycles equal to or longer than the current one. `amount_today` is what is paid now,...",
|
|
"action": "List plan upgrades",
|
|
"routing": {
|
|
"request": {
|
|
"method": "GET",
|
|
"url": "=/v1/services/{{encodeURIComponent(String($parameter[\"id\"]))}}/upgrades"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Change plan",
|
|
"value": "servicesUpgrade",
|
|
"description": "Needs `billing:purchase`. Moves the service to a bigger plan from GET /v1/services/{id}/upgrades, now. Also needs the write permission of the service area (`hosting:write` or `vps:write`)....",
|
|
"action": "Change plan",
|
|
"routing": {
|
|
"request": {
|
|
"method": "POST",
|
|
"url": "=/v1/services/{{encodeURIComponent(String($parameter[\"id\"]))}}/upgrade",
|
|
"headers": {
|
|
"Idempotency-Key": "={{ \"n8n-\" + Date.now().toString(36) + \"-\" + Math.random().toString(36).slice(2, 12) }}"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"default": "invoicesList"
|
|
}];
|
|
|
|
export const billingFields: INodeProperties[] = [
|
|
{
|
|
"displayName": "Query Parameters",
|
|
"name": "queryParameters",
|
|
"type": "collection",
|
|
"placeholder": "Add Parameter",
|
|
"default": {},
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"invoicesList"
|
|
]
|
|
}
|
|
},
|
|
"options": [
|
|
{
|
|
"displayName": "Page",
|
|
"name": "page",
|
|
"type": "number",
|
|
"default": 1,
|
|
"typeOptions": {
|
|
"numberPrecision": 0
|
|
},
|
|
"description": "The page number. The first is 1.",
|
|
"routing": {
|
|
"send": {
|
|
"type": "query",
|
|
"property": "page"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "Per Page",
|
|
"name": "per_page",
|
|
"type": "number",
|
|
"default": 10,
|
|
"typeOptions": {
|
|
"numberPrecision": 0
|
|
},
|
|
"description": "Results per page, from 1 to 100. The default is 10.",
|
|
"routing": {
|
|
"send": {
|
|
"type": "query",
|
|
"property": "per_page"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "Status",
|
|
"name": "status",
|
|
"type": "options",
|
|
"options": [
|
|
{
|
|
"name": "unpaid",
|
|
"value": "unpaid"
|
|
},
|
|
{
|
|
"name": "paid",
|
|
"value": "paid"
|
|
},
|
|
{
|
|
"name": "cancelled",
|
|
"value": "cancelled"
|
|
},
|
|
{
|
|
"name": "refunded",
|
|
"value": "refunded"
|
|
},
|
|
{
|
|
"name": "collections",
|
|
"value": "collections"
|
|
},
|
|
{
|
|
"name": "payment_pending",
|
|
"value": "payment_pending"
|
|
}
|
|
],
|
|
"default": "unpaid",
|
|
"description": "Only results in this status.",
|
|
"routing": {
|
|
"send": {
|
|
"type": "query",
|
|
"property": "status"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"displayName": "ID",
|
|
"name": "id",
|
|
"type": "string",
|
|
"required": true,
|
|
"default": "",
|
|
"description": "The `id` of the invoice.",
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"invoicesGet"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "Query Parameters",
|
|
"name": "queryParameters",
|
|
"type": "collection",
|
|
"placeholder": "Add Parameter",
|
|
"default": {},
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"transactionsList"
|
|
]
|
|
}
|
|
},
|
|
"options": [
|
|
{
|
|
"displayName": "Page",
|
|
"name": "page",
|
|
"type": "number",
|
|
"default": 1,
|
|
"typeOptions": {
|
|
"numberPrecision": 0
|
|
},
|
|
"description": "The page number. The first is 1.",
|
|
"routing": {
|
|
"send": {
|
|
"type": "query",
|
|
"property": "page"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "Per Page",
|
|
"name": "per_page",
|
|
"type": "number",
|
|
"default": 10,
|
|
"typeOptions": {
|
|
"numberPrecision": 0
|
|
},
|
|
"description": "Results per page, from 1 to 100. The default is 10.",
|
|
"routing": {
|
|
"send": {
|
|
"type": "query",
|
|
"property": "per_page"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"displayName": "ID",
|
|
"name": "id",
|
|
"type": "string",
|
|
"required": true,
|
|
"default": "",
|
|
"description": "The `id` of the invoice.",
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"invoicesPdf"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "ID",
|
|
"name": "id",
|
|
"type": "string",
|
|
"required": true,
|
|
"default": "",
|
|
"description": "The `id` of the invoice.",
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"invoicesPay"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "Query Parameters",
|
|
"name": "queryParameters",
|
|
"type": "collection",
|
|
"placeholder": "Add Parameter",
|
|
"default": {},
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"ordersList"
|
|
]
|
|
}
|
|
},
|
|
"options": [
|
|
{
|
|
"displayName": "Page",
|
|
"name": "page",
|
|
"type": "number",
|
|
"default": 1,
|
|
"typeOptions": {
|
|
"numberPrecision": 0
|
|
},
|
|
"description": "The page number. The first is 1.",
|
|
"routing": {
|
|
"send": {
|
|
"type": "query",
|
|
"property": "page"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "Per Page",
|
|
"name": "per_page",
|
|
"type": "number",
|
|
"default": 10,
|
|
"typeOptions": {
|
|
"numberPrecision": 0
|
|
},
|
|
"description": "Results per page, from 1 to 100. The default is 10.",
|
|
"routing": {
|
|
"send": {
|
|
"type": "query",
|
|
"property": "per_page"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "Status",
|
|
"name": "status",
|
|
"type": "string",
|
|
"default": "",
|
|
"description": "Filter by status: `pending`, `active`, `cancelled` or `fraud`.",
|
|
"routing": {
|
|
"send": {
|
|
"type": "query",
|
|
"property": "status"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"displayName": "ID",
|
|
"name": "id",
|
|
"type": "string",
|
|
"required": true,
|
|
"default": "",
|
|
"description": "The `id` of the order.",
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"ordersGet"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "Query Parameters",
|
|
"name": "queryParameters",
|
|
"type": "collection",
|
|
"placeholder": "Add Parameter",
|
|
"default": {},
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"quotesList"
|
|
]
|
|
}
|
|
},
|
|
"options": [
|
|
{
|
|
"displayName": "Page",
|
|
"name": "page",
|
|
"type": "number",
|
|
"default": 1,
|
|
"typeOptions": {
|
|
"numberPrecision": 0
|
|
},
|
|
"description": "The page number. The first is 1.",
|
|
"routing": {
|
|
"send": {
|
|
"type": "query",
|
|
"property": "page"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "Per Page",
|
|
"name": "per_page",
|
|
"type": "number",
|
|
"default": 10,
|
|
"typeOptions": {
|
|
"numberPrecision": 0
|
|
},
|
|
"description": "Results per page, from 1 to 100. The default is 10.",
|
|
"routing": {
|
|
"send": {
|
|
"type": "query",
|
|
"property": "per_page"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "Status",
|
|
"name": "status",
|
|
"type": "string",
|
|
"default": "",
|
|
"description": "Filter by status: `delivered`, `accepted`, `lost` or `dead`.",
|
|
"routing": {
|
|
"send": {
|
|
"type": "query",
|
|
"property": "status"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"displayName": "ID",
|
|
"name": "id",
|
|
"type": "string",
|
|
"required": true,
|
|
"default": "",
|
|
"description": "The `id` of the quote.",
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"quotesGet"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "ID",
|
|
"name": "id",
|
|
"type": "string",
|
|
"required": true,
|
|
"default": "",
|
|
"description": "The `id` of the service.",
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"servicesBillingCyclesList"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "ID",
|
|
"name": "id",
|
|
"type": "string",
|
|
"required": true,
|
|
"default": "",
|
|
"description": "The `id` of the service.",
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"servicesBillingCycleUpdate"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "Cycle",
|
|
"name": "cycle",
|
|
"type": "options",
|
|
"options": [
|
|
{
|
|
"name": "monthly",
|
|
"value": "monthly"
|
|
},
|
|
{
|
|
"name": "quarterly",
|
|
"value": "quarterly"
|
|
},
|
|
{
|
|
"name": "semi_annually",
|
|
"value": "semi_annually"
|
|
},
|
|
{
|
|
"name": "annually",
|
|
"value": "annually"
|
|
},
|
|
{
|
|
"name": "biennially",
|
|
"value": "biennially"
|
|
},
|
|
{
|
|
"name": "triennially",
|
|
"value": "triennially"
|
|
}
|
|
],
|
|
"default": "monthly",
|
|
"required": true,
|
|
"routing": {
|
|
"send": {
|
|
"type": "body",
|
|
"property": "cycle"
|
|
}
|
|
},
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"servicesBillingCycleUpdate"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "Expected Amount",
|
|
"name": "expected_amount",
|
|
"type": "number",
|
|
"default": 0,
|
|
"required": true,
|
|
"description": "The price from the query.",
|
|
"routing": {
|
|
"send": {
|
|
"type": "body",
|
|
"property": "expected_amount"
|
|
}
|
|
},
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"servicesBillingCycleUpdate"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "ID",
|
|
"name": "id",
|
|
"type": "string",
|
|
"required": true,
|
|
"default": "",
|
|
"description": "The `id` of the service.",
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"servicesUpgradeLinkGet"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "ID",
|
|
"name": "id",
|
|
"type": "string",
|
|
"required": true,
|
|
"default": "",
|
|
"description": "The `id` of the service.",
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"servicesCancellationCreate"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "Reason",
|
|
"name": "reason",
|
|
"type": "string",
|
|
"default": "",
|
|
"required": true,
|
|
"description": "Why you are cancelling.",
|
|
"routing": {
|
|
"send": {
|
|
"type": "body",
|
|
"property": "reason"
|
|
}
|
|
},
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"servicesCancellationCreate"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "Confirm",
|
|
"name": "confirm",
|
|
"type": "string",
|
|
"default": "",
|
|
"required": true,
|
|
"description": "The domain of the service or, if it has none, the plan name.",
|
|
"routing": {
|
|
"send": {
|
|
"type": "body",
|
|
"property": "confirm"
|
|
}
|
|
},
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"servicesCancellationCreate"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "Additional Fields",
|
|
"name": "additionalFields",
|
|
"type": "collection",
|
|
"placeholder": "Add Field",
|
|
"default": {},
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"servicesCancellationCreate"
|
|
]
|
|
}
|
|
},
|
|
"options": [
|
|
{
|
|
"displayName": "Type",
|
|
"name": "type",
|
|
"type": "options",
|
|
"options": [
|
|
{
|
|
"name": "end_of_billing_period",
|
|
"value": "end_of_billing_period"
|
|
}
|
|
],
|
|
"default": "end_of_billing_period",
|
|
"routing": {
|
|
"send": {
|
|
"type": "body",
|
|
"property": "type"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"displayName": "ID",
|
|
"name": "id",
|
|
"type": "string",
|
|
"required": true,
|
|
"default": "",
|
|
"description": "The service `id`.",
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"servicesUpgradesList"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "ID",
|
|
"name": "id",
|
|
"type": "string",
|
|
"required": true,
|
|
"default": "",
|
|
"description": "The service `id`.",
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"servicesUpgrade"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "Product ID",
|
|
"name": "product_id",
|
|
"type": "number",
|
|
"default": 0,
|
|
"typeOptions": {
|
|
"numberPrecision": 0
|
|
},
|
|
"required": true,
|
|
"description": "The new plan.",
|
|
"routing": {
|
|
"send": {
|
|
"type": "body",
|
|
"property": "product_id"
|
|
}
|
|
},
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"servicesUpgrade"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "Billing Cycle",
|
|
"name": "billing_cycle",
|
|
"type": "options",
|
|
"options": [
|
|
{
|
|
"name": "monthly",
|
|
"value": "monthly"
|
|
},
|
|
{
|
|
"name": "quarterly",
|
|
"value": "quarterly"
|
|
},
|
|
{
|
|
"name": "semi_annually",
|
|
"value": "semi_annually"
|
|
},
|
|
{
|
|
"name": "annually",
|
|
"value": "annually"
|
|
},
|
|
{
|
|
"name": "biennially",
|
|
"value": "biennially"
|
|
},
|
|
{
|
|
"name": "triennially",
|
|
"value": "triennially"
|
|
}
|
|
],
|
|
"default": "monthly",
|
|
"required": true,
|
|
"routing": {
|
|
"send": {
|
|
"type": "body",
|
|
"property": "billing_cycle"
|
|
}
|
|
},
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"servicesUpgrade"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "Expected Amount",
|
|
"name": "expected_amount",
|
|
"type": "number",
|
|
"default": 0,
|
|
"required": true,
|
|
"description": "The `amount_today` you checked.",
|
|
"routing": {
|
|
"send": {
|
|
"type": "body",
|
|
"property": "expected_amount"
|
|
}
|
|
},
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"servicesUpgrade"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"displayName": "Additional Fields",
|
|
"name": "additionalFields",
|
|
"type": "collection",
|
|
"placeholder": "Add Field",
|
|
"default": {},
|
|
"displayOptions": {
|
|
"show": {
|
|
"resource": [
|
|
"billing"
|
|
],
|
|
"operation": [
|
|
"servicesUpgrade"
|
|
]
|
|
}
|
|
},
|
|
"options": [
|
|
{
|
|
"displayName": "Promo Code",
|
|
"name": "promo_code",
|
|
"type": "string",
|
|
"default": "",
|
|
"description": "Optional promo code. If it does not apply to this purchase, it answers `422` with `promo_not_applicable` and nothing is charged; if it does not exist, `promo_code_invalid`. In Sandbox the code is only checked to exist.",
|
|
"routing": {
|
|
"send": {
|
|
"type": "body",
|
|
"property": "promo_code"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
];
|