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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/klaviyo_api/resources/profile_exclusion.rb +36 -0
- data/lib/klaviyo_api/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be4638567c3dbc65c7d447df78c95f154ef5e688439da875d14293541ab64157
|
4
|
+
data.tar.gz: f06ed9f4f74c7d1bc59d863a3d6f1c16d2fdac9c69c8cf21d1809f6e0e06ae19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fa7aa3f31ca0aa1345cf37cd0a2807f805b53590638300aace5ee68f1663c9fa7900e65aee8fac8c90fc85ddbca334796dcd7d983dd31585be24b8554165bf5
|
7
|
+
data.tar.gz: c87c47bba6c3387c2e3576e362c4edc11c54d3f58b01b696f5e0a4692362b864bd9f9771650269552c2a81639e43aeaa2ceb563ec0714a9c93c9f2f88245dc15
|
data/CHANGELOG.md
CHANGED
@@ -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
|
data/lib/klaviyo_api/version.rb
CHANGED
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.
|
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-
|
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
|