klaviyo-api-sdk 17.0.0 → 18.0.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 (201) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +932 -414
  4. data/klaviyo-api-sdk.gemspec +1 -1
  5. data/lib/klaviyo-api-sdk/api/accounts_api.rb +12 -12
  6. data/lib/klaviyo-api-sdk/api/campaigns_api.rb +215 -155
  7. data/lib/klaviyo-api-sdk/api/catalogs_api.rb +585 -381
  8. data/lib/klaviyo-api-sdk/api/client_api.rb +100 -0
  9. data/lib/klaviyo-api-sdk/api/conversations_api.rb +3 -3
  10. data/lib/klaviyo-api-sdk/api/coupons_api.rb +187 -108
  11. data/lib/klaviyo-api-sdk/api/custom_objects_api.rb +2755 -83
  12. data/lib/klaviyo-api-sdk/api/data_privacy_api.rb +3 -3
  13. data/lib/klaviyo-api-sdk/api/events_api.rb +72 -58
  14. data/lib/klaviyo-api-sdk/api/flows_api.rb +238 -152
  15. data/lib/klaviyo-api-sdk/api/forms_api.rb +81 -60
  16. data/lib/klaviyo-api-sdk/api/images_api.rb +48 -27
  17. data/lib/klaviyo-api-sdk/api/lists_api.rb +113 -88
  18. data/lib/klaviyo-api-sdk/api/metrics_api.rb +184 -156
  19. data/lib/klaviyo-api-sdk/api/profiles_api.rb +445 -226
  20. data/lib/klaviyo-api-sdk/api/reporting_api.rb +76 -27
  21. data/lib/klaviyo-api-sdk/api/reviews_api.rb +38 -31
  22. data/lib/klaviyo-api-sdk/api/segments_api.rb +107 -82
  23. data/lib/klaviyo-api-sdk/api/tags_api.rb +164 -128
  24. data/lib/klaviyo-api-sdk/api/templates_api.rb +113 -60
  25. data/lib/klaviyo-api-sdk/api/tracking_settings_api.rb +24 -17
  26. data/lib/klaviyo-api-sdk/api/web_feeds_api.rb +41 -27
  27. data/lib/klaviyo-api-sdk/api/webhooks_api.rb +73 -31
  28. data/lib/klaviyo-api-sdk/api_client.rb +1 -1
  29. data/lib/klaviyo-api-sdk/models/action_output_condition.rb +1 -1
  30. data/lib/klaviyo-api-sdk/models/action_output_condition_filter.rb +78 -195
  31. data/lib/klaviyo-api-sdk/models/action_output_split_action_data.rb +2 -6
  32. data/lib/klaviyo-api-sdk/models/{flow_push_notification_additional_filters.rb → action_output_split_action_data_action_output_filter.rb} +4 -4
  33. data/lib/klaviyo-api-sdk/models/{action_output_condition_condition_group.rb → action_output_split_action_data_action_output_filter_condition_groups_inner.rb} +3 -3
  34. data/lib/klaviyo-api-sdk/models/age_gate_properties.rb +11 -1
  35. data/lib/klaviyo-api-sdk/models/api_schema_property.rb +301 -0
  36. data/lib/klaviyo-api-sdk/models/back_in_stock_email_consent_checkbox_properties.rb +11 -1
  37. data/lib/klaviyo-api-sdk/models/base_event_create_query_bulk_entry_resource_object_attributes.rb +15 -2
  38. data/lib/klaviyo-api-sdk/models/base_style_properties.rb +15 -5
  39. data/lib/klaviyo-api-sdk/models/button_action.rb +1 -0
  40. data/lib/klaviyo-api-sdk/models/button_properties.rb +11 -1
  41. data/lib/klaviyo-api-sdk/models/button_styles.rb +25 -3
  42. data/lib/klaviyo-api-sdk/models/{action_output_condition_filter2.rb → button_styles_height.rb} +3 -7
  43. data/lib/klaviyo-api-sdk/models/cart_content.rb +277 -0
  44. data/lib/klaviyo-api-sdk/models/cart_content_properties.rb +236 -0
  45. data/lib/klaviyo-api-sdk/models/checkboxes_properties.rb +11 -1
  46. data/lib/klaviyo-api-sdk/models/conditional_branch_action_data_profile_filter_condition_groups_inner_conditions_inner.rb +5 -0
  47. data/lib/klaviyo-api-sdk/models/constant_property_mapping.rb +287 -0
  48. data/lib/klaviyo-api-sdk/models/{price_drop_condition_filter2.rb → constant_property_mapping_value.rb} +6 -16
  49. data/lib/klaviyo-api-sdk/models/content_experiment_action.rb +1 -1
  50. data/lib/klaviyo-api-sdk/models/{send_push_notification_action_content_experiment_action_data.rb → content_experiment_action_data.rb} +6 -5
  51. data/lib/klaviyo-api-sdk/models/{send_push_notification_action_current_experiment.rb → content_experiment_action_data_current_experiment.rb} +6 -6
  52. data/lib/klaviyo-api-sdk/models/{low_inventory_condition_filter2.rb → content_experiment_action_data_main_action.rb} +3 -16
  53. data/lib/klaviyo-api-sdk/models/countdown_timer_properties.rb +11 -1
  54. data/lib/klaviyo-api-sdk/models/coupon_properties.rb +11 -1
  55. data/lib/klaviyo-api-sdk/models/custom_css.rb +231 -0
  56. data/lib/klaviyo-api-sdk/models/custom_html.rb +292 -0
  57. data/lib/klaviyo-api-sdk/models/custom_html_properties.rb +263 -0
  58. data/lib/klaviyo-api-sdk/models/custom_object_date_trigger.rb +450 -0
  59. data/lib/klaviyo-api-sdk/models/custom_object_property_condition.rb +1 -1
  60. data/lib/klaviyo-api-sdk/models/custom_object_relationship_source.rb +328 -0
  61. data/lib/klaviyo-api-sdk/models/date_properties.rb +11 -1
  62. data/lib/klaviyo-api-sdk/models/display_options.rb +24 -4
  63. data/lib/klaviyo-api-sdk/models/dropdown_properties.rb +11 -1
  64. data/lib/klaviyo-api-sdk/models/email_properties.rb +11 -1
  65. data/lib/klaviyo-api-sdk/models/email_subscription_parameters.rb +13 -9
  66. data/lib/klaviyo-api-sdk/models/email_unsubscription_parameters.rb +13 -9
  67. data/lib/klaviyo-api-sdk/models/embedded_object_schema_resource_object.rb +237 -0
  68. data/lib/klaviyo-api-sdk/models/embedded_object_schema_resource_object_attributes.rb +292 -0
  69. data/lib/klaviyo-api-sdk/models/embedded_object_schema_resource_object_attributes_source_mapping.rb +224 -0
  70. data/lib/klaviyo-api-sdk/models/event_create_query_v2_resource_object_attributes.rb +15 -2
  71. data/lib/klaviyo-api-sdk/models/events_bulk_create_query_resource_object_attributes.rb +14 -1
  72. data/lib/klaviyo-api-sdk/models/flow_definition_profile_filter_condition_groups_inner_conditions_inner.rb +5 -0
  73. data/lib/klaviyo-api-sdk/models/flow_definition_triggers_inner.rb +1 -0
  74. data/lib/klaviyo-api-sdk/models/flow_email.rb +1 -1
  75. data/lib/klaviyo-api-sdk/models/flow_push_notification.rb +14 -4
  76. data/lib/klaviyo-api-sdk/models/flow_sms.rb +15 -2
  77. data/lib/klaviyo-api-sdk/models/form_create_query_resource_object_attributes.rb +2 -2
  78. data/lib/klaviyo-api-sdk/models/html_text_properties.rb +11 -1
  79. data/lib/klaviyo-api-sdk/models/iaf_deeplink_to_screen.rb +305 -0
  80. data/lib/klaviyo-api-sdk/models/iaf_deeplink_to_screen_properties.rb +220 -0
  81. data/lib/klaviyo-api-sdk/models/image_action.rb +1 -0
  82. data/lib/klaviyo-api-sdk/models/image_block_cropping_properties.rb +0 -35
  83. data/lib/klaviyo-api-sdk/models/image_properties.rb +11 -1
  84. data/lib/klaviyo-api-sdk/models/low_inventory_condition.rb +1 -1
  85. data/lib/klaviyo-api-sdk/models/low_inventory_trigger.rb +2 -6
  86. data/lib/klaviyo-api-sdk/models/{low_inventory_condition_filter.rb → low_inventory_trigger_trigger_filter.rb} +4 -4
  87. data/lib/klaviyo-api-sdk/models/{low_inventory_condition_condition_group.rb → low_inventory_trigger_trigger_filter_condition_groups_inner.rb} +3 -3
  88. data/lib/klaviyo-api-sdk/models/metric_aggregate_query_resource_object_attributes.rb +2 -2
  89. data/lib/klaviyo-api-sdk/models/metric_property_condition.rb +1 -1
  90. data/lib/klaviyo-api-sdk/models/metric_property_condition_filter.rb +87 -195
  91. data/lib/klaviyo-api-sdk/models/metric_trigger.rb +2 -1
  92. data/lib/klaviyo-api-sdk/models/{flow_email_additional_filters.rb → metric_trigger_trigger_filter.rb} +4 -4
  93. data/lib/klaviyo-api-sdk/models/{flow_email_additional_filters_condition_groups_inner.rb → metric_trigger_trigger_filter_condition_groups_inner.rb} +4 -4
  94. data/lib/klaviyo-api-sdk/models/mobile_push_content_create.rb +18 -5
  95. data/lib/klaviyo-api-sdk/models/mobile_push_content_update.rb +18 -5
  96. data/lib/klaviyo-api-sdk/models/mobile_push_options_on_open.rb +2 -1
  97. data/lib/klaviyo-api-sdk/models/multi_branch_split_branch_branch_filter_condition_groups_inner_conditions_inner.rb +5 -0
  98. data/lib/klaviyo-api-sdk/models/object_record_bulk_delete_job_enum.rb +35 -0
  99. data/lib/klaviyo-api-sdk/models/object_record_delete_job_create_query.rb +223 -0
  100. data/lib/klaviyo-api-sdk/models/object_record_delete_job_create_query_resource_object.rb +237 -0
  101. data/lib/klaviyo-api-sdk/models/{flow_push_notification_additional_filters_condition_groups_inner.rb → object_record_delete_job_create_query_resource_object_relationships.rb} +13 -15
  102. data/lib/klaviyo-api-sdk/models/object_record_delete_job_create_query_resource_object_relationships_object_records.rb +220 -0
  103. data/lib/klaviyo-api-sdk/models/object_record_delete_job_rels_records_data_inner.rb +238 -0
  104. data/lib/klaviyo-api-sdk/models/object_record_enum.rb +35 -0
  105. data/lib/klaviyo-api-sdk/models/object_schema_create_query.rb +223 -0
  106. data/lib/klaviyo-api-sdk/models/object_schema_create_query_resource_object.rb +246 -0
  107. data/lib/klaviyo-api-sdk/models/object_schema_create_query_resource_object_attributes.rb +322 -0
  108. data/lib/klaviyo-api-sdk/models/object_schema_create_query_resource_object_relationships.rb +218 -0
  109. data/lib/klaviyo-api-sdk/models/object_schema_create_query_resource_object_relationships_object_type.rb +218 -0
  110. data/lib/klaviyo-api-sdk/models/object_schema_create_query_resource_object_relationships_object_type_data.rb +238 -0
  111. data/lib/klaviyo-api-sdk/models/object_schema_enum.rb +35 -0
  112. data/lib/klaviyo-api-sdk/models/object_schema_partial_update_query.rb +223 -0
  113. data/lib/klaviyo-api-sdk/models/object_schema_partial_update_query_resource_object.rb +252 -0
  114. data/lib/klaviyo-api-sdk/models/object_schema_partial_update_query_resource_object_attributes.rb +302 -0
  115. data/lib/klaviyo-api-sdk/models/object_schema_relationship_create_meta.rb +237 -0
  116. data/lib/klaviyo-api-sdk/models/{metric_property_condition_condition_group.rb → object_schema_relationship_create_query.rb} +14 -14
  117. data/lib/klaviyo-api-sdk/models/{flow_sms_additional_filters_condition_groups_inner.rb → object_schema_relationship_create_query_data_inner.rb} +37 -15
  118. data/lib/klaviyo-api-sdk/models/object_schema_relationship_delete_meta.rb +224 -0
  119. data/lib/klaviyo-api-sdk/models/object_schema_relationship_delete_query.rb +225 -0
  120. data/lib/klaviyo-api-sdk/models/object_schema_relationship_delete_query_data_inner.rb +247 -0
  121. data/lib/klaviyo-api-sdk/models/object_schema_relationship_partial_update_query.rb +223 -0
  122. data/lib/klaviyo-api-sdk/models/object_schema_relationship_partial_update_query_data.rb +247 -0
  123. data/lib/klaviyo-api-sdk/models/object_schema_relationship_update_meta.rb +246 -0
  124. data/lib/klaviyo-api-sdk/models/object_type_create_query.rb +223 -0
  125. data/lib/klaviyo-api-sdk/models/object_type_create_query_resource_object.rb +237 -0
  126. data/lib/klaviyo-api-sdk/models/object_type_create_query_resource_object_attributes.rb +307 -0
  127. data/lib/klaviyo-api-sdk/models/object_type_create_query_resource_object_attributes_object_schema.rb +224 -0
  128. data/lib/klaviyo-api-sdk/models/object_type_enum.rb +35 -0
  129. data/lib/klaviyo-api-sdk/models/onsite_profile_meta.rb +13 -4
  130. data/lib/klaviyo-api-sdk/models/open_tracking_subscription_parameters.rb +258 -0
  131. data/lib/klaviyo-api-sdk/models/open_tracking_unsubscription_parameters.rb +258 -0
  132. data/lib/klaviyo-api-sdk/models/opt_in_code_properties.rb +11 -1
  133. data/lib/klaviyo-api-sdk/models/patch_identifiers.rb +227 -0
  134. data/lib/klaviyo-api-sdk/models/phone_number_properties.rb +11 -1
  135. data/lib/klaviyo-api-sdk/models/price_drop_condition.rb +1 -1
  136. data/lib/klaviyo-api-sdk/models/price_drop_trigger.rb +2 -6
  137. data/lib/klaviyo-api-sdk/models/{flow_sms_additional_filters.rb → price_drop_trigger_trigger_filter.rb} +4 -4
  138. data/lib/klaviyo-api-sdk/models/{price_drop_condition_condition_group.rb → price_drop_trigger_trigger_filter_condition_groups_inner.rb} +3 -3
  139. data/lib/klaviyo-api-sdk/models/profile_event_tracked_properties.rb +19 -9
  140. data/lib/klaviyo-api-sdk/models/profile_has_not_received_email_message_condition.rb +1 -1
  141. data/lib/klaviyo-api-sdk/models/{profile_has_not_received_push_message_condition_timeframe_filter.rb → profile_has_not_received_email_message_condition_timeframe_filter.rb} +1 -1
  142. data/lib/klaviyo-api-sdk/models/profile_has_not_received_push_message_condition.rb +1 -1
  143. data/lib/klaviyo-api-sdk/models/profile_has_not_received_sms_message_condition.rb +1 -1
  144. data/lib/klaviyo-api-sdk/models/profile_meta.rb +13 -4
  145. data/lib/klaviyo-api-sdk/models/profile_not_in_flow_condition.rb +1 -1
  146. data/lib/klaviyo-api-sdk/models/profile_object_schema_enum.rb +35 -0
  147. data/lib/klaviyo-api-sdk/models/profile_object_schema_relationship_create_query.rb +225 -0
  148. data/lib/klaviyo-api-sdk/models/profile_object_schema_relationship_create_query_data_inner.rb +247 -0
  149. data/lib/klaviyo-api-sdk/models/profile_object_schema_relationship_delete_query.rb +225 -0
  150. data/lib/klaviyo-api-sdk/models/profile_object_schema_relationship_delete_query_data_inner.rb +247 -0
  151. data/lib/klaviyo-api-sdk/models/profile_object_schema_relationship_partial_update_query.rb +223 -0
  152. data/lib/klaviyo-api-sdk/models/profile_object_schema_relationship_partial_update_query_data.rb +247 -0
  153. data/lib/klaviyo-api-sdk/models/profile_predictive_analytics_channel_affinity_priority_condition.rb +2 -2
  154. data/lib/klaviyo-api-sdk/models/profile_predictive_analytics_channel_affinity_rank_condition.rb +2 -2
  155. data/lib/klaviyo-api-sdk/models/profile_relationship_source.rb +330 -0
  156. data/lib/klaviyo-api-sdk/models/property_filter.rb +237 -0
  157. data/lib/klaviyo-api-sdk/models/property_source.rb +254 -0
  158. data/lib/klaviyo-api-sdk/models/push_action_button.rb +1 -5
  159. data/lib/klaviyo-api-sdk/models/push_action_button_definition.rb +261 -0
  160. data/lib/klaviyo-api-sdk/models/push_on_open_web_url.rb +268 -0
  161. data/lib/klaviyo-api-sdk/models/quote_style.rb +21 -1
  162. data/lib/klaviyo-api-sdk/models/radio_buttons_properties.rb +11 -1
  163. data/lib/klaviyo-api-sdk/models/redirect_properties.rb +2 -5
  164. data/lib/klaviyo-api-sdk/models/related_id_path.rb +273 -0
  165. data/lib/klaviyo-api-sdk/models/review_block_styles.rb +13 -13
  166. data/lib/klaviyo-api-sdk/models/review_properties.rb +11 -1
  167. data/lib/klaviyo-api-sdk/models/reviewer_name_style.rb +21 -1
  168. data/lib/klaviyo-api-sdk/models/row_v0_blocks_inner.rb +1 -0
  169. data/lib/klaviyo-api-sdk/models/signup_counter_properties.rb +11 -1
  170. data/lib/klaviyo-api-sdk/models/simple_property_mapping.rb +287 -0
  171. data/lib/klaviyo-api-sdk/models/simple_relationship_mapping.rb +287 -0
  172. data/lib/klaviyo-api-sdk/models/simple_relationship_mapping_source.rb +105 -0
  173. data/lib/klaviyo-api-sdk/models/sms_consent_checkbox_properties.rb +11 -1
  174. data/lib/klaviyo-api-sdk/models/sms_disclosure_link_text_style.rb +319 -0
  175. data/lib/klaviyo-api-sdk/models/sms_disclosure_properties.rb +11 -1
  176. data/lib/klaviyo-api-sdk/models/sms_disclosure_styles.rb +1 -1
  177. data/lib/klaviyo-api-sdk/models/source_mapping_create_query_resource_object.rb +237 -0
  178. data/lib/klaviyo-api-sdk/models/source_mapping_create_query_resource_object_attributes.rb +235 -0
  179. data/lib/klaviyo-api-sdk/models/source_mapping_create_query_resource_object_attributes_property_mappings_inner.rb +104 -0
  180. data/lib/klaviyo-api-sdk/models/source_mapping_enum.rb +35 -0
  181. data/lib/klaviyo-api-sdk/models/source_mapping_partial_update_query.rb +223 -0
  182. data/lib/klaviyo-api-sdk/models/source_mapping_partial_update_query_resource_object.rb +252 -0
  183. data/lib/klaviyo-api-sdk/models/spin_to_win_properties.rb +11 -1
  184. data/lib/klaviyo-api-sdk/models/string_phone_operator_string_array_filter.rb +1 -1
  185. data/lib/klaviyo-api-sdk/models/table_fallback_image_sub_block.rb +0 -13
  186. data/lib/klaviyo-api-sdk/models/table_image_sub_block.rb +0 -13
  187. data/lib/klaviyo-api-sdk/models/template_definition.rb +1 -0
  188. data/lib/klaviyo-api-sdk/models/text_properties.rb +11 -1
  189. data/lib/klaviyo-api-sdk/models/version.rb +39 -4
  190. data/lib/klaviyo-api-sdk/models/version_properties.rb +14 -4
  191. data/lib/klaviyo-api-sdk/models/version_styles.rb +15 -6
  192. data/lib/klaviyo-api-sdk/models/version_triggers_inner.rb +1 -0
  193. data/lib/klaviyo-api-sdk.rb +86 -23
  194. data/lib/klaviyo-api-sdk.rb.bak +87 -24
  195. metadata +88 -25
  196. data/lib/klaviyo-api-sdk/models/custom_object_property_condition_filter.rb +0 -117
  197. data/lib/klaviyo-api-sdk/models/flow_email_additional_filters_condition_groups_inner_conditions_inner.rb +0 -116
  198. data/lib/klaviyo-api-sdk/models/flow_push_notification_additional_filters_condition_groups_inner_conditions_inner.rb +0 -116
  199. data/lib/klaviyo-api-sdk/models/flow_sms_additional_filters_condition_groups_inner_conditions_inner.rb +0 -116
  200. data/lib/klaviyo-api-sdk/models/metric_property_condition_filter2.rb +0 -117
  201. data/lib/klaviyo-api-sdk/models/price_drop_condition_filter.rb +0 -225
