parallel588-klaviyo 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/klaviyo/client.rb +1 -0
- data/lib/klaviyo/people/api_operations.rb +10 -4
- data/lib/klaviyo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 431c88d8cd862ea7d018b3bfb4ae029470d68079
|
4
|
+
data.tar.gz: b39c6478d8520e8059868efd2d407062f9f36d07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f83d6f88721ba4085a9c067091a8c4c7666d9cf4fa8a266b1bdd46bc41e6a7c7e7e2f3d0fb5bc4c965662db39b278319f03d86db6e022c04b706b0f4358a366
|
7
|
+
data.tar.gz: d9d3f8bcc353023dd19782db7b4cc7411283095b8b97b51d054f6dc48e01e338d1a9ecc5bc42c2afb3bdf75233fe3568ee82c2046d8faf7ea8df11071f2f1b61
|
data/lib/klaviyo/client.rb
CHANGED
@@ -45,6 +45,7 @@ module Klaviyo
|
|
45
45
|
define_api_method resource: :people, action: :find
|
46
46
|
define_api_method resource: :people, action: :exclusions
|
47
47
|
define_api_method resource: :people, action: :exclude
|
48
|
+
define_api_method resource: :people, action: :create
|
48
49
|
define_api_method resource: :people, action: :update
|
49
50
|
define_api_method resource: :people, action: :events
|
50
51
|
define_api_method resource: :people, action: :metric_events
|
@@ -42,12 +42,18 @@ module Klaviyo
|
|
42
42
|
)
|
43
43
|
end
|
44
44
|
|
45
|
+
def create(client:, attrs: {})
|
46
|
+
Klaviyo::Resource.build(
|
47
|
+
client.conn.put('/api/v1/person',
|
48
|
+
{ api_key: client.api_key }.merge(attrs)
|
49
|
+
).body)
|
50
|
+
end
|
51
|
+
|
45
52
|
def update(client:, id:, attrs: {})
|
46
53
|
Klaviyo::Resource.build(
|
47
|
-
client.conn.put(
|
48
|
-
|
49
|
-
|
50
|
-
).body)
|
54
|
+
client.conn.put("/api/v1/person/#{id}",
|
55
|
+
{ api_key: client.api_key }.merge(attrs)
|
56
|
+
).body)
|
51
57
|
end
|
52
58
|
|
53
59
|
def events(client:, id:, sort: 'desc', per: 100, since: Time.now.to_i)
|
data/lib/klaviyo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parallel588-klaviyo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maxim Pechnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04
|
11
|
+
date: 2016-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: virtus
|