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.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -0
  3. data/README.md +382 -136
  4. data/klaviyo-api-sdk.gemspec +1 -1
  5. data/lib/klaviyo-api-sdk/api/accounts_api.rb +2 -2
  6. data/lib/klaviyo-api-sdk/api/campaigns_api.rb +41 -23
  7. data/lib/klaviyo-api-sdk/api/catalogs_api.rb +82 -76
  8. data/lib/klaviyo-api-sdk/api/coupons_api.rb +111 -93
  9. data/lib/klaviyo-api-sdk/api/data_privacy_api.rb +1 -1
  10. data/lib/klaviyo-api-sdk/api/events_api.rb +128 -116
  11. data/lib/klaviyo-api-sdk/api/flows_api.rb +199 -169
  12. data/lib/klaviyo-api-sdk/api/forms_api.rb +19 -7
  13. data/lib/klaviyo-api-sdk/api/images_api.rb +5 -5
  14. data/lib/klaviyo-api-sdk/api/lists_api.rb +391 -337
  15. data/lib/klaviyo-api-sdk/api/metrics_api.rb +151 -115
  16. data/lib/klaviyo-api-sdk/api/profiles_api.rb +170 -119
  17. data/lib/klaviyo-api-sdk/api/reporting_api.rb +49 -7
  18. data/lib/klaviyo-api-sdk/api/reviews_api.rb +2 -2
  19. data/lib/klaviyo-api-sdk/api/segments_api.rb +170 -146
  20. data/lib/klaviyo-api-sdk/api/tags_api.rb +108 -42
  21. data/lib/klaviyo-api-sdk/api/templates_api.rb +12 -12
  22. data/lib/klaviyo-api-sdk/api/tracking_settings_api.rb +3 -3
  23. data/lib/klaviyo-api-sdk/api/webhooks_api.rb +7 -7
  24. data/lib/klaviyo-api-sdk/api_client.rb +1 -1
  25. data/lib/klaviyo-api-sdk/configuration.rb +18 -9
  26. data/lib/klaviyo-api-sdk/models/campaign_send_job_partial_update_query_resource_object_attributes.rb +34 -0
  27. data/lib/klaviyo-api-sdk/models/device_metadata.rb +2 -2
  28. data/lib/klaviyo-api-sdk/models/email_unsubscription_parameters.rb +224 -0
  29. data/lib/klaviyo-api-sdk/models/html_block_data.rb +4 -14
  30. data/lib/klaviyo-api-sdk/models/profile_subscription_delete_query_resource_object_attributes.rb +14 -5
  31. data/lib/klaviyo-api-sdk/models/sms_subscription_parameters.rb +13 -4
  32. data/lib/klaviyo-api-sdk/models/sms_unsubscription_parameters.rb +228 -0
  33. data/lib/klaviyo-api-sdk/models/template_create_query_resource_object_attributes.rb +1 -1
  34. data/lib/klaviyo-api-sdk/models/unsubscription_channels.rb +228 -0
  35. data/lib/klaviyo-api-sdk/models/unsubscription_parameters.rb +259 -0
  36. data/lib/klaviyo-api-sdk.rb +36 -19
  37. metadata +6 -2
@@ -65,7 +65,7 @@ module KlaviyoAPI
65
65
  return_type = opts[:debug_return_type]
66
66
 
67
67
  # auth_names
68
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
68
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
69
69
 