@@ -31,13 +31,14 @@ module KlaviyoAPI
31
31
  # Attribute type mapping.
32
32
  def self.openapi_types
33
33
  {
34
- :'action_output_filter' => :'ActionOutputConditionFilter'
34
+ :'action_output_filter' => :'ActionOutputSplitActionDataActionOutputFilter'
35
35
  }
36
36
  end
37
37
 
38
38
  # List of attributes with nullable: true
39
39
  def self.openapi_nullable
40
40
  Set.new([
41
+ :'action_output_filter'
41
42
  ])
42
43
  end
43
44
 
@@ -65,17 +66,12 @@ module KlaviyoAPI
65
66
  # @return Array for valid properties with the reasons
66
67
  def list_invalid_properties
67
68
  invalid_properties = Array.new
68
- if @action_output_filter.nil?
69
- invalid_properties.push('invalid value for "action_output_filter", action_output_filter cannot be nil.')
70
- end
71
-
72
69
  invalid_properties
73
70
  end
74
71
 
75
72
  # Check to see if the all the properties in the model are valid
76
73
  # @return true if the model is valid
77
74
  def valid?
78
- return false if @action_output_filter.nil?
79
75
  true
80
76
  end
81
77
 
@@ -13,7 +13,7 @@ require 'date'
13
13
  require 'time'
