sk_api_schema 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc CHANGED
@@ -58,7 +58,7 @@ them to much right now.
58
58
  Before you run the tests use bundler to install all required gems:
59
59
  # git clone
60
60
  # cd into sk_api_schema dir
61
- bundle install
62
- bundle exec rake spec
61
+ BUNDLE_GEMFILE=ci/Gemfile bundle install
62
+ BUNDLE_GEMFILE=ci/Gemfile bundle exec rake spec
63
63
 
64
64
  Copyright (c) 2010-2011 Georg Leciejewski, released under the MIT license
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
data/ci/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source :gemcutter
2
+ gem "rake"
3
+ gem "rdoc"
4
+ gem "rcov"
5
+ gem "active_support"
6
+ group :test do
7
+ gem "rspec"
8
+ end
@@ -1,6 +1,6 @@
1
1
  { "type":"object",
2
2
  "title": "address",
3
- "description":"An address in SK must always be related to an object.",
3
+ "description":"An address in SK is maintained within it's parent object(client, company). The first address(default_address) is used inside the address field of new documents. With multiple addresses sorting(first) is done by date, newest first. So if you add a new adddress it will be the new default one. See order and type property for details about ordering and accessing parcel work or home addresses.",
4
4
  "properties": {
5
5
  "id": {
6
6
  "description": "uuid of the adress.",
@@ -50,10 +50,14 @@
50
50
  "type":"string"
51
51
  },
52
52
  "address_type": {
53
- "description": "Type of the address, as seen by vCard definition.",
54
- "enum":["work","home"],
53
+ "description": "Type of the address, as seen by vCard definition. There can only be one type. Inside of SK you can use placeholders like client.parcel_address.city to access the first parcel adr(Same for work_ / home_). <br/>Besides the placeholder default_address, always returns the first address found. Sorting is done by the order(if set) else by date, newest first.",
54
+ "enum":["work","home", "parcel"],
55
55
  "type":"string"
56
56
  },
57
+ "order": {
58
+ "description": "Addresses are normally sorted by date, newest first. If you need to strongly rely on their sorting e.g. default_address (always first) or have multiple addresses of one type(3 parcel), use this field for all adrs. <br/>Single adrs are used in placeholders like: addresses.2.city, returning the second adr found(not necessarily one with order=2).",
59
+ "type":"integer"
60
+ },
57
61
  "lat": {
58
62
  "description": "Geolocation latitude",
59
63
  "type":"string"
@@ -13,7 +13,7 @@
13
13
  "type":"string"
14
14
  },
15
15
  "number":{
16
- "description": "Unique number assigned by SK user or object number schema.",
16
+ "description": "Unique number assigned by a user or automatic by the object's number schema.",
17
17
  "type":"string"
18
18
  },
19
19
  "address_field":{
@@ -21,7 +21,7 @@
21
21
  "type":"string"
22
22
  },
23
23
  "date":{
24
- "description": "Date the docuent is issued. Automatically set when document is opened. Required for non-draft documents.",
24
+ "description": "Date the document is issued. Automatically set when document is opened. Required for non-draft documents.",
25
25
  "format":"date",
26
26
  "type":"string"
27
27
  },
data/json/v1.0/sub.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {"type":"object",
2
2
  "title": "sub",
3
- "description": "Subscribe to push notifications(webhooks) about object livecycle events like new, update or delete. Only returns subscription for the current app, so you MUST be using oAuth. When a user removes your app its subs are also deleted. <br/>To register you must supply <br/>- callback_url: receives the object in it's latest state, the user_id & subdomain, company_id, hmac-signed with your app secret.<br/>- channel: defining the event, made up of the SINGULAR object name and the action: invoice.delete, payment.new<br/> - register auth_permissions: An app MUST request non-api permissions f.ex.: clients:create. Perms(on company,app,user,team) are checked before any publishing, so if a user cannot create clients in the interface, his apps will not receive any callbacks.",
3
+ "description": "Subscribe to push notifications(webhooks) about object livecycle events like new, update or delete. Only returns subscription for the current app, so you MUST be using oAuth. When a user removes your app its subs are also deleted. <br/>To register you must supply <br/>- callback_url: receives a base64 encode string containing a JSON object with the object in it's latest state, the user_id & subdomain, company_id, hmac-signed with your app secret.<br/>- channel: defining the event, made up of the SINGULAR object name and the action: invoice.delete, payment.new<br/> - register auth_permissions: An app MUST request non-api permissions f.ex.: clients:create. Perms(on company,app,user,team) are checked before any publishing, so if a user cannot create clients in the interface, his apps will not receive any callbacks.",
4
4
  "properties": {
5
5
  "id": {
6
6
  "identity":true,
@@ -13,15 +13,9 @@
13
13
  "type":"string"
14
14
  },
15
15
  "callback_url": {
16
- "description": "An url receiving the notification. The url MUST be within the url of the current app",
16
+ "description": "An url receiving the notification. The url MUST be within the url of the current app and receives a POST with a single signed_request parameter containing an base64 encoded JSON object.",
17
17
  "type":"string",
18
18
  "required":true
19
- },
20
- "http_method": {
21
- "description": "HTTP method used for the request, defaults to POST",
22
- "type":"string",
23
- "default":"POST",
24
- "enum":["POST","GET", "DELETE", "PUT"]
25
19
  },
26
20
  "created_at": {
27
21
  "description": "Date the record was created in SK. Never changes afterwards.",
@@ -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.2.2"
8
+ s.version = "0.2.3"
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-06-27}
12
+ s.date = %q{2011-07-21}
13
13
  s.description = %q{The SalesKing JSON Schema describes our business API in terms of available objects, their fields and links to url endpoints with related objects. Besides ruby users can use a smal lib with utility methods to load and test the schema files.}
14
14
  s.email = %q{gl@salesking.eu}
15
15
  s.extra_rdoc_files = [
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
20
20
  "README.rdoc",
21
21
  "Rakefile",
22
22
  "VERSION",
23
+ "ci/Gemfile",
23
24
  "json/v1.0/address.json",
24
25
  "json/v1.0/attachment.json",
25
26
  "json/v1.0/auth_permission.json",
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: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 2
10
- version: 0.2.2
9
+ - 3
10
+ version: 0.2.3
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-06-27 00:00:00 +02:00
18
+ date: 2011-07-21 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -73,6 +73,7 @@ files:
73
73
  - README.rdoc
74
74
  - Rakefile
75
75
  - VERSION
76
+ - ci/Gemfile
76
77
  - json/v1.0/address.json
77
78
  - json/v1.0/attachment.json
78
79
  - json/v1.0/auth_permission.json