klaviyo-api-sdk 10.0.0 → 11.1.0
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 +11 -0
- data/README.md +382 -136
- data/klaviyo-api-sdk.gemspec +1 -1
- data/lib/klaviyo-api-sdk/api/accounts_api.rb +2 -2
- data/lib/klaviyo-api-sdk/api/campaigns_api.rb +41 -23
- data/lib/klaviyo-api-sdk/api/catalogs_api.rb +82 -76
- data/lib/klaviyo-api-sdk/api/coupons_api.rb +111 -93
- data/lib/klaviyo-api-sdk/api/data_privacy_api.rb +1 -1
- data/lib/klaviyo-api-sdk/api/events_api.rb +128 -116
- data/lib/klaviyo-api-sdk/api/flows_api.rb +199 -169
- data/lib/klaviyo-api-sdk/api/forms_api.rb +19 -7
- data/lib/klaviyo-api-sdk/api/images_api.rb +5 -5
- data/lib/klaviyo-api-sdk/api/lists_api.rb +391 -337
- data/lib/klaviyo-api-sdk/api/metrics_api.rb +151 -115
- data/lib/klaviyo-api-sdk/api/profiles_api.rb +170 -119
- data/lib/klaviyo-api-sdk/api/reporting_api.rb +49 -7
- data/lib/klaviyo-api-sdk/api/reviews_api.rb +2 -2
- data/lib/klaviyo-api-sdk/api/segments_api.rb +170 -146
- data/lib/klaviyo-api-sdk/api/tags_api.rb +108 -42
- data/lib/klaviyo-api-sdk/api/templates_api.rb +12 -12
- data/lib/klaviyo-api-sdk/api/tracking_settings_api.rb +3 -3
- data/lib/klaviyo-api-sdk/api/webhooks_api.rb +7 -7
- data/lib/klaviyo-api-sdk/api_client.rb +1 -1
- data/lib/klaviyo-api-sdk/configuration.rb +18 -9
- data/lib/klaviyo-api-sdk/models/campaign_send_job_partial_update_query_resource_object_attributes.rb +34 -0
- data/lib/klaviyo-api-sdk/models/device_metadata.rb +2 -2
- data/lib/klaviyo-api-sdk/models/email_unsubscription_parameters.rb +224 -0
- data/lib/klaviyo-api-sdk/models/html_block_data.rb +4 -14
- data/lib/klaviyo-api-sdk/models/profile_subscription_delete_query_resource_object_attributes.rb +14 -5
- data/lib/klaviyo-api-sdk/models/sms_subscription_parameters.rb +13 -4
- data/lib/klaviyo-api-sdk/models/sms_unsubscription_parameters.rb +228 -0
- data/lib/klaviyo-api-sdk/models/template_create_query_resource_object_attributes.rb +1 -1
- data/lib/klaviyo-api-sdk/models/unsubscription_channels.rb +228 -0
- data/lib/klaviyo-api-sdk/models/unsubscription_parameters.rb +259 -0
- data/lib/klaviyo-api-sdk.rb +36 -19
- metadata +6 -2
data/klaviyo-api-sdk.gemspec
CHANGED
@@ -17,7 +17,7 @@ require "klaviyo-api-sdk/version"
|
|
17
17
|
|
18
18
|
Gem::Specification.new do |s|
|
19
19
|
s.name = "klaviyo-api-sdk"
|
20
|
-
s.version = "
|
20
|
+
s.version = "11.1.0"
|
21
21
|
s.authors = ['Klaviyo Team']
|
22
22
|
s.email = ['libraries@klaviyo.com']
|
23
23
|
s.summary = 'You heard us, a Ruby wrapper for the Klaviyo API'
|
@@ -72,7 +72,7 @@ module KlaviyoAPI
|
|
72
72
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
73
73
|
|
74
74
|
# auth_names
|
75
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
75
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
76
76
|
|
77
77
|
new_options = opts.merge(
|
78
78
|
:operation => :"AccountsApi.get_account",
|
@@ -138,7 +138,7 @@ module KlaviyoAPI
|
|
138
138
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
139
139
|
|
140
140
|
# auth_names
|
141
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
141
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
142
142
|
|
143
143
|
new_options = opts.merge(
|
144
144
|
:operation => :"AccountsApi.get_accounts",
|
@@ -73,7 +73,7 @@ module KlaviyoAPI
|
|
73
73
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
74
74
|
|
75
75
|
# auth_names
|
76
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
76
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
77
77
|
|
78
78
|
new_options = opts.merge(
|
79
79
|
:operation => :"CampaignsApi.assign_template_to_campaign_message",
|
@@ -155,7 +155,7 @@ module KlaviyoAPI
|
|
155
155
|
return_type = opts[:debug_return_type]
|
156
156
|
|
157
157
|
# auth_names
|
158
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
158
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
159
159
|
|
160
160
|
new_options = opts.merge(
|
161
161
|
:operation => :"CampaignsApi.cancel_campaign_send",
|
@@ -228,7 +228,7 @@ module KlaviyoAPI
|
|
228
228
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
229
229
|
|
230
230
|
# auth_names
|
231
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
231
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
232
232
|
|
233
233
|
new_options = opts.merge(
|
234
234
|
:operation => :"CampaignsApi.create_campaign",
|
@@ -301,7 +301,7 @@ module KlaviyoAPI
|
|
301
301
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
302
302
|
|
303
303
|
# auth_names
|
304
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
304
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
305
305
|
|
306
306
|
new_options = opts.merge(
|
307
307
|
:operation => :"CampaignsApi.create_campaign_clone",
|
@@ -369,7 +369,7 @@ module KlaviyoAPI
|
|
369
369
|
return_type = opts[:debug_return_type]
|
370
370
|
|
371
371
|
# auth_names
|
372
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
372
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
373
373
|
|
374
374
|
new_options = opts.merge(
|
375
375
|
:operation => :"CampaignsApi.delete_campaign",
|
@@ -462,7 +462,7 @@ module KlaviyoAPI
|
|
462
462
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
463
463
|
|
464
464
|
# auth_names
|
465
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
465
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
466
466
|
|
467
467
|
new_options = opts.merge(
|
468
468
|
:operation => :"CampaignsApi.get_campaign",
|
@@ -537,7 +537,7 @@ module KlaviyoAPI
|
|
537
537
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
538
538
|
|
539
539
|
# auth_names
|
540
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
540
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
541
541
|
|
542
542
|
new_options = opts.merge(
|
543
543
|
:operation => :"CampaignsApi.get_campaign_for_campaign_message",
|
@@ -608,7 +608,7 @@ module KlaviyoAPI
|
|
608
608
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
609
609
|
|
610
610
|
# auth_names
|
611
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
611
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
612
612
|
|
613
613
|
new_options = opts.merge(
|
614
614
|
:operation => :"CampaignsApi.get_campaign_id_for_campaign_message",
|
@@ -704,7 +704,7 @@ module KlaviyoAPI
|
|
704
704
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
705
705
|
|
706
706
|
# auth_names
|
707
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
707
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
708
708
|
|
709
709
|
new_options = opts.merge(
|
710
710
|
:operation => :"CampaignsApi.get_campaign_message",
|
@@ -776,7 +776,7 @@ module KlaviyoAPI
|
|
776
776
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
777
777
|
|
778
778
|
# auth_names
|
779
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
779
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
780
780
|
|
781
781
|
new_options = opts.merge(
|
782
782
|
:operation => :"CampaignsApi.get_campaign_recipient_estimation",
|
@@ -848,7 +848,7 @@ module KlaviyoAPI
|
|
848
848
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
849
849
|
|
850
850
|
# auth_names
|
851
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
851
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
852
852
|
|
853
853
|
new_options = opts.merge(
|
854
854
|
:operation => :"CampaignsApi.get_campaign_recipient_estimation_job",
|
@@ -920,7 +920,7 @@ module KlaviyoAPI
|
|
920
920
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
921
921
|
|
922
922
|
# auth_names
|
923
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
923
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
924
924
|
|
925
925
|
new_options = opts.merge(
|
926
926
|
:operation => :"CampaignsApi.get_campaign_send_job",
|
@@ -950,6 +950,9 @@ module KlaviyoAPI
|
|
950
950
|
data
|
951
951
|
end
|
952
952
|
|
953
|
+
# alias of `get_campaign_tags`
|
954
|
+
alias get_tags_for_campaign get_campaign_tags
|
955
|
+
|
953
956
|
# Get Campaign Tags
|
954
957
|
# Return all tags that belong to the given campaign.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `campaigns:read` `tags:read`
|
955
958
|
# @param id [String]
|
@@ -992,7 +995,7 @@ module KlaviyoAPI
|
|
992
995
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
993
996
|
|
994
997
|
# auth_names
|
995
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
998
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
996
999
|
|
997
1000
|
new_options = opts.merge(
|
998
1001
|
:operation => :"CampaignsApi.get_campaign_tags",
|
@@ -1011,6 +1014,9 @@ module KlaviyoAPI
|
|
1011
1014
|
return data, status_code, headers
|
1012
1015
|
end
|
1013
1016
|
|
1017
|
+
# alias of `get_campaign_tags_with_http_info`
|
1018
|
+
alias get_tags_for_campaign_with_http_info get_campaign_tags_with_http_info
|
1019
|
+
|
1014
1020
|
# Get Campaigns
|
1015
1021
|
# Returns some or all campaigns based on filters. A channel filter is required to list campaigns. Please provide either: `?filter=equals(messages.channel,'email')` to list email campaigns, or `?filter=equals(messages.channel,'sms')` to list SMS campaigns.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
|
1016
1022
|
# @param filter [String] For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`messages.channel`: `equals`<br>`name`: `contains`<br>`status`: `any`, `equals`<br>`archived`: `equals`<br>`created_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`scheduled_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`
|
@@ -1096,7 +1102,7 @@ module KlaviyoAPI
|
|
1096
1102
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
1097
1103
|
|
1098
1104
|
# auth_names
|
1099
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
1105
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
1100
1106
|
|
1101
1107
|
new_options = opts.merge(
|
1102
1108
|
:operation => :"CampaignsApi.get_campaigns",
|
@@ -1128,6 +1134,9 @@ module KlaviyoAPI
|
|
1128
1134
|
# alias of `get_message_ids_for_campaign`
|
1129
1135
|
alias get_campaign_relationships_campaign_messages get_message_ids_for_campaign
|
1130
1136
|
|
1137
|
+
# alias of `get_message_ids_for_campaign`
|
1138
|
+
alias get_campaign_relationships_messages get_message_ids_for_campaign
|
1139
|
+
|
1131
1140
|
# Get Message IDs for Campaign
|
1132
1141
|
# Returns the IDs of all messages associated with the given campaign.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
|
1133
1142
|
# @param id [String]
|
@@ -1164,7 +1173,7 @@ module KlaviyoAPI
|
|
1164
1173
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
1165
1174
|
|
1166
1175
|
# auth_names
|
1167
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
1176
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
1168
1177
|
|
1169
1178
|
new_options = opts.merge(
|
1170
1179
|
:operation => :"CampaignsApi.get_message_ids_for_campaign",
|
@@ -1186,6 +1195,9 @@ module KlaviyoAPI
|
|
1186
1195
|
# alias of `get_message_ids_for_campaign_with_http_info`
|
1187
1196
|
alias get_campaign_relationships_campaign_messages_with_http_info get_message_ids_for_campaign_with_http_info
|
1188
1197
|
|
1198
|
+
# alias of `get_message_ids_for_campaign_with_http_info`
|
1199
|
+
alias get_campaign_relationships_messages_with_http_info get_message_ids_for_campaign_with_http_info
|
1200
|
+
|
1189
1201
|
# Get Messages for Campaign
|
1190
1202
|
# Return all messages that belong to the given campaign.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
|
1191
1203
|
# @param id [String]
|
@@ -1203,6 +1215,9 @@ module KlaviyoAPI
|
|
1203
1215
|
# alias of `get_messages_for_campaign`
|
1204
1216
|
alias get_campaign_campaign_messages get_messages_for_campaign
|
1205
1217
|
|
1218
|
+
# alias of `get_messages_for_campaign`
|
1219
|
+
alias get_campaign_messages get_messages_for_campaign
|
1220
|
+
|
1206
1221
|
# Get Messages for Campaign
|
1207
1222
|
# Return all messages that belong to the given campaign.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `campaigns:read`
|
1208
1223
|
# @param id [String]
|
@@ -1263,7 +1278,7 @@ module KlaviyoAPI
|
|
1263
1278
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
1264
1279
|
|
1265
1280
|
# auth_names
|
1266
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
1281
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
1267
1282
|
|
1268
1283
|
new_options = opts.merge(
|
1269
1284
|
:operation => :"CampaignsApi.get_messages_for_campaign",
|
@@ -1285,6 +1300,9 @@ module KlaviyoAPI
|
|
1285
1300
|
# alias of `get_messages_for_campaign_with_http_info`
|
1286
1301
|
alias get_campaign_campaign_messages_with_http_info get_messages_for_campaign_with_http_info
|
1287
1302
|
|
1303
|
+
# alias of `get_messages_for_campaign_with_http_info`
|
1304
|
+
alias get_campaign_messages_with_http_info get_messages_for_campaign_with_http_info
|
1305
|
+
|
1288
1306
|
# Get Tag IDs for Campaign
|
1289
1307
|
# Returns the IDs of all tags associated with the given campaign.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `campaigns:read` `tags:read`
|
1290
1308
|
# @param id [String]
|
@@ -1334,7 +1352,7 @@ module KlaviyoAPI
|
|
1334
1352
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
1335
1353
|
|
1336
1354
|
# auth_names
|
1337
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
1355
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
1338
1356
|
|
1339
1357
|
new_options = opts.merge(
|
1340
1358
|
:operation => :"CampaignsApi.get_tag_ids_for_campaign",
|
@@ -1412,7 +1430,7 @@ module KlaviyoAPI
|
|
1412
1430
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
1413
1431
|
|
1414
1432
|
# auth_names
|
1415
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
1433
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
1416
1434
|
|
1417
1435
|
new_options = opts.merge(
|
1418
1436
|
:operation => :"CampaignsApi.get_template_for_campaign_message",
|
@@ -1483,7 +1501,7 @@ module KlaviyoAPI
|
|
1483
1501
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
1484
1502
|
|
1485
1503
|
# auth_names
|
1486
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
1504
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
1487
1505
|
|
1488
1506
|
new_options = opts.merge(
|
1489
1507
|
:operation => :"CampaignsApi.get_template_id_for_campaign_message",
|
@@ -1559,7 +1577,7 @@ module KlaviyoAPI
|
|
1559
1577
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
1560
1578
|
|
1561
1579
|
# auth_names
|
1562
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
1580
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
1563
1581
|
|
1564
1582
|
new_options = opts.merge(
|
1565
1583
|
:operation => :"CampaignsApi.refresh_campaign_recipient_estimation",
|
@@ -1635,7 +1653,7 @@ module KlaviyoAPI
|
|
1635
1653
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
1636
1654
|
|
1637
1655
|
# auth_names
|
1638
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
1656
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
1639
1657
|
|
1640
1658
|
new_options = opts.merge(
|
1641
1659
|
:operation => :"CampaignsApi.send_campaign",
|
@@ -1714,7 +1732,7 @@ module KlaviyoAPI
|
|
1714
1732
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
1715
1733
|
|
1716
1734
|
# auth_names
|
1717
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
1735
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
1718
1736
|
|
1719
1737
|
new_options = opts.merge(
|
1720
1738
|
:operation => :"CampaignsApi.update_campaign",
|
@@ -1790,7 +1808,7 @@ module KlaviyoAPI
|
|
1790
1808
|
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
1791
1809
|
|
1792
1810
|
# auth_names
|
1793
|
-
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
|
1811
|
+
auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
|
1794
1812
|
|
1795
1813
|
new_options = opts.merge(
|
1796
1814
|
:operation => :"CampaignsApi.update_campaign_message",
|