Skip to content

Commit 831ef48

Browse files
authored
Merge pull request #2567 from yoshizzle/api45Docs
Added invoices, payments, envelopes...
2 parents b58f2a7 + 41869c3 commit 831ef48

File tree

8 files changed

+243
-59
lines changed

8 files changed

+243
-59
lines changed

docs/src/data/endpoints/account.yaml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,3 +576,87 @@ endpoints:
576576
curl https://$api_root/$version/account/event/123/read
577577
python: |
578578
event.mark_read()
579+
/account/invoices:
580+
group: Invoices
581+
authenticated: true
582+
description: >
583+
View the collection of invoices.
584+
methods:
585+
GET:
586+
response: invoice
587+
paginationKey: invoice
588+
description: >
589+
Returns a list of invoices.
590+
examples:
591+
curl: |
592+
curl https://$api_root/$version/account/invoices
593+
/account/invoices/:id:
594+
group: Invoices
595+
type: resource
596+
authenticated: true
597+
description: >
598+
Returns information about a specific invoice.
599+
methods:
600+
GET:
601+
response: invoices
602+
description: >
603+
Returns information about this invoice.
604+
examples:
605+
curl: |
606+
curl https://$api_root/$version/account/invoices/123
607+
/account/invoices/:id/items:
608+
group: Invoices
609+
type: resource
610+
authenticated: true
611+
description: >
612+
View the items associated with a specific invoice.
613+
methods:
614+
GET:
615+
response: invoice_items
616+
description: >
617+
Returns a collection of invoice items.
618+
examples:
619+
curl: |
620+
curl https://$api_root/$version/account/invoices/123/items
621+
/account/payments:
622+
group: Payments
623+
type: Resource
624+
authenticated: true
625+
description: >
626+
View the collection of payments.
627+
methods:
628+
GET:
629+
response: payment
630+
description: >
631+
Returns information about this payment.
632+
examples:
633+
curl: |
634+
curl https://$api_root/$version/account/payments
635+
POST:
636+
oauth: account:modify
637+
response: payment
638+
description: >
639+
Make a payment.
640+
examples:
641+
curl: |
642+
curl -H "Content-Type: application/json" \
643+
-H "Authorization: Bearer $TOKEN" \
644+
-X POST -d '{
645+
"usd": 100,
646+
}' \
647+
https://$api_root/$version/account/payments
648+
/account/payments/:id:
649+
group: Payments
650+
type: Resource
651+
authenticated: true
652+
description: >
653+
Returns information about a specific payment.
654+
methods:
655+
GET:
656+
response: payment
657+
description: >
658+
Returns information about this payment.
659+
examples:
660+
curl: |
661+
curl https://$api_root/$version/account/payments/123
662+

docs/src/data/objects/invoice.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Invoice
2+
prefix: invoice
3+
description: >
4+
An Invoice
5+
schema:
6+
date:
7+
type: String
8+
value: "2015-09-29T11:21:01"
9+
filterable: true
10+
description: The date the invoice was generated.
11+
overdue:
12+
type: Boolean
13+
value: false
14+
filterable: true
15+
description: Whether or not the invoice is overdue for payment.
16+
paid:
17+
type: Boolean
18+
value: true
19+
filterable: true
20+
description: Whether or not the invoice has been paid.
21+
id:
22+
type: integer
23+
value: 123
24+
description: The invoice's ID.
25+
total:
26+
type: integer
27+
value: 120
28+
filterable: true
29+
description: The amount of the invoice in U.S. Dollars.
30+
label:
31+
type: string
32+
value: Invoice #1
33+
filterable: true
34+
editable: true
35+
description: The invoice's display label.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: InvoiceItems
2+
prefix: invoiceitems
3+
description: >
4+
An individual item from an Invoice
5+
schema:
6+
to:
7+
type: String
8+
value: "2015-09-01T00:00:01"
9+
description: The date the invoice item started, based on month.
10+
from:
11+
type: String
12+
value: "2015-09-30T11:59:59:59"
13+
description: The date the invoice item ended, based on month.
14+
type:
15+
type: Enum
16+
subtype: Type
17+
value: prepay
18+
description: The type of service, either 'prepay' or 'misc'
19+
amount:
20+
type: integer
21+
value: 20
22+
description: The price, in U.S. Dollars, of unitprice multiplied by quantity.
23+
unitprice:
24+
type: integer
25+
value: 10
26+
description: The monthly service fee (in US Dollars) for this item.
27+
label:
28+
type: string
29+
value: Linode 123
30+
description: This invoice item's display label.
31+
filterable: true
32+
editable: true
33+
quantity:
34+
type: integer
35+
value: 1
36+
description: The quantity of this item for the specified invoice.
37+
enums:
38+
Type:
39+
prepay: The invoice was pre-paid.
40+
misc: The invoice was not pre-paid.
41+

docs/src/data/objects/kernel.yaml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ schema:
1111
id:
1212
type: String
1313
value: linode/3.5.2-x86_64-linode26
14-
description:
15-
type: String
16-
value: "null"
17-
description: Additional, descriptive text about the kernel.
1814
xen:
1915
type: Boolean
2016
value: false
@@ -41,17 +37,11 @@ schema:
4137
value: x86_64
4238
description: The architecture of this kernel.
4339
filterable: true
44-
current:
45-
type: Boolean
46-
value: true
47-
filterable: true
48-
deprecated:
40+
pvops:
4941
type: Boolean
5042
value: false
43+
description: If this kernel is suitable for paravirtualized operations.
5144
filterable: true
52-
latest:
53-
type: Boolean
54-
value: true
5545
enums:
5646
architecture:
5747
x86_64: a 64 bit distribution

