sk_api_schema 0.0.15 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -13,13 +13,13 @@ http://dev.blog.salesking.eu/api/
13
13
 
14
14
  == Versioning
15
15
 
16
- The API-version, is kept in the folder-name and as long as there are no major
16
+ The API-version is kept in the folder-name and as long as there are no major
17
17
  changes(breaking backwards compatibility), the version number will remain.
18
18
 
19
19
  The gem has its own version number. It is used by SalesKing to deliver it's
20
20
  resources BUT changes might not be directly reflected.
21
21
  A new gem version indicates a change, but we first try it on our staging environment
22
- before any live instances are updated.
22
+ before any live instances are updated and the schema becomes public available.
23
23
 
24
24
  You can get the current schema at your SalesKing api url:
25
25
  my.salesking.eu/api/schema
@@ -41,4 +41,4 @@ see bugfixes since more resources where made available.
41
41
 
42
42
  gem install sk_api_schema
43
43
 
44
- Copyright (c) 2010 Georg Leciejewski, released under the MIT license
44
+ Copyright (c) 2010-2011 Georg Leciejewski, released under the MIT license
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.15
1
+ 0.0.16
@@ -0,0 +1,61 @@
1
+ {"type":"object",
2
+ "title": "auth_permission",
3
+ "description": "A Permission authorises someone to execute actions(grants privileges) in the scope of a context. The context is a resource f.ex: clients, and the privileges a group of actions like: index, show, edit, update. A permission to read invoices has the context: invoices and as privileges: index,show.",
4
+ "properties": {
5
+ "id": {
6
+ "identity":true,
7
+ "readonly":true,
8
+ "type":"string"
9
+ },
10
+ "full_name": {
11
+ "description": "Context_name and name localized: API Clients read - API Kunden anzeigen",
12
+ "type":"string"
13
+ },
14
+ "name": {
15
+ "description": "Name for the permission. Since a permission groups multiple privileges the name reflects what someone is allowed to do: read, update, delete. With 'read' granting acccess to the 'index' and 'show' actions of a resource.",
16
+ "type":"string"
17
+ },
18
+ "context_name":{
19
+ "description": "The context for the permission, beeing a resource: clients, emails",
20
+ "readonly":true,
21
+ "type":"string"
22
+ },
23
+ "privilege_list": {
24
+ "description": "A permission has many privileges which define the actions someone can execute. Such actions are resource methods like index, update, edit, show",
25
+ "type":"string",
26
+ "readonly":true
27
+ }
28
+ },
29
+
30
+ "links":[
31
+ { "rel": "instances",
32
+ "href": "auth_permissions",
33
+ "properties" : {
34
+ "page":{
35
+ "title" : "Page",
36
+ "description": "In paginated results set the page to look for",
37
+ "type":"number"
38
+ },
39
+ "filter[q]":{
40
+ "title" : "Search",
41
+ "description": "Search in name and context names",
42
+ "type":"string"
43
+ },
44
+ "sort_by":{
45
+ "title" : "Sort by",
46
+ "description": "Sort the results by the given field => number",
47
+ "enum":["auth_permission.name", "auth_context.name"],
48
+ "type": "string"
49
+ },
50
+ "sort":{
51
+ "title" : "Sort",
52
+ "enum":["ASC","DESC"],
53
+ "description": "Sort the results in ASC or DESC"
54
+ }
55
+ }
56
+ },
57
+ { "rel": "self",
58
+ "href": "auth_permissions/{id}"
59
+ }
60
+ ]
61
+ }
@@ -75,7 +75,7 @@
75
75
  },
76
76
  "payment_method":{
77
77
  "description": "Default payment method for used for new documemts",
78
- "enum":["cash","bank_transfer","credit_card","paypal","direct_debit","cheque"],
78
+ "enum":["cash","bank_transfer","credit_card","paypal","direct_debit","cheque", "moneybookers", "premium_sms"],
79
79
  "type":"string"
80
80
  },
