klaviyo_api 1.5.0 → 1.6.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: 7f85a155aaaffcfefa023339aabee06627eedd5aafe4aa3bd5585ae5a42ca85e
4
- data.tar.gz: a83d88200ca420c62c24c53a1b57b4857f7b519bb2954cae6a24022680806e3b
3
+ metadata.gz: be4638567c3dbc65c7d447df78c95f154ef5e688439da875d14293541ab64157
4
+ data.tar.gz: f06ed9f4f74c7d1bc59d863a3d6f1c16d2fdac9c69c8cf21d1809f6e0e06ae19
5
5
  SHA512:
6
- metadata.gz: 9754d0c6d89a3fe4bb128295e45226223b7062afc5eeb2e1a0f4ac2ad51aba410b45d1a2d8b8645c18e1064b67331e425178b60e8105efa530ebfa9adaa5364f
7
- data.tar.gz: f3dca57bea500ad7289bccef655e2a36272ee64a0865548311aff3cb1b50d791730ab7e982cbd36775cdd08957a9487ae169a0ced35b9c948f5bddf4275e1b42
6
+ metadata.gz: 2fa7aa3f31ca0aa1345cf37cd0a2807f805b53590638300aace5ee68f1663c9fa7900e65aee8fac8c90fc85ddbca334796dcd7d983dd31585be24b8554165bf5
7
+ data.tar.gz: c87c47bba6c3387c2e3576e362c4edc11c54d3f58b01b696f5e0a4692362b864bd9f9771650269552c2a81639e43aeaa2ceb563ec0714a9c93c9f2f88245dc15
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## [1.6.0]
4
+
5
+ ### Added
6
+
7
+ - Support `/v1/people/exclusions`
8
+
3
9
  ## [1.5.0]
4
10
 
5
11
  ### Added
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'addressable/uri'
4
+
5
+ module KlaviyoAPI
6
+ class ProfileExclusion < Base
7
+ extend KlaviyoAPI::Support::Countable
8
+
9
+ self.prefix += 'v1/people/'
10
+
11
+ self.element_name = 'exclusion'
12
+
13
+ self.collection_parser = KlaviyoAPI::Collections::PaginatedCollection
14
+
15
+ class << self
16
+ def collection_path(prefix_options = {}, query_options = {})
17
+ super prefix_options, query_options.deep_merge({ api_key: headers['api-key'] })
18
+ end
19
+ end
20
+
21
+ def create
22
+ run_callbacks :create do
23
+ # This endpoint does not accept JSON bodies.
24
+
25
+ uri = Addressable::URI.new
26
+ uri.query_values = attributes
27
+
28
+ connection
29
+ .post(self.class.collection_path,
30
+ uri.query,
31
+ self.class.headers.merge('Content-Type': 'application/x-www-form-urlencoded'))
32
+ .tap(&method(:load_attributes_from_response))
33
+ end
34
+ end
35
+ end
36
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KlaviyoAPI
4
- VERSION = '1.5.0'
4
+ VERSION = '1.6.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.5.0
4
+ version: 1.6.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-04-29 00:00:00.000000000 Z
11
+ date: 2019-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource
@@ -209,6 +209,7 @@ files:
209
209
  - lib/klaviyo_api/resources/list_member.rb
210
210
  - lib/klaviyo_api/resources/metric.rb
211
211
  - lib/klaviyo_api/resources/profile.rb
212
+ - lib/klaviyo_api/resources/profile_exclusion.rb
212
213
  - lib/klaviyo_api/resources/support/countable.rb
213
214
  - lib/klaviyo_api/session.rb
214
215
  - lib/klaviyo_api/version.rb