14
14
 
15
15
  module KlaviyoAPI
16
- class FlowPushNotificationAdditionalFilters
16
+ class ActionOutputSplitActionDataActionOutputFilter
17
17
  attr_accessor :condition_groups
18
18
 
19
19
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -31,7 +31,7 @@ module KlaviyoAPI
31
31
  # Attribute type mapping.
32
32
  def self.openapi_types
33
33
  {
34
- :'condition_groups' => :'Array<FlowPushNotificationAdditionalFiltersConditionGroupsInner>'
34
+ :'condition_groups' => :'Array<ActionOutputSplitActionDataActionOutputFilterConditionGroupsInner>'
35
35
  }
36
36
  end
37
37
 
@@ -45,13 +45,13 @@ module KlaviyoAPI
45
45
  # @param [Hash] attributes Model attributes in the form of hash
46
46
  def initialize(attributes = {})
47
47
  if (!attributes.is_a?(Hash))
48
- fail ArgumentError, "The input argument (attributes) must be a hash in `KlaviyoAPI::FlowPushNotificationAdditionalFilters` initialize method"
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `KlaviyoAPI::ActionOutputSplitActionDataActionOutputFilter` initialize method"
49
49
  end
50
50
 
51
51
  # check to see if the attribute exists and convert string to symbol for hash key
