klaviyo_sdk 1.0.1.20220329 → 1.0.4.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.
Files changed (121) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +121 -99
  4. data/klaviyo_sdk.gemspec +1 -1
  5. data/lib/klaviyo_sdk/api/campaigns_api.rb +1 -1
  6. data/lib/klaviyo_sdk/api/data_privacy_api.rb +3 -3
  7. data/lib/klaviyo_sdk/api/lists_segments_api.rb +1 -1
  8. data/lib/klaviyo_sdk/api/metrics_api.rb +1 -1
  9. data/lib/klaviyo_sdk/api/profiles_api.rb +67 -1
  10. data/lib/klaviyo_sdk/api/templates_api.rb +1 -1
  11. data/lib/klaviyo_sdk/api/track_identify_api.rb +1 -1
  12. data/lib/klaviyo_sdk/api_client.rb +2 -2
  13. data/lib/klaviyo_sdk/api_error.rb +1 -1
  14. data/lib/klaviyo_sdk/configuration.rb +1 -1
  15. data/lib/klaviyo_sdk/models/campaign.rb +202 -22
  16. data/lib/klaviyo_sdk/models/campaign_lists.rb +318 -0
  17. data/lib/klaviyo_sdk/models/campaigns.rb +487 -0
  18. data/lib/klaviyo_sdk/models/check_membership_request.rb +4 -4
  19. data/lib/klaviyo_sdk/models/delete_email.rb +4 -4
  20. data/lib/klaviyo_sdk/models/delete_person.rb +4 -4
  21. data/lib/klaviyo_sdk/models/delete_phone.rb +4 -4
  22. data/lib/klaviyo_sdk/models/deprecated_get_list_response.rb +4 -4
  23. data/lib/klaviyo_sdk/models/deprecated_get_list_response_data.rb +4 -4
  24. data/lib/klaviyo_sdk/models/global_exclusion_response_data.rb +4 -4
  25. data/lib/klaviyo_sdk/models/identify_payload.rb +4 -4
  26. data/lib/klaviyo_sdk/models/identify_payload_properties.rb +4 -4
  27. data/lib/klaviyo_sdk/models/inline_object.rb +9 -4
  28. data/lib/klaviyo_sdk/models/inline_object3.rb +4 -4
  29. data/lib/klaviyo_sdk/models/inline_object4.rb +4 -4
  30. data/lib/klaviyo_sdk/models/inline_object5.rb +4 -5
  31. data/lib/klaviyo_sdk/models/inline_response200.rb +218 -0
  32. data/lib/klaviyo_sdk/models/metric.rb +4 -4
  33. data/lib/klaviyo_sdk/models/metric_export.rb +4 -4
  34. data/lib/klaviyo_sdk/models/metric_timeline.rb +4 -4
  35. data/lib/klaviyo_sdk/models/metric_timeline_data.rb +4 -4
  36. data/lib/klaviyo_sdk/models/person.rb +4 -4
  37. data/lib/klaviyo_sdk/models/person.rb.bak +4 -4
  38. data/lib/klaviyo_sdk/models/privacy_email.rb +4 -4
  39. data/lib/klaviyo_sdk/models/privacy_id.rb +4 -4
  40. data/lib/klaviyo_sdk/models/privacy_phone.rb +4 -4
  41. data/lib/klaviyo_sdk/models/rendered_template.rb +4 -4
  42. data/lib/klaviyo_sdk/models/template.rb +4 -4
  43. data/lib/klaviyo_sdk/models/track_payload.rb +4 -4
  44. data/lib/klaviyo_sdk/models/track_payload_customer_properties.rb +4 -4
  45. data/lib/klaviyo_sdk/models/track_payload_properties.rb +4 -4
  46. data/lib/klaviyo_sdk/version.rb +1 -1
  47. data/lib/klaviyo_sdk.rb +10 -7
  48. metadata +6 -76
  49. data/docs/Campaign.md +0 -38
  50. data/docs/CampaignsApi.md +0 -707
  51. data/docs/CheckMembershipRequest.md +0 -22
  52. data/docs/DataPrivacyApi.md +0 -81
  53. data/docs/DeleteEmail.md +0 -18
  54. data/docs/DeletePerson.md +0 -18
  55. data/docs/DeletePhone.md +0 -18
  56. data/docs/DeprecatedGetListResponse.md +0 -30
  57. data/docs/DeprecatedGetListResponseData.md +0 -28
  58. data/docs/GlobalExclusionResponseData.md +0 -30
  59. data/docs/IdentifyPayload.md +0 -20
  60. data/docs/IdentifyPayloadProperties.md +0 -42
  61. data/docs/InlineObject.md +0 -18
  62. data/docs/InlineObject3.md +0 -18
  63. data/docs/InlineObject4.md +0 -18
  64. data/docs/InlineObject5.md +0 -22
  65. data/docs/ListsSegmentsApi.md +0 -1198
  66. data/docs/Metric.md +0 -28
  67. data/docs/MetricExport.md +0 -32
  68. data/docs/MetricTimeline.md +0 -24
  69. data/docs/MetricTimelineData.md +0 -34
  70. data/docs/MetricsApi.md +0 -329
  71. data/docs/Person.md +0 -56
  72. data/docs/PrivacyEmail.md +0 -18
  73. data/docs/PrivacyId.md +0 -18
  74. data/docs/PrivacyPhone.md +0 -18
  75. data/docs/ProfilesApi.md +0 -391
  76. data/docs/RenderedTemplate.md +0 -24
  77. data/docs/Template.md +0 -30
  78. data/docs/TemplatesApi.md +0 -541
  79. data/docs/TrackIdentifyApi.md +0 -267
  80. data/docs/TrackPayload.md +0 -24
  81. data/docs/TrackPayloadCustomerProperties.md +0 -20
  82. data/docs/TrackPayloadProperties.md +0 -22
  83. data/git_push.sh +0 -57
  84. data/klaviyo_sdk-1.0.0.20220329.gem +0 -0
  85. data/spec/api/campaigns_api_spec.rb +0 -165
  86. data/spec/api/data_privacy_api_spec.rb +0 -47
  87. data/spec/api/lists_segments_api_spec.rb +0 -239
  88. data/spec/api/metrics_api_spec.rb +0 -96
  89. data/spec/api/profiles_api_spec.rb +0 -103
  90. data/spec/api/templates_api_spec.rb +0 -130
  91. data/spec/api/track_identify_api_spec.rb +0 -83
  92. data/spec/api_client_spec.rb +0 -226
  93. data/spec/configuration_spec.rb +0 -42
  94. data/spec/models/campaign_spec.rb +0 -94
  95. data/spec/models/check_membership_request_spec.rb +0 -46
  96. data/spec/models/delete_email_spec.rb +0 -34
  97. data/spec/models/delete_person_spec.rb +0 -34
  98. data/spec/models/delete_phone_spec.rb +0 -34
  99. data/spec/models/deprecated_get_list_response_data_spec.rb +0 -64
  100. data/spec/models/deprecated_get_list_response_spec.rb +0 -70
  101. data/spec/models/global_exclusion_response_data_spec.rb +0 -70
  102. data/spec/models/identify_payload_properties_spec.rb +0 -106
  103. data/spec/models/identify_payload_spec.rb +0 -40
  104. data/spec/models/inline_object3_spec.rb +0 -34
  105. data/spec/models/inline_object4_spec.rb +0 -34
  106. data/spec/models/inline_object5_spec.rb +0 -46
  107. data/spec/models/inline_object_spec.rb +0 -34
  108. data/spec/models/metric_export_spec.rb +0 -76
  109. data/spec/models/metric_spec.rb +0 -64
  110. data/spec/models/metric_timeline_data_spec.rb +0 -82
  111. data/spec/models/metric_timeline_spec.rb +0 -52
  112. data/spec/models/person_spec.rb +0 -148
  113. data/spec/models/privacy_email_spec.rb +0 -34
  114. data/spec/models/privacy_id_spec.rb +0 -34
  115. data/spec/models/privacy_phone_spec.rb +0 -34
  116. data/spec/models/rendered_template_spec.rb +0 -52
  117. data/spec/models/template_spec.rb +0 -70
  118. data/spec/models/track_payload_customer_properties_spec.rb +0 -40
  119. data/spec/models/track_payload_properties_spec.rb +0 -46
  120. data/spec/models/track_payload_spec.rb +0 -52
  121. data/spec/spec_helper.rb +0 -111
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Klaviyo Ruby SDK
2
2
 
3
- - SDK version: 1.0.1.20220329
3
+ - SDK version: 1.0.4.20220329
4
4
 
5
5
  ## Helpful Resources
6
6
 
@@ -60,13 +60,13 @@ gem build klaviyo_sdk.gemspec
60
60
  Then install the gem locally:
61
61
 
62
62
  ```shell
63
- gem install ./klaviyo_sdk-1.0.1.20220329.gem
63
+ gem install ./klaviyo_sdk-1.0.4.20220329.gem
64
64
  ```
65
65
 
66
66
 
67
67
  Finally add this to the Gemfile:
68
68
 
69
- gem 'klaviyo_sdk', '~> 1.0.1.20220329'
69
+ gem 'klaviyo_sdk', '~> 1.0.4.20220329'
70
70
 
71
71
  To install directly from rubygems:
72
72
 
@@ -83,7 +83,7 @@ gem install klaviyo_sdk
83
83
  require 'klaviyo_sdk'
84
84
 
85
85
  # Setup authorization
86
- Client.configure do |config|
86
+ Klaviyo.configure do |config|
87
87
  config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
88
88
  #config.max_retries = 5 # optional
89
89
  #config.max_delay = 60 # optional
@@ -102,7 +102,7 @@ metric_id = 'METRIC_ID'
102
102
  count = 100
103
103
 
104
104
  begin
105
- result = Client::Metrics.metric_export(metric_id, count=count)
105
+ result = Klaviyo::Metrics.metric_export(metric_id, count=count)
106
106
  end
107
107
  ```
108
108
 
@@ -114,8 +114,8 @@ metric_id = 'METRIC_ID'
114
114
  count = 100
115
115
 
116
116
  begin
117
- result = Client::Metrics.metric_export(metric_id, count=count)
118
- rescue Client::ApiError => e
117
+ result = Klaviyo::Metrics.metric_export(metric_id, count=count)
118
+ rescue Klaviyo::ApiError => e
119
119
  puts "Error when calling Metrics.metric_export #{e}"
120
120
  end
121
121
  ```
@@ -136,14 +136,14 @@ _**NOTE:**_
136
136
  #### [Cancel a Campaign](https://developers.klaviyo.com/en/reference/cancel-campaign)
137
137
 
138
138
  ```ruby
139
- Client::Campaigns.cancel_campaign(campaign_id)
139
+ Klaviyo::Campaigns.cancel_campaign(campaign_id)
140
140
  ```
141
141
 
142
142
  #### Example:
143
143
 
144
144
  ```ruby
145
145
  campaign_id = 'CAMPAIGN_ID'
146
- response = Client::Campaigns.cancel_campaign(campaign_id)
146
+ response = Klaviyo::Campaigns.cancel_campaign(campaign_id)
147
147
  ```
148
148
 
149
149
 
@@ -153,7 +153,7 @@ response = Client::Campaigns.cancel_campaign(campaign_id)
153
153
  #### [Clone a Campaign](https://developers.klaviyo.com/en/reference/clone-campaign)
154
154
 
155
155
  ```ruby
156
- Client::Campaigns.clone_campaign(campaign_id, name, list_id)
156
+ Klaviyo::Campaigns.clone_campaign(campaign_id, name, list_id)
157
157
  ```
158
158
 
159
159
  #### Example:
