Skip to content

Commit 3ebf840

Browse files
committed
Add GET /account/payment-methods
1 parent c1712b8 commit 3ebf840

File tree

1 file changed

+89
-0
lines changed

1 file changed

+89
-0
lines changed

openapi.yaml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,6 +1644,95 @@ paths:
16441644
-X PUT \
16451645
--data-binary "/path/to/image"
16461646
https://api.linode.com/v4/account/oauth-clients/edc6790ea9db4d224c5c/thumbnail
1647+
/account/payment-methods:
1648+
x-linode-cli-command: account
1649+
get:
1650+
servers:
1651+
- url: https://api.linode.com/v4beta
1652+
parameters:
1653+
- $ref: '#/components/parameters/pageOffset'
1654+
- $ref: '#/components/parameters/pageSize'
1655+
x-linode-grant: read_only
1656+
tags:
1657+
- Account
1658+
summary: Payment Methods List
1659+
description: |
1660+
Returns a paginated list of Payment Methods for this Account.
1661+
operationId: getPaymentMethods
1662+
x-linode-cli-action: payment-methods-list
1663+
security:
1664+
- personalAccessToken: []
1665+
- oauth:
1666+
- account:read_only
1667+
responses:
1668+
'200':
1669+
description: Returns a paginated list of Payment Method objects.
1670+
content:
1671+
application/json:
1672+
schema:
1673+
type: object
1674+
properties:
1675+
data:
1676+
type: array
1677+
items:
1678+
type: object
1679+
description: Payment Method object response.
1680+
properties:
1681+
method:
1682+
type: string
1683+
description: The type of Payment Method.
1684+
example: 'credit_card'
1685+
x-linode-cli-display: 1
1686+
is_default:
1687+
type: integer
1688+
description: |
1689+
Whether this Payment Method is the default method for processing service charges.
1690+
1691+
`0` corresponds to "no", while any other value corresponds to "yes".
1692+
example: 1
1693+
x-linode-cli-display: 2
1694+
created:
1695+
type: string
1696+
readOnly: true
1697+
format: date-time
1698+
description: When the Payment Method was added to the Account.
1699+
example: '2018-01-15T00:01:01'
1700+
data:
1701+
type: object
1702+
description: Credit card information
1703+
properties:
1704+
card_type:
1705+
type: string
1706+
description: The type of credit card.
1707+
example: ""
1708+
x-linode-cli-display: 8
1709+
last_four:
1710+
type: string
1711+
description: The last four digits of the credit card number.
1712+
example: "1234"
1713+
x-linode-cli-display: 9
1714+
expiry:
1715+
type: string
1716+
format: MM/YYYY
1717+
description: The expiration month and year of the credit card.
1718+
example: 06/2022
1719+
x-linode-cli-display: 10
1720+
page:
1721+
$ref: '#/components/schemas/PaginationEnvelope/properties/page'
1722+
pages:
1723+
$ref: '#/components/schemas/PaginationEnvelope/properties/pages'
1724+
results:
1725+
$ref: '#/components/schemas/PaginationEnvelope/properties/results'
1726+
default:
1727+
$ref: '#/components/responses/ErrorResponse'
1728+
x-code-samples:
1729+
- lang: Shell
1730+
source: >
1731+
curl -H "Authorization: Bearer $TOKEN" \
1732+
https://api.linode.com/v4beta/account/payment-methods
1733+
- lang: CLI
1734+
source: >
1735+
linode-cli account payment-methods-list
16471736
/account/payments:
16481737
x-linode-cli-command: account
16491738
get:

0 commit comments

Comments
 (0)