Skip to content

Commit e103c2f

Browse files
Merge pull request #502 from bbiggerr/payment-method-delete
Add Payment Method Delete endpoint
2 parents 5293209 + 3e6f1ca commit e103c2f

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

openapi.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1798,6 +1798,43 @@ paths:
17981798
- lang: CLI
17991799
source: >
18001800
linode-cli account payment-method-view 123
1801+
delete:
1802+
x-linode-grant: read_write
1803+
tags:
1804+
- Account
1805+
summary: Payment Method Delete
1806+
description: |
1807+
Deactivate the specified Payment Method.
1808+
1809+
The default Payment Method can not be deleted. To add a new default Payment Method, access the Payment Method
1810+
Add ([POST /account/payment-methods](/docs/api/account/#payment-method-add)) endpoint. To designate an existing
1811+
Payment Method as the default method, access the Payment Method Make Default
1812+
([POST /account/payment-methods/{paymentMethodId}/make-default](/docs/api/account/#payment-method-make-default))
1813+
endpoint.
1814+
operationId: deletePaymentMethod
1815+
x-linode-cli-action: payment-method-delete
1816+
security:
1817+
- personalAccessToken: []
1818+
- oauth:
1819+
- account:read_only
1820+
responses:
1821+
'200':
1822+
description: Payment Method deactivated.
1823+
content:
1824+
application/json:
1825+
schema:
1826+
type: object
1827+
default:
1828+
$ref: '#/components/responses/ErrorResponse'
1829+
x-code-samples:
1830+
- lang: Shell
1831+
source: >
1832+
curl -H "Authorization: Bearer $TOKEN" \
1833+
-X DELETE \
1834+
https://api.linode.com/v4/account/payment-methods/123
1835+
- lang: CLI
1836+
source: >
1837+
linode-cli account payment-method-delete 123
18011838
/account/payment-methods/{paymentMethodId}/make-default:
18021839
x-linode-cli-command: account
18031840
parameters:

0 commit comments

Comments
 (0)