docs/src/data/objects/linode.yaml

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,21 @@ schema:
2626
type: Integer
2727
value: 10000
2828
description: Disk IO Rate ops/sec (Range 0-100000, default 10000). 0 to disable.
29-
transfer_in:
30-
type: Integer
31-
value: 0
32-
description: Incoming Traffic Mbit/s (Range 0-40000, default 10). 0 to disable.
33-
transfer_out:
34-
type: Integer
35-
value: 10
36-
description: Outbound Traffic Mbit/s (Range 0-10000, default 10). 0 to disable.
37-
transfer_quota:
38-
type: Integer
39-
value: 80
40-
description: Transfer Quota % (Range 0-400, default 80). 0 to disable.
29+
transfer:
30+
type: Object
31+
description: Thresholds for sending email alerts.
32+
in:
33+
type: Integer
34+
value: 0
35+
description: Incoming Traffic Mbit/s (Range 0-40000, default 10). 0 to disable.
36+
out:
37+
type: Integer
38+
value: 10
39+
description: Outbound Traffic Mbit/s (Range 0-10000, default 10). 0 to disable.
40+
quota:
41+
type: Integer
42+
value: 80
43+
description: Transfer Quota % (Range 0-400, default 80). 0 to disable.
4144
backups:
4245
type: Object
4346
seeAlso: "/reference/endpoints/linode/instances/$id/backups"
@@ -114,10 +117,6 @@ schema:
114117
value: running
115118
filterable: true
116119
_pylib_volatile: true
117-
transfer_total:
118-
type: Integer
119-
description: The amount of outbound traffic used this month.
120-
value: 20000
121120
updated:
122121
type: Datetime
123122
value: 2015-10-27T09:59:26
@@ -128,11 +127,26 @@ schema:
128127
subtype: Hypervisor
129128
description: The hypervisor this Linode is running on.
130129
value: kvm
131-
disk:
132-
type: Integer
133-
value: 24576
134-
description: Available disk space, in MB
135-
filterable: false
130+
specs:
131+
type: Object
132+
description: Specifications for this Linode.
133+
disk:
134+
type: Integer
135+
value: 24576
136+
description: Available disk space, in MB
137+
filterable: false
138+
memory:
139+
type: Integer
140+
value: 1024
141+
description: Total RAM for this Linode.
142+
vcpus:
143+
type: Integer
144+
value: 1
145+
description: Number of VCPUs for this Linode.
146+
transfer:
147+
type: Integer
148+
description: The amount of outbound traffic used this month.
149+
value: 20000
136150
enums:
137151
Status:
138152
offline: The Linode is powered off.

docs/src/data/objects/linode_config.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,6 @@ schema:
8787
type: String
8888
value: "/dev/sda"
8989
description: Root device to boot. Corresponding disk must be attached.
90-
root_device_ro:
91-
editable: true
92-
type: Boolean
93-
value: false
94-
description: Controls whether to mount the root disk read-only.
9590
run_level:
9691
editable: true
9792
type: Enum

docs/src/data/objects/payment.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Payment
2+
prefix: payment
3+
description: >
4+
A Payment
5+
schema:
6+
date:
7+
type: String
8+
value: "2015-09-29T11:21:01"
9+
filterable: true
10+
description: The date the payment was processed.
11+
id:
12+
type: integer
13+
value: 123
14+
description: The payment's ID.
15+
amount:
16+
type: integer
17+
value: 120
18+
filterable: true
19+
description: The amount (in US Dollars) of the payment.

docs/src/data/objects/type.yaml

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,39 +16,45 @@ schema:
1616
class:
1717
type: Enum
1818
subtype: Class
19-
price_hourly:
20-
type: Float
21-
value: 1.44
22-
description: Cost (in cents) per hour.
23-
filterable: true
24-
label:
25-
type: String
26-
value: Linode 2048
27-
description: Human-friendly name of this type.
28-
filterable: true
29-
backups_option:
19+
price:
3020
type: Object
31-
description: Cost of enabling backups for this type.
32-
price_hourly:
21+
description: Cost (in US dollars) for this type.
22+
hourly:
3323
type: Float
34-
value: 0.004
24+
value: 1.44
3525
description: Cost (in cents) per hour.
3626
filterable: true
37-
price_monthly:
27+
monthly:
3828
type: Integer
39-
value: 2.5
29+
value: 1000
4030
description: Cost (in US dollars) per month.
4131
filterable: true
32+
label:
33+
type: String
34+
value: Linode 2048
35+
description: Human-friendly name of this type.
36+
filterable: true
37+
addons:
38+
type: Object
39+
description: Cost of enabling addon services for this type.
40+
price:
41+
type: Object
42+
description: Cost of enabling backups for this type.
43+
hourly:
44+
type: Float
45+
value: 0.004
46+
description: Cost (in cents) per hour.
47+
filterable: true
48+
monthly:
49+
type: Integer
50+
value: 2.5
51+
description: Cost (in US dollars) per month.
52+
filterable: true
4253
network_out:
4354
type: Integer
4455
value: 125
4556
description: If applicable, Mbits outbound bandwidth.
4657
filterable: true
47-
price_monthly:
48-
type: Integer
49-
value: 1000
50-
description: Cost (in US dollars) per month.
51-
filterable: true
5258
memory:
5359
type: Integer
5460
value: 2048

0 commit comments

Comments
 (0)