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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f20c322826f6e2c97eeb107ed11482d783c30555
4
- data.tar.gz: ed8f644a6be432c04c74d9c5b7eac502ad2b13b5
3
+ metadata.gz: 431c88d8cd862ea7d018b3bfb4ae029470d68079
4
+ data.tar.gz: b39c6478d8520e8059868efd2d407062f9f36d07
5
5
  SHA512:
6
- metadata.gz: a26848c0c3885b018fdd7f9a5455bc6d3ddeae71d43a3d526285e9c18800d44e1107ca34afd88a09683a1e5d686f42e39ad6accc649db2f10e898bb454db1a83
7
- data.tar.gz: 41a2cc7c7b3ae68dcd40a3f93c6aa60243f179bea8c64d8fc11b2a9e7b097072c75e811ff6a251938998ea2682b92a35bc58a8bc5a131cd8b1764e30771b3bed
6
+ metadata.gz: 0f83d6f88721ba4085a9c067091a8c4c7666d9cf4fa8a266b1bdd46bc41e6a7c7e7e2f3d0fb5bc4c965662db39b278319f03d86db6e022c04b706b0f4358a366
7
+ data.tar.gz: d9d3f8bcc353023dd19782db7b4cc7411283095b8b97b51d054f6dc48e01e338d1a9ecc5bc42c2afb3bdf75233fe3568ee82c2046d8faf7ea8df11071f2f1b61
@@ -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
- "/api/v1/person/#{id}",
49
- { api_key: client.api_key }.merge(attrs)
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)
@@ -1,3 +1,3 @@
1
1
  module Klaviyo
2
- VERSION = "0.8.0"
2
+ VERSION = "0.9.0"
3
3
  end
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.8.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-09 00:00:00.000000000 Z
11
+ date: 2016-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: virtus