52
52
  attributes = attributes.each_with_object({}) { |(k, v), h|
53
53
  if (!self.class.attribute_map.key?(k.to_sym))
54
- fail ArgumentError, "`#{k}` is not a valid attribute in `KlaviyoAPI::FlowPushNotificationAdditionalFilters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `KlaviyoAPI::ActionOutputSplitActionDataActionOutputFilter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
55
  end
56
56
  h[k.to_sym] = v
57
57
  }
@@ -13,7 +13,7 @@ require 'date'
13
13
  require 'time'
14
14
 
15
15
  module KlaviyoAPI
16
- class ActionOutputConditionConditionGroup
16
+ class ActionOutputSplitActionDataActionOutputFilterConditionGroupsInner
17
17
  attr_accessor :conditions
18
18
 
19
19
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -45,13 +45,13 @@ module KlaviyoAPI
45
45
  # @param [Hash] attributes Model attributes in the form of hash
46
46
  def initialize(attributes = {})
47
47
  if (!attributes.is_a?(Hash))
48
- fail ArgumentError, "The input argument (attributes) must be a hash in `KlaviyoAPI::ActionOutputConditionConditionGroup` initialize method"
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `KlaviyoAPI::ActionOutputSplitActionDataActionOutputFilterConditionGroupsInner` initialize method"
49
49
  end
50
50
 
51
51
  # check to see if the attribute exists and convert string to symbol for hash key
52
52
  attributes = attributes.each_with_object({}) { |(k, v), h|
53
53
  if (!self.class.attribute_map.key?(k.to_sym))
54
- fail ArgumentError, "`#{k}` is not a valid attribute in `KlaviyoAPI::ActionOutputConditionConditionGroup`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `KlaviyoAPI::ActionOutputSplitActionDataActionOutputFilterConditionGroupsInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
55
  end
56
56
  h[k.to_sym] = v
57
57
  }
@@ -16,6 +16,8 @@ module KlaviyoAPI
16
16
  class AgeGateProperties
17
17
  attr_accessor :display_device
18
18
 
19
+ attr_accessor :classname
20
+
19
21
  attr_accessor :label
20
22
 
21
23
  attr_accessor :show_label
@@ -59,6 +61,7 @@ module KlaviyoAPI
59
61
  def self.attribute_map
60
62
  {
61
63
  :'display_device' => :'display_device',
64
+ :'classname' => :'classname',
62
65
  :'label' => :'label',
63
66
  :'show_label' => :'show_label',
64
67
  :'placeholder' => :'placeholder',
@@ -79,6 +82,7 @@ module KlaviyoAPI
79
82
  def self.openapi_types
80
83
  {
81
84
  :'display_device' => :'Array<String>',
85
+ :'classname' => :'String',
82
86
  :'label' => :'String',
83
87
  :'show_label' => :'Boolean',
84
88
  :'placeholder' => :'String',
@@ -93,6 +97,7 @@ module KlaviyoAPI
93
97
  # List of attributes with nullable: true
94
98
  def self.openapi_nullable
95
99
  Set.new([
100
+ :'classname',
96
101
  :'label',
97
102
  :'placeholder',
98
103
  ])
@@ -119,6 +124,10 @@ module KlaviyoAPI
119
124
  end
120
125
  end
121
126
 
127
+ if attributes.key?(:'classname')
128
+ self.classname = attributes[:'classname']
129
+ end
130
+
122
131
  if attributes.key?(:'label')
123
132
  self.label = attributes[:'label']
124
133
  end
@@ -217,6 +226,7 @@ module KlaviyoAPI
217
226
  return true if self.equal?(o)
218
227
  self.class == o.class &&
219
228
  display_device == o.display_device &&
229
+ classname == o.classname &&
220
230
  label == o.label &&
221
231
  show_label == o.show_label &&
222
232
  placeholder == o.placeholder &&
@@ -236,7 +246,7 @@ module KlaviyoAPI
236
246
  # Calculates hash code according to all attributes.
237
247
  # @return [Integer] Hash code
238
248
  def hash
239
- [display_device, label, show_label, placeholder, error_messages, property_name, date_format, sms_country_code, required].hash
249
+ [display_device, classname, label, show_label, placeholder, error_messages, property_name, date_format, sms_country_code, required].hash
240
250
  end
241
251
 
242
252
  # Builds the object from hash
@@ -0,0 +1,301 @@
1
+ =begin
2
+ #Klaviyo API
3
+
4
+ #The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
5
+
6
+ Contact: developers@klaviyo.com
7
+ Generated by: https://openapi-generator.tech
8
+ OpenAPI Generator version: 6.2.1
9
+
10
+ =end
11
+
12
+ require 'date'
13
+ require 'time'
14
+
15
+ module KlaviyoAPI
16
+ class APISchemaProperty
17
+ # The ID of the schema property. Must be a postive integer.
18
+ attr_accessor :id
19
+
20
+ # The name of the schema property
21
+ attr_accessor :name
22
+
23
+ # The type of the schema property
24
+ attr_accessor :type
25
+
26
+ # The description of the schema property
27
+ attr_accessor :description
28
+
29
+ class EnumAttributeValidator
30
+ attr_reader :datatype
31
+ attr_reader :allowable_values
32
+
33
+ def initialize(datatype, allowable_values)
34
+ @allowable_values = allowable_values.map do |value|
35
+ case datatype.to_s
36
+ when /Integer/i
37
+ value.to_i
38
+ when /Float/i
39
+ value.to_f
40
+ else
41
+ value
42
+ end
43
+ end
44
+ end
45
+
46
+ def valid?(value)
47
+ !value || allowable_values.include?(value)
48
+ end
49
+ end
50
+
51
+ # Attribute mapping from ruby-style variable name to JSON key.
52
+ def self.attribute_map
53
+ {
54
+ :'id' => :'id',
55
+ :'name' => :'name',
56
+ :'type' => :'type',
57
+ :'description' => :'description'
58
+ }
59
+ end
60
+
61
+ # Returns all the JSON keys this model knows about
62
+ def self.acceptable_attributes
63
+ attribute_map.values
64
+ end
65
+
66
+ # Attribute type mapping.
67
+ def self.openapi_types
68
+ {
69
+ :'id' => :'Integer',
70
+ :'name' => :'String',
71
+ :'type' => :'String',
72
+ :'description' => :'String'
73
+ }
74
+ end
75
+
76
+ # List of attributes with nullable: true
77
+ def self.openapi_nullable
78
+ Set.new([
79
+ :'description'
80
+ ])
81
+ end
82
+
83
+ # Initializes the object
84
+ # @param [Hash] attributes Model attributes in the form of hash
85
+ def initialize(attributes = {})
86
+ if (!attributes.is_a?(Hash))
87
+ fail ArgumentError, "The input argument (attributes) must be a hash in `KlaviyoAPI::APISchemaProperty` initialize method"
88
+ end
89
+
90
+ # check to see if the attribute exists and convert string to symbol for hash key
91
+ attributes = attributes.each_with_object({}) { |(k, v), h|
92
+ if (!self.class.attribute_map.key?(k.to_sym))
93
+ fail ArgumentError, "`#{k}` is not a valid attribute in `KlaviyoAPI::APISchemaProperty`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
94
+ end
95
+ h[k.to_sym] = v
96
+ }
97
+
98
+ if attributes.key?(:'id')
99
+ self.id = attributes[:'id']
100
+ end
101
+
102
+ if attributes.key?(:'name')
103
+ self.name = attributes[:'name']
104
+ end
105
+
106
+ if attributes.key?(:'type')
107
+ self.type = attributes[:'type']
108
+ end
109
+
110
+ if attributes.key?(:'description')
111
+ self.description = attributes[:'description']
112
+ else
113
+ self.description = ''
114
+ end
115
+ end
116
+
117
+ # Show invalid properties with the reasons. Usually used together with valid?
118
+ # @return Array for valid properties with the reasons
119
+ def list_invalid_properties
120
+ invalid_properties = Array.new
121
+ if @id.nil?
122
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
123
+ end
124
+
125
+ if @name.nil?
126
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
127
+ end
128
+
129
+ if @type.nil?
130
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
131
+ end
132
+
133
+ invalid_properties
134
+ end
135
+
136
+ # Check to see if the all the properties in the model are valid
137
+ # @return true if the model is valid
138
+ def valid?
139
+ return false if @id.nil?
140
+ return false if @name.nil?
141
+ return false if @type.nil?
142
+ type_validator = EnumAttributeValidator.new('String', ["boolean", "float", "int", "string", "timestamp"])
143
+ return false unless type_validator.valid?(@type)
144
+ true
145
+ end
146
+
147
+ # Custom attribute writer method checking allowed values (enum).
148
+ # @param [Object] type Object to be assigned
149
+ def type=(type)
150
+ validator = EnumAttributeValidator.new('String', ["boolean", "float", "int", "string", "timestamp"])
151
+ unless validator.valid?(type)
152
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
153
+ end
154
+ @type = type
155
+ end
156
+
157
+ # Checks equality by comparing each attribute.
158
+ # @param [Object] Object to be compared
159
+ def ==(o)
160
+ return true if self.equal?(o)
161
+ self.class == o.class &&
162
+ id == o.id &&
163
+ name == o.name &&
164
+ type == o.type &&
165
+ description == o.description
166
+ end
167
+
168
+ # @see the `==` method
169
+ # @param [Object] Object to be compared
170
+ def eql?(o)
171
+ self == o
172
+ end
173
+
174
+ # Calculates hash code according to all attributes.
175
+ # @return [Integer] Hash code
176
+ def hash
177
+ [id, name, type, description].hash
178
+ end
179
+
180
+ # Builds the object from hash
181
+ # @param [Hash] attributes Model attributes in the form of hash
182
+ # @return [Object] Returns the model itself
183
+ def self.build_from_hash(attributes)
184
+ new.build_from_hash(attributes)
185
+ end
186
+
187
+ # Builds the object from hash
188
+ # @param [Hash] attributes Model attributes in the form of hash
189
+ # @return [Object] Returns the model itself
190
+ def build_from_hash(attributes)
191
+ return nil unless attributes.is_a?(Hash)
192
+ attributes = attributes.transform_keys(&:to_sym)
193
+ self.class.openapi_types.each_pair do |key, type|
194
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
195
+ self.send("#{key}=", nil)
196
+ elsif type =~ /\AArray<(.*)>/i
197
+ # check to ensure the input is an array given that the attribute
198
+ # is documented as an array but the input is not
199
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
200
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
201
+ end
202
+ elsif !attributes[self.class.attribute_map[key]].nil?
203
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
204
+ end
205
+ end
206
+
207
+ self
208
+ end
209
+
210
+ # Deserializes the data based on type
211
+ # @param string type Data type
212
+ # @param string value Value to be deserialized
213
+ # @return [Object] Deserialized data
214
+ def _deserialize(type, value)
215
+ case type.to_sym
216
+ when :Time
217
+ Time.parse(value)
218
+ when :Date
219
+ Date.parse(value)
220
+ when :String
221
+ value.to_s
222
+ when :Integer
223
+ value.to_i
224
+ when :Float
225
+ value.to_f
226
+ when :Boolean
227
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
228
+ true
229
+ else
230
+ false
231
+ end
232
+ when :Object
233
+ # generic object (usually a Hash), return directly
234
+ value
235
+ when /\AArray<(?<inner_type>.+)>\z/
236
+ inner_type = Regexp.last_match[:inner_type]
237
+ value.map { |v| _deserialize(inner_type, v) }
238
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
239
+ k_type = Regexp.last_match[:k_type]
240
+ v_type = Regexp.last_match[:v_type]
241
+ {}.tap do |hash|
242
+ value.each do |k, v|
243
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
244
+ end
245
+ end
246
+ else # model
247
+ # models (e.g. Pet) or oneOf
248
+ klass = KlaviyoAPI.const_get(type)
249
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
250
+ end
251
+ end
252
+
253
+ # Returns the string representation of the object
254
+ # @return [String] String presentation of the object
255
+ def to_s
256
+ to_hash.to_s
257
+ end
258
+
259
+ # to_body is an alias to to_hash (backward compatibility)
260
+ # @return [Hash] Returns the object in the form of hash
261
+ def to_body
262
+ to_hash
263
+ end
264
+
265
+ # Returns the object in the form of hash
266
+ # @return [Hash] Returns the object in the form of hash
267
+ def to_hash
268
+ hash = {}
269
+ self.class.attribute_map.each_pair do |attr, param|
270
+ value = self.send(attr)
271
+ if value.nil?
272
+ is_nullable = self.class.openapi_nullable.include?(attr)
273
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
274
+ end
275
+
276
+ hash[param] = _to_hash(value)
277
+ end
278
+ hash
279
+ end
280
+
281
+ # Outputs non-array value in the form of hash
282
+ # For object, use to_hash. Otherwise, just return the value
283
+ # @param [Object] value Any valid value
284
+ # @return [Hash] Returns the value in the form of hash
285
+ def _to_hash(value)
286
+ if value.is_a?(Array)
287
+ value.compact.map { |v| _to_hash(v) }
288
+ elsif value.is_a?(Hash)
289
+ {}.tap do |hash|
290
+ value.each { |k, v| hash[k] = _to_hash(v) }
291
+ end
292
+ elsif value.respond_to? :to_hash
293
+ value.to_hash
294
+ else
295
+ value
296
+ end
297
+ end
298
+
299
+ end
300
+
301
+ end
@@ -16,6 +16,8 @@ module KlaviyoAPI
16
16
  class BackInStockEmailConsentCheckboxProperties
17
17
  attr_accessor :display_device
18
18
 
19
+ attr_accessor :classname
20
+
19
21
  attr_accessor :label
20
22
 
21
23
  attr_accessor :show_label
@@ -56,6 +58,7 @@ module KlaviyoAPI
56
58
  def self.attribute_map
57
59
  {
58
60
  :'display_device' => :'display_device',
61
+ :'classname' => :'classname',
59
62
  :'label' => :'label',
60
63
  :'show_label' => :'show_label',
61
64
  :'error_messages' => :'error_messages',
@@ -75,6 +78,7 @@ module KlaviyoAPI
75
78
  def self.openapi_types
76
79
  {
77
80
  :'display_device' => :'Array<String>',
81
+ :'classname' => :'String',
78
82
  :'label' => :'String',
79
83
  :'show_label' => :'Boolean',
80
84
  :'error_messages' => :'ErrorMessages',
@@ -88,6 +92,7 @@ module KlaviyoAPI
88
92
  # List of attributes with nullable: true
89
93
  def self.openapi_nullable
90
94
  Set.new([
95
+ :'classname',
91
96
  :'label',
92
97
  ])
93
98
  end
@@ -113,6 +118,10 @@ module KlaviyoAPI
113
118
  end
114
119
  end
115
120
 
121
+ if attributes.key?(:'classname')
122
+ self.classname = attributes[:'classname']
123
+ end
124
+
116
125
  if attributes.key?(:'label')
117
126
  self.label = attributes[:'label']
118
127
  end
@@ -208,6 +217,7 @@ module KlaviyoAPI
208
217
  return true if self.equal?(o)
209
218
  self.class == o.class &&
210
219
  display_device == o.display_device &&
220
+ classname == o.classname &&
211
221
  label == o.label &&
212
222
  show_label == o.show_label &&
213
223
  error_messages == o.error_messages &&
@@ -226,7 +236,7 @@ module KlaviyoAPI
226
236
  # Calculates hash code according to all attributes.
227
237
  # @return [Integer] Hash code
228
238
  def hash
229
- [display_device, label, show_label, error_messages, required, property_name, checkbox_text, placeholder].hash
239
+ [display_device, classname, label, show_label, error_messages, required, property_name, checkbox_text, placeholder].hash
230
240
  end
231
241
 
232
242
  # Builds the object from hash
@@ -17,7 +17,7 @@ module KlaviyoAPI
17
17
  # Properties of this event (must not exceed 400 properties). The size of the event payload must not exceed 5 MB, and each string cannot be larger than 100 KB. For a full list of data limits on event payloads, see [Limitations](https://developers.klaviyo.com/en/reference/events_api_overview#limitations). Note any top-level property that is not an object can be used to create segments. The `$extra` property records any non-segmentable values that can be referenced later, e.g., HTML templates are useful on a segment but are not used to create a segment.
18
18
  attr_accessor :properties
19
19
 
20
- # When this event occurred. By default, the time the request was received will be used. The time is truncated to the second. The time must be after the year 2000 and can only be up to 1 year in the future.
20
+ # When this event occurred. By default, the time the request was received will be used. The time is truncated to the second. The time must be after the year 1990 and can only be up to 1 year in the future.
21
21
  attr_accessor :time
22
22
 
23
23
  # A numeric, monetary value to associate with this event. For example, the dollar amount of a purchase.
@@ -26,6 +26,9 @@ module KlaviyoAPI
26
26
  # The ISO 4217 currency code of the value associated with the event.
27
27
  attr_accessor :value_currency
28
28
 
29
+ # When true, the event is recorded but does NOT trigger flows. Use this when backfilling historical events so existing flow definitions do not re-fire on events that already fired in the past.
30
+ attr_accessor :backfill
31
+
29
32
  attr_accessor :metric
30
33
 
31
34
  # A unique identifier for an event. If a unique_id is repeated for the same profile and metric, the request will fail and no events will be processed. If this field is not present, this field will use the time to the second. Using the default, this limits only one event per profile per second.
@@ -38,6 +41,7 @@ module KlaviyoAPI
38
41
  :'time' => :'time',
39
42
  :'value' => :'value',
40
43
  :'value_currency' => :'value_currency',
44
+ :'backfill' => :'backfill',
41
45
  :'metric' => :'metric',
42
46
  :'unique_id' => :'unique_id'
43
47
  }
@@ -55,6 +59,7 @@ module KlaviyoAPI
55
59
  :'time' => :'Time',
56
60
  :'value' => :'Float',
57
61
  :'value_currency' => :'String',
62
+ :'backfill' => :'Boolean',
58
63
  :'metric' => :'EventCreateQueryV2ResourceObjectAttributesMetric',
59
64
  :'unique_id' => :'String'
60
65
  }
@@ -66,6 +71,7 @@ module KlaviyoAPI
66
71
  :'time',
67
72
  :'value',
68
73
  :'value_currency',
74
+ :'backfill',
69
75
  :'unique_id'
70
76
  ])
