sk_api_schema 0.8.4 → 0.8.5

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,21 +1,20 @@
1
1
  # SalesKing API Changelog
2
2
 
3
3
  See [commit messages](https://github.com/salesking/sk_api_schema/commits/) for details.
4
- Also signup to our [Developer Newsletter](http://www.salesking.eu/dev/newsletter/) to stay up-to-date !!!
4
+ Also sign up to our [Developer Newsletter](http://www.salesking.eu/dev/newsletter/) to stay up-to-date !!!
5
5
 
6
6
  ##2013-08
7
7
 
8
+ * fix docs for POST invoices/ID/payments to create payments
9
+ * add auto_send setting for recurring, opens invoice,creates pdf, sends email
8
10
  * add recurring_id for invoices referencing the recurring from which the invoice was created
9
- * add filter\[recurring_ids] to invoices, recurring links to all invoices
11
+ * add filter\[recurring_ids] to invoices
12
+ * add link to all invoices in recurring
10
13
  * add filter\[status] to all documents
11
14
  * add log field for emails, keeping potential error log
12
15
  * add BCC, CC, FROM fields for email templates
13
16
  * add items array to documents to be used instead of line_items
14
- * Deprecate line_items
15
-
16
- ** doc.items vs doc.line_items **
17
-
18
- ONLY use ONE as long as both items and line_items are present!
17
+ * Deprecate line_items **! doc.items vs doc.line_items !** ONLY use ONE as long as both items and line_items are present!
19
18
  When updating objects we cannot figure out which array changed. In this case we
20
19
  prefer line_items for backwards compatibility.
21
20
  When using items: make sure to remove line_items before submitting an updated
@@ -81,7 +81,7 @@
81
81
  "minLength": 3
82
82
  },
83
83
  "exchange_rate":{
84
- "description": "The exchange rate from the foreign document currency(eg. USD) to the company currency(EUR). The rate is set on document open with the exchange rate based on the document date. If there is no rate for this day, say on weekends, the closest previous day is taken(Sunday->Friday).",
84
+ "description": "The exchange rate from the foreign document currency(eg. USD) to the company currency(EUR). If the rate is empty we use the exchange rate on the document date or today if doc.date is empty. If there is no rate for this day, say on weekends, the closest previous day is taken(Sunday->Friday). If you open the doc at a later time make sure to manually refresh the rate, as we dont change it. ",
85
85
  "readonly":true,
86
86
  "type":"number"
87
87
  },
@@ -294,7 +294,7 @@
294
294
  "properties" : {
295
295
  "source" : {
296
296
  "title" : "Source document id",
297
- "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."
297
+ "description": "Copies the source(excl. number,date) and returns a new draft document. You can pass any document type(e.g. invoice, order). Fields passed with the object(e.g. notes, title, address_field) are not overwritten."
298
298
  },
299
299
  "cancel" : {
300
300
  "title" : "Cancel an credit note",
@@ -336,6 +336,10 @@
336
336
  }
337
337
  }
338
338
  },
339
+ { "rel": "payment create",
340
+ "href": "invoices/{id}/payments",
341
+ "method": "POST"
342
+ },
339
343
  { "rel": "print",
340
344
  "href": "credit_notes/{id}/print",
341
345
  "method": "POST",
@@ -122,7 +122,7 @@
122
122
  "minLength": 3
123
123
  },
124
124
  "exchange_rate":{
125
- "description": "The exchange rate from the foreign document currency(eg. USD) to the company currency(EUR). The rate is set on document open with the exchange rate based on the document date. If there is no rate for this day, say on weekends, the closest previous day is taken(Sunday->Friday).",
125
+ "description": "The exchange rate from the foreign document currency(eg. USD) to the company currency(EUR). If the rate is empty we use the exchange rate on the document date or today if doc.date is empty. If there is no rate for this day, say on weekends, the closest previous day is taken(Sunday->Friday). If you open the doc at a later time make sure to manually refresh the rate, as we dont change it. ",
126
126
  "readonly":true,
127
127
  "type":"number"
128
128
  },
@@ -76,7 +76,7 @@
76
76
  "minLength": 3
77
77
  },
78
78
  "exchange_rate":{
79
- "description": "The exchange rate from the foreign document currency(eg. USD) to the company currency(EUR). The rate is set on document open with the exchange rate based on the document date. If there is no rate for this day, say on weekends, the closest previous day is taken(Sunday->Friday).",
79
+ "description": "The exchange rate from the foreign document currency(eg. USD) to the company currency(EUR). If the rate is empty we use the exchange rate on the document date or today if doc.date is empty. If there is no rate for this day, say on weekends, the closest previous day is taken(Sunday->Friday). If you open the doc at a later time make sure to manually refresh the rate, as we dont change it. ",
80
80
  "readonly":true,
81
81
  "type":"number"
82
82
  },
