Skip to content

Commit 507d577

Browse files
committed
add template resource
1 parent 8a560f2 commit 507d577

File tree

2 files changed

+24
-17
lines changed

2 files changed

+24
-17
lines changed

README.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fastbill.bootstrap(username, password);
1616
```
1717

1818
### Accessing fastbill's API
19-
After the client has set authentication details, it can be used by simply calling
19+
After the client has set authentication details, it can be used by simply calling
2020
```js
2121
fastbill.api.entity.verb
2222
```
@@ -44,8 +44,8 @@ whereas those methods also accept multiple field values as an array:
4444
fastbill.api.invoice.getById(["ID1", "ID2", "ID3"], limit, offset)
4545
```
4646

47-
### CREATE, UPDATE, DELETE etc.
48-
All other methods besides previously mentioned getters, accept a data object only that must reflect fastbill's API specification.
47+
### CREATE, UPDATE, DELETE etc.
48+
All other methods besides previously mentioned getters, accept a data object only that must reflect fastbill's API specification.
4949

5050
```js
5151
fastbill.api.invoice.create({"CUSTOMER_ID": "XXXXXX", "ITEMS": [{"ARTICLE_NUMBER": "1", "QUANTITY": "4"}]})
@@ -83,7 +83,7 @@ API COVERAGE
8383

8484
```json
8585
{ customer:
86-
{
86+
{
8787
get: [Function],
8888
update: [Function],
8989
delete: [Function],
@@ -134,12 +134,12 @@ API COVERAGE
134134
sign: [Function],
135135
sendbyemail: [Function],
136136
sendbypost: [Function],
137-
setpaid: [Function]
137+
setpaid: [Function]
138138
},
139139
item:
140140
{ get: [Function],
141141
getByInvoiceId: [Function],
142-
delete: [Function]
142+
delete: [Function]
143143
},
144144
recurring:
145145
{ create: [Function],
@@ -155,7 +155,7 @@ API COVERAGE
155155
getByState: [Function],
156156
getByType: [Function],
157157
update: [Function],
158-
delete: [Function]
158+
delete: [Function]
159159
},
160160
revenue:
161161
{ create: [Function],
@@ -171,23 +171,23 @@ API COVERAGE
171171
getByState: [Function],
172172
getByType: [Function],
173173
update: [Function],
174-
delete: [Function]
174+
delete: [Function]
175175
},
176176
expense:
177177
{ create: [Function],
178178
get: [Function],
179179
getByInvoiceId: [Function],
180180
getByInvoiceNumber: [Function],
181181
getByMonth: [Function],
182-
getByYear: [Function]
182+
getByYear: [Function]
183183
},
184184
article:
185185
{ create: [Function],
186186
get: [Function],
187187
getByArticleNumber: [Function],
188188
getByNumber: [Function],
189189
update: [Function],
190-
delete: [Function]
190+
delete: [Function]
191191
},
192192
document: { create: [Function] },
193193
project:
@@ -197,7 +197,7 @@ API COVERAGE
197197
getById: [Function],
198198
getByCustomerId: [Function],
199199
update: [Function],
200-
delete: [Function]
200+
delete: [Function]
201201
},
202202
time:
203203
{ create: [Function],
@@ -211,7 +211,11 @@ API COVERAGE
211211
getByEndDate: [Function],
212212
getByDate: [Function],
213213
update: [Function],
214-
delete: [Function]
215-
}
214+
delete: [Function]
215+
}
216+
},
217+
template:
218+
{
219+
get: [Function]
216220
}
217221
```

lib/fastbill-api-description.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
"verbs": ["create", "get", "delete", "sendbyemail", "createinvoice"]
1111
},
1212
"invoice": {
13-
"get_filter": ["INVOICE_ID", "INVOICE_NUMBER", "INVOICE_TITLE", "CUSTOMER_ID", "MONTH", "YEAR", "START_DUE_DATE",
13+
"get_filter": ["INVOICE_ID", "INVOICE_NUMBER", "INVOICE_TITLE", "CUSTOMER_ID", "MONTH", "YEAR", "START_DUE_DATE",
1414
"END_DUE_DATE", "STATE", "TYPE"],
1515
"verbs": ["create", "get", "update", "delete", "complete", "cancel", "sign", "sendbyemail", "sendbypost", "setpaid"]
1616
},
17-
"item": {
17+
"item": {
1818
"get_filter": ["INVOICE_ID"],
1919
"verbs": ["get", "delete"]
2020
},
@@ -46,7 +46,10 @@
4646
"time": {
4747
"get_filter": ["TIME_ID", "CUSTOMER_ID", "PROJECT_ID", "TASK_ID", "START_DATE", "END_DATE", "DATE"],
4848
"verbs": ["create", "get", "update", "delete"]
49+
},
50+
"template": {
51+
"get_filter": ["TAGS"],
52+
"verbs": ["get"]
4953
}
50-
}
54+
}
5155
}
52-

0 commit comments

Comments
 (0)