@@ -162,7 +162,7 @@ campaign_id = 'CAMPAIGN_ID'
162
162
  name = 'CLONED_CAMPAIGN'
163
163
  list_id = 'LIST_ID'
164
164
 
165
- response = Client::Campaigns.clone_campaign(campaign_id, name, list_id)
165
+ response = Klaviyo::Campaigns.clone_campaign(campaign_id, name, list_id)
166
166
  ```
167
167
 
168
168
 
@@ -172,7 +172,7 @@ response = Client::Campaigns.clone_campaign(campaign_id, name, list_id)
172
172
  #### [Create New Campaign](https://developers.klaviyo.com/en/reference/create-campaign)
173
173
 
174
174
  ```ruby
175
- Client::Campaigns.create_campaign(list_id, template_id, from_email, from_name, subject, opts)
175
+ Klaviyo::Campaigns.create_campaign(list_id, template_id, from_email, from_name, subject, opts)
176
176
  ```
177
177
 
178
178
  #### Example:
@@ -189,7 +189,7 @@ opts = {
189
189
  'name': 'Campaign Name',
190
190
  }
191
191
 
192
- response = Client::Campaigns.create_campaign(list_id, template_id, from_email, from_name, subject, opts)
192
+ response = Klaviyo::Campaigns.create_campaign(list_id, template_id, from_email, from_name, subject, opts)
193
193
  ```
194
194
 
195
195
 
@@ -198,14 +198,14 @@ response = Client::Campaigns.create_campaign(list_id, template_id, from_email, f
198
198
  #### [Get Campaign Info](https://developers.klaviyo.com/en/reference/get-campaign-info)
199
199
 
200
200
  ```ruby
201
- Client::Campaigns.get_campaign_info(campaign_id)
201
+ Klaviyo::Campaigns.get_campaign_info(campaign_id)
202
202
  ```
203
203
 
204
204
  #### Example:
205
205
  ```ruby
206
206
  campaign_id = 'CAMPAIGN_ID'
207
207
 
208
- response = Client::Campaigns.get_campaign_info(campaign_id)
208
+ response = Klaviyo::Campaigns.get_campaign_info(campaign_id)
209
209
  ```
210
210
 
211
211
 
@@ -214,7 +214,7 @@ response = Client::Campaigns.get_campaign_info(campaign_id)
214
214
  #### [Get Campaign Recipients](https://developers.klaviyo.com/en/reference/get-campaign-recipients)
215
215
 
216
216
  ```ruby
217
- Client::Campaigns.get_campaign_recipients(campaign_id, opts)
217
+ Klaviyo::Campaigns.get_campaign_recipients(campaign_id, opts)
218
218
  ```
219
219
 
220
220
  #### Example:
@@ -228,7 +228,7 @@ opts = {
228
228
  # offset: 'offset'
229
229
  }
230
230
 
231
- response = Client::Campaigns.get_campaign_recipients(campaign_id, opts)
231
+ response = Klaviyo::Campaigns.get_campaign_recipients(campaign_id, opts)
232
232
  ```
233
233
 
234
234
 
@@ -237,7 +237,7 @@ response = Client::Campaigns.get_campaign_recipients(campaign_id, opts)
237
237
  #### [Get Campaigns](https://developers.klaviyo.com/en/reference/get-campaigns)
238
238
 
239
239
  ```ruby
240
- Client::Campaigns.get_campaigns(opts)
240
+ Klaviyo::Campaigns.get_campaigns(opts)
241
241
  ```
242
242
 
243
243
  #### Example:
@@ -247,7 +247,7 @@ opts = {
247
247
  'count': 1
248
248
  }
249
249
 
250
- response = Client::Campaigns.get_campaigns(opts)
250
+ response = Klaviyo::Campaigns.get_campaigns(opts)
251
251
  ```
252
252
 
253
253
 
@@ -256,7 +256,7 @@ response = Client::Campaigns.get_campaigns(opts)
256
256
  #### [Schedule a Campaign](https://developers.klaviyo.com/en/reference/schedule-campaign)
257
257
 
258
258
  ```ruby
259
- Client::Campaigns.schedule_campaign(campaign_id, send_time)
259
+ Klaviyo::Campaigns.schedule_campaign(campaign_id, send_time)
260
260
  ```
261
261
 
262
262
  #### Example:
@@ -264,7 +264,7 @@ Client::Campaigns.schedule_campaign(campaign_id, send_time)
264
264
  campaign_id = 'CAMPAIGN_ID'
265
265
  send_time = '2030-01-13 00:00:00'
266
266
 
267
- response = Client::Campaigns.schedule_campaign(campaign_id, send_time)
267
+ response = Klaviyo::Campaigns.schedule_campaign(campaign_id, send_time)
268
268
  ```
269
269
 
270
270
 
@@ -273,14 +273,14 @@ response = Client::Campaigns.schedule_campaign(campaign_id, send_time)
273
273
  #### [Send a Campaign Immediately](https://developers.klaviyo.com/en/reference/send-campaign)
274
274
 
275
275
  ```ruby
276
- Client::Campaigns.send_campaign(campaign_id)
276
+ Klaviyo::Campaigns.send_campaign(campaign_id)
277
277
  ```
278
278
 
279
279
  #### Example:
280
280
  ```ruby
281
281
  campaign_id = 'CAMPAIGN_ID'
282
282
 
283
- response = Client::Campaigns.send_campaign(campaign_id)
283
+ response = Klaviyo::Campaigns.send_campaign(campaign_id)
284
284
 
285
285
  ```
286
286
 
@@ -290,7 +290,7 @@ response = Client::Campaigns.send_campaign(campaign_id)
290
290
  #### [Update Campaign](https://developers.klaviyo.com/en/reference/update-campaign)
291
291
 
292
292
  ```ruby
293
- Client::Campaigns.update_campaign(campaign_id, opts)
293
+ Klaviyo::Campaigns.update_campaign(campaign_id, opts)
294
294
  ```
295
295
 
296
296
  #### Example:
@@ -308,7 +308,7 @@ opts = {
308
308
  'add_google_analytics': false
309
309
  }
310
310
 
311
- response = Client::Campaigns.update_campaign(campaign_id, opts)
311
+ response = Klaviyo::Campaigns.update_campaign(campaign_id, opts)
312
312
 
313
313
  ```
314
314
 
@@ -322,7 +322,7 @@ response = Client::Campaigns.update_campaign(campaign_id, opts)
322
322
  #### [Request a Deletion](https://developers.klaviyo.com/en/reference/request-deletion)
323
323
 
324
324
  ```ruby
325
- Client::DataPrivacy.request_deletion(opts)
325
+ Klaviyo::DataPrivacy.request_deletion(opts)
326
326
  ```
327
327
 
328
328
  #### Example:
@@ -333,7 +333,7 @@ opts = {
333
333
  }
334
334
  }
