sk_api_schema 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/json/v1.0/credit_note.json +12 -1
- data/json/v1.0/estimate.json +7 -1
- data/json/v1.0/invoice.json +12 -1
- data/json/v1.0/order.json +7 -1
- data/json/v1.0/payment_reminder.json +2 -0
- data/json/v1.0/recurring.json +205 -0
- data/sk_api_schema.gemspec +3 -2
- metadata +5 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.14
|
data/json/v1.0/credit_note.json
CHANGED
@@ -193,7 +193,18 @@
|
|
193
193
|
},
|
194
194
|
{ "rel": "create",
|
195
195
|
"href": "credit_notes",
|
196
|
-
"method": "POST"
|
196
|
+
"method": "POST",
|
197
|
+
"properties" : {
|
198
|
+
"source" : {
|
199
|
+
"title" : "Source document id",
|
200
|
+
"description": "Copies the source document(excl. number,date) and returns a new draft document."
|
201
|
+
},
|
202
|
+
"cancel" : {
|
203
|
+
"title" : "Cancel an credit note",
|
204
|
+
"description": "Cancelling a document negates its line item values. A source id must be set.",
|
205
|
+
"dependencies": ['source']
|
206
|
+
}
|
207
|
+
}
|
197
208
|
},
|
198
209
|
{ "rel": "attachments",
|
199
210
|
"href": "credit_notes/{id}/attachments"
|
data/json/v1.0/estimate.json
CHANGED
@@ -180,7 +180,13 @@
|
|
180
180
|
},
|
181
181
|
{ "rel": "create",
|
182
182
|
"href": "estimates",
|
183
|
-
"method": "POST"
|
183
|
+
"method": "POST",
|
184
|
+
"properties" : {
|
185
|
+
"source" : {
|
186
|
+
"title" : "Source document id",
|
187
|
+
"description": "Copies the source document(excl. number,date) and returns a new draft document."
|
188
|
+
}
|
189
|
+
}
|
184
190
|
},
|
185
191
|
{ "rel": "attachments",
|
186
192
|
"href": "estimates/{id}/attachments"
|
data/json/v1.0/invoice.json
CHANGED
@@ -195,7 +195,18 @@
|
|
195
195
|
},
|
196
196
|
{ "rel": "create",
|
197
197
|
"href": "invoices",
|
198
|
-
"method": "POST"
|
198
|
+
"method": "POST",
|
199
|
+
"properties" : {
|
200
|
+
"source" : {
|
201
|
+
"title" : "Source document id",
|
202
|
+
"description": "Copies the source document(excl. number,date) and returns a new draft document. If the source is an Estimate or Order only line_items, client & tags are copied, so you can pass in additional fields."
|
203
|
+
},
|
204
|
+
"cancel" : {
|
205
|
+
"title" : "Cancel an invoice",
|
206
|
+
"description": "Cancelling a document negates its line item values. A source id must be set.",
|
207
|
+
"dependencies": ['source']
|
208
|
+
}
|
209
|
+
}
|
199
210
|
},
|
200
211
|
{ "rel": "attachments",
|
201
212
|
"href": "invoices/{id}/attachments"
|
data/json/v1.0/order.json
CHANGED
@@ -170,7 +170,13 @@
|
|
170
170
|
},
|
171
171
|
{ "rel": "create",
|
172
172
|
"href": "orders",
|
173
|
-
"method": "POST"
|
173
|
+
"method": "POST",
|
174
|
+
"properties" : {
|
175
|
+
"source" : {
|
176
|
+
"title" : "Source document id",
|
177
|
+
"description": "Copies the source document(excl. number,date) and returns a new draft document."
|
178
|
+
}
|
179
|
+
}
|
174
180
|
},
|
175
181
|
{ "rel": "attachments",
|
176
182
|
"href": "orders/{id}/attachments"
|
@@ -10,6 +10,7 @@
|
|
10
10
|
},
|
11
11
|
"invoice_id":{
|
12
12
|
"description": "The invoice for the reminder. If set assumes all other fields are set to custom values, instead of filling them from the invoice. POSTing to invoices/:id/payment_reminders, automatically set this and all other fields.",
|
13
|
+
"required": true,
|
13
14
|
"type":"string"
|
14
15
|
},
|
15
16
|
"address_field":{
|
@@ -19,6 +20,7 @@
|
|
19
20
|
"date":{
|
20
21
|
"description": "Date the payment_reminder is issued. Automatically set when created from invoice. Defaults to today.",
|
21
22
|
"format":"date",
|
23
|
+
"required": true,
|
22
24
|
"type":"string"
|
23
25
|
},
|
24
26
|
"due_days":{
|
@@ -0,0 +1,205 @@
|
|
1
|
+
{ "type":"object",
|
2
|
+
"title": "recurring",
|
3
|
+
"description": "An recurring is used as an template for new invoices.",
|
4
|
+
"properties":{
|
5
|
+
"id":{
|
6
|
+
"description": "UUID assigned by SK",
|
7
|
+
"identity":true,
|
8
|
+
"readonly":true,
|
9
|
+
"type":"string"
|
10
|
+
},
|
11
|
+
"number":{
|
12
|
+
"description": "Unique name to identify the document. Unlike all other document this one has no number schema and not auto assign",
|
13
|
+
"type":"string",
|
14
|
+
"required":true
|
15
|
+
},
|
16
|
+
"address_field":{
|
17
|
+
"description": "Receiver address, normally shown in envelope window. Defaults to client address_field if empty and client_id given.",
|
18
|
+
"type":"string"
|
19
|
+
},
|
20
|
+
"date":{
|
21
|
+
"description": "First date the recurring is issued. Not allowed to be in the past.",
|
22
|
+
"format":"date",
|
23
|
+
"type":"string",
|
24
|
+
"required":true
|
25
|
+
},
|
26
|
+
"due_days":{
|
27
|
+
"description": "Used to calculate the due date of the recurring. Useless if date and due date are present.",
|
28
|
+
"type":"integer"
|
29
|
+
},
|
30
|
+
"final_date":{
|
31
|
+
"description": "The last date the recurring is executed.",
|
32
|
+
"format":"date",
|
33
|
+
"type":"string",
|
34
|
+
"required":true
|
35
|
+
},
|
36
|
+
"frequency":{
|
37
|
+
"description": "Recurring frequency",
|
38
|
+
"enum":['yearly', 'monthly', 'weekly', 'quarterly', 'biweekly', 'sixmonthly'],
|
39
|
+
"type":"string",
|
40
|
+
"required":true
|
41
|
+
},
|
42
|
+
"payment_method":{
|
43
|
+
"description": "How the invoce is beeing payed. Used in new payments.",
|
44
|
+
"enum":["cash","bank_transfer","credit_card","paypal","direct_debit","cheque"],
|
45
|
+
"type":"string"
|
46
|
+
},
|
47
|
+
"title":{
|
48
|
+
"description": "The headline of a document. Use SK placeholders to prevent exessive typing e.g. 'Your recurring [number]'",
|
49
|
+
"type":"string"
|
50
|
+
},
|
51
|
+
"notes_before":{
|
52
|
+
"description": "Notes shown before the line items. Normaly contains salutation and other introductional information. SK placeholders can be used.",
|
53
|
+
"type":"string"
|
54
|
+
},
|
55
|
+
"notes_after":{
|
56
|
+
"description": "Notes shown after the line items. Can contain information about payments, bank account or a thank-you message. SK placeholders can be used.",
|
57
|
+
"type":"string"
|
58
|
+
},
|
59
|
+
"tag_list": {
|
60
|
+
"description": "Space separated list of tags.",
|
61
|
+
"type":"string"
|
62
|
+
},
|
63
|
+
"precision":{
|
64
|
+
"description": "Decimal places for displayed(printed) money values. gross_total and net_total will always be displayed rounded to a precision of 2. When greater 2 use net_total_base(also in line_item) to show the net val with the set precision(3,4).",
|
65
|
+
"type":"number",
|
66
|
+
"enum": [2,3,4],
|
67
|
+
"default":2
|
68
|
+
},
|
69
|
+
"client":{
|
70
|
+
"description": "The client for the document. New documents cannot create a client, use client_id field to set it.",
|
71
|
+
"readonly":true,
|
72
|
+
"type":"object",
|
73
|
+
"properties":{"$ref":"./client.json#properties"}
|
74
|
+
},
|
75
|
+
"client_id":{
|
76
|
+
"description": "The clients uuid, must be set for a new document. New recurrings take the clients address field, due days and cash discount if those fields are not set.",
|
77
|
+
"type":"string",
|
78
|
+
"required":true
|
79
|
+
},
|
80
|
+
"team_id":{
|
81
|
+
"description": "A team uuid. If set only the team and its parent teams can see the record.",
|
82
|
+
"type":"string"
|
83
|
+
},
|
84
|
+
"line_items":{
|
85
|
+
"description": "Line items for the document",
|
86
|
+
"type":"array",
|
87
|
+
"properties":{"$ref":"./address.json#properties"}
|
88
|
+
},
|
89
|
+
"created_at":{
|
90
|
+
"description": "Date the object was created in SK. Never changes afterwards.",
|
91
|
+
"format":"date-time",
|
92
|
+
"readonly":true,
|
93
|
+
"type":"string"
|
94
|
+
},
|
95
|
+
"updated_at":{
|
96
|
+
"description": "Date the object was edited in SK.",
|
97
|
+
"format":"date-time",
|
98
|
+
"readonly":true,
|
99
|
+
"type":"string"
|
100
|
+
},
|
101
|
+
"lock_version":{
|
102
|
+
"description": "Auto-incremented to prevent concurrent updateing. First save wins and increments version. ",
|
103
|
+
"optional":true,
|
104
|
+
"type":"integer"
|
105
|
+
},
|
106
|
+
"gross_total":{
|
107
|
+
"description": "Gross total of all line items, 2 decimals places",
|
108
|
+
"readonly":true,
|
109
|
+
"type":"number"
|
110
|
+
},
|
111
|
+
"tax_total":{
|
112
|
+
"description": "Tax total, 2 decimals places",
|
113
|
+
"readonly":true,
|
114
|
+
"type":"number"
|
115
|
+
},
|
116
|
+
"net_total":{
|
117
|
+
"description": "Net total, 2 decimals places",
|
118
|
+
"readonly":true,
|
119
|
+
"type":"number"
|
120
|
+
},
|
121
|
+
"net_total_base":{
|
122
|
+
"description": "Net total, decimals places as set in precision, default 2",
|
123
|
+
"readonly":true,
|
124
|
+
"type":"number"
|
125
|
+
},
|
126
|
+
"net_total_base_raw":{
|
127
|
+
"description": "Net total, 6 decimal places. Summmed items net_total_base_raw (incl discount)",
|
128
|
+
"readonly":true,
|
129
|
+
"type":"number"
|
130
|
+
}
|
131
|
+
},
|
132
|
+
"links":[
|
133
|
+
{ "rel": "self",
|
134
|
+
"href": "recurrings/{id}"
|
135
|
+
},
|
136
|
+
{ "rel": "instances",
|
137
|
+
"href": "recurrings",
|
138
|
+
"properties" : {
|
139
|
+
"page":{
|
140
|
+
"title" : "Page",
|
141
|
+
"description": "In paginated results set the page to look for",
|
142
|
+
"type":"number"
|
143
|
+
},
|
144
|
+
"filter[q]":{
|
145
|
+
"title" : "Search",
|
146
|
+
"description": "Search in title, number, addressfield",
|
147
|
+
"type":"string"
|
148
|
+
},
|
149
|
+
"filter[tags]":{
|
150
|
+
"title" : "Tags",
|
151
|
+
"description": "Filter by a space delimited list of tags",
|
152
|
+
"type":"string"
|
153
|
+
},
|
154
|
+
"filter[from]":{
|
155
|
+
"title" : "From date",
|
156
|
+
"description": "All objects with a date after the date"
|
157
|
+
},
|
158
|
+
"filter[to]":{
|
159
|
+
"title" : "To date",
|
160
|
+
"description": "All objects with date before the date"
|
161
|
+
},
|
162
|
+
"sort_by":{
|
163
|
+
"title" : "Sort by",
|
164
|
+
"description": "Sort the results by the given field => number",
|
165
|
+
"enum":['title', 'number', 'created_at', 'updated_at', 'client_id', 'price_total'],
|
166
|
+
"type": 'string'
|
167
|
+
},
|
168
|
+
"sort":{
|
169
|
+
"title" : "Sort",
|
170
|
+
"enum":["ASC","DESC"],
|
171
|
+
"description": "Sort the results in ASC or DESC"
|
172
|
+
}
|
173
|
+
}
|
174
|
+
},
|
175
|
+
{ "rel": "destroy",
|
176
|
+
"href": "recurrings/{id}",
|
177
|
+
"method": "DELETE"
|
178
|
+
},
|
179
|
+
{ "rel": "update",
|
180
|
+
"href": "recurrings/{id}",
|
181
|
+
"method": "PUT"
|
182
|
+
},
|
183
|
+
{ "rel": "create",
|
184
|
+
"href": "recurrings",
|
185
|
+
"method": "POST",
|
186
|
+
"properties" : {
|
187
|
+
"source" : {
|
188
|
+
"title" : "Source document id",
|
189
|
+
"description": "Copies the source document(excl. number,date) and returns a new draft document."
|
190
|
+
},
|
191
|
+
"cancel" : {
|
192
|
+
"title" : "Cancel an recurring",
|
193
|
+
"description": "Cancelling a document negates its line item values. A source id must be set.",
|
194
|
+
"dependencies": ['source']
|
195
|
+
}
|
196
|
+
}
|
197
|
+
},
|
198
|
+
{ "rel": "attachments",
|
199
|
+
"href": "recurrings/{id}/attachments"
|
200
|
+
},
|
201
|
+
{ "rel": "comments",
|
202
|
+
"href": "recurrings/{id}/comments"
|
203
|
+
}
|
204
|
+
]
|
205
|
+
}
|
data/sk_api_schema.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{sk_api_schema}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.14"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Georg Leciejewski"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-02-02}
|
13
13
|
s.description = %q{SalesKing API JSON schema and utility methods}
|
14
14
|
s.email = %q{gl@salesking.eu}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -35,6 +35,7 @@ Gem::Specification.new do |s|
|
|
35
35
|
"json/v1.0/payment.json",
|
36
36
|
"json/v1.0/payment_reminder.json",
|
37
37
|
"json/v1.0/product.json",
|
38
|
+
"json/v1.0/recurring.json",
|
38
39
|
"json/v1.0/text_template.json",
|
39
40
|
"json/v1.0/user.json",
|
40
41
|
"lib/sk_api_schema.rb",
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sk_api_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 14
|
10
|
+
version: 0.0.14
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Georg Leciejewski
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-02-02 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -74,6 +74,7 @@ files:
|
|
74
74
|
- json/v1.0/payment.json
|
75
75
|
- json/v1.0/payment_reminder.json
|
76
76
|
- json/v1.0/product.json
|
77
|
+
- json/v1.0/recurring.json
|
77
78
|
- json/v1.0/text_template.json
|
78
79
|
- json/v1.0/user.json
|
79
80
|
- lib/sk_api_schema.rb
|