cronofy 0.37.4 → 0.37.5

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: 1338eaab0825a963c74f2c5fd3c434d01185a4bbc36fa57504b0e1edd539fe9e
4
- data.tar.gz: 55a045316dbb1545ee7e4f14284ebbbc0aa7b91848ba28d165968125d2221bb3
3
+ metadata.gz: e21c23685801f569da765f2572e20cb66870a8eb2615628279bc6ff7cdcd49d9
4
+ data.tar.gz: 3c595df2b4fb1cf29c6bf76e31865a30cd7f09aaa12bcd80c485d8e3edc8c3e7
5
5
  SHA512:
6
- metadata.gz: 38ee7c99226bfe70c6e970a22477de0130e93fe07130b9d2c0a596e17178f66435ec58a97be5f18e9b6ac5624eefef7dde96443a8cc91c85f02818016ed64f7d
7
- data.tar.gz: 8d0d1641e57b0751988ac5f7978571d2dbd6d6ea12b96ff2314a33d0d9b87c7a11eb5e16775c55b070a312c2efb6b8b353dc3c3f7a8cbe9b3f42c943d6afa21a
6
+ metadata.gz: 151382f0d9c593b19637dd8d6c452c61dceab8e4345a361def1aee2e934545a6fc97ea73dd10ece22fb83073b1670e724bcfa32a6a712112f1c2f115010a5809
7
+ data.tar.gz: 95391561459fba368ef63ff522288ce50fdb08ae90c6205c825ae781495cbdb515d7ae6d9d0814080674c2fe608cb77ad306409bf28f1b62f686eb79dc5a7ca1
data/CHANGELOG.md CHANGED
@@ -1,22 +1,26 @@
1
+ ## [0.37.5]
2
+
3
+ * Support `query_periods` as well as the original `available_periods` for Real-Time Scheduling and Real-Time Sequencing [#99]
4
+
1
5
  ## [0.37.4]
2
6
 
3
- * Support client_secret only clients being able to authorize `#availability` calls. [#97]
7
+ * Support client_secret only clients being able to authorize `#availability` calls. [#97]
4
8
 
5
9
  ## [0.37.3]
6
10
 
7
- * Support `hmac_valid` as well as the original `hmac_match` for Client to verify a HMAC from a push notification using the client's secret.[#95]
11
+ * Support `hmac_valid` as well as the original `hmac_match` for Client to verify a HMAC from a push notification using the client's secret.[#95]
8
12
 
9
13
  ## [0.37.2]
10
14
 
11
- * Support `query_periods` as well as the original `available_periods` for Availability Query and Sequenced Availability [#91]
15
+ * Support `query_periods` as well as the original `available_periods` for Availability Query and Sequenced Availability [#91]
12
16
 
13
17
  ## [0.37.1]
14
18
 
15
- * Rename `data_centre` to `data_centre` (with aliases for backwards compatibility) [#90]
19
+ * Rename `data_centre` to `data_centre` (with aliases for backwards compatibility) [#90]
16
20
 
17
21
  ## [0.37.0]
18
22
 
19
- * Add `revoke_by_token` and `revoke_by_sub` to the Client [#86]
23
+ * Add `revoke_by_token` and `revoke_by_sub` to the Client [#86]
20
24
 
21
25
  ## [0.36.1]
22
26
 
@@ -197,6 +201,7 @@
197
201
  [0.37.2]: https://github.com/cronofy/cronofy-ruby/releases/tag/v0.37.2
198
202
  [0.37.3]: https://github.com/cronofy/cronofy-ruby/releases/tag/v0.37.3
199
203
  [0.37.4]: https://github.com/cronofy/cronofy-ruby/releases/tag/v0.37.4
204
+ [0.37.5]: https://github.com/cronofy/cronofy-ruby/releases/tag/v0.37.5
200
205
 
201
206
  [#13]: https://github.com/cronofy/cronofy-ruby/pull/13
202
207
  [#16]: https://github.com/cronofy/cronofy-ruby/pull/16
@@ -243,3 +248,4 @@
243
248
  [#91]: https://github.com/cronofy/cronofy-ruby/pull/91
244
249
  [#95]: https://github.com/cronofy/cronofy-ruby/pull/95
245
250
  [#97]: https://github.com/cronofy/cronofy-ruby/pull/97
251
+ [#99]: https://github.com/cronofy/cronofy-ruby/pull/99
@@ -1033,7 +1033,7 @@ module Cronofy
1033
1033
  # call
1034
1034
  # :required_duration - A hash stating the length of time the event will
1035
1035
  # last for
1036
- # :available_periods - A hash stating the available periods for the event
1036
+ # :query_periods - A hash stating the available periods for the event
1037
1037
  # :start_interval - An Integer representing the start interval
1038
1038
  # of minutes for the availability query.
1039
1039
  # :buffer - An Hash containing the buffer to apply to
@@ -1069,7 +1069,7 @@ module Cronofy
1069
1069
  # }
1070
1070
  # ],
1071
1071
  # required_duration: { minutes: 60 },
1072
- # available_periods: [{
1072
+ # query_periods: [{
1073
1073
  # start: Time.utc(2017, 1, 1, 9, 00),
1074
1074
  # end: Time.utc(2017, 1, 1, 17, 00),
1075
1075
  # }]
@@ -1110,7 +1110,7 @@ module Cronofy
1110
1110
  end
1111
1111
  end
1112
1112
 
1113
- translate_available_periods(availability[:available_periods])
1113
+ translate_available_periods(availability[:query_periods] || availability[:available_periods])
1114
1114
  body[:availability] = availability
1115
1115
 
1116
1116
  response = raw_post("/v1/real_time_scheduling", body)
@@ -1176,7 +1176,7 @@ module Cronofy
1176
1176
  # an array of invitees to invite to or reject from
1177
1177
  # the event. Invitees are represented by a hash of
1178
1178
  # :email and :display_name (optional).
1179
- # :available_periods - A hash stating the available periods for the event
1179
+ # :query_periods - A hash stating the query periods for the event
1180
1180
  # target_calendars - An array of hashes stating into which calendars to insert the created
1181
1181
  # event
1182
1182
  # Raises Cronofy::CredentialsMissingError if no credentials available.
@@ -1194,7 +1194,8 @@ module Cronofy
1194
1194
 
1195
1195
  if availability = args[:availability]
1196
1196
  availability[:sequence] = map_availability_sequence(availability[:sequence])
1197
- translate_available_periods(availability[:available_periods]) if availability[:available_periods]
1197
+ periods = availability[:query_periods] || availability[:available_periods]
1198
+ translate_available_periods(periods) if periods
1198
1199
  end
1199
1200
 
1200
1201
  body[:availability] = availability
@@ -1748,8 +1749,10 @@ module Cronofy
1748
1749
  hash[:required_duration] = map_availability_required_duration(value)
1749
1750
  end
1750
1751
 
1751
- if sequence_item[:available_periods]
1752
- translate_available_periods(sequence_item[:available_periods])
1752
+ periods = sequence_item[:query_periods] || sequence_item[:available_periods]
1753
+
1754
+ if periods
1755
+ translate_available_periods(periods)
1753
1756
  end
1754
1757
 
1755
1758
  if value = sequence_item[:start_interval]
@@ -1,3 +1,3 @@
1
1
  module Cronofy
2
- VERSION = "0.37.4".freeze
2
+ VERSION = "0.37.5".freeze
3
3
  end
@@ -2341,6 +2341,14 @@ describe Cronofy::Client do
2341
2341
  it_behaves_like 'a Cronofy request'
2342
2342
  end
2343
2343
 
2344
+ context 'when passing query periods' do
2345
+ it_behaves_like 'a Cronofy request'
2346
+
2347
+ before do
2348
+ availability[:query_periods] = availability.delete(:available_periods)
2349
+ mapped_availability[:query_periods] = mapped_availability.delete(:available_periods)
2350
+ end
2351
+ end
2344
2352
  end
2345
2353
 
2346
2354
  describe "Real time sequencing" do
@@ -2529,6 +2537,21 @@ describe Cronofy::Client do
2529
2537
  it_behaves_like 'a Cronofy request'
2530
2538
  end
2531
2539
 
2540
+ context 'when passing query periods' do
2541
+ it_behaves_like 'a Cronofy request'
2542
+
2543
+ before do
2544
+ availability[:query_periods] = availability.delete(:available_periods)
2545
+ availability[:sequence].each do |sequence|
2546
+ sequence[:query_periods] = sequence.delete(:available_periods)
2547
+ end
2548
+
2549
+ mapped_availability[:query_periods] = mapped_availability.delete(:available_periods)
2550
+ mapped_availability[:sequence].each do |sequence|
2551
+ sequence[:query_periods] = sequence.delete(:available_periods)
2552
+ end
2553
+ end
2554
+ end
2532
2555
  end
2533
2556
 
2534
2557
  describe "specifying data_centre" do
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cronofy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.37.4
4
+ version: 0.37.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergii Paryzhskyi
8
8
  - Garry Shutler
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-03-10 00:00:00.000000000 Z
12
+ date: 2022-03-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: hashie
@@ -141,7 +141,7 @@ homepage: https://github.com/cronofy/cronofy-ruby
141
141
  licenses:
142
142
  - MIT
143
143
  metadata: {}
144
- post_install_message:
144
+ post_install_message:
145
145
  rdoc_options: []
146
146
  require_paths:
147
147
  - lib
@@ -156,8 +156,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
156
  - !ruby/object:Gem::Version
157
157
  version: '0'
158
158
  requirements: []
159
- rubygems_version: 3.2.32
160
- signing_key:
159
+ rubygems_version: 3.2.33
160
+ signing_key:
161
161
  specification_version: 4
162
162
  summary: Cronofy - the scheduling platform for business
163
163
  test_files: