File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -3,3 +3,45 @@ layout: page
3
3
title : Examples
4
4
---
5
5
6
+ ### Complex Attributes <a href =" #complex-attributes " id =" complex-attributes " class =" headerlink " ></a >
7
+
8
+ The following resource object represents an invoice and contains three [ complex
9
+ attributes] ( /format/#document-structure-resource-object-complex-attributes ) :
10
+ ` notes ` , ` total ` , and ` customer-references ` .
11
+
12
+ ``` json
13
+ {
14
+ "type" : " invoices" ,
15
+ "id" : " 1234" ,
16
+ "date" : " 2015-02-14" ,
17
+ "due" : " 2015-03-14" ,
18
+ "notes" : [" Lorem ipsum dolor sit amet" , " Consectetuer adipiscing elit" ],
19
+ "total" : {
20
+ "currency" : " EUR" ,
21
+ "line-items" : 3000.00 ,
22
+ "discounts" : 300.00 ,
23
+ "tax" : {
24
+ "tax-type" : " VAT" ,
25
+ "taxable-amount" : 2700.00 ,
26
+ "tax-amount" : 540.00
27
+ },
28
+ "amount-payable" : 3240.00
29
+ },
30
+ "customer-references" : [{
31
+ "ref-type" : " purchase-order" ,
32
+ "text" : " AB3210"
33
+ }, {
34
+ "ref-type" : " other" ,
35
+ "text" : " Department XYZ"
36
+ }],
37
+ "links" : {
38
+ "customer" : {
39
+ "related" : " http://example.com/invoices/1234/customer"
40
+ },
41
+ "line-items" : {
42
+ "related" : " http://example.com/invoices/1234/line-items"
43
+ }
44
+ }
45
+ }
46
+ ```
47
+
You can’t perform that action at this time.
0 commit comments