klaviyo_sdk 1.0.1.20220329 → 1.0.2.20220329
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +99 -99
- data/docs/Campaign.md +2 -2
- data/docs/CampaignsApi.md +37 -37
- data/docs/CheckMembershipRequest.md +2 -2
- data/docs/DataPrivacyApi.md +5 -5
- data/docs/DeleteEmail.md +2 -2
- data/docs/DeletePerson.md +2 -2
- data/docs/DeletePhone.md +2 -2
- data/docs/DeprecatedGetListResponse.md +2 -2
- data/docs/DeprecatedGetListResponseData.md +2 -2
- data/docs/GlobalExclusionResponseData.md +2 -2
- data/docs/IdentifyPayload.md +2 -2
- data/docs/IdentifyPayloadProperties.md +2 -2
- data/docs/InlineObject.md +2 -2
- data/docs/InlineObject3.md +2 -2
- data/docs/InlineObject4.md +2 -2
- data/docs/InlineObject5.md +2 -2
- data/docs/ListsSegmentsApi.md +71 -71
- data/docs/Metric.md +2 -2
- data/docs/MetricExport.md +2 -2
- data/docs/MetricTimeline.md +2 -2
- data/docs/MetricTimelineData.md +2 -2
- data/docs/MetricsApi.md +17 -17
- data/docs/Person.md +2 -2
- data/docs/PrivacyEmail.md +2 -2
- data/docs/PrivacyId.md +2 -2
- data/docs/PrivacyPhone.md +2 -2
- data/docs/ProfilesApi.md +22 -22
- data/docs/RenderedTemplate.md +2 -2
- data/docs/Template.md +2 -2
- data/docs/TemplatesApi.md +29 -29
- data/docs/TrackIdentifyApi.md +13 -13
- data/docs/TrackPayload.md +2 -2
- data/docs/TrackPayloadCustomerProperties.md +2 -2
- data/docs/TrackPayloadProperties.md +2 -2
- 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 +1 -1
- 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 +1 -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 +4 -4
- 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 +4 -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 -4
- 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 +7 -7
- data/spec/api/campaigns_api_spec.rb +3 -3
- data/spec/api/data_privacy_api_spec.rb +3 -3
- data/spec/api/lists_segments_api_spec.rb +3 -3
- data/spec/api/metrics_api_spec.rb +3 -3
- data/spec/api/profiles_api_spec.rb +3 -3
- data/spec/api/templates_api_spec.rb +3 -3
- data/spec/api/track_identify_api_spec.rb +3 -3
- data/spec/api_client_spec.rb +29 -29
- data/spec/configuration_spec.rb +3 -3
- data/spec/models/campaign_spec.rb +4 -4
- data/spec/models/check_membership_request_spec.rb +4 -4
- data/spec/models/delete_email_spec.rb +4 -4
- data/spec/models/delete_person_spec.rb +4 -4
- data/spec/models/delete_phone_spec.rb +4 -4
- data/spec/models/deprecated_get_list_response_data_spec.rb +4 -4
- data/spec/models/deprecated_get_list_response_spec.rb +4 -4
- data/spec/models/global_exclusion_response_data_spec.rb +4 -4
- data/spec/models/identify_payload_properties_spec.rb +4 -4
- data/spec/models/identify_payload_spec.rb +4 -4
- data/spec/models/inline_object3_spec.rb +4 -4
- data/spec/models/inline_object4_spec.rb +4 -4
- data/spec/models/inline_object5_spec.rb +4 -4
- data/spec/models/inline_object_spec.rb +4 -4
- data/spec/models/metric_export_spec.rb +4 -4
- data/spec/models/metric_spec.rb +4 -4
- data/spec/models/metric_timeline_data_spec.rb +4 -4
- data/spec/models/metric_timeline_spec.rb +4 -4
- data/spec/models/person_spec.rb +4 -4
- data/spec/models/privacy_email_spec.rb +4 -4
- data/spec/models/privacy_id_spec.rb +4 -4
- data/spec/models/privacy_phone_spec.rb +4 -4
- data/spec/models/rendered_template_spec.rb +4 -4
- data/spec/models/template_spec.rb +4 -4
- data/spec/models/track_payload_customer_properties_spec.rb +4 -4
- data/spec/models/track_payload_properties_spec.rb +4 -4
- data/spec/models/track_payload_spec.rb +4 -4
- metadata +2 -3
- data/klaviyo_sdk-1.0.0.20220329.gem +0 -0
data/docs/MetricsApi.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# Klaviyo::MetricsApi
|
2
2
|
|
3
3
|
All URIs are relative to *https://a.klaviyo.com/api*
|
4
4
|
|
@@ -24,14 +24,14 @@ Returns a list of all the metrics in your account.
|
|
24
24
|
require 'time'
|
25
25
|
require 'klaviyo_sdk'
|
26
26
|
# setup authorization
|
27
|
-
|
27
|
+
Klaviyo.configure do |config|
|
28
28
|
# Configure API key authorization: ApiKeyAuth
|
29
29
|
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
30
30
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
31
31
|
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
32
32
|
end
|
33
33
|
|
34
|
-
api_instance =
|
34
|
+
api_instance = Klaviyo::MetricsApi.new
|
35
35
|
opts = {
|
36
36
|
page: 0, # Integer | For pagination, which page of results to return. Default = 0
|
37
37
|
count: 50 # Integer | For pagination, the number of results to return. Default = 50 ; Max = 100
|
@@ -41,7 +41,7 @@ begin
|
|
41
41
|
# Get Metrics Info
|
42
42
|
result = api_instance.get_metrics(opts)
|
43
43
|
p result
|
44
|
-
rescue
|
44
|
+
rescue Klaviyo::ApiError => e
|
45
45
|
puts "Error when calling MetricsApi->get_metrics: #{e}"
|
46
46
|
end
|
47
47
|
```
|
@@ -59,7 +59,7 @@ begin
|
|
59
59
|
p status_code # => 2xx
|
60
60
|
p headers # => { ... }
|
61
61
|
p data # => Hash<String, Object>
|
62
|
-
rescue
|
62
|
+
rescue Klaviyo::ApiError => e
|
63
63
|
puts "Error when calling MetricsApi->get_metrics_with_http_info: #{e}"
|
64
64
|
end
|
65
65
|
```
|
@@ -99,14 +99,14 @@ Exports event data from Klaviyo, optionally filtering and segmenting on availabl
|
|
99
99
|
require 'time'
|
100
100
|
require 'klaviyo_sdk'
|
101
101
|
# setup authorization
|
102
|
-
|
102
|
+
Klaviyo.configure do |config|
|
103
103
|
# Configure API key authorization: ApiKeyAuth
|
104
104
|
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
105
105
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
106
106
|
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
107
107
|
end
|
108
108
|
|
109
|
-
api_instance =
|
109
|
+
api_instance = Klaviyo::MetricsApi.new
|
110
110
|
metric_id = 'METRIC_ID' # String |
|
111
111
|
opts = {
|
112
112
|
start_date: 'start_date_example', # String | Beginning of timeframe to pull event data for. The default value is 1 month ago. Can also accept a 10-digit UNIX timestamp. When sending a `start_date`, you must also send an `end_date` Ex: `1610524800` OR `2021-01-13`
|
@@ -122,7 +122,7 @@ begin
|
|
122
122
|
# Query Event Data
|
123
123
|
result = api_instance.metric_export(metric_id, opts)
|
124
124
|
p result
|
125
|
-
rescue
|
125
|
+
rescue Klaviyo::ApiError => e
|
126
126
|
puts "Error when calling MetricsApi->metric_export: #{e}"
|
127
127
|
end
|
128
128
|
```
|
@@ -140,7 +140,7 @@ begin
|
|
140
140
|
p status_code # => 2xx
|
141
141
|
p headers # => { ... }
|
142
142
|
p data # => <MetricExport>
|
143
|
-
rescue
|
143
|
+
rescue Klaviyo::ApiError => e
|
144
144
|
puts "Error when calling MetricsApi->metric_export_with_http_info: #{e}"
|
145
145
|
end
|
146
146
|
```
|
@@ -186,14 +186,14 @@ Returns a batched timeline for one specific metric.
|
|
186
186
|
require 'time'
|
187
187
|
require 'klaviyo_sdk'
|
188
188
|
# setup authorization
|
189
|
-
|
189
|
+
Klaviyo.configure do |config|
|
190
190
|
# Configure API key authorization: ApiKeyAuth
|
191
191
|
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
192
192
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
193
193
|
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
194
194
|
end
|
195
195
|
|
196
|
-
api_instance =
|
196
|
+
api_instance = Klaviyo::MetricsApi.new
|
197
197
|
metric_id = 'METRIC_ID' # String |
|
198
198
|
opts = {
|
199
199
|
since: 'since_example', # String | Either a 10-digit Unix timestamp (UTC) to use as starting datetime, OR a pagination token obtained from the `next` attribute of a prior API call. For backwards compatibility, UUIDs will continue to be supported for a limited time. Defaults to current time.
|
@@ -205,7 +205,7 @@ begin
|
|
205
205
|
# Get Events for a Specific Metric
|
206
206
|
result = api_instance.metric_timeline(metric_id, opts)
|
207
207
|
p result
|
208
|
-
rescue
|
208
|
+
rescue Klaviyo::ApiError => e
|
209
209
|
puts "Error when calling MetricsApi->metric_timeline: #{e}"
|
210
210
|
end
|
211
211
|
```
|
@@ -223,7 +223,7 @@ begin
|
|
223
223
|
p status_code # => 2xx
|
224
224
|
p headers # => { ... }
|
225
225
|
p data # => <MetricTimeline>
|
226
|
-
rescue
|
226
|
+
rescue Klaviyo::ApiError => e
|
227
227
|
puts "Error when calling MetricsApi->metric_timeline_with_http_info: #{e}"
|
228
228
|
end
|
229
229
|
```
|
@@ -265,14 +265,14 @@ Returns a batched timeline of all events in your account.
|
|
265
265
|
require 'time'
|
266
266
|
require 'klaviyo_sdk'
|
267
267
|
# setup authorization
|
268
|
-
|
268
|
+
Klaviyo.configure do |config|
|
269
269
|
# Configure API key authorization: ApiKeyAuth
|
270
270
|
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
271
271
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
272
272
|
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
273
273
|
end
|
274
274
|
|
275
|
-
api_instance =
|
275
|
+
api_instance = Klaviyo::MetricsApi.new
|
276
276
|
opts = {
|
277
277
|
since: 'since_example', # String | Either a 10-digit Unix timestamp (UTC) to use as starting datetime, OR a pagination token obtained from the next attribute of a prior API call. For backwards compatibility, UUIDs will continue to be supported for a limited time. Defaults to current time.
|
278
278
|
count: 50, # Integer | Number of events to return in a batch. Default = 50, Max = 100
|
@@ -283,7 +283,7 @@ begin
|
|
283
283
|
# Get Events for All Metrics
|
284
284
|
result = api_instance.metrics_timeline(opts)
|
285
285
|
p result
|
286
|
-
rescue
|
286
|
+
rescue Klaviyo::ApiError => e
|
287
287
|
puts "Error when calling MetricsApi->metrics_timeline: #{e}"
|
288
288
|
end
|
289
289
|
```
|
@@ -301,7 +301,7 @@ begin
|
|
301
301
|
p status_code # => 2xx
|
302
302
|
p headers # => { ... }
|
303
303
|
p data # => <MetricTimeline>
|
304
|
-
rescue
|
304
|
+
rescue Klaviyo::ApiError => e
|
305
305
|
puts "Error when calling MetricsApi->metrics_timeline_with_http_info: #{e}"
|
306
306
|
end
|
307
307
|
```
|
data/docs/Person.md
CHANGED
data/docs/PrivacyEmail.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# Klaviyo::PrivacyEmail
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
@@ -11,7 +11,7 @@
|
|
11
11
|
```ruby
|
12
12
|
require 'klaviyo_sdk'
|
13
13
|
|
14
|
-
instance =
|
14
|
+
instance = Klaviyo::PrivacyEmail.new(
|
15
15
|
email: abraham.lincoln@klaviyo.com
|
16
16
|
)
|
17
17
|
```
|
data/docs/PrivacyId.md
CHANGED
data/docs/PrivacyPhone.md
CHANGED
data/docs/ProfilesApi.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# Klaviyo::ProfilesApi
|
2
2
|
|
3
3
|
All URIs are relative to *https://a.klaviyo.com/api*
|
4
4
|
|
@@ -25,23 +25,23 @@ Klaviyo's web tracking uses an encrypted identifier. However, there are many use
|
|
25
25
|
require 'time'
|
26
26
|
require 'klaviyo_sdk'
|
27
27
|
# setup authorization
|
28
|
-
|
28
|
+
Klaviyo.configure do |config|
|
29
29
|
# Configure API key authorization: ApiKeyAuth
|
30
30
|
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
31
31
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
32
32
|
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
33
33
|
end
|
34
34
|
|
35
|
-
api_instance =
|
35
|
+
api_instance = Klaviyo::ProfilesApi.new
|
36
36
|
opts = {
|
37
|
-
inline_object:
|
37
|
+
inline_object: Klaviyo::InlineObject.new # InlineObject |
|
38
38
|
}
|
39
39
|
|
40
40
|
begin
|
41
41
|
# Exchange ID for Profile ID
|
42
42
|
result = api_instance.exchange(opts)
|
43
43
|
p result
|
44
|
-
rescue
|
44
|
+
rescue Klaviyo::ApiError => e
|
45
45
|
puts "Error when calling ProfilesApi->exchange: #{e}"
|
46
46
|
end
|
47
47
|
```
|
@@ -59,7 +59,7 @@ begin
|
|
59
59
|
p status_code # => 2xx
|
60
60
|
p headers # => { ... }
|
61
61
|
p data # => Hash<String, Object>
|
62
|
-
rescue
|
62
|
+
rescue Klaviyo::ApiError => e
|
63
63
|
puts "Error when calling ProfilesApi->exchange_with_http_info: #{e}"
|
64
64
|
end
|
65
65
|
```
|
@@ -98,21 +98,21 @@ Retrieves all the data attributes for a person, based on the Klaviyo Person ID.
|
|
98
98
|
require 'time'
|
99
99
|
require 'klaviyo_sdk'
|
100
100
|
# setup authorization
|
101
|
-
|
101
|
+
Klaviyo.configure do |config|
|
102
102
|
# Configure API key authorization: ApiKeyAuth
|
103
103
|
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
104
104
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
105
105
|
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
106
106
|
end
|
107
107
|
|
108
|
-
api_instance =
|
108
|
+
api_instance = Klaviyo::ProfilesApi.new
|
109
109
|
person_id = 'PERSON_ID' # String |
|
110
110
|
|
111
111
|
begin
|
112
112
|
# Get Profile
|
113
113
|
result = api_instance.get_profile(person_id)
|
114
114
|
p result
|
115
|
-
rescue
|
115
|
+
rescue Klaviyo::ApiError => e
|
116
116
|
puts "Error when calling ProfilesApi->get_profile: #{e}"
|
117
117
|
end
|
118
118
|
```
|
@@ -130,7 +130,7 @@ begin
|
|
130
130
|
p status_code # => 2xx
|
131
131
|
p headers # => { ... }
|
132
132
|
p data # => <Person>
|
133
|
-
rescue
|
133
|
+
rescue Klaviyo::ApiError => e
|
134
134
|
puts "Error when calling ProfilesApi->get_profile_with_http_info: #{e}"
|
135
135
|
end
|
136
136
|
```
|
@@ -169,14 +169,14 @@ Returns a person's batched timeline for one specific event type.
|
|
169
169
|
require 'time'
|
170
170
|
require 'klaviyo_sdk'
|
171
171
|
# setup authorization
|
172
|
-
|
172
|
+
Klaviyo.configure do |config|
|
173
173
|
# Configure API key authorization: ApiKeyAuth
|
174
174
|
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
175
175
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
176
176
|
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
177
177
|
end
|
178
178
|
|
179
|
-
api_instance =
|
179
|
+
api_instance = Klaviyo::ProfilesApi.new
|
180
180
|
person_id = 'PERSON_ID' # String |
|
181
181
|
metric_id = 'METRIC_ID' # String |
|
182
182
|
opts = {
|
@@ -189,7 +189,7 @@ begin
|
|
189
189
|
# Get Profile's Events for a Specific Metric
|
190
190
|
result = api_instance.profile_metric_timeline(person_id, metric_id, opts)
|
191
191
|
p result
|
192
|
-
rescue
|
192
|
+
rescue Klaviyo::ApiError => e
|
193
193
|
puts "Error when calling ProfilesApi->profile_metric_timeline: #{e}"
|
194
194
|
end
|
195
195
|
```
|
@@ -207,7 +207,7 @@ begin
|
|
207
207
|
p status_code # => 2xx
|
208
208
|
p headers # => { ... }
|
209
209
|
p data # => <MetricTimeline>
|
210
|
-
rescue
|
210
|
+
rescue Klaviyo::ApiError => e
|
211
211
|
puts "Error when calling ProfilesApi->profile_metric_timeline_with_http_info: #{e}"
|
212
212
|
end
|
213
213
|
```
|
@@ -250,14 +250,14 @@ Returns a batched timeline of all events for a person.
|
|
250
250
|
require 'time'
|
251
251
|
require 'klaviyo_sdk'
|
252
252
|
# setup authorization
|
253
|
-
|
253
|
+
Klaviyo.configure do |config|
|
254
254
|
# Configure API key authorization: ApiKeyAuth
|
255
255
|
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
256
256
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
257
257
|
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
258
258
|
end
|
259
259
|
|
260
|
-
api_instance =
|
260
|
+
api_instance = Klaviyo::ProfilesApi.new
|
261
261
|
person_id = 'PERSON_ID' # String |
|
262
262
|
opts = {
|
263
263
|
since: 'since_example', # String | Either a 10-digit Unix timestamp (UTC) to use as starting datetime, OR a pagination token obtained from the next attribute of a prior API call. For backwards compatibility, UUIDs will continue to be supported for a limited time. Defaults to current time.
|
@@ -269,7 +269,7 @@ begin
|
|
269
269
|
# Get Profile's Events for all Metrics
|
270
270
|
result = api_instance.profile_metrics_timeline(person_id, opts)
|
271
271
|
p result
|
272
|
-
rescue
|
272
|
+
rescue Klaviyo::ApiError => e
|
273
273
|
puts "Error when calling ProfilesApi->profile_metrics_timeline: #{e}"
|
274
274
|
end
|
275
275
|
```
|
@@ -287,7 +287,7 @@ begin
|
|
287
287
|
p status_code # => 2xx
|
288
288
|
p headers # => { ... }
|
289
289
|
p data # => <MetricTimeline>
|
290
|
-
rescue
|
290
|
+
rescue Klaviyo::ApiError => e
|
291
291
|
puts "Error when calling ProfilesApi->profile_metrics_timeline_with_http_info: #{e}"
|
292
292
|
end
|
293
293
|
```
|
@@ -329,14 +329,14 @@ NOTE: If you are interested in creating or updating profiles in Klaviyo, you sho
|
|
329
329
|
require 'time'
|
330
330
|
require 'klaviyo_sdk'
|
331
331
|
# setup authorization
|
332
|
-
|
332
|
+
Klaviyo.configure do |config|
|
333
333
|
# Configure API key authorization: ApiKeyAuth
|
334
334
|
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
335
335
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
336
336
|
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
337
337
|
end
|
338
338
|
|
339
|
-
api_instance =
|
339
|
+
api_instance = Klaviyo::ProfilesApi.new
|
340
340
|
person_id = 'PERSON_ID' # String |
|
341
341
|
opts = {
|
342
342
|
params: { key: 3.56} # Hash<String, Object> |
|
@@ -346,7 +346,7 @@ begin
|
|
346
346
|
# Update Profile
|
347
347
|
result = api_instance.update_profile(person_id, opts)
|
348
348
|
p result
|
349
|
-
rescue
|
349
|
+
rescue Klaviyo::ApiError => e
|
350
350
|
puts "Error when calling ProfilesApi->update_profile: #{e}"
|
351
351
|
end
|
352
352
|
```
|
@@ -364,7 +364,7 @@ begin
|
|
364
364
|
p status_code # => 2xx
|
365
365
|
p headers # => { ... }
|
366
366
|
p data # => <Person>
|
367
|
-
rescue
|
367
|
+
rescue Klaviyo::ApiError => e
|
368
368
|
puts "Error when calling ProfilesApi->update_profile_with_http_info: #{e}"
|
369
369
|
end
|
370
370
|
```
|
data/docs/RenderedTemplate.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# Klaviyo::RenderedTemplate
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
@@ -14,7 +14,7 @@
|
|
14
14
|
```ruby
|
15
15
|
require 'klaviyo_sdk'
|
16
16
|
|
17
|
-
instance =
|
17
|
+
instance = Klaviyo::RenderedTemplate.new(
|
18
18
|
object: email-template,
|
19
19
|
id: TEMPLATE_ID,
|
20
20
|
name: My Cloned Template,
|
data/docs/Template.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# Klaviyo::Template
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
```ruby
|
18
18
|
require 'klaviyo_sdk'
|
19
19
|
|
20
|
-
instance =
|
20
|
+
instance = Klaviyo::Template.new(
|
21
21
|
object: email-template,
|
22
22
|
id: TEMPLATE_ID,
|
23
23
|
name: TEMPLATE_NAME,
|
data/docs/TemplatesApi.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# Klaviyo::TemplatesApi
|
2
2
|
|
3
3
|
All URIs are relative to *https://a.klaviyo.com/api*
|
4
4
|
|
@@ -27,14 +27,14 @@ Creates a copy of a given template with a new name.
|
|
27
27
|
require 'time'
|
28
28
|
require 'klaviyo_sdk'
|
29
29
|
# setup authorization
|
30
|
-
|
30
|
+
Klaviyo.configure do |config|
|
31
31
|
# Configure API key authorization: ApiKeyAuth
|
32
32
|
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
33
33
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
34
34
|
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
35
35
|
end
|
36
36
|
|
37
|
-
api_instance =
|
37
|
+
api_instance = Klaviyo::TemplatesApi.new
|
38
38
|
template_id = 'TEMPLATE_ID' # String |
|
39
39
|
name = 'name_example' # String | The new name of the email template.
|
40
40
|
|
@@ -42,7 +42,7 @@ begin
|
|
42
42
|
# Clone Template
|
43
43
|
result = api_instance.clone_template(template_id, name)
|
44
44
|
p result
|
45
|
-
rescue
|
45
|
+
rescue Klaviyo::ApiError => e
|
46
46
|
puts "Error when calling TemplatesApi->clone_template: #{e}"
|
47
47
|
end
|
48
48
|
```
|
@@ -60,7 +60,7 @@ begin
|
|
60
60
|
p status_code # => 2xx
|
61
61
|
p headers # => { ... }
|
62
62
|
p data # => <Template>
|
63
|
-
rescue
|
63
|
+
rescue Klaviyo::ApiError => e
|
64
64
|
puts "Error when calling TemplatesApi->clone_template_with_http_info: #{e}"
|
65
65
|
end
|
66
66
|
```
|
@@ -100,14 +100,14 @@ Creates a new email template.
|
|
100
100
|
require 'time'
|
101
101
|
require 'klaviyo_sdk'
|
102
102
|
# setup authorization
|
103
|
-
|
103
|
+
Klaviyo.configure do |config|
|
104
104
|
# Configure API key authorization: ApiKeyAuth
|
105
105
|
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
106
106
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
107
107
|
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
108
108
|
end
|
109
109
|
|
110
|
-
api_instance =
|
110
|
+
api_instance = Klaviyo::TemplatesApi.new
|
111
111
|
name = 'name_example' # String | The name of the email template.
|
112
112
|
html = 'html_example' # String |
|
113
113
|
|
@@ -115,7 +115,7 @@ begin
|
|
115
115
|
# Create New Template
|
116
116
|
result = api_instance.create_template(name, html)
|
117
117
|
p result
|
118
|
-
rescue
|
118
|
+
rescue Klaviyo::ApiError => e
|
119
119
|
puts "Error when calling TemplatesApi->create_template: #{e}"
|
120
120
|
end
|
121
121
|
```
|
@@ -133,7 +133,7 @@ begin
|
|
133
133
|
p status_code # => 2xx
|
134
134
|
p headers # => { ... }
|
135
135
|
p data # => <Template>
|
136
|
-
rescue
|
136
|
+
rescue Klaviyo::ApiError => e
|
137
137
|
puts "Error when calling TemplatesApi->create_template_with_http_info: #{e}"
|
138
138
|
end
|
139
139
|
```
|
@@ -173,21 +173,21 @@ Deletes a given template.
|
|
173
173
|
require 'time'
|
174
174
|
require 'klaviyo_sdk'
|
175
175
|
# setup authorization
|
176
|
-
|
176
|
+
Klaviyo.configure do |config|
|
177
177
|
# Configure API key authorization: ApiKeyAuth
|
178
178
|
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
179
179
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
180
180
|
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
181
181
|
end
|
182
182
|
|
183
|
-
api_instance =
|
183
|
+
api_instance = Klaviyo::TemplatesApi.new
|
184
184
|
template_id = 'TEMPLATE_ID' # String |
|
185
185
|
|
186
186
|
begin
|
187
187
|
# Delete Template
|
188
188
|
result = api_instance.delete_template(template_id)
|
189
189
|
p result
|
190
|
-
rescue
|
190
|
+
rescue Klaviyo::ApiError => e
|
191
191
|
puts "Error when calling TemplatesApi->delete_template: #{e}"
|
192
192
|
end
|
193
193
|
```
|
@@ -205,7 +205,7 @@ begin
|
|
205
205
|
p status_code # => 2xx
|
206
206
|
p headers # => { ... }
|
207
207
|
p data # => Hash<String, Object>
|
208
|
-
rescue
|
208
|
+
rescue Klaviyo::ApiError => e
|
209
209
|
puts "Error when calling TemplatesApi->delete_template_with_http_info: #{e}"
|
210
210
|
end
|
211
211
|
```
|
@@ -244,14 +244,14 @@ Returns a list of all the email templates you've created. The templates are retu
|
|
244
244
|
require 'time'
|
245
245
|
require 'klaviyo_sdk'
|
246
246
|
# setup authorization
|
247
|
-
|
247
|
+
Klaviyo.configure do |config|
|
248
248
|
# Configure API key authorization: ApiKeyAuth
|
249
249
|
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
250
250
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
251
251
|
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
252
252
|
end
|
253
253
|
|
254
|
-
api_instance =
|
254
|
+
api_instance = Klaviyo::TemplatesApi.new
|
255
255
|
opts = {
|
256
256
|
page: 0, # Integer | For pagination, which page of results to return. Default = 0
|
257
257
|
count: 100 # Integer | For pagination, the number of results to return. Max = 100
|
@@ -261,7 +261,7 @@ begin
|
|
261
261
|
# Get All Templates
|
262
262
|
result = api_instance.get_templates(opts)
|
263
263
|
p result
|
264
|
-
rescue
|
264
|
+
rescue Klaviyo::ApiError => e
|
265
265
|
puts "Error when calling TemplatesApi->get_templates: #{e}"
|
266
266
|
end
|
267
267
|
```
|
@@ -279,7 +279,7 @@ begin
|
|
279
279
|
p status_code # => 2xx
|
280
280
|
p headers # => { ... }
|
281
281
|
p data # => Hash<String, Object>
|
282
|
-
rescue
|
282
|
+
rescue Klaviyo::ApiError => e
|
283
283
|
puts "Error when calling TemplatesApi->get_templates_with_http_info: #{e}"
|
284
284
|
end
|
285
285
|
```
|
@@ -319,14 +319,14 @@ Renders the specified template with the provided data and return HTML and text v
|
|
319
319
|
require 'time'
|
320
320
|
require 'klaviyo_sdk'
|
321
321
|
# setup authorization
|
322
|
-
|
322
|
+
Klaviyo.configure do |config|
|
323
323
|
# Configure API key authorization: ApiKeyAuth
|
324
324
|
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
325
325
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
326
326
|
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
327
327
|
end
|
328
328
|
|
329
|
-
api_instance =
|
329
|
+
api_instance = Klaviyo::TemplatesApi.new
|
330
330
|
template_id = 'TEMPLATE_ID' # String |
|
331
331
|
opts = {
|
332
332
|
context: 'context_example' # String | This is the context your email template will be rendered with. Email templates are rendered with contexts in a similar manner to how Django templates are rendered. This means that nested template variables can be referenced via dot notation and template variables without corresponding context values are treated as falsy and output nothing.
|
@@ -336,7 +336,7 @@ begin
|
|
336
336
|
# Render Template
|
337
337
|
result = api_instance.render_template(template_id, opts)
|
338
338
|
p result
|
339
|
-
rescue
|
339
|
+
rescue Klaviyo::ApiError => e
|
340
340
|
puts "Error when calling TemplatesApi->render_template: #{e}"
|
341
341
|
end
|
342
342
|
```
|
@@ -354,7 +354,7 @@ begin
|
|
354
354
|
p status_code # => 2xx
|
355
355
|
p headers # => { ... }
|
356
356
|
p data # => <RenderedTemplate>
|
357
|
-
rescue
|
357
|
+
rescue Klaviyo::ApiError => e
|
358
358
|
puts "Error when calling TemplatesApi->render_template_with_http_info: #{e}"
|
359
359
|
end
|
360
360
|
```
|
@@ -394,14 +394,14 @@ Renders the specified template with the provided data and send the contents in a
|
|
394
394
|
require 'time'
|
395
395
|
require 'klaviyo_sdk'
|
396
396
|
# setup authorization
|
397
|
-
|
397
|
+
Klaviyo.configure do |config|
|
398
398
|
# Configure API key authorization: ApiKeyAuth
|
399
399
|
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
400
400
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
401
401
|
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
402
402
|
end
|
403
403
|
|
404
|
-
api_instance =
|
404
|
+
api_instance = Klaviyo::TemplatesApi.new
|
405
405
|
template_id = 'TEMPLATE_ID' # String |
|
406
406
|
from_email = 'from_email_example' # String |
|
407
407
|
from_name = 'from_name_example' # String |
|
@@ -415,7 +415,7 @@ begin
|
|
415
415
|
# Render and Send Template
|
416
416
|
result = api_instance.send_template(template_id, from_email, from_name, subject, to, opts)
|
417
417
|
p result
|
418
|
-
rescue
|
418
|
+
rescue Klaviyo::ApiError => e
|
419
419
|
puts "Error when calling TemplatesApi->send_template: #{e}"
|
420
420
|
end
|
421
421
|
```
|
@@ -433,7 +433,7 @@ begin
|
|
433
433
|
p status_code # => 2xx
|
434
434
|
p headers # => { ... }
|
435
435
|
p data # => <RenderedTemplate>
|
436
|
-
rescue
|
436
|
+
rescue Klaviyo::ApiError => e
|
437
437
|
puts "Error when calling TemplatesApi->send_template_with_http_info: #{e}"
|
438
438
|
end
|
439
439
|
```
|
@@ -477,14 +477,14 @@ Updates the name and/or HTML content of a template. Only updates imported HTML t
|
|
477
477
|
require 'time'
|
478
478
|
require 'klaviyo_sdk'
|
479
479
|
# setup authorization
|
480
|
-
|
480
|
+
Klaviyo.configure do |config|
|
481
481
|
# Configure API key authorization: ApiKeyAuth
|
482
482
|
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
483
483
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
484
484
|
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
485
485
|
end
|
486
486
|
|
487
|
-
api_instance =
|
487
|
+
api_instance = Klaviyo::TemplatesApi.new
|
488
488
|
template_id = 'TEMPLATE_ID' # String |
|
489
489
|
opts = {
|
490
490
|
name: 'name_example', # String | The new name of the email template.
|
@@ -495,7 +495,7 @@ begin
|
|
495
495
|
# Update Template
|
496
496
|
result = api_instance.update_template(template_id, opts)
|
497
497
|
p result
|
498
|
-
rescue
|
498
|
+
rescue Klaviyo::ApiError => e
|
499
499
|
puts "Error when calling TemplatesApi->update_template: #{e}"
|
500
500
|
end
|
501
501
|
```
|
@@ -513,7 +513,7 @@ begin
|
|
513
513
|
p status_code # => 2xx
|
514
514
|
p headers # => { ... }
|
515
515
|
p data # => <Template>
|
516
|
-
rescue
|
516
|
+
rescue Klaviyo::ApiError => e
|
517
517
|
puts "Error when calling TemplatesApi->update_template_with_http_info: #{e}"
|
518
518
|
end
|
519
519
|
```
|