71
77
  end
@@ -101,6 +107,12 @@ module KlaviyoAPI
101
107
  self.value_currency = attributes[:'value_currency']
102
108
  end
103
109
 
110
+ if attributes.key?(:'backfill')
111
+ self.backfill = attributes[:'backfill']
112
+ else
113
+ self.backfill = false
114
+ end
115
+
104
116
  if attributes.key?(:'metric')
105
117
  self.metric = attributes[:'metric']
106
118
  end
@@ -142,6 +154,7 @@ module KlaviyoAPI
142
154
  time == o.time &&
143
155
  value == o.value &&
144
156
  value_currency == o.value_currency &&
157
+ backfill == o.backfill &&
145
158
  metric == o.metric &&
146
159
  unique_id == o.unique_id
147
160
  end
@@ -155,7 +168,7 @@ module KlaviyoAPI
155
168
  # Calculates hash code according to all attributes.
156
169
  # @return [Integer] Hash code
157
170
  def hash
158
- [properties, time, value, value_currency, metric, unique_id].hash
171
+ [properties, time, value, value_currency, backfill, metric, unique_id].hash
159
172
  end
160
173
 
161
174
  # Builds the object from hash
@@ -24,6 +24,8 @@ module KlaviyoAPI
24
24
 
25
25
  attr_accessor :mobile_optimizations
