vng 3.3.2 → 3.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/vng/mock_request.rb +3 -1
- data/lib/vng/version.rb +1 -1
- data/lib/vng/work_order.rb +5 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86c5764d54af7b5d5ca0fa4fa758e1f28311f3d5629196329792f0d767a44286
|
4
|
+
data.tar.gz: c98f4606e09460f8ee13c4d450c136eae7ebbcb2aff694380445a050db552099
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a485a69359c8b812f6cbb4918f01150e4c160faaebab5b89a003efbe5d9a8922362be9be6d309311b1ac078f8472615749ebeab3efb8b0327850b645b32141a6
|
7
|
+
data.tar.gz: b6bdc6c10c743c9385b3bd156c235aec71fffc683dbe268bf859c1730b8f24e58016076585324001336928ab361b0d188773062fd80e25a2aa5393b4880486fb
|
data/CHANGELOG.md
CHANGED
data/lib/vng/mock_request.rb
CHANGED
@@ -276,7 +276,9 @@ module Vng
|
|
276
276
|
{"fieldID" => 810, "fieldValue" => "0.00"},
|
277
277
|
{"fieldID" => 186, "fieldValue" => "30"},
|
278
278
|
{"fieldID" => 9835, "fieldValue" => "135.00"},
|
279
|
-
]
|
279
|
+
], "Relations" => [
|
280
|
+
{"objectID" => 2, "name" => "Route 2", "relationType" => "route", "isActive" => "true"},
|
281
|
+
]},
|
280
282
|
]}
|
281
283
|
else
|
282
284
|
{ "WorkOrder"=>{ "objectID"=>"4138030" } }
|
data/lib/vng/version.rb
CHANGED
data/lib/vng/work_order.rb
CHANGED
@@ -5,9 +5,9 @@ module Vng
|
|
5
5
|
class WorkOrder < Resource
|
6
6
|
PATH = '/api/v1/data/WorkOrders/'
|
7
7
|
|
8
|
-
attr_reader :id, :scheduled_on, :price, :discount, :tax, :tip, :duration, :total
|
8
|
+
attr_reader :id, :scheduled_on, :price, :discount, :tax, :tip, :duration, :total, :route_id
|
9
9
|
|
10
|
-
def initialize(id:, scheduled_on: nil, price: nil, discount: nil, tax: nil, tip: nil, duration: nil, total: nil)
|
10
|
+
def initialize(id:, scheduled_on: nil, price: nil, discount: nil, tax: nil, tip: nil, duration: nil, total: nil, route_id: nil)
|
11
11
|
@id = id
|
12
12
|
@scheduled_on = scheduled_on
|
13
13
|
@price = price
|
@@ -16,6 +16,7 @@ module Vng
|
|
16
16
|
@tip = tip
|
17
17
|
@duration = duration
|
18
18
|
@total = total
|
19
|
+
@route_id = route_id
|
19
20
|
end
|
20
21
|
|
21
22
|
def self.create(lock_id:, client_id:, contact_id:, location_id:, duration:, summary:, line_items:)
|
@@ -56,8 +57,9 @@ module Vng
|
|
56
57
|
tip = BigDecimal(value_for_field body, 810)
|
57
58
|
duration = Integer(value_for_field body, 186)
|
58
59
|
total = BigDecimal(value_for_field body, 9835)
|
60
|
+
route_id = value_for_relation body, 'route'
|
59
61
|
|
60
|
-
new id:, scheduled_on:, price:, discount:, tax:, tip:, duration:, total:
|
62
|
+
new id:, scheduled_on:, price:, discount:, tax:, tip:, duration:, total:, route_id:
|
61
63
|
end
|
62
64
|
end
|
63
65
|
|