335
335
 
336
- response = Client::DataPrivacy.request_deletion(opts)
336
+ response = Klaviyo::DataPrivacy.request_deletion(opts)
337
337
  ```
338
338
 
339
339
 
@@ -346,7 +346,7 @@ response = Client::DataPrivacy.request_deletion(opts)
346
346
  #### [Add Members to a List](https://developers.klaviyo.com/en/reference/add-members)
347
347
 
348
348
  ```ruby
349
- Client::ListsSegments.add_members(list_id, opts)
349
+ Klaviyo::ListsSegments.add_members(list_id, opts)
350
350
  ```
351
351
 
352
352
  #### Example:
@@ -362,7 +362,7 @@ opts = {
362
362
  }
363
363
  }
364
364
 
365
- response = Client::ListsSegments.add_members(list_id, opts)
365
+ response = Klaviyo::ListsSegments.add_members(list_id, opts)
366
366
  ```
367
367
 
368
368
 
@@ -371,14 +371,14 @@ response = Client::ListsSegments.add_members(list_id, opts)
371
371
  #### [Create List](https://developers.klaviyo.com/en/reference/create-list)
372
372
 
373
373
  ```ruby
374
- Client::ListsSegments.create_list(list_name)
374
+ Klaviyo::ListsSegments.create_list(list_name)
375
375
  ```
376
376
 
377
377
  #### Example:
378
378
  ```ruby
379
379
  list_name = 'MyNewList'
380
380
 
381
- response = Client::ListsSegments.create_list(list_name)
381
+ response = Klaviyo::ListsSegments.create_list(list_name)
382
382
  ```
383
383
 
384
384
 
@@ -387,14 +387,14 @@ response = Client::ListsSegments.create_list(list_name)
387
387
  #### [Delete List](https://developers.klaviyo.com/en/reference/delete-list)
388
388
 
389
389
  ```ruby
390
- Client::ListsSegments.delete_list(list_id)
390
+ Klaviyo::ListsSegments.delete_list(list_id)
391
391
  ```
392
392
 
393
393
  #### Example:
394
394
  ```ruby
395
395
  list_id = 'LIST_ID'
396
396
 
397
- response = Client::ListsSegments.delete_list(list_id)
397
+ response = Klaviyo::ListsSegments.delete_list(list_id)
398
398
  ```
399
399
 
400
400
 
@@ -403,14 +403,14 @@ response = Client::ListsSegments.delete_list(list_id)
403
403
  #### [Exclude Profile From All Email](https://developers.klaviyo.com/en/reference/exclude-globally)
404
404
 
405
405
  ```ruby
406
- Client::ListsSegments.exclude_globally(email)
406
+ Klaviyo::ListsSegments.exclude_globally(email)
407
407
  ```
408
408
 
409
409
  #### Example:
410
410
  ```ruby
411
411
  email = 'george.washington@klaviyo.com'
412
412
 
413
- response = Client::ListsSegments.exclude_globally(email)
413
+ response = Klaviyo::ListsSegments.exclude_globally(email)
414
414
  ```
415
415
 
416
416
 
@@ -419,7 +419,7 @@ response = Client::ListsSegments.exclude_globally(email)
419
419
  #### [Get Global Exclusions & Unsubscribes](https://developers.klaviyo.com/en/reference/get-global-exclusions)
420
420
 
421
421
  ```ruby
422
- Client::ListsSegments.get_global_exclusions(opts)
422
+ Klaviyo::ListsSegments.get_global_exclusions(opts)
423
423
  ```
424
424
 
425
425
  #### Example:
@@ -433,7 +433,7 @@ opts = {
433
433
  }
434
434
  }
435
435
 
436
- response = Client::ListsSegments.get_global_exclusions(opts)
436
+ response = Klaviyo::ListsSegments.get_global_exclusions(opts)
437
437
  ```
438
438
 
439
439
 
@@ -442,7 +442,7 @@ response = Client::ListsSegments.get_global_exclusions(opts)
442
442
  #### [Get All Exclusions for a List](https://developers.klaviyo.com/en/reference/get-list-exclusions)
443
443
 
444
444
  ```ruby
445
- Client::ListsSegments.get_list_exclusions(list_id, opts)
445
+ Klaviyo::ListsSegments.get_list_exclusions(list_id, opts)
446
446
  ```
447
447
 
448
448
  #### Example:
@@ -455,7 +455,7 @@ opts = {
455
455
  }
456
456
  }
457
457
 
458
- response = Client::ListsSegments.get_list_exclusions(list_id, opts)
458
+ response = Klaviyo::ListsSegments.get_list_exclusions(list_id, opts)
459
459
  ```
460
460
 
461
461
 
@@ -464,14 +464,14 @@ response = Client::ListsSegments.get_list_exclusions(list_id, opts)
464
464
  #### [Get List Info](https://developers.klaviyo.com/en/reference/get-list-info)
465
465
 
466
466
  ```ruby
467
- Client::ListsSegments.get_list_info(list_id)
467
+ Klaviyo::ListsSegments.get_list_info(list_id)
468
468
  ```