26
26
 
27
+ attr_accessor :tip_tap_enabled
28
+
27
29
  # Attribute mapping from ruby-style variable name to JSON key.
28
30
  def self.attribute_map
29
31
  {
@@ -31,7 +33,8 @@ module KlaviyoAPI
31
33
  :'currency_set_on_template' => :'currency_set_on_template',
32
34
  :'disable_websafe_fonts' => :'disable_websafe_fonts',
33
35
  :'is_user_draggable' => :'is_user_draggable',
34
- :'mobile_optimizations' => :'mobile_optimizations'
36
+ :'mobile_optimizations' => :'mobile_optimizations',
37
+ :'tip_tap_enabled' => :'tip_tap_enabled'
35
38
  }
36
39
  end
37
40
 
@@ -47,7 +50,8 @@ module KlaviyoAPI
47
50
  :'currency_set_on_template' => :'Boolean',
48
51
  :'disable_websafe_fonts' => :'Boolean',
49
52
  :'is_user_draggable' => :'Boolean',
50
- :'mobile_optimizations' => :'Boolean'
53
+ :'mobile_optimizations' => :'Boolean',
54
+ :'tip_tap_enabled' => :'Boolean'
51
55
  }
52
56
  end
53
57
 
@@ -58,7 +62,8 @@ module KlaviyoAPI
58
62
  :'currency_set_on_template',