70
70
  new_options = opts.merge(
71
71
  :operation => :"FlowsApi.delete_flow",
@@ -84,6 +84,84 @@ module KlaviyoAPI
84
84
  return data, status_code, headers
85
85
  end
86
86
 
87
+ # Get Action for Flow Message
88
+ # Get the flow action for a flow message with the given message ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `flows:read`
89
+ # @param id [String]
90
+ # @param [Hash] opts the optional parameters
91
+ # @option opts [Array<String>] :fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
92
+ # @return [Hash<String, Object>]
93
+ def get_action_for_flow_message(id, opts = {})
94
+ data, _status_code, _headers = get_action_for_flow_message_with_http_info(id, opts)
95
+ data
96
+ end
97
+
98
+ # alias of `get_action_for_flow_message`
99
+ alias get_flow_message_action get_action_for_flow_message
100
+
101
+ # Get Action for Flow Message
102
+ # Get the flow action for a flow message with the given message ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;3/s&#x60;&lt;br&gt;Steady: &#x60;60/m&#x60; **Scopes:** &#x60;flows:read&#x60;
103
+ # @param id [String]
104
+ # @param [Hash] opts the optional parameters
105
+ # @option opts [Array<String>] :fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
106
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
107
+ def get_action_for_flow_message_with_http_info(id, opts = {})
108
+ if @api_client.config.debugging
109
+ @api_client.config.logger.debug 'Calling API: FlowsApi.get_action_for_flow_message ...'
110
+ end
111
+ # verify the required parameter 'id' is set
112
+ if @api_client.config.client_side_validation && id.nil?
113
+ fail ArgumentError, "Missing the required parameter 'id' when calling FlowsApi.get_action_for_flow_message"
114
+ end
115
+ allowable_values = ["action_type", "status", "created", "updated", "settings", "tracking_options", "tracking_options.add_utm", "tracking_options.utm_params", "tracking_options.is_tracking_opens", "tracking_options.is_tracking_clicks", "send_options", "send_options.use_smart_sending", "send_options.is_transactional", "render_options", "render_options.shorten_links", "render_options.add_org_prefix", "render_options.add_info_link", "render_options.add_opt_out_language"]
116
+ if @api_client.config.client_side_validation && opts[:'fields_flow_action'] && !opts[:'fields_flow_action'].all? { |item| allowable_values.include?(item) }
117
+ fail ArgumentError, "invalid value for \"fields_flow_action\", must include one of #{allowable_values}"
118
+ end
119
+ # resource path
120
+ local_var_path = '/api/flow-messages/{id}/flow-action'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
121
+
122
+ # query parameters
123
+ query_params = opts[:query_params] || {}
124
+ query_params[:'fields[flow-action]'] = @api_client.build_collection_param(opts[:'fields_flow_action'], :csv) if !opts[:'fields_flow_action'].nil?
125
+
126
+ # header parameters
127
+ header_params = opts[:header_params] || {}
128
+ # klaviyo api revision
129
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
130
+ # HTTP header 'Accept' (if needed)
131
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
132
+
133
+ # form parameters
134
+ form_params = opts[:form_params] || {}
135
+
136
+ # http body (model)
137
+ post_body = opts[:debug_body]
138
+
139
+ # return_type
140
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
141
+
142
+ # auth_names
143
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
144
+
145
+ new_options = opts.merge(
146
+ :operation => :"FlowsApi.get_action_for_flow_message",
147
+ :header_params => header_params,
148
+ :query_params => query_params,
149
+ :form_params => form_params,
150
+ :body => post_body,
151
+ :auth_names => auth_names,
152
+ :return_type => return_type
153
+ )
154
+
155
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
156
+ if @api_client.config.debugging
157
+ @api_client.config.logger.debug "API called: FlowsApi#get_action_for_flow_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
158
+ end
159
+ return data, status_code, headers
160
+ end
161
+
162
+ # alias of `get_action_for_flow_message_with_http_info`
163
+ alias get_flow_message_action_with_http_info get_action_for_flow_message_with_http_info
164
+
87
165
  # Get Action ID for Flow Message
88
166
  # Get the [relationship](https://developers.klaviyo.com/en/reference/api_overview#relationships) for a flow message's flow action, given the flow ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `flows:read`
89
167
  # @param id [String]
@@ -133,7 +211,7 @@ module KlaviyoAPI
133
211
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
134
212
 
135
213
  # auth_names
136
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
214
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
137
215
 
138
216
  new_options = opts.merge(
139
217
  :operation => :"FlowsApi.get_action_id_for_flow_message",
@@ -171,6 +249,9 @@ module KlaviyoAPI
171
249
  # alias of `get_action_ids_for_flow`
172
250
  alias get_flow_relationships_flow_actions get_action_ids_for_flow
173
251
 
252
+ # alias of `get_action_ids_for_flow`
253
+ alias get_flow_relationships_actions get_action_ids_for_flow
254
+
174
255
  # Get Action IDs for Flow
175
256
  # Get all [relationships](https://developers.klaviyo.com/en/reference/api_overview#relationships) for flow actions associated with the given flow ID. Flow action relationships can be sorted by the following fields, in ascending and descending order: &#x60;id&#x60;, &#x60;status&#x60;, &#x60;created&#x60;, &#x60;updated&#x60; Use filters to narrow your results. Returns a maximum of 50 flow action relationships per request, which can be paginated with offset pagination. Offset pagination uses the following parameters: &#x60;page[size]&#x60; and &#x60;page[number]&#x60;.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;3/s&#x60;&lt;br&gt;Steady: &#x60;60/m&#x60; **Scopes:** &#x60;flows:read&#x60;
176
257
  # @param id [String] ID of the Flow to update. Ex: XVTP5Q
@@ -225,7 +306,7 @@ module KlaviyoAPI
225
306
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
226
307
 
227
308
  # auth_names
228
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
309
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
229
310
 
230
311
  new_options = opts.merge(
231
312
  :operation => :"FlowsApi.get_action_ids_for_flow",
@@ -247,6 +328,9 @@ module KlaviyoAPI
247
328
  # alias of `get_action_ids_for_flow_with_http_info`
248
329
  alias get_flow_relationships_flow_actions_with_http_info get_action_ids_for_flow_with_http_info
249
330
 
331
+ # alias of `get_action_ids_for_flow_with_http_info`
332
+ alias get_flow_relationships_actions_with_http_info get_action_ids_for_flow_with_http_info
333
+
250
334
  # Get Actions for Flow
251
335
  # Get all flow actions associated with the given flow ID. Returns a maximum of 50 flows per request, which can be paginated with cursor-based pagination.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `flows:read`
252
336
  # @param id [String]
@@ -265,6 +349,9 @@ module KlaviyoAPI
265
349
  # alias of `get_actions_for_flow`
266
350
  alias get_flow_flow_actions get_actions_for_flow
267
351
 
352
+ # alias of `get_actions_for_flow`
353
+ alias get_flow_actions get_actions_for_flow
354
+
268
355
  # Get Actions for Flow
269
356
  # Get all flow actions associated with the given flow ID. Returns a maximum of 50 flows per request, which can be paginated with cursor-based pagination.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;3/s&#x60;&lt;br&gt;Steady: &#x60;60/m&#x60; **Scopes:** &#x60;flows:read&#x60;
270
357
  # @param id [String]
@@ -327,7 +414,7 @@ module KlaviyoAPI
327
414
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
328
415
 
329
416
  # auth_names
330
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
417
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
331
418
 
332
419
  new_options = opts.merge(
333
420
  :operation => :"FlowsApi.get_actions_for_flow",
@@ -349,6 +436,9 @@ module KlaviyoAPI
349
436
  # alias of `get_actions_for_flow_with_http_info`
350
437
  alias get_flow_flow_actions_with_http_info get_actions_for_flow_with_http_info
351
438
 
439
+ # alias of `get_actions_for_flow_with_http_info`
440
+ alias get_flow_actions_with_http_info get_actions_for_flow_with_http_info
441
+
352
442
  # Get Flow
353
443
  # Get a flow with the given flow ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `flows:read`
354
444
  # @param id [String]
@@ -423,7 +513,7 @@ module KlaviyoAPI
423
513
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
424
514
 
425
515
  # auth_names
426
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
516
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
427
517
 
428
518
  new_options = opts.merge(
429
519
  :operation => :"FlowsApi.get_flow",
@@ -516,7 +606,7 @@ module KlaviyoAPI
516
606
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
517
607
 
518
608
  # auth_names
519
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
609
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
520
610
 
521
611
  new_options = opts.merge(
522
612
  :operation => :"FlowsApi.get_flow_action",
@@ -535,30 +625,33 @@ module KlaviyoAPI
535
625
  return data, status_code, headers
536
626
  end
537
627
 
538
- # Get Flow For Flow Action
628
+ # Get Flow for Flow Action
539
629
  # Get the flow associated with the given action ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `flows:read`
540
630
  # @param id [String]
541
631
  # @param [Hash] opts the optional parameters
542
632
  # @option opts [Array<String>] :fields_flow For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
543
633
  # @return [Hash<String, Object>]
544
- def get_flow_action_flow(id, opts = {})
545
- data, _status_code, _headers = get_flow_action_flow_with_http_info(id, opts)
634
+ def get_flow_for_flow_action(id, opts = {})
635
+ data, _status_code, _headers = get_flow_for_flow_action_with_http_info(id, opts)
546
636
  data
547
637
  end
548
638
 
549
- # Get Flow For Flow Action
639
+ # alias of `get_flow_for_flow_action`
640
+ alias get_flow_action_flow get_flow_for_flow_action
641
+
642
+ # Get Flow for Flow Action
550
643
  # Get the flow associated with the given action ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;3/s&#x60;&lt;br&gt;Steady: &#x60;60/m&#x60; **Scopes:** &#x60;flows:read&#x60;
551
644
  # @param id [String]
552
645
  # @param [Hash] opts the optional parameters
553
646
  # @option opts [Array<String>] :fields_flow For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
554
647
  # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
555
- def get_flow_action_flow_with_http_info(id, opts = {})
648
+ def get_flow_for_flow_action_with_http_info(id, opts = {})
556
649
  if @api_client.config.debugging
557
- @api_client.config.logger.debug 'Calling API: FlowsApi.get_flow_action_flow ...'
650
+ @api_client.config.logger.debug 'Calling API: FlowsApi.get_flow_for_flow_action ...'
558
651
  end
559
652
  # verify the required parameter 'id' is set
560
653
  if @api_client.config.client_side_validation && id.nil?
561
- fail ArgumentError, "Missing the required parameter 'id' when calling FlowsApi.get_flow_action_flow"
654
+ fail ArgumentError, "Missing the required parameter 'id' when calling FlowsApi.get_flow_for_flow_action"
562
655
  end
563
656
  allowable_values = ["name", "status", "archived", "created", "updated", "trigger_type"]
564
657
  if @api_client.config.client_side_validation && opts[:'fields_flow'] && !opts[:'fields_flow'].all? { |item| allowable_values.include?(item) }
@@ -588,10 +681,10 @@ module KlaviyoAPI
588
681
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
589
682
 
590
683
  # auth_names
591
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
684
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
592
685
 
593
686
  new_options = opts.merge(
594
- :operation => :"FlowsApi.get_flow_action_flow",
687
+ :operation => :"FlowsApi.get_flow_for_flow_action",
595
688
  :header_params => header_params,
596
689
  :query_params => query_params,
597
690
  :form_params => form_params,
@@ -602,11 +695,14 @@ module KlaviyoAPI
602
695
 
603
696
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
604
697
  if @api_client.config.debugging
605
- @api_client.config.logger.debug "API called: FlowsApi#get_flow_action_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
698
+ @api_client.config.logger.debug "API called: FlowsApi#get_flow_for_flow_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
606
699
  end
607
700
  return data, status_code, headers
608
701
  end
609
702
 
703
+ # alias of `get_flow_for_flow_action_with_http_info`
704
+ alias get_flow_action_flow_with_http_info get_flow_for_flow_action_with_http_info
705
+
610
706
  # Get Flow ID for Flow Action
611
707
  # Get the flow associated with the given action ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `flows:read`
612
708
  # @param id [String]
@@ -656,7 +752,7 @@ module KlaviyoAPI
656
752
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
657
753
 
658
754
  # auth_names
659
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
755
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
660
756
 
661
757
  new_options = opts.merge(
662
758
  :operation => :"FlowsApi.get_flow_id_for_flow_action",
@@ -752,7 +848,7 @@ module KlaviyoAPI
752
848
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
753
849
 
754
850
  # auth_names
755
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
851
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
756
852
 
757
853
  new_options = opts.merge(
758
854
  :operation => :"FlowsApi.get_flow_message",
@@ -771,150 +867,6 @@ module KlaviyoAPI
771
867
  return data, status_code, headers
772
868
  end
773
869
 
774
- # Get Flow Action For Message
775
- # Get the flow action for a flow message with the given message ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `flows:read`
776
- # @param id [String]
777
- # @param [Hash] opts the optional parameters
778
- # @option opts [Array<String>] :fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
779
- # @return [Hash<String, Object>]
780
- def get_flow_message_action(id, opts = {})
781
- data, _status_code, _headers = get_flow_message_action_with_http_info(id, opts)
782
- data
783
- end
784
-
785
- # Get Flow Action For Message
786
- # Get the flow action for a flow message with the given message ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;3/s&#x60;&lt;br&gt;Steady: &#x60;60/m&#x60; **Scopes:** &#x60;flows:read&#x60;
787
- # @param id [String]
788
- # @param [Hash] opts the optional parameters
789
- # @option opts [Array<String>] :fields_flow_action For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
790
- # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
791
- def get_flow_message_action_with_http_info(id, opts = {})
792
- if @api_client.config.debugging
793
- @api_client.config.logger.debug 'Calling API: FlowsApi.get_flow_message_action ...'
794
- end
795
- # verify the required parameter 'id' is set
796
- if @api_client.config.client_side_validation && id.nil?
797
- fail ArgumentError, "Missing the required parameter 'id' when calling FlowsApi.get_flow_message_action"
798
- end
799
- allowable_values = ["action_type", "status", "created", "updated", "settings", "tracking_options", "tracking_options.add_utm", "tracking_options.utm_params", "tracking_options.is_tracking_opens", "tracking_options.is_tracking_clicks", "send_options", "send_options.use_smart_sending", "send_options.is_transactional", "render_options", "render_options.shorten_links", "render_options.add_org_prefix", "render_options.add_info_link", "render_options.add_opt_out_language"]
800
- if @api_client.config.client_side_validation && opts[:'fields_flow_action'] && !opts[:'fields_flow_action'].all? { |item| allowable_values.include?(item) }
801
- fail ArgumentError, "invalid value for \"fields_flow_action\", must include one of #{allowable_values}"
802
- end
803
- # resource path
804
- local_var_path = '/api/flow-messages/{id}/flow-action'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
805
-
806
- # query parameters
807
- query_params = opts[:query_params] || {}
808
- query_params[:'fields[flow-action]'] = @api_client.build_collection_param(opts[:'fields_flow_action'], :csv) if !opts[:'fields_flow_action'].nil?
809
-
810
- # header parameters
811
- header_params = opts[:header_params] || {}
812
- # klaviyo api revision
813
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
814
- # HTTP header 'Accept' (if needed)
815
- header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
816
-
817
- # form parameters
818
- form_params = opts[:form_params] || {}
819
-
820
- # http body (model)
821
- post_body = opts[:debug_body]
822
-
823
- # return_type
824
- return_type = opts[:debug_return_type] || 'Hash<String, Object>'
825
-
826
- # auth_names
827
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
828
-
829
- new_options = opts.merge(
830
- :operation => :"FlowsApi.get_flow_message_action",
831
- :header_params => header_params,
832
- :query_params => query_params,
833
- :form_params => form_params,
834
- :body => post_body,
835
- :auth_names => auth_names,
836
- :return_type => return_type
837
- )
838
-
839
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
840
- if @api_client.config.debugging
841
- @api_client.config.logger.debug "API called: FlowsApi#get_flow_message_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
842
- end
843
- return data, status_code, headers
844
- end
845
-
846
- # Get Flow Tags
847
- # Return all tags associated with the given flow ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `flows:read` `tags:read`
848
- # @param id [String]
849
- # @param [Hash] opts the optional parameters
850
- # @option opts [Array<String>] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
851
- # @return [Hash<String, Object>]
852
- def get_flow_tags(id, opts = {})
853
- data, _status_code, _headers = get_flow_tags_with_http_info(id, opts)
854
- data
855
- end
856
-
857
- # Get Flow Tags
858
- # Return all tags associated with the given flow ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;3/s&#x60;&lt;br&gt;Steady: &#x60;60/m&#x60; **Scopes:** &#x60;flows:read&#x60; &#x60;tags:read&#x60;
859
- # @param id [String]
860
- # @param [Hash] opts the optional parameters
861
- # @option opts [Array<String>] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
862
- # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
863
- def get_flow_tags_with_http_info(id, opts = {})
864
- if @api_client.config.debugging
865
- @api_client.config.logger.debug 'Calling API: FlowsApi.get_flow_tags ...'
866
- end
867
- # verify the required parameter 'id' is set
868
- if @api_client.config.client_side_validation && id.nil?
869
- fail ArgumentError, "Missing the required parameter 'id' when calling FlowsApi.get_flow_tags"
870
- end
871
- allowable_values = ["name"]
872
- if @api_client.config.client_side_validation && opts[:'fields_tag'] && !opts[:'fields_tag'].all? { |item| allowable_values.include?(item) }
873
- fail ArgumentError, "invalid value for \"fields_tag\", must include one of #{allowable_values}"
874
- end
875
- # resource path
876
- local_var_path = '/api/flows/{id}/tags'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
877
-
878
- # query parameters
879
- query_params = opts[:query_params] || {}
880
- query_params[:'fields[tag]'] = @api_client.build_collection_param(opts[:'fields_tag'], :csv) if !opts[:'fields_tag'].nil?
881
-
882
- # header parameters
883
- header_params = opts[:header_params] || {}
884
- # klaviyo api revision
885
- header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
886
- # HTTP header 'Accept' (if needed)
887
- header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
888
-
889
- # form parameters
890
- form_params = opts[:form_params] || {}
891
-
892
- # http body (model)
893
- post_body = opts[:debug_body]
894
-
895
- # return_type
896
- return_type = opts[:debug_return_type] || 'Hash<String, Object>'
897
-
898
- # auth_names
899
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
900
-
901
- new_options = opts.merge(
902
- :operation => :"FlowsApi.get_flow_tags",
903
- :header_params => header_params,
904
- :query_params => query_params,
905
- :form_params => form_params,
906
- :body => post_body,
907
- :auth_names => auth_names,
908
- :return_type => return_type
909
- )
910
-
911
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
912
- if @api_client.config.debugging
913
- @api_client.config.logger.debug "API called: FlowsApi#get_flow_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
914
- end
915
- return data, status_code, headers
916
- end
917
-
918
870
  # Get Flows
919
871
  # Get all flows in an account. Returns a maximum of 50 flows per request, which can be paginated with cursor-based pagination.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `flows:read`
920
872
  # @param [Hash] opts the optional parameters
@@ -1007,7 +959,7 @@ module KlaviyoAPI
1007
959
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1008
960
 
1009
961
  # auth_names
1010
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
962
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
1011
963
 
1012
964
  new_options = opts.merge(
1013
965
  :operation => :"FlowsApi.get_flows",
@@ -1099,7 +1051,7 @@ module KlaviyoAPI
1099
1051
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1100
1052
 
1101
1053
  # auth_names
1102
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1054
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
1103
1055
 
1104
1056
  new_options = opts.merge(
1105
1057
  :operation => :"FlowsApi.get_message_ids_for_flow_action",
@@ -1198,7 +1150,7 @@ module KlaviyoAPI
1198
1150
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1199
1151
 
1200
1152
  # auth_names
1201
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1153
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
1202
1154
 
1203
1155
  new_options = opts.merge(
1204
1156
  :operation => :"FlowsApi.get_messages_for_flow_action",
@@ -1269,7 +1221,7 @@ module KlaviyoAPI
1269
1221
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1270
1222
 
1271
1223
  # auth_names
1272
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1224
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
1273
1225
 
1274
1226
  new_options = opts.merge(
1275
1227
  :operation => :"FlowsApi.get_tag_ids_for_flow",
@@ -1291,6 +1243,84 @@ module KlaviyoAPI
1291
1243
  # alias of `get_tag_ids_for_flow_with_http_info`
1292
1244
  alias get_flow_relationships_tags_with_http_info get_tag_ids_for_flow_with_http_info
1293
1245
 
1246
+ # Get Tags for Flow
1247
+ # Return all tags associated with the given flow ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `flows:read` `tags:read`
1248
+ # @param id [String]
1249
+ # @param [Hash] opts the optional parameters
1250
+ # @option opts [Array<String>] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
1251
+ # @return [Hash<String, Object>]
1252
+ def get_tags_for_flow(id, opts = {})
1253
+ data, _status_code, _headers = get_tags_for_flow_with_http_info(id, opts)
1254
+ data
1255
+ end
1256
+
1257
+ # alias of `get_tags_for_flow`
1258
+ alias get_flow_tags get_tags_for_flow
1259
+
1260
+ # Get Tags for Flow
1261
+ # Return all tags associated with the given flow ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;3/s&#x60;&lt;br&gt;Steady: &#x60;60/m&#x60; **Scopes:** &#x60;flows:read&#x60; &#x60;tags:read&#x60;
1262
+ # @param id [String]
1263
+ # @param [Hash] opts the optional parameters
1264
+ # @option opts [Array<String>] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2024-10-15/reference/api-overview#sparse-fieldsets
1265
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
1266
+ def get_tags_for_flow_with_http_info(id, opts = {})
1267
+ if @api_client.config.debugging
1268
+ @api_client.config.logger.debug 'Calling API: FlowsApi.get_tags_for_flow ...'
1269
+ end
1270
+ # verify the required parameter 'id' is set
1271
+ if @api_client.config.client_side_validation && id.nil?
1272
+ fail ArgumentError, "Missing the required parameter 'id' when calling FlowsApi.get_tags_for_flow"
1273
+ end
1274
+ allowable_values = ["name"]
1275
+ if @api_client.config.client_side_validation && opts[:'fields_tag'] && !opts[:'fields_tag'].all? { |item| allowable_values.include?(item) }
1276
+ fail ArgumentError, "invalid value for \"fields_tag\", must include one of #{allowable_values}"
1277
+ end
1278
+ # resource path
1279
+ local_var_path = '/api/flows/{id}/tags'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1280
+
1281
+ # query parameters
1282
+ query_params = opts[:query_params] || {}
1283
+ query_params[:'fields[tag]'] = @api_client.build_collection_param(opts[:'fields_tag'], :csv) if !opts[:'fields_tag'].nil?
1284
+
1285
+ # header parameters
1286
+ header_params = opts[:header_params] || {}
1287
+ # klaviyo api revision
1288
+ header_params['revision'] = ENV['KLAVIYO_API_REVISION'] || ENV['API_REVISION'] || "2024-10-15"
1289
+ # HTTP header 'Accept' (if needed)
1290
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
1291
+
1292
+ # form parameters
1293
+ form_params = opts[:form_params] || {}
1294
+
1295
+ # http body (model)
1296
+ post_body = opts[:debug_body]
1297
+
1298
+ # return_type
1299
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1300
+
1301
+ # auth_names
1302
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
1303
+
1304
+ new_options = opts.merge(
1305
+ :operation => :"FlowsApi.get_tags_for_flow",
1306
+ :header_params => header_params,
1307
+ :query_params => query_params,
1308
+ :form_params => form_params,
1309
+ :body => post_body,
1310
+ :auth_names => auth_names,
1311
+ :return_type => return_type
1312
+ )
1313
+
1314
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1315
+ if @api_client.config.debugging
1316
+ @api_client.config.logger.debug "API called: FlowsApi#get_tags_for_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1317
+ end
1318
+ return data, status_code, headers
1319
+ end
1320
+
1321
+ # alias of `get_tags_for_flow_with_http_info`
1322
+ alias get_flow_tags_with_http_info get_tags_for_flow_with_http_info
1323
+
1294
1324
  # Get Template for Flow Message
1295
1325
  # Return the related template<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `templates:read`
1296
1326
  # @param id [String]
@@ -1347,7 +1377,7 @@ module KlaviyoAPI
1347
1377
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1348
1378
 
1349
1379
  # auth_names
1350
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1380
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
1351
1381
 
1352
1382
  new_options = opts.merge(
1353
1383
  :operation => :"FlowsApi.get_template_for_flow_message",
@@ -1418,7 +1448,7 @@ module KlaviyoAPI
1418
1448
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1419
1449
 
1420
1450
  # auth_names
1421
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1451
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
1422
1452
 
1423
1453
  new_options = opts.merge(
1424
1454
  :operation => :"FlowsApi.get_template_id_for_flow_message",
@@ -1497,7 +1527,7 @@ module KlaviyoAPI
1497
1527
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1498
1528
 
1499
1529
  # auth_names
1500
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1530
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
1501
1531
 
1502
1532
  new_options = opts.merge(
1503
1533
  :operation => :"FlowsApi.update_flow",
@@ -86,7 +86,7 @@ module KlaviyoAPI
86
86
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
87
87
 
88
88
  # auth_names
89
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
89
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
90
90
 
91
91
  new_options = opts.merge(
92
92
  :operation => :"FormsApi.get_form",
@@ -161,7 +161,7 @@ module KlaviyoAPI
161
161
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
162
162
 
163
163
  # auth_names
164
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
164
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
165
165
 
166
166
  new_options = opts.merge(
167
167
  :operation => :"FormsApi.get_form_for_form_version",
@@ -232,7 +232,7 @@ module KlaviyoAPI
232
232
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
233
233
 
234
234
  # auth_names
235
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
235
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
236
236
 
237
237
  new_options = opts.merge(
238
238
  :operation => :"FormsApi.get_form_id_for_form_version",
@@ -307,7 +307,7 @@ module KlaviyoAPI
307
307
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
308
308
 
309
309
  # auth_names
310
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
310
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
311
311
 
312
312
  new_options = opts.merge(
313
313
  :operation => :"FormsApi.get_form_version",
@@ -397,7 +397,7 @@ module KlaviyoAPI
397
397
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
398
398
 
399
399
  # auth_names
400
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
400
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
401
401
 
402
402
  new_options = opts.merge(
403
403
  :operation => :"FormsApi.get_forms",
@@ -429,6 +429,9 @@ module KlaviyoAPI
429
429
  # alias of `get_version_ids_for_form`
430
430
  alias get_form_relationships_form_versions get_version_ids_for_form
431
431
 
432
+ # alias of `get_version_ids_for_form`
433
+ alias get_form_relationships_versions get_version_ids_for_form
434
+
432
435
  # Get Version IDs for Form
433
436
  # Get the IDs of the form versions for the given form.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;3/s&#x60;&lt;br&gt;Steady: &#x60;60/m&#x60; **Scopes:** &#x60;forms:read&#x60;
434
437
  # @param id [String] The ID of the form
@@ -465,7 +468,7 @@ module KlaviyoAPI
465
468
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
466
469
 
467
470
  # auth_names
468
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
471
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
469
472
 
470
473
  new_options = opts.merge(
471
474
  :operation => :"FormsApi.get_version_ids_for_form",
@@ -487,6 +490,9 @@ module KlaviyoAPI
487
490
  # alias of `get_version_ids_for_form_with_http_info`
488
491
  alias get_form_relationships_form_versions_with_http_info get_version_ids_for_form_with_http_info
489
492
 
493
+ # alias of `get_version_ids_for_form_with_http_info`
494
+ alias get_form_relationships_versions_with_http_info get_version_ids_for_form_with_http_info
495
+
490
496
  # Get Versions for Form
491
497
  # Get the form versions for the given form.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `forms:read`
492
498
  # @param id [String] The ID of the form
@@ -505,6 +511,9 @@ module KlaviyoAPI
505
511
  # alias of `get_versions_for_form`
506
512
  alias get_form_form_versions get_versions_for_form
507
513
 
514
+ # alias of `get_versions_for_form`
515
+ alias get_form_versions get_versions_for_form
516
+
508
517
  # Get Versions for Form
509
518
  # Get the form versions for the given form.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;3/s&#x60;&lt;br&gt;Steady: &#x60;60/m&#x60; **Scopes:** &#x60;forms:read&#x60;
510
519
  # @param id [String] The ID of the form
@@ -563,7 +572,7 @@ module KlaviyoAPI
563
572
  return_type = opts[:debug_return_type] || 'Hash<String, Object>'
564
573
 
565
574
  # auth_names
566
- auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
575
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key', 'OAuth']
567
576
 
568
577
  new_options = opts.merge(
569
578
  :operation => :"FormsApi.get_versions_for_form",
@@ -584,5 +593,8 @@ module KlaviyoAPI
584
593
 
585
594
  # alias of `get_versions_for_form_with_http_info`
586
595
  alias get_form_form_versions_with_http_info get_versions_for_form_with_http_info
596
+
597
+ # alias of `get_versions_for_form_with_http_info`
598
+ alias get_form_versions_with_http_info get_versions_for_form_with_http_info
587
599
  end
588
600
  end