469
469
 
470
470
  #### Example:
471
471
  ```ruby
472
472
  list_id = 'LIST_ID'
473
473
 
474
- response = Client::ListsSegments.get_list_info(list_id)
474
+ response = Klaviyo::ListsSegments.get_list_info(list_id)
475
475
  ```
476
476
 
477
477
 
@@ -480,7 +480,7 @@ response = Client::ListsSegments.get_list_info(list_id)
480
480
  #### [Check if Profiles Are in a List](https://developers.klaviyo.com/en/reference/get-list-members)
481
481
 
482
482
  ```ruby
483
- Client::ListsSegments.get_list_members(list_id, opts)
483
+ Klaviyo::ListsSegments.get_list_members(list_id, opts)
484
484
  ```
485
485
 
486
486
  #### Example:
@@ -495,7 +495,7 @@ opts = {
495
495
  }
496
496
  }
497
497
 
498
- response = Client::ListsSegments.get_list_members(list_id, opts)
498
+ response = Klaviyo::ListsSegments.get_list_members(list_id, opts)
499
499
  ```
500
500
 
501
501
 
@@ -504,7 +504,7 @@ response = Client::ListsSegments.get_list_members(list_id, opts)
504
504
  #### [Check if Profiles Are in a List and not Suppressed](https://developers.klaviyo.com/en/reference/get-list-subscriptions)
505
505
 
506
506
  ```ruby
507
- Client::ListsSegments.get_list_subscriptions(list_id, opts)
507
+ Klaviyo::ListsSegments.get_list_subscriptions(list_id, opts)
508
508
  ```
509
509
 
510
510
  #### Example:
@@ -515,7 +515,7 @@ opts = {
515
515
  body: {'emails': ['george.washington@klaviyo.com']}
516
516
  }
517
517
 
518
- response = Client::ListsSegments.get_list_subscriptions(list_id, opts)
518
+ response = Klaviyo::ListsSegments.get_list_subscriptions(list_id, opts)
519
519
  ```
520
520
 
521
521
 
@@ -524,12 +524,12 @@ response = Client::ListsSegments.get_list_subscriptions(list_id, opts)
524
524
  #### [Get Lists](https://developers.klaviyo.com/en/reference/get-lists)
525
525
 
526
526
  ```ruby
527
- Client::ListsSegments.get_lists
527
+ Klaviyo::ListsSegments.get_lists
528
528
  ```
529
529
 
530
530
  #### Example:
531
531
  ```ruby
532
- response = Client::ListsSegments.get_lists
532
+ response = Klaviyo::ListsSegments.get_lists
533
533
  ```
534
534
 
535
535
 
@@ -538,7 +538,7 @@ response = Client::ListsSegments.get_lists
538
538
  #### [Get List and Segment Members](https://developers.klaviyo.com/en/reference/get-members)
539
539
 
540
540
  ```ruby
541
- Client::ListsSegments.get_members(list_or_segment_id, opts)
541
+ Klaviyo::ListsSegments.get_members(list_or_segment_id, opts)
542
542
  ```
543
543
 
544
544
  #### Example:
@@ -550,7 +550,7 @@ opts = {
550
550
  # marker: 12345
551
551
  }
552
552
  }
553
- response = Client::ListsSegments.get_members(list_id)
553
+ response = Klaviyo::ListsSegments.get_members(list_id)
554
554
  ```
555
555
 
556
556
 
@@ -559,7 +559,7 @@ response = Client::ListsSegments.get_members(list_id)
559
559
  #### [Check if Profiles Are in a Segment](https://developers.klaviyo.com/en/reference/get-segment-members)
560
560
 
561
561
  ```ruby
562
- Client::ListsSegments.get_segment_members(segment_id, opts)
562
+ Klaviyo::ListsSegments.get_segment_members(segment_id, opts)
563
563
  ```
564
564
 
565
565
  #### Example:
@@ -569,7 +569,7 @@ segment_id = 'SEGMENT_ID'
569
569
  opts = {
570
570
  body: {'emails': ['george.washington@klaviyo.com']}
571
571
  }
572
- response = Client::ListsSegments.get_segment_members(segment_id, opts)
572
+ response = Klaviyo::ListsSegments.get_segment_members(segment_id, opts)
573
573
  ```
574
574
 
575
575
 
@@ -578,7 +578,7 @@ response = Client::ListsSegments.get_segment_members(segment_id, opts)
578
578
  #### [Remove Profiles From List](https://developers.klaviyo.com/en/reference/remove-members)
579
579
 
580
580
  ```ruby
581
- Client::ListsSegments.remove_members(list_id, opts)
581
+ Klaviyo::ListsSegments.remove_members(list_id, opts)
582
582
  ```
583
583
 
584
584
  #### Example:
@@ -589,7 +589,7 @@ opts = {
589
589
  body: {'emails': ['george.washington@klaviyo.com']}
590
590
  }
591
591
 
592
- response = Client::ListsSegments.remove_members(list_id, opts)
592
+ response = Klaviyo::ListsSegments.remove_members(list_id, opts)
593
593
  ```
594
594
 
595
595
 
@@ -598,7 +598,7 @@ response = Client::ListsSegments.remove_members(list_id, opts)
598
598
  #### [Subscribe Profiles to List](https://developers.klaviyo.com/en/reference/subscribe)
599
599
 
600
600
  ```ruby
601
- Client::ListsSegments.subscribe(list_id, opts)
601
+ Klaviyo::ListsSegments.subscribe(list_id, opts)
602
602
  ```
603
603
 
604
604
  #### Example:
@@ -615,7 +615,7 @@ opts = {
615
615
  }
616
616
  }
617
617
 
618
- response = Client::ListsSegmentsApi.new.subscribe(list_id, opts)
618
+ response = Klaviyo::ListsSegmentsApi.new.subscribe(list_id, opts)
619
619
  ```
620
620
 
621
621
 
