sk_api_schema 0.0.7 → 0.0.8

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.7
1
+ 0.0.8
@@ -48,6 +48,10 @@
48
48
  "format":"date-time",
49
49
  "readonly":true,
50
50
  "type":"string"
51
+ },
52
+ "team_id":{
53
+ "description": "A team uuid. If set only the team and its parent teams can see the record.",
54
+ "type":"string"
51
55
  }
52
56
 
53
57
  }
@@ -34,6 +34,10 @@
34
34
  "format":"date-time",
35
35
  "readonly":true,
36
36
  "type":"string"
37
+ },
38
+ "team_id":{
39
+ "description": "A team uuid. If set only the team and its parent teams can see the record.",
40
+ "type":"string"
37
41
  }
38
42
  },
39
43
  "links":[
data/json/v1.0/email.json CHANGED
@@ -74,6 +74,10 @@
74
74
  "format":"date-time",
75
75
  "readonly":true,
76
76
  "type":"string"
77
+ },
78
+ "team_id":{
79
+ "description": "A team uuid. If set only the team and its parent teams can see the record.",
80
+ "type":"string"
77
81
  }
78
82
  },
79
83
  "links":[
@@ -0,0 +1,125 @@
1
+ { "type":"object",
2
+ "title": "export",
3
+ "description":"An export in SK",
4
+ "properties": {
5
+ "id": {
6
+ "description": "uuid of the export",
7
+ "identity":true,
8
+ "readonly":true,
9
+ "type":"string"
10
+ },
11
+ "collection_type": {
12
+ "description": "The type of data to export. Lower-case plural name of the export data's class",
13
+ "required":true,
14
+ "enum": ['text', 'archived_pdf', 'attachments', 'dtaus_lk', 'dtaus_gk', 'allinone_pdf'],
15
+ "type":"string"
16
+ },
17
+ "collection_ids": {
18
+ "description": "Comma separated uuid's of the export objects. The backend uses a mysql text-column limited to ~64kb. 100 uuids are ~2.5kb",
19
+ "required":true,
20
+ "type":"string"
21
+ },
22
+ "kind": {
23
+ "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.",
24
+ "required":true,
25
+ "enum": ['text', 'archived_pdf', 'attachments', 'dtaus_lk', 'dtaus_gk', 'allinone_pdf'],
26
+ "type":"string"
27
+ },
28
+ "template_id":{
29
+ "description": "A export template uuid. Only needed for text exports.",
30
+ "type":"string"
31
+ },
32
+ "team_id":{
33
+ "description": "A team uuid. If set only the team and its parent teams can see the record.",
34
+ "type":"string"
35
+ },
36
+ "status": {
37
+ "description": "The export status",
38
+ "readonly":true,
39
+ "enum": ['pending', 'in_progress', 'failed', 'success'],
40
+ "type":"string"
41
+ },
42
+ "log": {
43
+ "description": "Errors and warnings, can contain html markup f.ex. links to clients with invalid back accounts when doing dtaus export",
44
+ "readonly":true,
45
+ "type":"string"
46
+ },
47
+ "attachments":{
48
+ "description": "The exported data as attachment.",
49
+ "readonly":true,
50
+ "type":"array",
51
+ "properties":{"$ref":"./attachment.json#properties"}
52
+ },
53
+ "started_at": {
54
+ "description": "Date the was started",
55
+ "format":"date-time",
56
+ "readonly":true,
57
+ "type":"string"
58
+ },
59
+ "finished_at": {
60
+ "description": "Date the was finished",
61
+ "format":"date-time",
62
+ "readonly":true,
63
+ "type":"string"
64
+ },
65
+ "created_at": {
66
+ "description": "Date the object was created in SK. Never changes afterwards",
67
+ "format":"date-time",
68
+ "readonly":true,
69
+ "type":"string"
70
+ },
71
+ "updated_at": {
72
+ "description": "Date the object was edited in SK.",
73
+ "format":"date-time",
74
+ "readonly":true,
75
+ "type":"string"
76
+ }
77
+ },
78
+ "links":[
79
+ { "rel": "self",
80
+ "href": "exports/{id}"
81
+ },
82
+ { "rel": "instances",
83
+ "href": "exports",
84
+ "properties" : {
85
+ "page":{
86
+ "title" : "Page",
87
+ "description": "In paginated results set the page to look for",
88
+ "type":"number"
89
+ },
90
+
91
+ "filter[from]":{
92
+ "title" : "From date",
93
+ "description": "All objects with a date after the date"
94
+ },
95
+ "filter[to]":{
96
+ "title" : "To date",
97
+ "description": "All objects with date before the date"
98
+ },
99
+ "sort_by":{
100
+ "title" : "Sort by",
101
+ "description": "Sort the results by the given field => number",
102
+ "enum":['created_at', 'updated_at'],
103
+ "type": 'string'
104
+ },
105
+ "sort":{
106
+ "title" : "Sort",
107
+ "enum":["ASC","DESC"],
108
+ "description": "Sort the results in ASC or DESC"
109
+ }
110
+ }
111
+ },
112
+ { "rel": "destroy",
113
+ "href": "exports/{id}",
114
+ "method": "DELETE"
115
+ },
116
+ { "rel": "update",
117
+ "href": "exports/{id}",
118
+ "method": "PUT"
119
+ },
120
+ { "rel": "create",
121
+ "href": "exports",
122
+ "method": "POST"
123
+ }
124
+ ]
125
+ }
@@ -9,7 +9,7 @@
9
9
  "type":"string"
10
10
  },
11
11
  "number":{
12
- "description": "Unique number assigned by you or if emtpy SK product number schema.",
12
+ "description": "Unique number assigned by you or if empty SK product number schema.",
13
13
  "type":"string"
14
14
  },
15
15
  "name":{
@@ -44,6 +44,10 @@
44
44
  "format":"date-time",
45
45
  "readonly":true,
46
46
  "type":"string"
47
+ },
48
+ "team_id":{
49
+ "description": "A team uuid. If set only the team and its parent teams can see the record.",
50
+ "type":"string"
47
51
  }
48
52
  }
49
53
  }
data/lib/sk_api_schema.rb CHANGED
@@ -38,8 +38,9 @@ module SK
38
38
  schemas
39
39
  end
40
40
 
41
- # Create a Hash with the available (api)object attributes defined in
42
- # schema properties.
41
+ # Create a Hash with the available (api)object attributes defined in the
42
+ # according schema properties. This is the meat of the object-to-api
43
+ # workflow
43
44
  #
44
45
  # === Example
45
46
  # obj = Invoice.new(:title =>'hello world', :number=>'4711')
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sk_api_schema}
8
- s.version = "0.0.7"
8
+ s.version = "0.0.8"
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"]
@@ -26,6 +26,7 @@ Gem::Specification.new do |s|
26
26
  "json/v1.0/credit_note.json",
27
27
  "json/v1.0/email.json",
28
28
  "json/v1.0/estimate.json",
29
+ "json/v1.0/export.json",
29
30
  "json/v1.0/invoice.json",
30
31
  "json/v1.0/line_item.json",
31
32
  "json/v1.0/order.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: 17
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 7
10
- version: 0.0.7
9
+ - 8
10
+ version: 0.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Georg Leciejewski
@@ -65,6 +65,7 @@ files:
65
65
  - json/v1.0/credit_note.json
66
66
  - json/v1.0/email.json
67
67
  - json/v1.0/estimate.json
68
+ - json/v1.0/export.json
68
69
  - json/v1.0/invoice.json
69
70
  - json/v1.0/line_item.json
70
71
  - json/v1.0/order.json