sk_api_schema 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -88,14 +88,27 @@
88
88
  "type":"object",
89
89
  "properties":{"$ref":"./attachment.json#properties"}
90
90
  },
91
- "client":{
92
- "description": "The client for the document. Is assigned throught the related invoice",
91
+ "client":{
92
+ "description": "DEPRECATED: use contact",
93
93
  "readonly":true,
94
94
  "type":"object",
95
95
  "properties":{"$ref":"./client.json#properties"}
96
96
  },
97
97
  "client_id":{
98
- "description": "The clients uuid. Is assigned throught the related invoice.",
98
+ "description": "DEPRECATED: use contact_id",
99
+ "type":"string",
100
+ "maxLength": 22,
101
+ "minLength":22
102
+ },
103
+ "contact":{
104
+ "description": "The contact for the document. Is assigned through the related invoice.",
105
+ "readonly":true,
106
+ "type":"object",
107
+ "properties":{"$ref":"./contact.json#properties"}
108
+ },
109
+ "contact_id":{
110
+ "description": "The contact uuid. Is assigned through the related invoice.",
111
+ "readonly":true,
99
112
  "type":"string",
100
113
  "maxLength": 22,
101
114
  "minLength":22
@@ -184,7 +197,12 @@
184
197
  },
185
198
  "filter[client_ids]":{
186
199
  "title" : "Clients",
187
- "description": "A single or a list of client uuids, comma separated",
200
+ "description": "DEPRECATED use contact_ids",
201
+ "type" : "string"
202
+ },
203
+ "filter[contact_ids]":{
204
+ "title" : "Contacts",
205
+ "description": "A single or a list of contact uuids, comma separated",
188
206
  "type" : "string"
189
207
  },
190
208
  "filter[ids]":{
@@ -195,13 +213,14 @@
195
213
  "sort_by":{
196
214
  "title" : "Sort by",
197
215
  "description": "Sort the results by the given field => number",
198
- "enum":["title", "number", "created_at", "updated_at", "client_id", "price_total", "price_tax", "date", "due_date"],
216
+ "enum":["title", "number", "created_at", "updated_at", "price_total", "price_tax", "date", "due_date"],
199
217
  "type": "string"
200
218
  },
201
219
  "sort":{
202
220
  "title" : "Sort",
203
221
  "enum":["ASC","DESC"],
204
- "description": "Sort the results in ASC or DESC"
222
+ "description": "Sort the results in ASC or DESC",
223
+ "type": "string"
205
224
  }
206
225
  }
207
226
  },
@@ -78,8 +78,9 @@
78
78
  },
79
79
  "sort":{
80
80
  "title" : "Sort",
81
- "enum":["ASC","DESC"],
82
- "description": "Sort the results in ASC or DESC"
81
+ "description": "Sort the results in ASC or DESC",
82
+ "type":"string",
83
+ "enum":["ASC","DESC"]
83
84
  },
84
85
  "filter[q]":{
85
86
  "title" : "Search wildcard",
@@ -88,8 +89,9 @@
88
89
  },
89
90
  "filter[kind]":{
90
91
  "title" : "Search by kind",
91
- "description": "Kind of object this template can be used for: invoice, credit_note (singular lowercase classname)",
92
- "type":"string"
92
+ "description": "Kind of object this template can be used for: invoice, order",
93
+ "type":"string",
94
+ "enum":["invoice","estimate", "credit_note", "payment_reminder", "order"]
93
95
  }
94
96
  }
95
97
  }
@@ -109,7 +109,8 @@
109
109
  "sort":{
110
110
  "title" : "Sort",
111
111
  "enum":["ASC","DESC"],
112
- "description": "Sort the results in ASC or DESC"
112
+ "description": "Sort the results in ASC or DESC",
113
+ "type": "string"
113
114
  }
114
115
  }
115
116
  },
@@ -84,13 +84,25 @@
84
84
  "minLength": 3
85
85
  },
86
86
  "client":{
87
- "description": "The client for the document. New documents cannot create a client, use client_id field to set it.",
87
+ "description": "DEPRECATED: use contact",
88
88
  "readonly":true,
89
89
  "type":"object",
90
90
  "properties":{"$ref":"./client.json#properties"}
91
91
  },