@@ -624,7 +624,7 @@ response = Client::ListsSegmentsApi.new.subscribe(list_id, opts)
624
624
  #### [Unsubscribe Profiles From List](https://developers.klaviyo.com/en/reference/unsubscribe)
625
625
 
626
626
  ```ruby
627
- Client::ListsSegments.unsubscribe(list_id, opts)
627
+ Klaviyo::ListsSegments.unsubscribe(list_id, opts)
628
628
  ```
629
629
 
630
630
  #### Example:
@@ -638,7 +638,7 @@ opts = {
638
638
  ]
639
639
  }
640
640
  }
641
- response = Client::ListsSegments.unsubscribe(list_id, opts)
641
+ response = Klaviyo::ListsSegments.unsubscribe(list_id, opts)
642
642
  ```
643
643
 
644
644
 
@@ -647,7 +647,7 @@ response = Client::ListsSegments.unsubscribe(list_id, opts)
647
647
  #### [Update List Name](https://developers.klaviyo.com/en/reference/update-list-name)
648
648
 
649
649
  ```ruby
650
- Client::ListsSegments.update_list_name(list_id, list_name)
650
+ Klaviyo::ListsSegments.update_list_name(list_id, list_name)
651
651
  ```
652
652
 
653
653
  #### Example:
@@ -655,7 +655,7 @@ Client::ListsSegments.update_list_name(list_id, list_name)
655
655
  list_id = 'LIST_ID'
656
656
  list_name = 'MyRenamedList'
657
657
 
658
- response = Client::ListsSegments.update_list_name(list_id, list_name)
658
+ response = Klaviyo::ListsSegments.update_list_name(list_id, list_name)
659
659
  ```
660
660
 
661
661
 
@@ -668,7 +668,7 @@ response = Client::ListsSegments.update_list_name(list_id, list_name)
668
668
  #### [Get Metrics Info](https://developers.klaviyo.com/en/reference/get-metrics)
669
669
 
670
670
  ```ruby
671
- Client::Metrics.get_metrics(opts)
671
+ Klaviyo::Metrics.get_metrics(opts)
672
672
  ```
673
673
 
674
674
  #### Example:
@@ -680,7 +680,7 @@ opts = {
680
680
  }
681
681
  }
682
682
 
683
- response = Client::Metrics.get_metrics(opts)
683
+ response = Klaviyo::Metrics.get_metrics(opts)
684
684
  ```
685
685
 
686
686
 
@@ -689,7 +689,7 @@ response = Client::Metrics.get_metrics(opts)
689
689
  #### [Query Event Data](https://developers.klaviyo.com/en/reference/metric-export)
690
690
 
691
691
  ```ruby
692
- Client::Metrics.metric_export(metric_id, opts)
692
+ Klaviyo::Metrics.metric_export(metric_id, opts)
693
693
  ```
694
694
 
695
695
  #### Example:
@@ -703,7 +703,7 @@ opts = {
703
703
  }
704
704
  }
705
705
 
706
- response = Client::Metrics.metric_export(metric_id, opts)
706
+ response = Klaviyo::Metrics.metric_export(metric_id, opts)
707
707
  ```
708
708
 
709
709
 
@@ -712,7 +712,7 @@ response = Client::Metrics.metric_export(metric_id, opts)
712
712
  #### [Get Events for a Specific Metric](https://developers.klaviyo.com/en/reference/metric-timeline)
713
713
 
714
714
  ```ruby
715
- Client::Metrics.metric_timeline(metric_id, opts)
715
+ Klaviyo::Metrics.metric_timeline(metric_id, opts)
716
716
  ```
717
717
 
718
718
  #### Example:
@@ -727,7 +727,7 @@ opts = {
727
727
  }
728
728
  }
729
729
 
730
- response = Client::Metrics.metric_timeline(metric_id, opts)
730
+ response = Klaviyo::Metrics.metric_timeline(metric_id, opts)
731
731
  ```
732
732
 
733
733
 
@@ -736,7 +736,7 @@ response = Client::Metrics.metric_timeline(metric_id, opts)
736
736
  #### [Get Events for All Metrics](https://developers.klaviyo.com/en/reference/metrics-timeline)
737
737
 
738
738
  ```ruby
739
- Client::Metrics.metrics_timeline(opts)
739
+ Klaviyo::Metrics.metrics_timeline(opts)
740
740
  ```
741
741
 
742
742
  #### Example:
@@ -748,7 +748,7 @@ opts = {
748
748
  sort: 'asc'
749
749
  }
750
750
  }
751
- response = Client::Metrics.metrics_timeline(opts)
751
+ response = Klaviyo::Metrics.metrics_timeline(opts)
752
752
  ```
753
753
 
754
754
 
@@ -761,7 +761,7 @@ response = Client::Metrics.metrics_timeline(opts)
761
761
  #### [Exchange ID for Profile ID](https://developers.klaviyo.com/en/reference/exchange)
762
762
 
763
763
  ```ruby
764
- Client::Profiles.exchange(opts)
764
+ Klaviyo::Profiles.exchange(opts)
765
765
  ```
766
766
 
767
767
  #### Example:
@@ -770,7 +770,7 @@ opts = {
770
770
  body: {'exchange_id': 'EXCHANGE_ID'}
771
771
  }
772
772
 
773
- response = Client::Profiles.exchange(opts)
773
+ response = Klaviyo::Profiles.exchange(opts)
774
774
  ```
775
775
 
776
776
 
@@ -779,14 +779,36 @@ response = Client::Profiles.exchange(opts)
779
779
  #### [Get Profile](https://developers.klaviyo.com/en/reference/get-profile)
780
780
 
781
781
  ```ruby
782
- Client::Profiles.get_profile(person_id)
782
+ Klaviyo::Profiles.get_profile(person_id)
783
783
  ```
784
784
 
785
785
  #### Example:
786
786
  ```ruby
787
787
  person_id = 'PERSON_ID'
788
788
 