@@ -286,7 +286,7 @@
286
286
  "properties" : {
287
287
  "source" : {
288
288
  "title" : "Source document id",
289
- "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.",
289
+ "description": "Copies the source(excl. number,date) and returns a new draft document. You can pass any document type(e.g. invoice, order). Fields passed with the object(e.g. notes, title, address_field) are not overwritten.",
290
290
  "type" : "string"
291
291
  }
292
292
  }
@@ -81,7 +81,7 @@
81
81
  "minLength": 3
82
82
  },
83
83
  "exchange_rate":{
84
- "description": "The exchange rate from the foreign document currency(eg. USD) to the company currency(EUR). The rate is set on document open with the exchange rate based on the document date. If there is no rate for this day, say on weekends, the closest previous day is taken(Sunday->Friday).",
84
+ "description": "The exchange rate from the foreign document currency(eg. USD) to the company currency(EUR). If the rate is empty we use the exchange rate on the document date or today if doc.date is empty. If there is no rate for this day, say on weekends, the closest previous day is taken(Sunday->Friday). If you open the doc at a later time make sure to manually refresh the rate, as we dont change it. ",
85
85
  "readonly":true,
86
86
  "type":"number"
87
87
  },
@@ -301,7 +301,7 @@
301
301
  "properties" : {
302
302
  "source" : {
303
303
  "title" : "Source document id",
304
- "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. If the source is an Estimate or Order only line_items, contact & tags are copied.",
304
+ "description": "Copies the source(excl. number,date) and returns a new draft document. You can pass any document type(e.g. invoice, order). Fields passed with the object(e.g. notes, title, address_field) are not overwritten.",
305
305
  "type" : "string"
306
306
  },
307
307
  "cancel" : {
@@ -348,6 +348,10 @@
348
348
  }
349
349
  }
350
350
  },
351
+ { "rel": "payment create",
352
+ "href": "invoices/{id}/payments",
353
+ "method": "POST"
354
+ },
351
355
  { "rel": "print",
352
356
  "href": "invoices/{id}/print",
353
357
  "method": "POST",
data/json/v1.0/order.json CHANGED
@@ -81,7 +81,7 @@
81
81
  "minLength": 3
82
82
  },
83
83
  "exchange_rate":{
84
- "description": "The exchange rate from the foreign document currency(eg. USD) to the company currency(EUR). The rate is set on document open with the exchange rate based on the document date. If there is no rate for this day, say on weekends, the closest previous day is taken(Sunday->Friday).",
84
+ "description": "The exchange rate from the foreign document currency(eg. USD) to the company currency(EUR). If the rate is empty we use the exchange rate on the document date or today if doc.date is empty. If there is no rate for this day, say on weekends, the closest previous day is taken(Sunday->Friday). If you open the doc at a later time make sure to manually refresh the rate, as we dont change it. ",
85
85
  "readonly":true,
86
86
  "type":"number"
87
87
  },
@@ -291,7 +291,7 @@
291
291
  "properties" : {
292
292
  "source" : {
293
293
  "title" : "Source document id",
294
- "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.",
294
+ "description": "Copies the source(excl. number,date) and returns a new draft document. You can pass any document type(e.g. invoice, order). Fields passed with the object(e.g. notes, title, address_field) are not overwritten.",
295
295
  "type" : "string"
296
296
  }
297
297
  }
@@ -1,7 +1,7 @@
1
1
  { "type":"object",
2
2
  "title": "payment",
3
3
  "name": "payment",
4
- "description":"An payment in SK must always be related to an document.",
4
+ "description":"An payment must always be related to an document, so you must use the nested URL e.g. POST invoices/ID/payments. In this case the related_object_id/type are automatically set.",
5
5
  "properties":{
6
6
  "id":{
7
7
  "description":"Unique identifier - UUID",
@@ -43,7 +43,7 @@
43
43
  "minLength": 3
44
44
  },
45
45
  "exchange_rate":{
46
- "description": "The exchange rate from the foreign document currency(eg. USD) to the company currency(EUR). The rate is set on document open with the exchange rate based on the document date. If there is no rate for this day, say on weekends, the closest previous day is taken(Sunday->Friday).",
46
+ "description": "The exchange rate from the foreign document currency(eg. USD) to the company currency(EUR). If the rate is empty we use the exchange rate on the document date or today if doc.date is empty. If there is no rate for this day, say on weekends, the closest previous day is taken(Sunday->Friday). If you open the doc at a later time make sure to manually refresh the rate, as we dont change it. ",
47
47
  "readonly":true,
48
48
  "type":"number"
49
49
  },
@@ -62,12 +62,12 @@
62
62
  "type":"number"
63
63
  },
64
64
  "related_object_type":{
65
- "description": "Object type of the payments parent. Is the camel-cased base class name: Document for invoice, credit_note",
65
+ "description": "Object type of the payments parent. Is the camel-cased base class name: Document for invoice, credit_note. Is auto-set when using the nested URL POST invoices/ID/payments",
66
66
  "required":true,
67
67
  "type":"string"
68
68
  },
69
69
  "related_object_id":{
70
- "description": "uuid of the payments parent object.",
70
+ "description": "uuid of the payments parent object. Is auto-set when using the nested URL POST invoices/ID/payments",
71
71
  "required":true,
72
72
  "type":"string",
73
73
  "maxLength": 22,
@@ -79,7 +79,7 @@
79
79
  "minLength": 3
80
80
  },
81
81
  "exchange_rate":{
82
- "description": "The exchange rate from the foreign document currency(eg. USD) to the company currency(EUR). The rate is set on document open with the exchange rate based on the document date. If there is no rate for this day, say on weekends, the closest previous day is taken(Sunday->Friday).",
82
+ "description": "The exchange rate from the foreign document currency(eg. USD) to the company currency(EUR). If the rate is empty we use the exchange rate on the document date or today if doc.date is empty. If there is no rate for this day, say on weekends, the closest previous day is taken(Sunday->Friday). If you open the doc at a later time make sure to manually refresh the rate, as we dont change it. ",
83
83
  "readonly":true,
84
84
  "type":"number"
85
85
  },
@@ -162,6 +162,24 @@
162
162
  "description": "Net total, 6 decimal places incl. discount",
163
163
  "readonly":true,
164
164
  "type":"number"
165
+ },
166
+ "pdf_template_id":{
167
+ "description": "The PDF template used for printing the invoice when auto sending. Required when auto_send'ing is enabled.",
168
+ "type":"string",
169
+ "maxLength": 22,
170
+ "minLength":22
171
+ },
172
+ "email_template_id":{
173
+ "description": "The Email template used for the email in auto sending. Required when auto_send'ing is enabled.",
174
+ "type":"string",
175
+ "maxLength": 22,
176
+ "minLength":22
177
+ },
178
+ "auto_send":{
179
+ "description": "Enable automatic sending of new invoices created from the recurring. Opens the invoice, creates a PDF and sends an email to the contact. GOTCHA's: check PDF-, Email-Template, SMTP Settings and of course the contacts email address! Since new recurrings which start today directly create new invoices, they are also SEND if auto_send is true!! If something fails, we'll send an error-email to the user who created the recurring. For success infos you can add yourself to the BCC of the email template or",
180
+ "default": null,
181
+ "type": "string",
182
+ "enum":["email"]
165
183
  }
166
184
  },
167
185
  "links":[
@@ -268,7 +286,7 @@
268
286
  "properties" : {
269
287
  "source" : {
270
288
  "title" : "Source document id",
271
- "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.",
289
+ "description": "Copies the source(excl. number,date) and returns a new draft document. You can pass any document type(e.g. invoice, order). Fields passed with the object(e.g. notes, title, address_field) are not overwritten.",
272
290
  "type" : "string"
273
291
  }
274
292
  }
@@ -1,7 +1,7 @@
1
1
  module SK
2
2
  module Api
3
3
  class Schema
4
- VERSION='0.8.4'
4
+ VERSION='0.8.5'
5
5
  end
6
6
  end
7
7
  end
@@ -11,11 +11,11 @@ Besides ruby users can use a small lib with utility methods to load and test the
11
11
  s.authors = ['Georg Leciejewski']
12
12
  s.email = %q{gl@salesking.eu}
13
13
  s.homepage = %q{http://github.com/salesking/sk_api_schema}
14
+ s.license = 'MIT'
14
15
 
15
16
  s.files = `git ls-files`.split("\n").reject{|i| i[/^docs\//] }
16
17
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
18
  s.extra_rdoc_files = ['README.rdoc']
18
-
19
19
  s.require_paths = ['lib']
20
20
 
21
21
  s.add_runtime_dependency 'activesupport'
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: 55
4
+ hash: 53
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 8
9
- - 4
10
- version: 0.8.4
9
+ - 5
10
+ version: 0.8.5
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: 2013-08-16 00:00:00 Z
18
+ date: 2013-08-25 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  type: :runtime
@@ -141,8 +141,8 @@ files:
141
141
  - spec/sk_api_schema_spec.rb
142
142
  - spec/spec_helper.rb
143
143
  homepage: http://github.com/salesking/sk_api_schema
144
- licenses: []
145
-
144
+ licenses:
145
+ - MIT
146
146
  post_install_message:
147
147
  rdoc_options: []
148
148