92
92
  "client_id":{
93
- "description": "The clients uuid. If a new client is assigned its language, address field, due days and cash discount are used if those fields are not set.",
93
+ "description": "DEPRECATED: use contact_id",
94
+ "type":"string",
95
+ "maxLength": 22,
96
+ "minLength":22
97
+ },
98
+ "contact":{
99
+ "description": "The contact for the document. Use contact_id field to set a contact.",
100
+ "readonly":true,
101
+ "type":"object",
102
+ "properties":{"$ref":"./contact.json#properties"}
103
+ },
104
+ "contact_id":{
105
+ "description": "The contact uuid. When assigning a contact its language, currency, address_field (due days, cash discount) values are used for the document if those doc-fields are not set.",
94
106
  "type":"string",
95
107
  "maxLength": 22,
96
108
  "minLength":22
@@ -201,7 +213,12 @@
201
213
  },
202
214
  "filter[client_ids]":{
203
215
  "title" : "Clients",
204
- "description": "A single or a list of client uuids, comma separated",
216
+ "description": "DEPRECATED use contact_ids",
217
+ "type" : "string"
218
+ },
219
+ "filter[contact_ids]":{
220
+ "title" : "Contacts",
221
+ "description": "A single or a list of contact uuids, comma separated",
205
222
  "type" : "string"
206
223
  },
207
224
  "filter[ids]":{
@@ -217,13 +234,14 @@
217
234
  "sort_by":{
218
235
  "title" : "Sort by",
219
236
  "description": "Sort the results by the given field => number",
220
- "enum":["title", "number", "created_at", "updated_at", "client_id", "price_total"],
237
+ "enum":["title", "number", "created_at", "updated_at", "price_total"],
221
238
  "type": "string"
222
239
  },
223
240
  "sort":{
224
241
  "title" : "Sort",
225
242
  "enum":["ASC","DESC"],
226
- "description": "Sort the results in ASC or DESC"
243
+ "description": "Sort the results in ASC or DESC",
244
+ "type": "string"
227
245
  }
228
246
  }
229
247
  },
@@ -241,7 +259,7 @@
241
259
  "properties" : {
242
260
  "source" : {
243
261
  "title" : "Source document id",
244
- "description": "Copies the source document(excl. number,date) and returns a new draft document.",
262
+ "description": "Copies the source(excl. number,date) and returns a new draft document. Fields passed with the object(e.g. notes, title, address_field) are not overwritten.",
245
263
  "type" : "string"
246
264
  }
247
265
  }
data/json/v1.0/tag.json CHANGED
@@ -59,7 +59,8 @@
59
59
  "sort":{
60
60
  "title" : "Sort",
61
61
  "enum":["ASC","DESC"],
62
- "description": "Sort the results in ASC or DESC"
62
+ "description": "Sort the results in ASC or DESC",
63
+ "type": "string"
63
64
  }
64
65
  }
65
66
  },
@@ -26,7 +26,7 @@
26
26
  "kind":{
27
27
  "description": "Kind of object the template can be used for. If empty the snippet can be used global. In this case watch not all placeholders are available: a client has different fields than an invoice.",
28
28
  "required":true,
29
- "enum": ["","invoice", "estimate", "credit_note", "payment_reminder", "order", "client", "email"],
29
+ "enum": ["","invoice", "estimate", "credit_note", "payment_reminder", "order", "contact", "email"],
30
30
  "type":"string"
31
31
  },
32
32
  "created_at":{
@@ -74,7 +74,8 @@
74
74
  "sort":{
75
75
  "title" : "Sort",
76
76
  "enum":["ASC","DESC"],
77
- "description": "Sort the results in ASC or DESC"
77
+ "description": "Sort the results in ASC or DESC",
78
+ "type": "string"
78
79
  }
79
80
  }
80
81
  },
@@ -1,7 +1,7 @@
1
1
  module SK
2
2
  module Api
3
3
  class Schema
4
- VERSION='0.6.1'
4
+ VERSION='0.7.0'
5
5
  end
6
6
  end
7
7
  end
@@ -144,7 +144,9 @@ end
144
144
  ################################################################################
145
145
  # virtual classes used in test
146
146
  class Invoice
147
- attr_accessor :id, :title, :description, :number, :date, :due_date, :line_items, :client, :archived_pdf, :items
147
+ attr_accessor :id, :title, :description, :number, :date, :due_date,
148
+ :line_items, :archived_pdf, :items,
149
+ :client, :contact
148
150
  end
149
151
 
150
152
  class LineItem
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: 5
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 6
9
- - 1
10
- version: 0.6.1
8
+ - 7
9
+ - 0
10
+ version: 0.7.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Georg Leciejewski
@@ -112,6 +112,7 @@ files:
112
112
  - json/v1.0/client.json
113
113
  - json/v1.0/comment.json
114
114
  - json/v1.0/company.json
115
+ - json/v1.0/contact.json
115
116
  - json/v1.0/credit_note.json
116
117
  - json/v1.0/divider_item.json
117
118
  - json/v1.0/document.json