789
- response = Client::Profiles.get_profile(person_id)
789
+ response = Klaviyo::Profiles.get_profile(person_id)
790
+ ```
791
+
792
+
793
+
794
+
795
+ #### [Get Profile ID](https://developers.klaviyo.com/en/reference/get-profile-id)
796
+
797
+ ```ruby
798
+ Klaviyo::Profiles.get_profile_id(opts)
799
+ ```
800
+
801
+ #### Example:
802
+ ```ruby
803
+ opts = {
804
+ query_params: {
805
+ email: 'george.washington@klaviyo.com',
806
+ phone_number: '555-555-5555',
807
+ external_id: 'EXTERNAL_ID'
808
+ }
809
+ }
810
+
811
+ response = Klaviyo::Profiles.get_profile_id(opts)
790
812
  ```
791
813
 
792
814
 
@@ -795,7 +817,7 @@ response = Client::Profiles.get_profile(person_id)
795
817
  #### [Get Profile's Events for a Specific Metric](https://developers.klaviyo.com/en/reference/profile-metric-timeline)
796
818
 
797
819
  ```ruby
798
- Client::Profiles.profile_metric_timeline(person_id, metric_id, opts)
820
+ Klaviyo::Profiles.profile_metric_timeline(person_id, metric_id, opts)
799
821
  ```
800
822
 
801
823
  #### Example:
@@ -811,7 +833,7 @@ opts = {
811
833
  }
812
834
  }
813
835
 
814
- response = Client::Profiles.profile_metric_timeline(person_id, metric_id, opts)
836
+ response = Klaviyo::Profiles.profile_metric_timeline(person_id, metric_id, opts)
815
837
  ```
816
838
 
817
839
 
@@ -820,7 +842,7 @@ response = Client::Profiles.profile_metric_timeline(person_id, metric_id, opts)
820
842
  #### [Get Profile's Events for all Metrics](https://developers.klaviyo.com/en/reference/profile-metrics-timeline)
821
843
 
822
844
  ```ruby
823
- Client::Profiles.profile_metrics_timeline(person_id, opts)
845
+ Klaviyo::Profiles.profile_metrics_timeline(person_id, opts)
824
846
  ```
825
847
 
826
848
  #### Example:
@@ -835,7 +857,7 @@ opts = {
835
857
  }
836
858
  }
837
859
 
838
- response = Client::Profiles.profile_metrics_timeline(person_id, opts)
860
+ response = Klaviyo::Profiles.profile_metrics_timeline(person_id, opts)
839
861
  ```
840
862
 
841
863
 
@@ -844,7 +866,7 @@ response = Client::Profiles.profile_metrics_timeline(person_id, opts)
844
866
  #### [Update Profile](https://developers.klaviyo.com/en/reference/update-profile)
845
867
 
846
868
  ```ruby
847
- Client::Profiles.update_profile(person_id, opts)
869
+ Klaviyo::Profiles.update_profile(person_id, opts)
848
870
  ```
849
871
 
850
872
  #### Example:
@@ -855,7 +877,7 @@ opts = {
855
877
  query_params: {'$email': 'george.washington@klaviyo.com'}
856
878
  }
857
879
 
858
- response = Client::Profiles.update_profile(person_id, opts)
880
+ response = Klaviyo::Profiles.update_profile(person_id, opts)
859
881
  ```
860
882
 
861
883
 
@@ -868,7 +890,7 @@ response = Client::Profiles.update_profile(person_id, opts)
868
890
  #### [Clone Template](https://developers.klaviyo.com/en/reference/clone-template)
869
891
 
870
892
  ```ruby
871
- Client::Templates.clone_template(template_id, name)
893
+ Klaviyo::Templates.clone_template(template_id, name)
872
894
  ```
873
895
 
874
896
  #### Example:
@@ -876,7 +898,7 @@ Client::Templates.clone_template(template_id, name)
876
898
  template_id = 'TEMPLATE_ID'
877
899
  name = 'My Cloned Template'
878
900
 
879
- response = Client::Templates.clone_template(template_id, name)
901
+ response = Klaviyo::Templates.clone_template(template_id, name)
880
902
  ```
881
903
 
882
904
 
@@ -885,7 +907,7 @@ response = Client::Templates.clone_template(template_id, name)
885
907
  #### [Create New Template](https://developers.klaviyo.com/en/reference/create-template)
886
908
 
887
909
  ```ruby
888
- Client::Templates.create_template(name, html)
910
+ Klaviyo::Templates.create_template(name, html)
889
911
  ```
890
912
 
891
913
  #### Example:
@@ -893,7 +915,7 @@ Client::Templates.create_template(name, html)
893
915
  name = 'New Template Name'
894
916
  html = '<html><body><p>This is an email for {{ email }}.</p></body></html>'
895
917
 
896
- response = Client::Templates.create_template(name, html)
918
+ response = Klaviyo::Templates.create_template(name, html)
897
919
  ```
898
920
 
899
921
 
@@ -902,14 +924,14 @@ response = Client::Templates.create_template(name, html)
902
924
  #### [Delete Template](https://developers.klaviyo.com/en/reference/delete-template)
903
925
 
904
926
  ```ruby
905
- Client::Templates.delete_template(template_id)
927
+ Klaviyo::Templates.delete_template(template_id)
906
928
  ```
907
929
 
908
930
  #### Example:
909
931
  ```ruby
910
932
  template_id = 'TEMPLATE_ID'
911
933
 
912
- response = Client::Templates.delete_template(template_id)
934
+ response = Klaviyo::Templates.delete_template(template_id)
913
935
  ```
914
936
 
915
937
 
@@ -918,12 +940,12 @@ response = Client::Templates.delete_template(template_id)
918
940
  #### [Get All Templates](https://developers.klaviyo.com/en/reference/get-templates)
919
941
 
920
942
  ```ruby
921
- Client::Templates.get_templates
943
+ Klaviyo::Templates.get_templates
922
944
  ```
923
945
 
