fixably 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -0
- data/docs/location.md +33 -0
- data/docs/order.md +6 -0
- data/lib/fixably/resources/location.rb +10 -0
- data/lib/fixably/resources/order.rb +2 -9
- data/lib/fixably/version.rb +1 -1
- data/lib/fixably.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f29bd52c1bffd5295a5166642706b8520ec60f030a224b91a289e65a6f57c2f
|
4
|
+
data.tar.gz: b0cff7c565e74ef04ed8d827e9e78c2bed1bb559e79a8b530584220bb8ac96d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fa6840875acab195e03712b89353a989440a1b8e9cd6ff5063090da999f1028533f7601a12a30cccfde07f6f853e3abc6daf9d78084bab6dba6fa1cbf7ea8d2
|
7
|
+
data.tar.gz: 66adc06a408eff0fed3e8ed18f27855ddadd4cbaa84fb933469d7fee36ccbbb0d2124852506e67b3ddc27d5a391b0ec8e97834e7f60a6ee7cc97fe000815ad76
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -116,6 +116,7 @@ Currently supported resources:
|
|
116
116
|
- Fixably::Customer ([documentation](docs/customer.md))
|
117
117
|
- Fixably::Customer::Child ([documentation](docs/customer/child.md))
|
118
118
|
- Fixably::Device ([documentation](docs/device.md))
|
119
|
+
- Fixably::Location ([documentation](docs/location.md))
|
119
120
|
- Fixably::Order ([documentation](docs/order.md))
|
120
121
|
- Fixably::Order::Line ([documentation](docs/order/line.md))
|
121
122
|
- Fixably::Order::Note ([documentation](docs/order/note.md))
|
data/docs/location.md
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# Fixably::Location
|
2
|
+
|
3
|
+
## List location
|
4
|
+
|
5
|
+
```ruby
|
6
|
+
Fixably::Location.all
|
7
|
+
Fixably::Location.where(name: "Our location")
|
8
|
+
```
|
9
|
+
|
10
|
+
### Include associations in a list
|
11
|
+
|
12
|
+
**Deliveries**
|
13
|
+
Currently not implemented
|
14
|
+
|
15
|
+
## Get a location
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
Fixably::Location.find(1_000)
|
19
|
+
Fixably::Location.first
|
20
|
+
Fixably::Location.last
|
21
|
+
```
|
22
|
+
|
23
|
+
## Create a location
|
24
|
+
|
25
|
+
The Fixably API does not allow locations to be created
|
26
|
+
|
27
|
+
## Update a location
|
28
|
+
|
29
|
+
The Fixably API does not allow locations to be updated
|
30
|
+
|
31
|
+
## Destroy a location
|
32
|
+
|
33
|
+
The Fixably API does not allow locations to be destroyed
|
data/docs/order.md
CHANGED
@@ -37,6 +37,12 @@ Fixably::Order.includes(:handled_by).all
|
|
37
37
|
Fixably::Order.includes(:handled_by).where(internal_location: "SERVICE")
|
38
38
|
```
|
39
39
|
|
40
|
+
**Location**
|
41
|
+
```ruby
|
42
|
+
Fixably::Order.includes(:location).all
|
43
|
+
Fixably::Order.includes(:location).where(internal_location: "SERVICE")
|
44
|
+
```
|
45
|
+
|
40
46
|
**Ordered by**
|
41
47
|
```ruby
|
42
48
|
Fixably::Order.includes(:ordered_by).all
|
@@ -14,6 +14,7 @@ module Fixably
|
|
14
14
|
has_one :customer, class_name: "fixably/customer"
|
15
15
|
has_one :device, class_name: "fixably/device"
|
16
16
|
has_one :handled_by, class_name: "fixably/customer"
|
17
|
+
has_one :location, class_name: "fixably/location"
|
17
18
|
has_one :ordered_by, class_name: "fixably/customer"
|
18
19
|
has_one :queue, class_name: "fixably/queue"
|
19
20
|
has_one :status, class_name: "fixably/status"
|
@@ -23,7 +24,6 @@ module Fixably
|
|
23
24
|
has_many :tasks, class_name: "fixably/order/task"
|
24
25
|
|
25
26
|
# TODO
|
26
|
-
# has_one :location
|
27
27
|
# has_one :store
|
28
28
|
|
29
29
|
ALLOWED_INTERNAL_LOCATIONS =
|
@@ -74,14 +74,7 @@ module Fixably
|
|
74
74
|
end
|
75
75
|
|
76
76
|
class Task < ApplicationResource
|
77
|
-
actions %i[list show
|
78
|
-
|
79
|
-
# TODO
|
80
|
-
# has_one :task
|
81
|
-
|
82
|
-
def update
|
83
|
-
raise "Updating order tasks has not been implemented"
|
84
|
-
end
|
77
|
+
actions %i[list show]
|
85
78
|
end
|
86
79
|
end
|
87
80
|
end
|
data/lib/fixably/version.rb
CHANGED
data/lib/fixably.rb
CHANGED
@@ -11,6 +11,7 @@ require "fixably/version"
|
|
11
11
|
require_relative "fixably/application_resource"
|
12
12
|
require_relative "fixably/resources/customer"
|
13
13
|
require_relative "fixably/resources/device"
|
14
|
+
require_relative "fixably/resources/location"
|
14
15
|
require_relative "fixably/resources/order"
|
15
16
|
require_relative "fixably/resources/queue"
|
16
17
|
require_relative "fixably/resources/status"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fixably
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Rice
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeresource
|
@@ -160,6 +160,7 @@ files:
|
|
160
160
|
- docs/customer.md
|
161
161
|
- docs/customer/child.md
|
162
162
|
- docs/device.md
|
163
|
+
- docs/location.md
|
163
164
|
- docs/order.md
|
164
165
|
- docs/order/line.md
|
165
166
|
- docs/order/note.md
|
@@ -184,6 +185,7 @@ files:
|
|
184
185
|
- lib/fixably/resource_lazy_loader.rb
|
185
186
|
- lib/fixably/resources/customer.rb
|
186
187
|
- lib/fixably/resources/device.rb
|
188
|
+
- lib/fixably/resources/location.rb
|
187
189
|
- lib/fixably/resources/order.rb
|
188
190
|
- lib/fixably/resources/queue.rb
|
189
191
|
- lib/fixably/resources/status.rb
|