sk_api_schema 0.0.6 → 0.0.7
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/comment.json +1 -1
- data/json/v1.0/credit_note.json +12 -0
- data/json/v1.0/email.json +148 -0
- data/json/v1.0/invoice.json +1 -1
- data/json/v1.0/payment.json +10 -1
- data/sk_api_schema.gemspec +4 -4
- metadata +7 -6
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.7
|
data/json/v1.0/comment.json
CHANGED
data/json/v1.0/credit_note.json
CHANGED
@@ -57,6 +57,18 @@
|
|
57
57
|
"description": "Space seperated list of tags.",
|
58
58
|
"type":"string"
|
59
59
|
},
|
60
|
+
"precision":{
|
61
|
+
"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).",
|
62
|
+
"type":"number",
|
63
|
+
"enum": [2,3,4],
|
64
|
+
"default":2
|
65
|
+
},
|
66
|
+
"archived_pdf":{
|
67
|
+
"description": "Archived PDF version of the document. Is created when an document is printed and archived. A document can have multiple archived versions. This only returns the most recent one. ",
|
68
|
+
"readonly":true,
|
69
|
+
"type":"object",
|
70
|
+
"properties":{"$ref":"./attachment.json#properties"}
|
71
|
+
},
|
60
72
|
"client":{
|
61
73
|
"description": "The client for the document. New documents cannot create a client, use client_id field to set it.",
|
62
74
|
"readonly":true,
|
@@ -0,0 +1,148 @@
|
|
1
|
+
{ "type":"object",
|
2
|
+
"title": "email",
|
3
|
+
"description":"An email in SK must always be related to an object.",
|
4
|
+
"properties": {
|
5
|
+
"id": {
|
6
|
+
"description": "uuid of the email",
|
7
|
+
"identity":true,
|
8
|
+
"readonly":true,
|
9
|
+
"type":"string"
|
10
|
+
},
|
11
|
+
"bcc_addr": {
|
12
|
+
"description": "BCC addresses, comma separated. Max 5, format: a@b.de,'George'<georg@sk.eu>",
|
13
|
+
"type":"string"
|
14
|
+
},
|
15
|
+
"cc_addr": {
|
16
|
+
"description": "CC addresses, comma separated. Max 5, format: a@b.de,'George'<georg@sk.eu>",
|
17
|
+
"type":"string"
|
18
|
+
},
|
19
|
+
"from_addr": {
|
20
|
+
"description": "From address",
|
21
|
+
"required":true,
|
22
|
+
"type":"string"
|
23
|
+
},
|
24
|
+
"to_addr": {
|
25
|
+
"description": "TO addresses, comma separated. Max 5, format: a@b.de,'George'<georg@sk.eu>",
|
26
|
+
"required":true,
|
27
|
+
"type":"string"
|
28
|
+
},
|
29
|
+
"subject": {
|
30
|
+
"description": "The email subject.",
|
31
|
+
"required":true,
|
32
|
+
"type":"string"
|
33
|
+
},
|
34
|
+
"body": {
|
35
|
+
"description": "The email text.",
|
36
|
+
"required":true,
|
37
|
+
"type":"string"
|
38
|
+
},
|
39
|
+
"attachments":{
|
40
|
+
"description": "The emails attachments.",
|
41
|
+
"readonly":true,
|
42
|
+
"type":"array",
|
43
|
+
"properties":{"$ref":"./attachment.json#properties"}
|
44
|
+
},
|
45
|
+
"related_object_type": {
|
46
|
+
"description": "Object type of the emails parent. Is the camelcased base class name: Document for invoice, credit_note,.., Contact for client",
|
47
|
+
"required":true,
|
48
|
+
"type":"string"
|
49
|
+
},
|
50
|
+
"related_object_id": {
|
51
|
+
"description": "uuid of the emails parent object.",
|
52
|
+
"required":true,
|
53
|
+
"type":"string"
|
54
|
+
},
|
55
|
+
"in_progress": {
|
56
|
+
"description": "Is set after an email has been scheduled for sending until it has been sent.",
|
57
|
+
"readonly":true,
|
58
|
+
"type":"boolean"
|
59
|
+
},
|
60
|
+
"delivered_at": {
|
61
|
+
"description": "Date the email was delivered by SK. If set, the message cannot be edited anymore.",
|
62
|
+
"format":"date-time",
|
63
|
+
"readonly":true,
|
64
|
+
"type":"string"
|
65
|
+
},
|
66
|
+
"created_at": {
|
67
|
+
"description": "Date the object was created in SK. Never changes afterwards",
|
68
|
+
"format":"date-time",
|
69
|
+
"readonly":true,
|
70
|
+
"type":"string"
|
71
|
+
},
|
72
|
+
"updated_at": {
|
73
|
+
"description": "Date the object was edited in SK.",
|
74
|
+
"format":"date-time",
|
75
|
+
"readonly":true,
|
76
|
+
"type":"string"
|
77
|
+
}
|
78
|
+
},
|
79
|
+
"links":[
|
80
|
+
{ "rel": "self",
|
81
|
+
"href": "emails/{id}"
|
82
|
+
},
|
83
|
+
{ "rel": "instances",
|
84
|
+
"href": "emails",
|
85
|
+
"properties" : {
|
86
|
+
"page":{
|
87
|
+
"title" : "Page",
|
88
|
+
"description": "In paginated results set the page to look for",
|
89
|
+
"type":"number"
|
90
|
+
},
|
91
|
+
"filter[q]":{
|
92
|
+
"title" : "Search",
|
93
|
+
"description": "Search in text",
|
94
|
+
"type":"string"
|
95
|
+
},
|
96
|
+
"filter[from]":{
|
97
|
+
"title" : "From date",
|
98
|
+
"description": "All objects with a date after the date"
|
99
|
+
},
|
100
|
+
"filter[to]":{
|
101
|
+
"title" : "To date",
|
102
|
+
"description": "All objects with date before the date"
|
103
|
+
},
|
104
|
+
"sort_by":{
|
105
|
+
"title" : "Sort by",
|
106
|
+
"description": "Sort the results by the given field => number",
|
107
|
+
"enum":['created_at', 'updated_at'],
|
108
|
+
"type": 'string'
|
109
|
+
},
|
110
|
+
"sort":{
|
111
|
+
"title" : "Sort",
|
112
|
+
"enum":["ASC","DESC"],
|
113
|
+
"description": "Sort the results in ASC or DESC"
|
114
|
+
}
|
115
|
+
}
|
116
|
+
},
|
117
|
+
{ "rel": "attachments",
|
118
|
+
"href": "emails/{id}/attachments"
|
119
|
+
},
|
120
|
+
{ "rel": "destroy",
|
121
|
+
"href": "emails/{id}",
|
122
|
+
"method": "DELETE"
|
123
|
+
},
|
124
|
+
{ "rel": "update",
|
125
|
+
"href": "emails/{id}",
|
126
|
+
"method": "PUT"
|
127
|
+
},
|
128
|
+
{ "rel": "create",
|
129
|
+
"href": "emails",
|
130
|
+
"method": "POST",
|
131
|
+
"properties" : {
|
132
|
+
"template_id":{
|
133
|
+
"title" : "Template",
|
134
|
+
"description": "UUID of an email template to use. If present, subject, body and attachments of the template are used for the current email.",
|
135
|
+
"type":"string"
|
136
|
+
},
|
137
|
+
"send":{
|
138
|
+
"title" : "Send email",
|
139
|
+
"description": "If present(any val) email is scheduled for sending."
|
140
|
+
},
|
141
|
+
"archived_pdf":{
|
142
|
+
"title" : "Attach archived pdf",
|
143
|
+
"description": "Adds the archived pdf from the related resource(if it has one)."
|
144
|
+
}
|
145
|
+
}
|
146
|
+
}
|
147
|
+
]
|
148
|
+
}
|
data/json/v1.0/invoice.json
CHANGED
@@ -220,7 +220,7 @@
|
|
220
220
|
},
|
221
221
|
"base64" : {
|
222
222
|
"title" : "Return the created pdf base64 encoded",
|
223
|
-
"description": "If set the new pdf is returned inside the attachment JSON within 'base64' key.
|
223
|
+
"description": "If set(any val) the new pdf is returned inside the attachment JSON within 'base64' key. Ommit to save traffic."
|
224
224
|
}
|
225
225
|
}
|
226
226
|
}
|
data/json/v1.0/payment.json
CHANGED
@@ -15,7 +15,6 @@
|
|
15
15
|
},
|
16
16
|
"external_ref":{
|
17
17
|
"description": "Reference number f.ex. issued by the bank.",
|
18
|
-
"format":"date",
|
19
18
|
"type":"string"
|
20
19
|
},
|
21
20
|
"date":{
|
@@ -29,6 +28,16 @@
|
|
29
28
|
"enum":["cash","bank_transfer","credit_card","paypal","direct_debit","cheque"],
|
30
29
|
"type":"string"
|
31
30
|
},
|
31
|
+
"related_object_type": {
|
32
|
+
"description": "Object type of the comments parent. Is the camelcased base class name: Document for invoice, credit_note,.., Contact for client",
|
33
|
+
"required":true,
|
34
|
+
"type":"string"
|
35
|
+
},
|
36
|
+
"related_object_id": {
|
37
|
+
"description": "uuid of the comments parent object.",
|
38
|
+
"required":true,
|
39
|
+
"type":"string"
|
40
|
+
},
|
32
41
|
"team_id":{
|
33
42
|
"description": "A team uuid. If set only the team and its parent teams can see the record.",
|
34
43
|
"type":"string"
|
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.7"
|
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-01-
|
12
|
+
s.date = %q{2011-01-23}
|
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 = [
|
@@ -24,6 +24,7 @@ Gem::Specification.new do |s|
|
|
24
24
|
"json/v1.0/client.json",
|
25
25
|
"json/v1.0/comment.json",
|
26
26
|
"json/v1.0/credit_note.json",
|
27
|
+
"json/v1.0/email.json",
|
27
28
|
"json/v1.0/estimate.json",
|
28
29
|
"json/v1.0/invoice.json",
|
29
30
|
"json/v1.0/line_item.json",
|
@@ -39,7 +40,7 @@ Gem::Specification.new do |s|
|
|
39
40
|
]
|
40
41
|
s.homepage = %q{http://github.com/salesking/sk_api_schema}
|
41
42
|
s.require_paths = ["lib"]
|
42
|
-
s.rubygems_version = %q{1.
|
43
|
+
s.rubygems_version = %q{1.4.1}
|
43
44
|
s.summary = %q{SalesKing API JSON Schema}
|
44
45
|
s.test_files = [
|
45
46
|
"spec/sk_api_schema_spec.rb",
|
@@ -47,7 +48,6 @@ Gem::Specification.new do |s|
|
|
47
48
|
]
|
48
49
|
|
49
50
|
if s.respond_to? :specification_version then
|
50
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
51
51
|
s.specification_version = 3
|
52
52
|
|
53
53
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
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
|
-
prerelease:
|
4
|
+
hash: 17
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 7
|
10
|
+
version: 0.0.7
|
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-01-
|
18
|
+
date: 2011-01-23 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -63,6 +63,7 @@ files:
|
|
63
63
|
- json/v1.0/client.json
|
64
64
|
- json/v1.0/comment.json
|
65
65
|
- json/v1.0/credit_note.json
|
66
|
+
- json/v1.0/email.json
|
66
67
|
- json/v1.0/estimate.json
|
67
68
|
- json/v1.0/invoice.json
|
68
69
|
- json/v1.0/line_item.json
|
@@ -105,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
106
|
requirements: []
|
106
107
|
|
107
108
|
rubyforge_project:
|
108
|
-
rubygems_version: 1.
|
109
|
+
rubygems_version: 1.4.1
|
109
110
|
signing_key:
|
110
111
|
specification_version: 3
|
111
112
|
summary: SalesKing API JSON Schema
|