parallel588-klaviyo 0.14.5 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/klaviyo.gemspec +6 -6
- data/lib/klaviyo/client.rb +2 -3
- data/lib/klaviyo/resource.rb +4 -3
- data/lib/klaviyo/version.rb +1 -1
- metadata +21 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e79ae4ccbb0db1441cb9d92680fb38d15a02942c9932ce533661880bf7dc3845
|
4
|
+
data.tar.gz: a7367421c3f8dbb52cbb820e89f8a039a8ed65c787e7736de75bf2bca541ce9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5db8abab75786a29999a2c50a9c6858bbf171c005135ca57231f66fb724a8885779b32759c121ad297db75978c8aeaebf1f133a7c0f0ca368c5730d6e2aaf9e4
|
7
|
+
data.tar.gz: 43e01f23efec488af23335d0899539848c904a3a919b8275c83de762bed6ddc4a8e00fdbd0483567ff9638b30719425487fff14226d7ef71e90ce845ab8c721a
|
data/klaviyo.gemspec
CHANGED
@@ -17,14 +17,14 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
-
spec.add_runtime_dependency('virtus', '
|
21
|
-
spec.add_runtime_dependency('json', '
|
22
|
-
spec.add_runtime_dependency('faraday', '~>
|
20
|
+
spec.add_runtime_dependency('virtus', '~> 1.0')
|
21
|
+
spec.add_runtime_dependency('json', '~> 1.7')
|
22
|
+
spec.add_runtime_dependency('faraday', '~> 1.6.0')
|
23
23
|
spec.add_runtime_dependency('multi_json', '~> 1.13')
|
24
|
-
spec.add_runtime_dependency('activesupport', ['>= 3.1', '<
|
24
|
+
spec.add_runtime_dependency('activesupport', ['>= 3.1', '< 7.0'])
|
25
25
|
|
26
|
-
spec.add_development_dependency
|
27
|
-
spec.add_development_dependency 'rake', '~>
|
26
|
+
spec.add_development_dependency "bundler", "~> 2.2.10"
|
27
|
+
spec.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
|
28
28
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
29
29
|
spec.add_development_dependency 'pry', '~> 0.10.3'
|
30
30
|
spec.add_development_dependency 'webmock', '~> 2.0', '>= 2.0.3'
|
data/lib/klaviyo/client.rb
CHANGED
@@ -14,9 +14,8 @@ module Klaviyo
|
|
14
14
|
raise Errors::AuthenticationError, 'No Token provided.' unless @token
|
15
15
|
|
16
16
|
@conn = Faraday.new(default_req_options.merge(req_options)) do |f|
|
17
|
-
f.
|
18
|
-
|
19
|
-
f.request :url_encoded
|
17
|
+
f.request :url_encoded
|
18
|
+
|
20
19
|
f.use Errors::RequestError
|
21
20
|
f.adapter Faraday.default_adapter
|
22
21
|
end
|
data/lib/klaviyo/resource.rb
CHANGED
@@ -21,7 +21,8 @@ module Klaviyo
|
|
21
21
|
|
22
22
|
attr_reader :meta, :items
|
23
23
|
|
24
|
-
def initialize(
|
24
|
+
def initialize(raw_data)
|
25
|
+
data = raw_data.is_a?(String) ? MultiJson.load(raw_data) : raw_data
|
25
26
|
@items = data.delete('data').map { |attrs| Klaviyo::Resource.build(attrs) }
|
26
27
|
@meta = data
|
27
28
|
end
|
@@ -36,8 +37,8 @@ module Klaviyo
|
|
36
37
|
class Folder < KlaviyoObject; end
|
37
38
|
class Membership < KlaviyoObject; end
|
38
39
|
|
39
|
-
def self.build(
|
40
|
-
|
40
|
+
def self.build(params)
|
41
|
+
attrs = params.is_a?(String) ? MultiJson.load(params) : params
|
41
42
|
object = attrs.delete('object')
|
42
43
|
case object.to_s
|
43
44
|
when 'person'
|
data/lib/klaviyo/version.rb
CHANGED
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parallel588-klaviyo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.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:
|
11
|
+
date: 2021-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: virtus
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.7'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.7'
|
41
41
|
- !ruby/object:Gem::Dependency
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 1.6.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 1.6.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: multi_json
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -75,7 +75,7 @@ dependencies:
|
|
75
75
|
version: '3.1'
|
76
76
|
- - "<"
|
77
77
|
- !ruby/object:Gem::Version
|
78
|
-
version: '
|
78
|
+
version: '7.0'
|
79
79
|
type: :runtime
|
80
80
|
prerelease: false
|
81
81
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -85,35 +85,41 @@ dependencies:
|
|
85
85
|
version: '3.1'
|
86
86
|
- - "<"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: '
|
88
|
+
version: '7.0'
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: bundler
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
93
|
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version:
|
95
|
+
version: 2.2.10
|
96
96
|
type: :development
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version:
|
102
|
+
version: 2.2.10
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: rake
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '
|
109
|
+
version: '12.3'
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: 12.3.3
|
110
113
|
type: :development
|
111
114
|
prerelease: false
|
112
115
|
version_requirements: !ruby/object:Gem::Requirement
|
113
116
|
requirements:
|
114
117
|
- - "~>"
|
115
118
|
- !ruby/object:Gem::Version
|
116
|
-
version: '
|
119
|
+
version: '12.3'
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: 12.3.3
|
117
123
|
- !ruby/object:Gem::Dependency
|
118
124
|
name: rspec
|
119
125
|
requirement: !ruby/object:Gem::Requirement
|
@@ -212,8 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
212
218
|
- !ruby/object:Gem::Version
|
213
219
|
version: '0'
|
214
220
|
requirements: []
|
215
|
-
|
216
|
-
rubygems_version: 2.7.3
|
221
|
+
rubygems_version: 3.2.15
|
217
222
|
signing_key:
|
218
223
|
specification_version: 4
|
219
224
|
summary: You heard us, a Ruby wrapper for the Klaviyo API
|