924
946
  #### Example:
925
947
  ```ruby
926
- response = Client::Templates.get_templates
948
+ response = Klaviyo::Templates.get_templates
927
949
  ```
928
950
 
929
951
 
@@ -932,7 +954,7 @@ response = Client::Templates.get_templates
932
954
  #### [Render Template](https://developers.klaviyo.com/en/reference/render-template)
933
955
 
934
956
  ```ruby
935
- Client::Templates.render_template(template_id, opts)
957
+ Klaviyo::Templates.render_template(template_id, opts)
936
958
  ```
937
959
 
938
960
  #### Example:
@@ -946,7 +968,7 @@ opts = {
946
968
  }
947
969
  }
948
970
 
949
- response = Client::Templates.render_template(template_id, opts)
971
+ response = Klaviyo::Templates.render_template(template_id, opts)
950
972
  ```
951
973
 
952
974
 
@@ -955,7 +977,7 @@ response = Client::Templates.render_template(template_id, opts)
955
977
  #### [Render and Send Template](https://developers.klaviyo.com/en/reference/send-template)
956
978
 
957
979
  ```ruby
958
- Client::Templates.send_template(template_id, from_email, from_name, subject, to, opts)
980
+ Klaviyo::Templates.send_template(template_id, from_email, from_name, subject, to, opts)
959
981
  ```
960
982
 
961
983
  #### Example:
@@ -973,7 +995,7 @@ opts = {
973
995
  }
974
996
  }
975
997
 
976
- response = Client::Templates.send_template(template_id, from_email, from_name, subject, to, opts)
998
+ response = Klaviyo::Templates.send_template(template_id, from_email, from_name, subject, to, opts)
977
999
  ```
978
1000
 
979
1001
 
@@ -982,7 +1004,7 @@ response = Client::Templates.send_template(template_id, from_email, from_name, s
982
1004
  #### [Update Template](https://developers.klaviyo.com/en/reference/update-template)
983
1005
 
984
1006
  ```ruby
985
- Client::Templates.update_template(template_id, opts)
1007
+ Klaviyo::Templates.update_template(template_id, opts)
986
1008
  ```
987
1009
 
988
1010
  #### Example:
@@ -995,7 +1017,7 @@ opts = {
995
1017
  }
996
1018
  }
997
1019
 
998
- response = Client::Templates.update_template(template_id, opts)
1020
+ response = Klaviyo::Templates.update_template(template_id, opts)
999
1021
  ```
1000
1022
 
1001
1023
 
@@ -1008,7 +1030,7 @@ response = Client::Templates.update_template(template_id, opts)
1008
1030
  #### [Identify Profile (Legacy)](https://developers.klaviyo.com/en/reference/identify-get)
1009
1031
 
1010
1032
  ```ruby
1011
- Client::TrackIdentify.identify_get(data)
1033
+ Klaviyo::TrackIdentify.identify_get(data)
1012
1034
  ```
1013
1035
 
1014
1036
  #### Example:
@@ -1026,7 +1048,7 @@ identify_payload = {
1026
1048
  }
1027
1049
 
1028
1050
  encoded_payload = Base64.encode64(identify_payload.to_json).encode(Encoding::UTF_8)
1029
- response = Client::TrackIdentify.identify_get(encoded_payload)
1051
+ response = Klaviyo::TrackIdentify.identify_get(encoded_payload)
1030
1052
  ```
1031
1053
 
1032
1054
 
@@ -1035,7 +1057,7 @@ response = Client::TrackIdentify.identify_get(encoded_payload)
1035
1057
  #### [Identify Profile](https://developers.klaviyo.com/en/reference/identify-post)
1036
1058
 
1037
1059
  ```ruby
1038
- Client::TrackIdentify.identify_post(data)
1060
+ Klaviyo::TrackIdentify.identify_post(data)
1039
1061
  ```
1040
1062
 
1041
1063
  #### Example:
@@ -1052,7 +1074,7 @@ identify_payload = {
1052
1074
  }
1053
1075
 
1054
1076
  data = identify_payload.to_json
1055
- response = Client::TrackIdentify.identify_post(data)
1077
+ response = Klaviyo::TrackIdentify.identify_post(data)
1056
1078
  ```
1057
1079
 
1058
1080
 
@@ -1061,7 +1083,7 @@ response = Client::TrackIdentify.identify_post(data)
1061
1083
  #### [Track Profile Activity (Legacy)](https://developers.klaviyo.com/en/reference/track-get)
1062
1084
 
1063
1085
  ```ruby
1064
- Client::TrackIdentify.track_get(data)
1086
+ Klaviyo::TrackIdentify.track_get(data)
1065
1087
  ```
1066
1088
 
1067
1089
  #### Example:
@@ -1080,7 +1102,7 @@ track_payload = {
1080
1102
  }
1081
1103
 
1082
1104
  encoded_payload = Base64.encode64(track_payload.to_json).encode(Encoding::UTF_8)
1083
- response = Client::TrackIdentify.track_get(encoded_payload)
1105
+ response = Klaviyo::TrackIdentify.track_get(encoded_payload)
1084
1106
  ```
1085
1107
 
1086
1108
 
@@ -1089,7 +1111,7 @@ response = Client::TrackIdentify.track_get(encoded_payload)
1089
1111
  #### [Track Profile Activity](https://developers.klaviyo.com/en/reference/track-post)
1090
1112
 
1091
1113
  ```ruby
1092
- Client::TrackIdentify.track_post(data)
1114
+ Klaviyo::TrackIdentify.track_post(data)
1093
1115
  ```
1094
1116
 
1095
1117
  #### Example:
@@ -1108,7 +1130,7 @@ track_payload = {
1108
1130
  }
1109
1131
 
1110
1132
  data = track_payload.to_json
1111
- response = Client::TrackIdentify.track_post(data)
1133
+ response = Klaviyo::TrackIdentify.track_post(data)
1112
1134
  ```
1113
1135
 
1114
1136