klaviyo_api 1.6.0 → 1.7.0

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: be4638567c3dbc65c7d447df78c95f154ef5e688439da875d14293541ab64157
4
- data.tar.gz: f06ed9f4f74c7d1bc59d863a3d6f1c16d2fdac9c69c8cf21d1809f6e0e06ae19
3
+ metadata.gz: 4bf6afa8a4b46e4d44a3c8d09a7cc9118c537a5513b8085eeb3d5743071e6f3c
4
+ data.tar.gz: 651fb3e6b88f7b0141f1150743d103eea4788e1406b423dffc2c0f65e6376776
5
5
  SHA512:
6
- metadata.gz: 2fa7aa3f31ca0aa1345cf37cd0a2807f805b53590638300aace5ee68f1663c9fa7900e65aee8fac8c90fc85ddbca334796dcd7d983dd31585be24b8554165bf5
7
- data.tar.gz: c87c47bba6c3387c2e3576e362c4edc11c54d3f58b01b696f5e0a4692362b864bd9f9771650269552c2a81639e43aeaa2ceb563ec0714a9c93c9f2f88245dc15
6
+ metadata.gz: b281dfe189de20b06213e4bf4ccf4822087b5d5d36481b5470c5dca1078266d0e2cef3fa1757bd3a162d2f4fcd3964ae317285f6e04afd253695b9053ac14bad
7
+ data.tar.gz: 347e0cfa8eaf8607ec09be7596de76753fb6fc297e73c1fdd9c6459ccf2fb96019517bfa0752e08f8844523429d51851e5d6bb130ecfc6d4f948e912d2eb097c
@@ -1,5 +1,11 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## [1.7.0]
4
+
5
+ ### Changed
6
+
7
+ - Updated to return count as zero, when there are no results found in klaviyo account
8
+
3
9
  ## [1.6.0]
4
10
 
5
11
  ### Added
@@ -5,6 +5,9 @@ module KlaviyoAPI::Support
5
5
  def count(params = {})
6
6
  all_params = params.deep_merge(params: { count: 1 })
7
7
  all(all_params).total
8
+ # klaviyo returns 400 if there are no results found in the account, so we catch it and return zero
9
+ rescue ActiveResource::BadRequest => e
10
+ 0
8
11
  end
9
12
  end
10
13
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KlaviyoAPI
4
- VERSION = '1.6.0'
4
+ VERSION = '1.7.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: klaviyo_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - rewind.io
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-03 00:00:00.000000000 Z
11
+ date: 2019-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource
@@ -232,7 +232,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
232
232
  - !ruby/object:Gem::Version
233
233
  version: '0'
234
234
  requirements: []
235
- rubygems_version: 3.0.3
235
+ rubyforge_project:
236
+ rubygems_version: 2.7.7
236
237
  signing_key:
237
238
  specification_version: 4
238
239
  summary: Consume Klaviyo's API using ActiveResource