81
81
  "bank_name": {
@@ -178,8 +178,8 @@
178
178
  "sort_by":{
179
179
  "title" : "Sort by",
180
180
  "description": "Sort the results by the given field => number",
181
- "enum":['organisation', 'number','email','first_name','last_name', 'created_at', 'updated_at'],
182
- "type": 'string'
181
+ "enum":["organisation", "number","email","first_name","last_name", "created_at", "updated_at"],
182
+ "type": "string"
183
183
  },
184
184
  "sort":{
185
185
  "title" : "Sort",
@@ -68,8 +68,8 @@
68
68
  "sort_by":{
69
69
  "title" : "Sort by",
70
70
  "description": "Sort the results by the given field => number",
71
- "enum":['created_at', 'updated_at'],
72
- "type": 'string'
71
+ "enum":["created_at", "updated_at"],
72
+ "type": "string"
73
73
  },
74
74
  "sort":{
75
75
  "title" : "Sort",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "payment_method":{
44
44
  "description": "How the document is beeing payed. Used in new payments.",
45
- "enum":["cash","bank_transfer","credit_card","paypal","direct_debit","cheque"],
45
+ "enum":["cash","bank_transfer","credit_card","paypal","direct_debit","cheque", "moneybookers", "premium_sms"],
46
46
  "type":"string"
47
47
  },
48
48
  "title":{
@@ -177,8 +177,8 @@
177
177
  "sort_by":{
178
178
  "title" : "Sort by",
179
179
  "description": "Sort the results by the given field => number",
180
- "enum":['title', 'number', 'created_at', 'updated_at', 'client_id', 'price_total', 'price_tax', 'date', 'due_date'],
181
- "type": 'string'
180
+ "enum":["title", "number", "created_at", "updated_at", "client_id", "price_total", "price_tax", "date", "due_date"],
181
+ "type": "string"
182
182
  },
183
183
  "sort":{
184
184
  "title" : "Sort",
@@ -206,7 +206,7 @@
206
206
  "cancel" : {
207
207
  "title" : "Cancel an credit note",
208
208
  "description": "Cancelling a document negates its line item values. A source id must be set.",
209
- "dependencies": ['source']
209
+ "dependencies": ["source"]
210
210
  }
211
211
  }
212
212
  },
data/json/v1.0/email.json CHANGED
@@ -120,8 +120,8 @@
120
120
  "sort_by":{
121
121
  "title" : "Sort by",
122
122
  "description": "Sort the results by the given field => number",
123
- "enum":['created_at', 'updated_at'],
124
- "type": 'string'
123
+ "enum":["created_at", "updated_at"],
124
+ "type": "string"
125
125
  },
126
126
  "sort":{
127
127
  "title" : "Sort",
@@ -26,7 +26,7 @@
26
26
  "kind": {
27
27
  "description": "Kind of object receiving the email.",
28
28
  "required":true,
29
- "enum": ['invoice', 'estimate', 'credit_note', 'payment_reminder', 'order', 'client'],
29
+ "enum": ["invoice", "estimate", "credit_note", "payment_reminder", "order", "client"],
30
30
  "type":"string"
31
31
  },
32
32
  "created_at": {
@@ -61,8 +61,8 @@
61
61
  "sort_by":{
62
62
  "title" : "Sort by",
63
63
  "description": "Sort the results by the given field => number",
64
- "enum":['created_at', 'updated_at'],
65
- "type": 'string'
64
+ "enum":["created_at", "updated_at"],
65
+ "type": "string"
66
66
  },
67
67
  "sort":{
68
68
  "title" : "Sort",
@@ -163,8 +163,8 @@
163
163
  "sort_by":{
164
164
  "title" : "Sort by",
165
165
  "description": "Sort the results by the given field => number",
166
- "enum":['title', 'number', 'created_at', 'updated_at', 'client_id', 'price_total', 'price_tax', 'date', 'due_date'],
167
- "type": 'string'
166
+ "enum":["title", "number", "created_at", "updated_at", "client_id", "price_total", "price_tax", "date", "due_date"],
167
+ "type": "string"
168
168
  },
169
169
  "sort":{
170
170
  "title" : "Sort",
@@ -20,7 +20,7 @@
20
20
  "kind": {
21
21
  "description": "The export type. text: uses an export template defined by a template_id. archived_pdf: zip with archived PDF(documents only). allinone_pdf: All archived PDF(Documents) in one big PDF. attachments: All attachments of the given objects as zip. dtaus: German bank format, relies on valid bank information in your company and for each client of the exported documents. dtaus_lk Lastschrift. dtaus_gk: Gutschrift.",
22
22
  "required":true,
23
- "enum": ['text', 'archived_pdf', 'attachments', 'dtaus_lk', 'dtaus_gk', 'allinone_pdf'],
23
+ "enum": ["text", "archived_pdf", "attachments", "dtaus_lk", "dtaus_gk", "allinone_pdf"],
24
24
  "type":"string"
25
25
  },
26
26
  "template_id":{
@@ -34,7 +34,7 @@
34
34
  "status": {
35
35
  "description": "The export status",
36
36
  "readonly":true,
37
- "enum": ['pending', 'in_progress', 'failed', 'success'],
37
+ "enum": ["pending", "in_progress", "failed", "success"],
38
38
  "type":"string"
39
39
  },
40
40
  "log": {
@@ -97,8 +97,8 @@
97
97
  "sort_by":{
98
98
  "title" : "Sort by",
99
99
  "description": "Sort the results by the given field => number",
100
- "enum":['created_at', 'updated_at'],
101
- "type": 'string'
100
+ "enum":["created_at", "updated_at"],
101
+ "type": "string"
102
102
  },
103
103
  "sort":{
104
104
  "title" : "Sort",
@@ -21,7 +21,7 @@
21
21
  "kind": {
22
22
  "description": "Kind of exported data.",
23
23
  "required":true,
24
- "enum": ['invoice', 'estimate', 'credit_note', 'payment_reminder', 'order', 'client', 'payment', 'comment', 'email', 'history', 'product','recurring'],
24
+ "enum": ["invoice", "estimate", "credit_note", "payment_reminder", "order", "client", "payment", "comment", "email", "history", "product","recurring"],
25
25
  "type":"string"
26
26
  },
27
27
  "filename": {
@@ -60,8 +60,8 @@
60
60
  "sort_by":{
61
61
  "title" : "Sort by",
62
62
  "description": "Sort the results by the given field => number",
63
- "enum":['created_at', 'updated_at'],
64
- "type": 'string'
63
+ "enum":["created_at", "updated_at"],
64
+ "type": "string"
65
65
  },
66
66
  "sort":{
67
67
  "title" : "Sort",
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "payment_method":{
44
44
  "description": "How the invoce is beeing payed. Used in new payments.",
45
- "enum":["cash","bank_transfer","credit_card","paypal","direct_debit","cheque"],
45
+ "enum":["cash","bank_transfer","credit_card","paypal","direct_debit","cheque", "moneybookers", "premium_sms"],
46
46
  "type":"string"
47
47
  },
48
48
  "title":{
@@ -178,8 +178,8 @@
178
178
  "sort_by":{
179
179
  "title" : "Sort by",
180
180
  "description": "Sort the results by the given field => number",
181
- "enum":['title', 'number', 'created_at', 'updated_at', 'client_id', 'price_total', 'price_tax', 'date', 'due_date'],
182
- "type": 'string'
181
+ "enum":["title", "number", "created_at", "updated_at", "client_id", "price_total", "price_tax", "date", "due_date"],
182
+ "type": "string"
183
183
  },
184
184
  "sort":{
185
185
  "title" : "Sort",
@@ -207,7 +207,7 @@
207
207
  "cancel" : {
208
208
  "title" : "Cancel an invoice",
209
209
  "description": "Cancelling a document negates its line item values. A source id must be set.",
210
- "dependencies": ['source']
210
+ "dependencies": ["source"]
211
211
  }
212
212
  }
213
213
  },
data/json/v1.0/order.json CHANGED
@@ -153,8 +153,8 @@
153
153
  "sort_by":{
154
154
  "title" : "Sort by",
155
155
  "description": "Sort the results by the given field => number",
156
- "enum":['title', 'number', 'created_at', 'updated_at', 'client_id', 'price_total', 'price_tax', 'date', 'due_date'],
157
- "type": 'string'
156
+ "enum":["title", "number", "created_at", "updated_at", "client_id", "price_total", "price_tax", "date", "due_date"],
157
+ "type": "string"
158
158
  },
159
159
  "sort":{
160
160
  "title" : "Sort",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "method":{
27
27
  "description": "How the payment was made.",
28
- "enum":["cash","bank_transfer","credit_card","paypal","direct_debit","cheque"],
28
+ "enum":["cash","bank_transfer","credit_card","paypal","direct_debit","cheque", "moneybookers", "premium_sms"],
29
29
  "type":"string"
30
30
  },
31
31
  "related_object_type": {
@@ -77,8 +77,8 @@
77
77
  "sort_by":{
78
78
  "title" : "Sort by",
79
79
  "description": "Sort the results by the given field => number",
80
- "enum":['amount','created_at', 'updated_at'],
81
- "type": 'string'
80
+ "enum":["amount","created_at", "updated_at"],
81
+ "type": "string"
82
82
  },
83
83
  "sort":{
84
84
  "title" : "Sort",
@@ -98,7 +98,7 @@
98
98
  "new_doc_status":{
99
99
  "title" : "New status for document",
100
100
  "description": "Convinience method to close a document with a payment.",
101
- "enum": ['open','closed'],
101
+ "enum": ["open","closed"],
102
102
  "type":"string"
103
103
  }
104
104
  }
@@ -143,8 +143,8 @@
143
143
  "sort_by":{
144
144
  "title" : "Sort by",
145
145
  "description": "Sort the results by the given field => number",
146
- "enum":['title', 'number', 'created_at', 'updated_at', 'client_id', 'price_total', 'price_tax', 'date', 'due_date'],
147
- "type": 'string'
146
+ "enum":["title", "number", "created_at", "updated_at", "client_id", "price_total", "price_tax", "date", "due_date"],
147
+ "type": "string"
148
148
  },
149
149
  "sort":{
150
150
  "title" : "Sort",
@@ -74,8 +74,8 @@
74
74
  "sort_by":{
75
75
  "title" : "Sort by",
76
76
  "description": "Sort the results by the given field => number",
77
- "enum":['name','number','price', 'created_at', 'updated_at'],
78
- "type": 'string'
77
+ "enum":["name","number","price", "created_at", "updated_at"],
78
+ "type": "string"
79
79
  },
80
80
  "sort":{
81
81
  "title" : "Sort",
@@ -35,13 +35,13 @@
35
35
  },
36
36
  "frequency":{
37
37
  "description": "Recurring frequency",
38
- "enum":['yearly', 'monthly', 'weekly', 'quarterly', 'biweekly', 'sixmonthly'],
38
+ "enum":["yearly", "monthly", "weekly", "quarterly", "biweekly", "sixmonthly"],
39
39
  "type":"string",
40
40
  "required":true
41
41
  },
42
42
  "payment_method":{
43
43
  "description": "How the invoce is beeing payed. Used in new payments.",
44
- "enum":["cash","bank_transfer","credit_card","paypal","direct_debit","cheque"],
44
+ "enum":["cash","bank_transfer","credit_card","paypal","direct_debit","cheque", "moneybookers", "premium_sms"],
45
45
  "type":"string"
46
46
  },
47
47
  "external_ref":{
@@ -165,8 +165,8 @@
165
165
  "sort_by":{
166
166
  "title" : "Sort by",
167
167
  "description": "Sort the results by the given field => number",
168
- "enum":['title', 'number', 'created_at', 'updated_at', 'client_id', 'price_total'],
169
- "type": 'string'
168
+ "enum":["title", "number", "created_at", "updated_at", "client_id", "price_total"],
169
+ "type": "string"
170
170
  },
171
171
  "sort":{
172
172
  "title" : "Sort",
@@ -194,7 +194,7 @@
194
194
  "cancel" : {
195
195
  "title" : "Cancel an recurring",
196
196
  "description": "Cancelling a document negates its line item values. A source id must be set.",
197
- "dependencies": ['source']
197
+ "dependencies": ["source"]
198
198
  }
199
199
  }
200
200
  },
@@ -14,14 +14,14 @@
14
14
  "type":"string"
15
15
  },
16
16
  "text": {
17
- "description": "Subject containing placeholders, replaced when the template is used.",
17
+ "description": "Text which may contain placeholders, replaced when the template is used.",
18
18
  "required":true,
19
19
  "type":"string"
20
20
  },
21
21
  "kind": {
22
22
  "description": "Kind of object in which the text is used. If empty the snippet can be used globally, but watch those placeholder.",
23
23
  "required":true,
24
- "enum": ['','invoice', 'estimate', 'credit_note', 'payment_reminder', 'order', 'client', 'email'],
24
+ "enum": ["","invoice", "estimate", "credit_note", "payment_reminder", "order", "client", "email"],
25
25
  "type":"string"
26
26
  },
27
27
  "created_at": {
@@ -56,8 +56,8 @@
56
56
  "sort_by":{
57
57
  "title" : "Sort by",
58
58
  "description": "Sort the results by the given field => number",
59
- "enum":['created_at', 'updated_at'],
60
- "type": 'string'
59
+ "enum":["created_at", "updated_at"],
60
+ "type": "string"
61
61
  },
62
62
  "sort":{
63
63
  "title" : "Sort",
@@ -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.15"
8
+ s.version = "0.0.16"
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-02-03}
12
+ s.date = %q{2011-02-14}
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 = [
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
21
21
  "VERSION",
22
22
  "json/v1.0/address.json",
23
23
  "json/v1.0/attachment.json",
24
+ "json/v1.0/auth_permission.json",
24
25
  "json/v1.0/client.json",
25
26
  "json/v1.0/comment.json",
26
27
  "json/v1.0/company.json",
@@ -46,7 +47,7 @@ Gem::Specification.new do |s|
46
47
  ]
47
48
  s.homepage = %q{http://github.com/salesking/sk_api_schema}
48
49
  s.require_paths = ["lib"]
49
- s.rubygems_version = %q{1.4.1}
50
+ s.rubygems_version = %q{1.5.2}
50
51
  s.summary = %q{SalesKing API JSON Schema}
51
52
  s.test_files = [
52
53
  "spec/sk_api_schema_spec.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: 1
4
+ hash: 63
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 15
10
- version: 0.0.15
9
+ - 16
10
+ version: 0.0.16
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-02-03 00:00:00 +01:00
18
+ date: 2011-02-14 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -60,6 +60,7 @@ files:
60
60
  - VERSION
61
61
  - json/v1.0/address.json
62
62
  - json/v1.0/attachment.json
63
+ - json/v1.0/auth_permission.json
63
64
  - json/v1.0/client.json
64
65
  - json/v1.0/comment.json
65
66
  - json/v1.0/company.json
@@ -112,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
113
  requirements: []
113
114
 
114
115
  rubyforge_project:
115
- rubygems_version: 1.4.1
116
+ rubygems_version: 1.5.2
116
117
  signing_key:
117
118
  specification_version: 3
118
119
  summary: SalesKing API JSON Schema