vng 3.3.2 → 3.4.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c0af9c8607d71fa3aa223f74a1a89961370b23bd9281e823edcf15c76144b06
4
- data.tar.gz: ff11b94c1ddb0b616ebc2750af6d18bdc8a76ed6b1781c48b93a4c487c1bbe3f
3
+ metadata.gz: 86c5764d54af7b5d5ca0fa4fa758e1f28311f3d5629196329792f0d767a44286
4
+ data.tar.gz: c98f4606e09460f8ee13c4d450c136eae7ebbcb2aff694380445a050db552099
5
5
  SHA512:
6
- metadata.gz: 684bb3e62c20b3c4c89a2bbf26c2ab52c17a4ea8345838ecdc566e75d0b645d389e2f7559a8c3288dcfdc17332103f2dd4a3f42e0bf730ace0d42a5c3c565853
7
- data.tar.gz: d983ecf12bcd1e98baa4e720ee2b9963fa71197503e2d9db52a856bf1ec80947c022ef296d63a8b6daaa5dfd88ad8c58a9ec4288f243bc7e3cc1cd008ecbc7c6
6
+ metadata.gz: a485a69359c8b812f6cbb4918f01150e4c160faaebab5b89a003efbe5d9a8922362be9be6d309311b1ac078f8472615749ebeab3efb8b0327850b645b32141a6
7
+ data.tar.gz: b6bdc6c10c743c9385b3bd156c235aec71fffc683dbe268bf859c1730b8f24e58016076585324001336928ab361b0d188773062fd80e25a2aa5393b4880486fb
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [3.4.1] - 2025-01-22
2
+
3
+ - Fix mock for WorkOrder#route_id
4
+
5
+ ## [3.4.0] - 2025-01-22
6
+
7
+ - Add WorkOrder#route_id
8
+
1
9
  ## [3.3.2] - 2025-01-22
2
10
 
3
11
  - Don't assume isActive is returned as a boolean
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Vng
2
- VERSION = '3.3.2'
2
+ VERSION = '3.4.1'
3
3
  end
@@ -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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vng
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.2
4
+ version: 3.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - claudiob