klaviyo_sdk 1.0.1.20220329 → 1.0.4.20220329
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +121 -99
- data/klaviyo_sdk.gemspec +1 -1
- data/lib/klaviyo_sdk/api/campaigns_api.rb +1 -1
- data/lib/klaviyo_sdk/api/data_privacy_api.rb +3 -3
- data/lib/klaviyo_sdk/api/lists_segments_api.rb +1 -1
- data/lib/klaviyo_sdk/api/metrics_api.rb +1 -1
- data/lib/klaviyo_sdk/api/profiles_api.rb +67 -1
- data/lib/klaviyo_sdk/api/templates_api.rb +1 -1
- data/lib/klaviyo_sdk/api/track_identify_api.rb +1 -1
- data/lib/klaviyo_sdk/api_client.rb +2 -2
- data/lib/klaviyo_sdk/api_error.rb +1 -1
- data/lib/klaviyo_sdk/configuration.rb +1 -1
- data/lib/klaviyo_sdk/models/campaign.rb +202 -22
- data/lib/klaviyo_sdk/models/campaign_lists.rb +318 -0
- data/lib/klaviyo_sdk/models/campaigns.rb +487 -0
- data/lib/klaviyo_sdk/models/check_membership_request.rb +4 -4
- data/lib/klaviyo_sdk/models/delete_email.rb +4 -4
- data/lib/klaviyo_sdk/models/delete_person.rb +4 -4
- data/lib/klaviyo_sdk/models/delete_phone.rb +4 -4
- data/lib/klaviyo_sdk/models/deprecated_get_list_response.rb +4 -4
- data/lib/klaviyo_sdk/models/deprecated_get_list_response_data.rb +4 -4
- data/lib/klaviyo_sdk/models/global_exclusion_response_data.rb +4 -4
- data/lib/klaviyo_sdk/models/identify_payload.rb +4 -4
- data/lib/klaviyo_sdk/models/identify_payload_properties.rb +4 -4
- data/lib/klaviyo_sdk/models/inline_object.rb +9 -4
- data/lib/klaviyo_sdk/models/inline_object3.rb +4 -4
- data/lib/klaviyo_sdk/models/inline_object4.rb +4 -4
- data/lib/klaviyo_sdk/models/inline_object5.rb +4 -5
- data/lib/klaviyo_sdk/models/inline_response200.rb +218 -0
- data/lib/klaviyo_sdk/models/metric.rb +4 -4
- data/lib/klaviyo_sdk/models/metric_export.rb +4 -4
- data/lib/klaviyo_sdk/models/metric_timeline.rb +4 -4
- data/lib/klaviyo_sdk/models/metric_timeline_data.rb +4 -4
- data/lib/klaviyo_sdk/models/person.rb +4 -4
- data/lib/klaviyo_sdk/models/person.rb.bak +4 -4
- data/lib/klaviyo_sdk/models/privacy_email.rb +4 -4
- data/lib/klaviyo_sdk/models/privacy_id.rb +4 -4
- data/lib/klaviyo_sdk/models/privacy_phone.rb +4 -4
- data/lib/klaviyo_sdk/models/rendered_template.rb +4 -4
- data/lib/klaviyo_sdk/models/template.rb +4 -4
- data/lib/klaviyo_sdk/models/track_payload.rb +4 -4
- data/lib/klaviyo_sdk/models/track_payload_customer_properties.rb +4 -4
- data/lib/klaviyo_sdk/models/track_payload_properties.rb +4 -4
- data/lib/klaviyo_sdk/version.rb +1 -1
- data/lib/klaviyo_sdk.rb +10 -7
- metadata +6 -76
- data/docs/Campaign.md +0 -38
- data/docs/CampaignsApi.md +0 -707
- data/docs/CheckMembershipRequest.md +0 -22
- data/docs/DataPrivacyApi.md +0 -81
- data/docs/DeleteEmail.md +0 -18
- data/docs/DeletePerson.md +0 -18
- data/docs/DeletePhone.md +0 -18
- data/docs/DeprecatedGetListResponse.md +0 -30
- data/docs/DeprecatedGetListResponseData.md +0 -28
- data/docs/GlobalExclusionResponseData.md +0 -30
- data/docs/IdentifyPayload.md +0 -20
- data/docs/IdentifyPayloadProperties.md +0 -42
- data/docs/InlineObject.md +0 -18
- data/docs/InlineObject3.md +0 -18
- data/docs/InlineObject4.md +0 -18
- data/docs/InlineObject5.md +0 -22
- data/docs/ListsSegmentsApi.md +0 -1198
- data/docs/Metric.md +0 -28
- data/docs/MetricExport.md +0 -32
- data/docs/MetricTimeline.md +0 -24
- data/docs/MetricTimelineData.md +0 -34
- data/docs/MetricsApi.md +0 -329
- data/docs/Person.md +0 -56
- data/docs/PrivacyEmail.md +0 -18
- data/docs/PrivacyId.md +0 -18
- data/docs/PrivacyPhone.md +0 -18
- data/docs/ProfilesApi.md +0 -391
- data/docs/RenderedTemplate.md +0 -24
- data/docs/Template.md +0 -30
- data/docs/TemplatesApi.md +0 -541
- data/docs/TrackIdentifyApi.md +0 -267
- data/docs/TrackPayload.md +0 -24
- data/docs/TrackPayloadCustomerProperties.md +0 -20
- data/docs/TrackPayloadProperties.md +0 -22
- data/git_push.sh +0 -57
- data/klaviyo_sdk-1.0.0.20220329.gem +0 -0
- data/spec/api/campaigns_api_spec.rb +0 -165
- data/spec/api/data_privacy_api_spec.rb +0 -47
- data/spec/api/lists_segments_api_spec.rb +0 -239
- data/spec/api/metrics_api_spec.rb +0 -96
- data/spec/api/profiles_api_spec.rb +0 -103
- data/spec/api/templates_api_spec.rb +0 -130
- data/spec/api/track_identify_api_spec.rb +0 -83
- data/spec/api_client_spec.rb +0 -226
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/campaign_spec.rb +0 -94
- data/spec/models/check_membership_request_spec.rb +0 -46
- data/spec/models/delete_email_spec.rb +0 -34
- data/spec/models/delete_person_spec.rb +0 -34
- data/spec/models/delete_phone_spec.rb +0 -34
- data/spec/models/deprecated_get_list_response_data_spec.rb +0 -64
- data/spec/models/deprecated_get_list_response_spec.rb +0 -70
- data/spec/models/global_exclusion_response_data_spec.rb +0 -70
- data/spec/models/identify_payload_properties_spec.rb +0 -106
- data/spec/models/identify_payload_spec.rb +0 -40
- data/spec/models/inline_object3_spec.rb +0 -34
- data/spec/models/inline_object4_spec.rb +0 -34
- data/spec/models/inline_object5_spec.rb +0 -46
- data/spec/models/inline_object_spec.rb +0 -34
- data/spec/models/metric_export_spec.rb +0 -76
- data/spec/models/metric_spec.rb +0 -64
- data/spec/models/metric_timeline_data_spec.rb +0 -82
- data/spec/models/metric_timeline_spec.rb +0 -52
- data/spec/models/person_spec.rb +0 -148
- data/spec/models/privacy_email_spec.rb +0 -34
- data/spec/models/privacy_id_spec.rb +0 -34
- data/spec/models/privacy_phone_spec.rb +0 -34
- data/spec/models/rendered_template_spec.rb +0 -52
- data/spec/models/template_spec.rb +0 -70
- data/spec/models/track_payload_customer_properties_spec.rb +0 -40
- data/spec/models/track_payload_properties_spec.rb +0 -46
- data/spec/models/track_payload_spec.rb +0 -52
- data/spec/spec_helper.rb +0 -111
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.4.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module Klaviyo
|
17
17
|
class Person
|
18
18
|
attr_accessor :object
|
19
19
|
|
@@ -122,13 +122,13 @@ module Client
|
|
122
122
|
# @param [Hash] attributes Model attributes in the form of hash
|
123
123
|
def initialize(attributes = {})
|
124
124
|
if (!attributes.is_a?(Hash))
|
125
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
125
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Klaviyo::Person` initialize method"
|
126
126
|
end
|
127
127
|
|
128
128
|
# check to see if the attribute exists and convert string to symbol for hash key
|
129
129
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
130
130
|
if (!self.class.attribute_map.key?(k.to_sym))
|
131
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
131
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Klaviyo::Person`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
132
132
|
end
|
133
133
|
h[k.to_sym] = v
|
134
134
|
}
|
@@ -333,7 +333,7 @@ module Client
|
|
333
333
|
end
|
334
334
|
else # model
|
335
335
|
# models (e.g. Pet) or oneOf
|
336
|
-
klass =
|
336
|
+
klass = Klaviyo.const_get(type)
|
337
337
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
338
338
|
end
|
339
339
|
end
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.4.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module Klaviyo
|
17
17
|
class PrivacyEmail
|
18
18
|
attr_accessor :email
|
19
19
|
|
@@ -46,13 +46,13 @@ module Client
|
|
46
46
|
# @param [Hash] attributes Model attributes in the form of hash
|
47
47
|
def initialize(attributes = {})
|
48
48
|
if (!attributes.is_a?(Hash))
|
49
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Klaviyo::PrivacyEmail` initialize method"
|
50
50
|
end
|
51
51
|
|
52
52
|
# check to see if the attribute exists and convert string to symbol for hash key
|
53
53
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
54
|
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Klaviyo::PrivacyEmail`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
56
|
end
|
57
57
|
h[k.to_sym] = v
|
58
58
|
}
|
@@ -162,7 +162,7 @@ module Client
|
|
162
162
|
end
|
163
163
|
else # model
|
164
164
|
# models (e.g. Pet) or oneOf
|
165
|
-
klass =
|
165
|
+
klass = Klaviyo.const_get(type)
|
166
166
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
167
167
|
end
|
168
168
|
end
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.4.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module Klaviyo
|
17
17
|
class PrivacyId
|
18
18
|
attr_accessor :person_id
|
19
19
|
|
@@ -46,13 +46,13 @@ module Client
|
|
46
46
|
# @param [Hash] attributes Model attributes in the form of hash
|
47
47
|
def initialize(attributes = {})
|
48
48
|
if (!attributes.is_a?(Hash))
|
49
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Klaviyo::PrivacyId` initialize method"
|
50
50
|
end
|
51
51
|
|
52
52
|
# check to see if the attribute exists and convert string to symbol for hash key
|
53
53
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
54
|
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Klaviyo::PrivacyId`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
56
|
end
|
57
57
|
h[k.to_sym] = v
|
58
58
|
}
|
@@ -162,7 +162,7 @@ module Client
|
|
162
162
|
end
|
163
163
|
else # model
|
164
164
|
# models (e.g. Pet) or oneOf
|
165
|
-
klass =
|
165
|
+
klass = Klaviyo.const_get(type)
|
166
166
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
167
167
|
end
|
168
168
|
end
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.4.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module Klaviyo
|
17
17
|
class PrivacyPhone
|
18
18
|
attr_accessor :phone_number
|
19
19
|
|
@@ -46,13 +46,13 @@ module Client
|
|
46
46
|
# @param [Hash] attributes Model attributes in the form of hash
|
47
47
|
def initialize(attributes = {})
|
48
48
|
if (!attributes.is_a?(Hash))
|
49
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Klaviyo::PrivacyPhone` initialize method"
|
50
50
|
end
|
51
51
|
|
52
52
|
# check to see if the attribute exists and convert string to symbol for hash key
|
53
53
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
54
|
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Klaviyo::PrivacyPhone`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
56
|
end
|
57
57
|
h[k.to_sym] = v
|
58
58
|
}
|
@@ -162,7 +162,7 @@ module Client
|
|
162
162
|
end
|
163
163
|
else # model
|
164
164
|
# models (e.g. Pet) or oneOf
|
165
|
-
klass =
|
165
|
+
klass = Klaviyo.const_get(type)
|
166
166
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
167
167
|
end
|
168
168
|
end
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.4.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module Klaviyo
|
17
17
|
class RenderedTemplate
|
18
18
|
attr_accessor :object
|
19
19
|
|
@@ -58,13 +58,13 @@ module Client
|
|
58
58
|
# @param [Hash] attributes Model attributes in the form of hash
|
59
59
|
def initialize(attributes = {})
|
60
60
|
if (!attributes.is_a?(Hash))
|
61
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Klaviyo::RenderedTemplate` initialize method"
|
62
62
|
end
|
63
63
|
|
64
64
|
# check to see if the attribute exists and convert string to symbol for hash key
|
65
65
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
66
66
|
if (!self.class.attribute_map.key?(k.to_sym))
|
67
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Klaviyo::RenderedTemplate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
68
68
|
end
|
69
69
|
h[k.to_sym] = v
|
70
70
|
}
|
@@ -191,7 +191,7 @@ module Client
|
|
191
191
|
end
|
192
192
|
else # model
|
193
193
|
# models (e.g. Pet) or oneOf
|
194
|
-
klass =
|
194
|
+
klass = Klaviyo.const_get(type)
|
195
195
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
196
196
|
end
|
197
197
|
end
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.4.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module Klaviyo
|
17
17
|
class Template
|
18
18
|
attr_accessor :object
|
19
19
|
|
@@ -70,13 +70,13 @@ module Client
|
|
70
70
|
# @param [Hash] attributes Model attributes in the form of hash
|
71
71
|
def initialize(attributes = {})
|
72
72
|
if (!attributes.is_a?(Hash))
|
73
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
73
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Klaviyo::Template` initialize method"
|
74
74
|
end
|
75
75
|
|
76
76
|
# check to see if the attribute exists and convert string to symbol for hash key
|
77
77
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
78
78
|
if (!self.class.attribute_map.key?(k.to_sym))
|
79
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
79
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Klaviyo::Template`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
80
80
|
end
|
81
81
|
h[k.to_sym] = v
|
82
82
|
}
|
@@ -216,7 +216,7 @@ module Client
|
|
216
216
|
end
|
217
217
|
else # model
|
218
218
|
# models (e.g. Pet) or oneOf
|
219
|
-
klass =
|
219
|
+
klass = Klaviyo.const_get(type)
|
220
220
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
221
221
|
end
|
222
222
|
end
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.4.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module Klaviyo
|
17
17
|
class TrackPayload
|
18
18
|
attr_accessor :token
|
19
19
|
|
@@ -59,13 +59,13 @@ module Client
|
|
59
59
|
# @param [Hash] attributes Model attributes in the form of hash
|
60
60
|
def initialize(attributes = {})
|
61
61
|
if (!attributes.is_a?(Hash))
|
62
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Klaviyo::TrackPayload` initialize method"
|
63
63
|
end
|
64
64
|
|
65
65
|
# check to see if the attribute exists and convert string to symbol for hash key
|
66
66
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
67
67
|
if (!self.class.attribute_map.key?(k.to_sym))
|
68
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Klaviyo::TrackPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
69
69
|
end
|
70
70
|
h[k.to_sym] = v
|
71
71
|
}
|
@@ -205,7 +205,7 @@ module Client
|
|
205
205
|
end
|
206
206
|
else # model
|
207
207
|
# models (e.g. Pet) or oneOf
|
208
|
-
klass =
|
208
|
+
klass = Klaviyo.const_get(type)
|
209
209
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
210
210
|
end
|
211
211
|
end
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.4.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module Klaviyo
|
17
17
|
class TrackPayloadCustomerProperties
|
18
18
|
attr_accessor :_email
|
19
19
|
|
@@ -50,13 +50,13 @@ module Client
|
|
50
50
|
# @param [Hash] attributes Model attributes in the form of hash
|
51
51
|
def initialize(attributes = {})
|
52
52
|
if (!attributes.is_a?(Hash))
|
53
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
53
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Klaviyo::TrackPayloadCustomerProperties` initialize method"
|
54
54
|
end
|
55
55
|
|
56
56
|
# check to see if the attribute exists and convert string to symbol for hash key
|
57
57
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
58
58
|
if (!self.class.attribute_map.key?(k.to_sym))
|
59
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
59
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Klaviyo::TrackPayloadCustomerProperties`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
60
60
|
end
|
61
61
|
h[k.to_sym] = v
|
62
62
|
}
|
@@ -171,7 +171,7 @@ module Client
|
|
171
171
|
end
|
172
172
|
else # model
|
173
173
|
# models (e.g. Pet) or oneOf
|
174
|
-
klass =
|
174
|
+
klass = Klaviyo.const_get(type)
|
175
175
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
176
176
|
end
|
177
177
|
end
|
@@ -13,7 +13,7 @@ OpenAPI Generator version: 5.4.0
|
|
13
13
|
require 'date'
|
14
14
|
require 'time'
|
15
15
|
|
16
|
-
module
|
16
|
+
module Klaviyo
|
17
17
|
class TrackPayloadProperties
|
18
18
|
attr_accessor :event_id
|
19
19
|
|
@@ -55,13 +55,13 @@ module Client
|
|
55
55
|
# @param [Hash] attributes Model attributes in the form of hash
|
56
56
|
def initialize(attributes = {})
|
57
57
|
if (!attributes.is_a?(Hash))
|
58
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Klaviyo::TrackPayloadProperties` initialize method"
|
59
59
|
end
|
60
60
|
|
61
61
|
# check to see if the attribute exists and convert string to symbol for hash key
|
62
62
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
63
63
|
if (!self.class.attribute_map.key?(k.to_sym))
|
64
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `
|
64
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Klaviyo::TrackPayloadProperties`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
65
65
|
end
|
66
66
|
h[k.to_sym] = v
|
67
67
|
}
|
@@ -181,7 +181,7 @@ module Client
|
|
181
181
|
end
|
182
182
|
else # model
|
183
183
|
# models (e.g. Pet) or oneOf
|
184
|
-
klass =
|
184
|
+
klass = Klaviyo.const_get(type)
|
185
185
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
186
186
|
end
|
187
187
|
end
|
data/lib/klaviyo_sdk/version.rb
CHANGED
data/lib/klaviyo_sdk.rb
CHANGED
@@ -18,6 +18,8 @@ require 'klaviyo_sdk/configuration'
|
|
18
18
|
|
19
19
|
# Models
|
20
20
|
require 'klaviyo_sdk/models/campaign'
|
21
|
+
require 'klaviyo_sdk/models/campaign_lists'
|
22
|
+
require 'klaviyo_sdk/models/campaigns'
|
21
23
|
require 'klaviyo_sdk/models/check_membership_request'
|
22
24
|
require 'klaviyo_sdk/models/delete_email'
|
23
25
|
require 'klaviyo_sdk/models/delete_person'
|
@@ -31,6 +33,7 @@ require 'klaviyo_sdk/models/inline_object'
|
|
31
33
|
require 'klaviyo_sdk/models/inline_object3'
|
32
34
|
require 'klaviyo_sdk/models/inline_object4'
|
33
35
|
require 'klaviyo_sdk/models/inline_object5'
|
36
|
+
require 'klaviyo_sdk/models/inline_response200'
|
34
37
|
require 'klaviyo_sdk/models/metric'
|
35
38
|
require 'klaviyo_sdk/models/metric_export'
|
36
39
|
require 'klaviyo_sdk/models/metric_timeline'
|
@@ -57,12 +60,12 @@ require 'klaviyo_sdk/api/track_identify_api'
|
|
57
60
|
# retry logic
|
58
61
|
require 'retriable'
|
59
62
|
|
60
|
-
module
|
63
|
+
module Klaviyo
|
61
64
|
@is_initialized = false
|
62
65
|
|
63
66
|
class << self
|
64
67
|
# Customize default settings for the SDK using block.
|
65
|
-
#
|
68
|
+
# Klaviyo.configure do |config|
|
66
69
|
# config.username = "xxx"
|
67
70
|
# config.password = "xxx"
|
68
71
|
# end
|
@@ -85,8 +88,8 @@ module Client
|
|
85
88
|
self.constants.each do |c|
|
86
89
|
if c[-3..-1] == "Api"
|
87
90
|
attributes = [:attr1]
|
88
|
-
wrapper_class =
|
89
|
-
original_class =
|
91
|
+
wrapper_class = Klaviyo.const_set(c[0..-4], Struct.new(*attributes))
|
92
|
+
original_class = Klaviyo.const_get(c)
|
90
93
|
|
91
94
|
# recreate methods
|
92
95
|
original_class.public_instance_methods(false).each do |m|
|
@@ -103,14 +106,14 @@ module Client
|
|
103
106
|
c.tries = max_retries
|
104
107
|
c.max_elapsed_time = max_delay
|
105
108
|
c.on = {
|
106
|
-
|
109
|
+
Klaviyo::ApiError => [/429/, /503/, /504/]
|
107
110
|
}
|
108
111
|
end
|
109
112
|
Retriable.retriable do
|
110
|
-
|
113
|
+
Klaviyo.const_get(c).new.send(m, *arg)
|
111
114
|
end
|
112
115
|
else
|
113
|
-
|
116
|
+
Klaviyo.const_get(c).new.send(m, *arg)
|
114
117
|
end
|
115
118
|
end
|
116
119
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: klaviyo_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4.20220329
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Klaviyo Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: retriable
|
@@ -55,42 +55,6 @@ files:
|
|
55
55
|
- Gemfile
|
56
56
|
- README.md
|
57
57
|
- Rakefile
|
58
|
-
- docs/Campaign.md
|
59
|
-
- docs/CampaignsApi.md
|
60
|
-
- docs/CheckMembershipRequest.md
|
61
|
-
- docs/DataPrivacyApi.md
|
62
|
-
- docs/DeleteEmail.md
|
63
|
-
- docs/DeletePerson.md
|
64
|
-
- docs/DeletePhone.md
|
65
|
-
- docs/DeprecatedGetListResponse.md
|
66
|
-
- docs/DeprecatedGetListResponseData.md
|
67
|
-
- docs/GlobalExclusionResponseData.md
|
68
|
-
- docs/IdentifyPayload.md
|
69
|
-
- docs/IdentifyPayloadProperties.md
|
70
|
-
- docs/InlineObject.md
|
71
|
-
- docs/InlineObject3.md
|
72
|
-
- docs/InlineObject4.md
|
73
|
-
- docs/InlineObject5.md
|
74
|
-
- docs/ListsSegmentsApi.md
|
75
|
-
- docs/Metric.md
|
76
|
-
- docs/MetricExport.md
|
77
|
-
- docs/MetricTimeline.md
|
78
|
-
- docs/MetricTimelineData.md
|
79
|
-
- docs/MetricsApi.md
|
80
|
-
- docs/Person.md
|
81
|
-
- docs/PrivacyEmail.md
|
82
|
-
- docs/PrivacyId.md
|
83
|
-
- docs/PrivacyPhone.md
|
84
|
-
- docs/ProfilesApi.md
|
85
|
-
- docs/RenderedTemplate.md
|
86
|
-
- docs/Template.md
|
87
|
-
- docs/TemplatesApi.md
|
88
|
-
- docs/TrackIdentifyApi.md
|
89
|
-
- docs/TrackPayload.md
|
90
|
-
- docs/TrackPayloadCustomerProperties.md
|
91
|
-
- docs/TrackPayloadProperties.md
|
92
|
-
- git_push.sh
|
93
|
-
- klaviyo_sdk-1.0.0.20220329.gem
|
94
58
|
- klaviyo_sdk.gemspec
|
95
59
|
- lib/klaviyo_sdk.rb
|
96
60
|
- lib/klaviyo_sdk/api/campaigns_api.rb
|
@@ -104,6 +68,8 @@ files:
|
|
104
68
|
- lib/klaviyo_sdk/api_error.rb
|
105
69
|
- lib/klaviyo_sdk/configuration.rb
|
106
70
|
- lib/klaviyo_sdk/models/campaign.rb
|
71
|
+
- lib/klaviyo_sdk/models/campaign_lists.rb
|
72
|
+
- lib/klaviyo_sdk/models/campaigns.rb
|
107
73
|
- lib/klaviyo_sdk/models/check_membership_request.rb
|
108
74
|
- lib/klaviyo_sdk/models/delete_email.rb
|
109
75
|
- lib/klaviyo_sdk/models/delete_person.rb
|
@@ -117,6 +83,7 @@ files:
|
|
117
83
|
- lib/klaviyo_sdk/models/inline_object3.rb
|
118
84
|
- lib/klaviyo_sdk/models/inline_object4.rb
|
119
85
|
- lib/klaviyo_sdk/models/inline_object5.rb
|
86
|
+
- lib/klaviyo_sdk/models/inline_response200.rb
|
120
87
|
- lib/klaviyo_sdk/models/metric.rb
|
121
88
|
- lib/klaviyo_sdk/models/metric_export.rb
|
122
89
|
- lib/klaviyo_sdk/models/metric_timeline.rb
|
@@ -132,43 +99,6 @@ files:
|
|
132
99
|
- lib/klaviyo_sdk/models/track_payload_customer_properties.rb
|
133
100
|
- lib/klaviyo_sdk/models/track_payload_properties.rb
|
134
101
|
- lib/klaviyo_sdk/version.rb
|
135
|
-
- spec/api/campaigns_api_spec.rb
|
136
|
-
- spec/api/data_privacy_api_spec.rb
|
137
|
-
- spec/api/lists_segments_api_spec.rb
|
138
|
-
- spec/api/metrics_api_spec.rb
|
139
|
-
- spec/api/profiles_api_spec.rb
|
140
|
-
- spec/api/templates_api_spec.rb
|
141
|
-
- spec/api/track_identify_api_spec.rb
|
142
|
-
- spec/api_client_spec.rb
|
143
|
-
- spec/configuration_spec.rb
|
144
|
-
- spec/models/campaign_spec.rb
|
145
|
-
- spec/models/check_membership_request_spec.rb
|
146
|
-
- spec/models/delete_email_spec.rb
|
147
|
-
- spec/models/delete_person_spec.rb
|
148
|
-
- spec/models/delete_phone_spec.rb
|
149
|
-
- spec/models/deprecated_get_list_response_data_spec.rb
|
150
|
-
- spec/models/deprecated_get_list_response_spec.rb
|
151
|
-
- spec/models/global_exclusion_response_data_spec.rb
|
152
|
-
- spec/models/identify_payload_properties_spec.rb
|
153
|
-
- spec/models/identify_payload_spec.rb
|
154
|
-
- spec/models/inline_object3_spec.rb
|
155
|
-
- spec/models/inline_object4_spec.rb
|
156
|
-
- spec/models/inline_object5_spec.rb
|
157
|
-
- spec/models/inline_object_spec.rb
|
158
|
-
- spec/models/metric_export_spec.rb
|
159
|
-
- spec/models/metric_spec.rb
|
160
|
-
- spec/models/metric_timeline_data_spec.rb
|
161
|
-
- spec/models/metric_timeline_spec.rb
|
162
|
-
- spec/models/person_spec.rb
|
163
|
-
- spec/models/privacy_email_spec.rb
|
164
|
-
- spec/models/privacy_id_spec.rb
|
165
|
-
- spec/models/privacy_phone_spec.rb
|
166
|
-
- spec/models/rendered_template_spec.rb
|
167
|
-
- spec/models/template_spec.rb
|
168
|
-
- spec/models/track_payload_customer_properties_spec.rb
|
169
|
-
- spec/models/track_payload_properties_spec.rb
|
170
|
-
- spec/models/track_payload_spec.rb
|
171
|
-
- spec/spec_helper.rb
|
172
102
|
homepage: https://www.klaviyo.com/
|
173
103
|
licenses:
|
174
104
|
- Unlicense
|
@@ -190,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
120
|
- !ruby/object:Gem::Version
|
191
121
|
version: '0'
|
192
122
|
requirements: []
|
193
|
-
rubygems_version: 3.
|
123
|
+
rubygems_version: 3.3.7
|
194
124
|
signing_key:
|
195
125
|
specification_version: 4
|
196
126
|
summary: You heard us, a Ruby wrapper for the Klaviyo API
|
data/docs/Campaign.md
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
# Client::Campaign
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **object** | **String** | | [optional] |
|
8
|
-
| **id** | **String** | | [optional] |
|
9
|
-
| **name** | **String** | | [optional] |
|
10
|
-
| **subject** | **String** | | [optional] |
|
11
|
-
| **from_email** | **String** | | [optional] |
|
12
|
-
| **from_name** | **String** | | [optional] |
|
13
|
-
| **list_id** | **String** | | [optional] |
|
14
|
-
| **template** | **Hash<String, Object>** | | [optional] |
|
15
|
-
| **status** | **String** | | [optional] |
|
16
|
-
| **sent_at** | **String** | | [optional] |
|
17
|
-
| **created** | **String** | | [optional] |
|
18
|
-
|
19
|
-
## Example
|
20
|
-
|
21
|
-
```ruby
|
22
|
-
require 'klaviyo_sdk'
|
23
|
-
|
24
|
-
instance = Client::Campaign.new(
|
25
|
-
object: campaign,
|
26
|
-
id: CAMPAIGN_ID,
|
27
|
-
name: Campaign Name,
|
28
|
-
subject: Company Monthly Newsletter,
|
29
|
-
from_email: george.washington@klaviyo.com,
|
30
|
-
from_name: George Washington,
|
31
|
-
list_id: erRoOX,
|
32
|
-
template: null,
|
33
|
-
status: draft,
|
34
|
-
sent_at: 2020-12-02 18:45:04,
|
35
|
-
created: 2020-12-01 18:45:04
|
36
|
-
)
|
37
|
-
```
|
38
|
-
|