parallel588-klaviyo 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 431c88d8cd862ea7d018b3bfb4ae029470d68079
4
- data.tar.gz: b39c6478d8520e8059868efd2d407062f9f36d07
3
+ metadata.gz: 4f52f1a79b4d5d831ce29cebbca33cde29354ca6
4
+ data.tar.gz: 9a5a3eef76a908bfe5d8f7687b21e30a96fc2ada
5
5
  SHA512:
6
- metadata.gz: 0f83d6f88721ba4085a9c067091a8c4c7666d9cf4fa8a266b1bdd46bc41e6a7c7e7e2f3d0fb5bc4c965662db39b278319f03d86db6e022c04b706b0f4358a366
7
- data.tar.gz: d9d3f8bcc353023dd19782db7b4cc7411283095b8b97b51d054f6dc48e01e338d1a9ecc5bc42c2afb3bdf75233fe3568ee82c2046d8faf7ea8df11071f2f1b61
6
+ metadata.gz: 0e03c44139ba5d78bfff26c72919cc6409f28b5b7718daaa284e305de43b0b396d77aaeffbb723b888a44b3b09af5b9739a09c18f1a499059ca0c8b46552624d
7
+ data.tar.gz: 4657419bee66939cfa9f9618ca606cca92da7e7f1511d18459485a53ca5f1de185edb0f8c85a3872d154b9e2ee123c1521a337a2c348d81e626a12595a686091
@@ -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: true)
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:, confirm_optin: true)
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("/api/v1/person/#{id}",
55
- { api_key: client.api_key }.merge(attrs)
56
- ).body)
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)
@@ -1,3 +1,3 @@
1
1
  module Klaviyo
2
- VERSION = "0.9.0"
2
+ VERSION = "0.10.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel588-klaviyo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxim Pechnikov