hcp 4.0.0 → 4.1.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: 6452e662bc00ffd31b8fa21a935de8c1b4ef9d4779a87668ce4f6b4c4585b3b0
4
- data.tar.gz: e9e8e77e53671ef7e822f2116d32a231ab6f71901de418bdd8643acd46232de5
3
+ metadata.gz: aad72b55ce034138806c6d68b993d430e7c299960ee14c92e0c59563b5f5bae3
4
+ data.tar.gz: ba0582ba808d0dbf087eb8a9f6823336e57d6fbc466a1be0f71a9daee38db25b
5
5
  SHA512:
6
- metadata.gz: 4b03d7602db5e603bd0b0ba03c9031fb93f29bece4d5984a460f0fb4f79b5d7a740de189c4c0d281919650f39f5bf84e4019d8cc5988630114aaec5a59fdab45
7
- data.tar.gz: 38068b949e79d8c8c26bbfe07f5c75546f4f11964a4ec9259eaab168df458423be6eac7575a070ed7cb91b0a529d3a11d22b6f2d2605decf7ea39d25847ad0c4
6
+ metadata.gz: da42001d35f67f6aa680b8b2b5f3cbc9ee020b537af8ba126ead44d76257d8f8f881afad501ecbce5c8c5fa7ebf65be59ccfb79f3d16ad2d5af5436288dd3c78
7
+ data.tar.gz: 680f9463a9f6540f03281fe4013251f83622811cfaff0a53bb1e9c47081720bc99f624be79ba86b0d9ce8031892c40f38cc140cf128711bc0cb0b800793ff4f8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [4.1.0] - 2026-09-17
4
+
5
+ - [Feature] `account.visits.for_work`, the stops of jobs and of estimates together and the hours
6
+ held around them left unread. `/events` narrows by nothing, so reading blocked-out time costs
7
+ a sweep of every page on top of the two requests the work itself takes -- fifteen of them on
8
+ an account with 2,877 events. A caller that wants the work and not the holds now says so and
9
+ is spared them.
10
+
11
+ - [Note] The vocabulary is `company` 3.1, where `for_work` is named. A platform that answers its
12
+ whole list at once gets the narrowing for free; this one pushes it down to the requests it
13
+ does not then make.
14
+
3
15
  ## [4.0.0] - 2026-09-16
4
16
 
5
17
  - [Breaking change] The vocabulary is `company` 3.0: `assigned_to` is `of`, so
data/README.md CHANGED
@@ -118,8 +118,12 @@ for the stops of work alone:
118
118
  ```ruby
119
119
  account.visits.upcoming(2.weeks).for_jobs # => only the appointments, one request
120
120
  account.visits.upcoming(2.weeks).for_leads # => only the estimates' slots, one request
121
+ account.visits.upcoming(2.weeks).for_work # => both kinds of stop, and no sweep
121
122
  ```
122
123
 
124
+ `for_work` is the one to ask for where a caller wants the work and not the hours held around it:
125
+ the jobs and the estimates are still read, and the fifteen requests of the sweep are not spent.
126
+
123
127
  A stop says where it is without being asked what it was booked for: an appointment has no
124
128
  address of its own and takes the job's, and an estimate's slot takes the estimate's. A caller
125
129
  reading a schedule never reaches through `visit.job` for an address.
@@ -44,6 +44,10 @@ module Hcp
44
44
  # @return [Visits] the same list, read off the estimates alone: one request rather than many.
45
45
  def for_leads = with(jobs: false, events: false)
46
46
 
47
+ # @return [Visits] the same list, read off the work alone: two requests rather than the
48
+ # fifteen a sweep of the calendar costs on top of them.
49
+ def for_work = with(events: false)
50
+
47
51
  # Work booked across the window carries every stop in it, so each list is read once and
48
52
  # what was called off keeps its stops to itself.
49
53
  # @yield [Company::Visit] each visit in the window, the work's stops before the hours
data/lib/hcp/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # The Housecall Pro API, answered in the vocabulary of the company gem.
2
2
  module Hcp
3
3
  # The version of this gem, as RubyGems knows it.
4
- VERSION = '4.0.0'
4
+ VERSION = '4.1.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hcp
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Baccigalupo
@@ -29,14 +29,14 @@ dependencies:
29
29
  requirements:
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: '3.0'
32
+ version: '3.1'
33
33
  type: :runtime
34
34
  prerelease: false
35
35
  version_requirements: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '3.0'
39
+ version: '3.1'
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: ice_cube
42
42
  requirement: !ruby/object:Gem::Requirement