59
63
  :'disable_websafe_fonts',
60
64
  :'is_user_draggable',
61
- :'mobile_optimizations'
65
+ :'mobile_optimizations',
66
+ :'tip_tap_enabled'
62
67
  ])
63
68
  end
64
69
 
@@ -96,6 +101,10 @@ module KlaviyoAPI
96
101
  if attributes.key?(:'mobile_optimizations')
97
102
  self.mobile_optimizations = attributes[:'mobile_optimizations']
98
103
  end
104
+
105
+ if attributes.key?(:'tip_tap_enabled')
106
+ self.tip_tap_enabled = attributes[:'tip_tap_enabled']
107
+ end
99
108
  end
100
109
 
101
110
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -120,7 +129,8 @@ module KlaviyoAPI
120
129
  currency_set_on_template == o.currency_set_on_template &&
121
130
  disable_websafe_fonts == o.disable_websafe_fonts &&
122
131
  is_user_draggable == o.is_user_draggable &&
123
- mobile_optimizations == o.mobile_optimizations
132
+ mobile_optimizations == o.mobile_optimizations &&
133
+ tip_tap_enabled == o.tip_tap_enabled
124
134
  end
125
135
 
126
136
  # @see the `==` method
@@ -132,7 +142,7 @@ module KlaviyoAPI
132
142
  # Calculates hash code according to all attributes.
133
143
  # @return [Integer] Hash code
134
144
  def hash
135
- [currency, currency_set_on_template, disable_websafe_fonts, is_user_draggable, mobile_optimizations].hash
145
+ [currency, currency_set_on_template, disable_websafe_fonts, is_user_draggable, mobile_optimizations, tip_tap_enabled].hash
136
146
  end
137
147
 
138
148
  # Builds the object from hash
@@ -20,6 +20,7 @@ module KlaviyoAPI
20
20
  [
21
21
  :'Close',
22
22
  :'GoToInbox',
23
+ :'IafDeeplinkToScreen',
23
24
  :'NextStep',
24
25
  :'OpenForm',
25
26
  :'PromotionalSMSSubscription',