parallel588-klaviyo 0.9.0 → 0.10.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 +0 -1
- data/lib/klaviyo/lists/api_operations.rb +3 -3
- data/lib/klaviyo/people/api_operations.rb +4 -10
- data/lib/klaviyo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f52f1a79b4d5d831ce29cebbca33cde29354ca6
|
4
|
+
data.tar.gz: 9a5a3eef76a908bfe5d8f7687b21e30a96fc2ada
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e03c44139ba5d78bfff26c72919cc6409f28b5b7718daaa284e305de43b0b396d77aaeffbb723b888a44b3b09af5b9739a09c18f1a499059ca0c8b46552624d
|
7
|
+
data.tar.gz: 4657419bee66939cfa9f9618ca606cca92da7e7f1511d18459485a53ca5f1de185edb0f8c85a3872d154b9e2ee123c1521a337a2c348d81e626a12595a686091
|
data/lib/klaviyo/client.rb
CHANGED
@@ -45,7 +45,6 @@ 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
|
49
48
|
define_api_method resource: :people, action: :update
|
50
49
|
define_api_method resource: :people, action: :events
|
51
50
|
define_api_method resource: :people, action: :metric_events
|
@@ -69,7 +69,7 @@ module Klaviyo
|
|
69
69
|
#
|
70
70
|
# @id - list id
|
71
71
|
#
|
72
|
-
def subscribe(client:, id:, email:, properties: {}, confirm_optin:
|
72
|
+
def subscribe(client:, id:, email:, properties: {}, confirm_optin: false)
|
73
73
|
Klaviyo::Resource.build(
|
74
74
|
client.conn.post("/api/v1/list/#{id}/members",
|
75
75
|
api_key: client.api_key,
|
@@ -93,11 +93,11 @@ module Klaviyo
|
|
93
93
|
#
|
94
94
|
# @id - list id
|
95
95
|
#
|
96
|
-
def batch_subscribe(client:, id:, batch
|
96
|
+
def batch_subscribe(client:, id:, batch: [], confirm_optin: false)
|
97
97
|
client.conn.post(
|
98
98
|
"/api/v1/list/#{id}/members/batch",
|
99
99
|
api_key: client.api_key,
|
100
|
-
batch: batch,
|
100
|
+
batch: JSON.generate(batch),
|
101
101
|
confirm_optin: confirm_optin
|
102
102
|
)
|
103
103
|
end
|
@@ -42,18 +42,12 @@ 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
|
-
|
52
45
|
def update(client:, id:, attrs: {})
|
53
46
|
Klaviyo::Resource.build(
|
54
|
-
client.conn.put(
|
55
|
-
|
56
|
-
|
47
|
+
client.conn.put(
|
48
|
+
"/api/v1/person/#{id}",
|
49
|
+
{ api_key: client.api_key }.merge(attrs)
|
50
|
+
).body)
|
57
51
|
end
|
58
52
|
|
59
53
|
def events(client:, id:, sort: 'desc', per: 100, since: Time.now.to_i)
|
data/lib/klaviyo/version.rb
CHANGED