jbr 3.10.0 → 3.11.0

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: 5a315b6ba52c573f0d7fa1a0adec8145578550bd67a136071e7b8a02ea328ea1
4
- data.tar.gz: 8c338c2f5a13ce4e98c99c2b5c11377274c71908a2b93fc6c114d8fb109ae540
3
+ metadata.gz: 85448f81e07f54907f8ea7dd6d3cd3c75cdc2b7283c282fee36a650a509140ba
4
+ data.tar.gz: 47ca67d4e752524a7c14109968e949ec23951925863d9785a6a7dcde38932094
5
5
  SHA512:
6
- metadata.gz: e82a0f7dac54170d4f791a752f7497d0b783dce98f4057c606c3ee1f5fe73c85ef32032eb297e2406b95d82bf531d6ba1cf2f4db8a9de5be1fbef38ac1c1c69b
7
- data.tar.gz: 82a90ec3316204bb8ccf87c4d4011e249cd7b5d4484697fc30477f553bd4146baa9402bff10f4c6c2f893ce93bc7d06509831ecaf4a7d8a16a60dfad5b0ae67d
6
+ metadata.gz: 61093edd19c3bd0b71472619e6b8cb5a9b2131571714ce2aa4091b0c0c51cb3c302ec8d8fed03b17f305cf147cb6f66fe32b3112ca890076a4d58ff08ce73907
7
+ data.tar.gz: db03655e533202b01e4a4b1d0c9d69e55fc66233996a622770ded307cf7d6d227eceb01504bb8af9604e619053cc7a1894a7b33f87cd50117f5e338c96cff8d2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [3.11.0] - 2026-08-19
2
+
3
+ - [New] `Jbr::Property#latitude` and `#longitude`, reading the two the address already carried.
4
+ Every property query has asked Jobber for its `coordinates` for some time and `#address` has
5
+ answered them, but a caller wanting one had to open the hash -- and a mocked property answered
6
+ nothing for the whole address, so under `Jbr.mock` there was no way to reach them at all
7
+
1
8
  ## [3.8.0] - 2026-08-18
2
9
 
3
10
  - [New] `Jbr::Retriable`, a `Jbr::Error` for a query Jobber refused over what it costs rather
data/README.md CHANGED
@@ -215,6 +215,8 @@ visit.property.id # => 'Z2lkOi8vS'
215
215
  visit.property.street # => '1 Main St'
216
216
  visit.property.city # => 'Raleigh'
217
217
  visit.property.zip # => '27601'
218
+ visit.property.latitude # => 35.77
219
+ visit.property.longitude # => -78.63
218
220
  visit.property.address # => { street: '1 Main St', city: 'Raleigh', state: 'NC',
219
221
  # zip: '27601', latitude: 35.77, longitude: -78.63 }
220
222
  visit.property.client.name # => whoever the place sits on the file of
@@ -10,6 +10,10 @@ module Jbr
10
10
 
11
11
  def zip = @node[:zip]
12
12
 
13
+ def latitude = @node[:latitude]
14
+
15
+ def longitude = @node[:longitude]
16
+
13
17
  def client = Mock::Client.new(node: @node.fetch(:client, {}))
14
18
  end
15
19
  end
data/lib/jbr/property.rb CHANGED
@@ -35,6 +35,12 @@ module Jbr
35
35
  # @return [String, nil] the postal code the work happens in.
36
36
  def zip = address[:zip]
37
37
 
38
+ # @return [Float, nil] how far north the work happens.
39
+ def latitude = address[:latitude]
40
+
41
+ # @return [Float, nil] how far east the work happens.
42
+ def longitude = address[:longitude]
43
+
38
44
  # The fields a match is made on. City and state are written but never matched:
39
45
  # Jobber holds whatever was typed, so "NC" and "North Carolina" -- or "Winston Salem"
40
46
  # and "Winston-Salem" -- would read as two homes. The ZIP already places the home.
data/lib/jbr/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # A Ruby client for the Jobber API.
2
2
  module Jbr
3
3
  # The version of this gem.
4
- VERSION = '3.10.0'
4
+ VERSION = '3.11.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jbr
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.10.0
4
+ version: 3.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Baccigalupo