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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cdd2d8cd3fb2feb9a44e920cfe03b421911e09d70808d6ba69268699ce557349
4
- data.tar.gz: 974d79e711fd2bdaf019ccbca392a75cfbe9b754cc698b7b5de792acf03bb819
3
+ metadata.gz: 5f29bd52c1bffd5295a5166642706b8520ec60f030a224b91a289e65a6f57c2f
4
+ data.tar.gz: b0cff7c565e74ef04ed8d827e9e78c2bed1bb559e79a8b530584220bb8ac96d2
5
5
  SHA512:
6
- metadata.gz: b13cdf4844e36560af8581b62e7588823818801a7ebeeac470a6feea0da824646c3ef968ee71da60a1bc636fa908591c910e1818eb5a945d787432087b8c3fa2
7
- data.tar.gz: 19bff33581a964cddf870f33f1ba96a6b2986958240fb5f6e8fc1f693be032e3e9f12d2cf2b4c7fa008d59a9d881bc5ca71f97d13d308cd72a926f07dbb367f8
6
+ metadata.gz: 2fa6840875acab195e03712b89353a989440a1b8e9cd6ff5063090da999f1028533f7601a12a30cccfde07f6f853e3abc6daf9d78084bab6dba6fa1cbf7ea8d2
7
+ data.tar.gz: 66adc06a408eff0fed3e8ed18f27855ddadd4cbaa84fb933469d7fee36ccbbb0d2124852506e67b3ddc27d5a391b0ec8e97834e7f60a6ee7cc97fe000815ad76
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fixably (0.1.0)
4
+ fixably (0.2.0)
5
5
  activeresource (~> 5)
6
6
 
7
7
  GEM
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
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Fixably
4
+ class Location < ApplicationResource
5
+ actions %i[list show]
6
+
7
+ # TODO
8
+ # has_many :deliveries
9
+ end
10
+ end
@@ -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 update]
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fixably
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
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.1.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-12 00:00:00.000000000 Z
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