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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -0
- data/README.md +932 -414
- data/klaviyo-api-sdk.gemspec +1 -1
- data/lib/klaviyo-api-sdk/api/accounts_api.rb +12 -12
- data/lib/klaviyo-api-sdk/api/campaigns_api.rb +215 -155
- data/lib/klaviyo-api-sdk/api/catalogs_api.rb +585 -381
- data/lib/klaviyo-api-sdk/api/client_api.rb +100 -0
- data/lib/klaviyo-api-sdk/api/conversations_api.rb +3 -3
- data/lib/klaviyo-api-sdk/api/coupons_api.rb +187 -108
- data/lib/klaviyo-api-sdk/api/custom_objects_api.rb +2755 -83
- data/lib/klaviyo-api-sdk/api/data_privacy_api.rb +3 -3
- data/lib/klaviyo-api-sdk/api/events_api.rb +72 -58
- data/lib/klaviyo-api-sdk/api/flows_api.rb +238 -152
- data/lib/klaviyo-api-sdk/api/forms_api.rb +81 -60
- data/lib/klaviyo-api-sdk/api/images_api.rb +48 -27
- data/lib/klaviyo-api-sdk/api/lists_api.rb +113 -88
- data/lib/klaviyo-api-sdk/api/metrics_api.rb +184 -156
- data/lib/klaviyo-api-sdk/api/profiles_api.rb +445 -226
- data/lib/klaviyo-api-sdk/api/reporting_api.rb +76 -27
- data/lib/klaviyo-api-sdk/api/reviews_api.rb +38 -31
- data/lib/klaviyo-api-sdk/api/segments_api.rb +107 -82
- data/lib/klaviyo-api-sdk/api/tags_api.rb +164 -128
- data/lib/klaviyo-api-sdk/api/templates_api.rb +113 -60
- data/lib/klaviyo-api-sdk/api/tracking_settings_api.rb +24 -17
- data/lib/klaviyo-api-sdk/api/web_feeds_api.rb +41 -27
- data/lib/klaviyo-api-sdk/api/webhooks_api.rb +73 -31
- data/lib/klaviyo-api-sdk/api_client.rb +1 -1
- data/lib/klaviyo-api-sdk/models/action_output_condition.rb +1 -1
- data/lib/klaviyo-api-sdk/models/action_output_condition_filter.rb +78 -195
- data/lib/klaviyo-api-sdk/models/action_output_split_action_data.rb +2 -6
- data/lib/klaviyo-api-sdk/models/{flow_push_notification_additional_filters.rb → action_output_split_action_data_action_output_filter.rb} +4 -4
- 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
- data/lib/klaviyo-api-sdk/models/age_gate_properties.rb +11 -1
- data/lib/klaviyo-api-sdk/models/api_schema_property.rb +301 -0
- data/lib/klaviyo-api-sdk/models/back_in_stock_email_consent_checkbox_properties.rb +11 -1
- data/lib/klaviyo-api-sdk/models/base_event_create_query_bulk_entry_resource_object_attributes.rb +15 -2
- data/lib/klaviyo-api-sdk/models/base_style_properties.rb +15 -5
- data/lib/klaviyo-api-sdk/models/button_action.rb +1 -0
- data/lib/klaviyo-api-sdk/models/button_properties.rb +11 -1
- data/lib/klaviyo-api-sdk/models/button_styles.rb +25 -3
- data/lib/klaviyo-api-sdk/models/{action_output_condition_filter2.rb → button_styles_height.rb} +3 -7
- data/lib/klaviyo-api-sdk/models/cart_content.rb +277 -0
- data/lib/klaviyo-api-sdk/models/cart_content_properties.rb +236 -0
- data/lib/klaviyo-api-sdk/models/checkboxes_properties.rb +11 -1
- data/lib/klaviyo-api-sdk/models/conditional_branch_action_data_profile_filter_condition_groups_inner_conditions_inner.rb +5 -0
- data/lib/klaviyo-api-sdk/models/constant_property_mapping.rb +287 -0
- data/lib/klaviyo-api-sdk/models/{price_drop_condition_filter2.rb → constant_property_mapping_value.rb} +6 -16
- data/lib/klaviyo-api-sdk/models/content_experiment_action.rb +1 -1
- data/lib/klaviyo-api-sdk/models/{send_push_notification_action_content_experiment_action_data.rb → content_experiment_action_data.rb} +6 -5
- data/lib/klaviyo-api-sdk/models/{send_push_notification_action_current_experiment.rb → content_experiment_action_data_current_experiment.rb} +6 -6
- data/lib/klaviyo-api-sdk/models/{low_inventory_condition_filter2.rb → content_experiment_action_data_main_action.rb} +3 -16
- data/lib/klaviyo-api-sdk/models/countdown_timer_properties.rb +11 -1
- data/lib/klaviyo-api-sdk/models/coupon_properties.rb +11 -1
- data/lib/klaviyo-api-sdk/models/custom_css.rb +231 -0
- data/lib/klaviyo-api-sdk/models/custom_html.rb +292 -0
- data/lib/klaviyo-api-sdk/models/custom_html_properties.rb +263 -0
- data/lib/klaviyo-api-sdk/models/custom_object_date_trigger.rb +450 -0
- data/lib/klaviyo-api-sdk/models/custom_object_property_condition.rb +1 -1
- data/lib/klaviyo-api-sdk/models/custom_object_relationship_source.rb +328 -0
- data/lib/klaviyo-api-sdk/models/date_properties.rb +11 -1
- data/lib/klaviyo-api-sdk/models/display_options.rb +24 -4
- data/lib/klaviyo-api-sdk/models/dropdown_properties.rb +11 -1
- data/lib/klaviyo-api-sdk/models/email_properties.rb +11 -1
- data/lib/klaviyo-api-sdk/models/email_subscription_parameters.rb +13 -9
- data/lib/klaviyo-api-sdk/models/email_unsubscription_parameters.rb +13 -9
- data/lib/klaviyo-api-sdk/models/embedded_object_schema_resource_object.rb +237 -0
- data/lib/klaviyo-api-sdk/models/embedded_object_schema_resource_object_attributes.rb +292 -0
- data/lib/klaviyo-api-sdk/models/embedded_object_schema_resource_object_attributes_source_mapping.rb +224 -0
- data/lib/klaviyo-api-sdk/models/event_create_query_v2_resource_object_attributes.rb +15 -2
- data/lib/klaviyo-api-sdk/models/events_bulk_create_query_resource_object_attributes.rb +14 -1
- data/lib/klaviyo-api-sdk/models/flow_definition_profile_filter_condition_groups_inner_conditions_inner.rb +5 -0
- data/lib/klaviyo-api-sdk/models/flow_definition_triggers_inner.rb +1 -0
- data/lib/klaviyo-api-sdk/models/flow_email.rb +1 -1
- data/lib/klaviyo-api-sdk/models/flow_push_notification.rb +14 -4
- data/lib/klaviyo-api-sdk/models/flow_sms.rb +15 -2
- data/lib/klaviyo-api-sdk/models/form_create_query_resource_object_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/html_text_properties.rb +11 -1
- data/lib/klaviyo-api-sdk/models/iaf_deeplink_to_screen.rb +305 -0
- data/lib/klaviyo-api-sdk/models/iaf_deeplink_to_screen_properties.rb +220 -0
- data/lib/klaviyo-api-sdk/models/image_action.rb +1 -0
- data/lib/klaviyo-api-sdk/models/image_block_cropping_properties.rb +0 -35
- data/lib/klaviyo-api-sdk/models/image_properties.rb +11 -1
- data/lib/klaviyo-api-sdk/models/low_inventory_condition.rb +1 -1
- data/lib/klaviyo-api-sdk/models/low_inventory_trigger.rb +2 -6
- data/lib/klaviyo-api-sdk/models/{low_inventory_condition_filter.rb → low_inventory_trigger_trigger_filter.rb} +4 -4
- data/lib/klaviyo-api-sdk/models/{low_inventory_condition_condition_group.rb → low_inventory_trigger_trigger_filter_condition_groups_inner.rb} +3 -3
- data/lib/klaviyo-api-sdk/models/metric_aggregate_query_resource_object_attributes.rb +2 -2
- data/lib/klaviyo-api-sdk/models/metric_property_condition.rb +1 -1
- data/lib/klaviyo-api-sdk/models/metric_property_condition_filter.rb +87 -195
- data/lib/klaviyo-api-sdk/models/metric_trigger.rb +2 -1
- data/lib/klaviyo-api-sdk/models/{flow_email_additional_filters.rb → metric_trigger_trigger_filter.rb} +4 -4
- data/lib/klaviyo-api-sdk/models/{flow_email_additional_filters_condition_groups_inner.rb → metric_trigger_trigger_filter_condition_groups_inner.rb} +4 -4
- data/lib/klaviyo-api-sdk/models/mobile_push_content_create.rb +18 -5
- data/lib/klaviyo-api-sdk/models/mobile_push_content_update.rb +18 -5
- data/lib/klaviyo-api-sdk/models/mobile_push_options_on_open.rb +2 -1
- data/lib/klaviyo-api-sdk/models/multi_branch_split_branch_branch_filter_condition_groups_inner_conditions_inner.rb +5 -0
- data/lib/klaviyo-api-sdk/models/object_record_bulk_delete_job_enum.rb +35 -0
- data/lib/klaviyo-api-sdk/models/object_record_delete_job_create_query.rb +223 -0
- data/lib/klaviyo-api-sdk/models/object_record_delete_job_create_query_resource_object.rb +237 -0
- 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
- data/lib/klaviyo-api-sdk/models/object_record_delete_job_create_query_resource_object_relationships_object_records.rb +220 -0
- data/lib/klaviyo-api-sdk/models/object_record_delete_job_rels_records_data_inner.rb +238 -0
- data/lib/klaviyo-api-sdk/models/object_record_enum.rb +35 -0
- data/lib/klaviyo-api-sdk/models/object_schema_create_query.rb +223 -0
- data/lib/klaviyo-api-sdk/models/object_schema_create_query_resource_object.rb +246 -0
- data/lib/klaviyo-api-sdk/models/object_schema_create_query_resource_object_attributes.rb +322 -0
- data/lib/klaviyo-api-sdk/models/object_schema_create_query_resource_object_relationships.rb +218 -0
- data/lib/klaviyo-api-sdk/models/object_schema_create_query_resource_object_relationships_object_type.rb +218 -0
- data/lib/klaviyo-api-sdk/models/object_schema_create_query_resource_object_relationships_object_type_data.rb +238 -0
- data/lib/klaviyo-api-sdk/models/object_schema_enum.rb +35 -0
- data/lib/klaviyo-api-sdk/models/object_schema_partial_update_query.rb +223 -0
- data/lib/klaviyo-api-sdk/models/object_schema_partial_update_query_resource_object.rb +252 -0
- data/lib/klaviyo-api-sdk/models/object_schema_partial_update_query_resource_object_attributes.rb +302 -0
- data/lib/klaviyo-api-sdk/models/object_schema_relationship_create_meta.rb +237 -0
- data/lib/klaviyo-api-sdk/models/{metric_property_condition_condition_group.rb → object_schema_relationship_create_query.rb} +14 -14
- data/lib/klaviyo-api-sdk/models/{flow_sms_additional_filters_condition_groups_inner.rb → object_schema_relationship_create_query_data_inner.rb} +37 -15
- data/lib/klaviyo-api-sdk/models/object_schema_relationship_delete_meta.rb +224 -0
- data/lib/klaviyo-api-sdk/models/object_schema_relationship_delete_query.rb +225 -0
- data/lib/klaviyo-api-sdk/models/object_schema_relationship_delete_query_data_inner.rb +247 -0
- data/lib/klaviyo-api-sdk/models/object_schema_relationship_partial_update_query.rb +223 -0
- data/lib/klaviyo-api-sdk/models/object_schema_relationship_partial_update_query_data.rb +247 -0
- data/lib/klaviyo-api-sdk/models/object_schema_relationship_update_meta.rb +246 -0
- data/lib/klaviyo-api-sdk/models/object_type_create_query.rb +223 -0
- data/lib/klaviyo-api-sdk/models/object_type_create_query_resource_object.rb +237 -0
- data/lib/klaviyo-api-sdk/models/object_type_create_query_resource_object_attributes.rb +307 -0
- data/lib/klaviyo-api-sdk/models/object_type_create_query_resource_object_attributes_object_schema.rb +224 -0
- data/lib/klaviyo-api-sdk/models/object_type_enum.rb +35 -0
- data/lib/klaviyo-api-sdk/models/onsite_profile_meta.rb +13 -4
- data/lib/klaviyo-api-sdk/models/open_tracking_subscription_parameters.rb +258 -0
- data/lib/klaviyo-api-sdk/models/open_tracking_unsubscription_parameters.rb +258 -0
- data/lib/klaviyo-api-sdk/models/opt_in_code_properties.rb +11 -1
- data/lib/klaviyo-api-sdk/models/patch_identifiers.rb +227 -0
- data/lib/klaviyo-api-sdk/models/phone_number_properties.rb +11 -1
- data/lib/klaviyo-api-sdk/models/price_drop_condition.rb +1 -1
- data/lib/klaviyo-api-sdk/models/price_drop_trigger.rb +2 -6
- data/lib/klaviyo-api-sdk/models/{flow_sms_additional_filters.rb → price_drop_trigger_trigger_filter.rb} +4 -4
- data/lib/klaviyo-api-sdk/models/{price_drop_condition_condition_group.rb → price_drop_trigger_trigger_filter_condition_groups_inner.rb} +3 -3
- data/lib/klaviyo-api-sdk/models/profile_event_tracked_properties.rb +19 -9
- data/lib/klaviyo-api-sdk/models/profile_has_not_received_email_message_condition.rb +1 -1
- 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
- data/lib/klaviyo-api-sdk/models/profile_has_not_received_push_message_condition.rb +1 -1
- data/lib/klaviyo-api-sdk/models/profile_has_not_received_sms_message_condition.rb +1 -1
- data/lib/klaviyo-api-sdk/models/profile_meta.rb +13 -4
- data/lib/klaviyo-api-sdk/models/profile_not_in_flow_condition.rb +1 -1
- data/lib/klaviyo-api-sdk/models/profile_object_schema_enum.rb +35 -0
- data/lib/klaviyo-api-sdk/models/profile_object_schema_relationship_create_query.rb +225 -0
- data/lib/klaviyo-api-sdk/models/profile_object_schema_relationship_create_query_data_inner.rb +247 -0
- data/lib/klaviyo-api-sdk/models/profile_object_schema_relationship_delete_query.rb +225 -0
- data/lib/klaviyo-api-sdk/models/profile_object_schema_relationship_delete_query_data_inner.rb +247 -0
- data/lib/klaviyo-api-sdk/models/profile_object_schema_relationship_partial_update_query.rb +223 -0
- data/lib/klaviyo-api-sdk/models/profile_object_schema_relationship_partial_update_query_data.rb +247 -0
- data/lib/klaviyo-api-sdk/models/profile_predictive_analytics_channel_affinity_priority_condition.rb +2 -2
- data/lib/klaviyo-api-sdk/models/profile_predictive_analytics_channel_affinity_rank_condition.rb +2 -2
- data/lib/klaviyo-api-sdk/models/profile_relationship_source.rb +330 -0
- data/lib/klaviyo-api-sdk/models/property_filter.rb +237 -0
- data/lib/klaviyo-api-sdk/models/property_source.rb +254 -0
- data/lib/klaviyo-api-sdk/models/push_action_button.rb +1 -5
- data/lib/klaviyo-api-sdk/models/push_action_button_definition.rb +261 -0
- data/lib/klaviyo-api-sdk/models/push_on_open_web_url.rb +268 -0
- data/lib/klaviyo-api-sdk/models/quote_style.rb +21 -1
- data/lib/klaviyo-api-sdk/models/radio_buttons_properties.rb +11 -1
- data/lib/klaviyo-api-sdk/models/redirect_properties.rb +2 -5
- data/lib/klaviyo-api-sdk/models/related_id_path.rb +273 -0
- data/lib/klaviyo-api-sdk/models/review_block_styles.rb +13 -13
- data/lib/klaviyo-api-sdk/models/review_properties.rb +11 -1
- data/lib/klaviyo-api-sdk/models/reviewer_name_style.rb +21 -1
- data/lib/klaviyo-api-sdk/models/row_v0_blocks_inner.rb +1 -0
- data/lib/klaviyo-api-sdk/models/signup_counter_properties.rb +11 -1
- data/lib/klaviyo-api-sdk/models/simple_property_mapping.rb +287 -0
- data/lib/klaviyo-api-sdk/models/simple_relationship_mapping.rb +287 -0
- data/lib/klaviyo-api-sdk/models/simple_relationship_mapping_source.rb +105 -0
- data/lib/klaviyo-api-sdk/models/sms_consent_checkbox_properties.rb +11 -1
- data/lib/klaviyo-api-sdk/models/sms_disclosure_link_text_style.rb +319 -0
- data/lib/klaviyo-api-sdk/models/sms_disclosure_properties.rb +11 -1
- data/lib/klaviyo-api-sdk/models/sms_disclosure_styles.rb +1 -1
- data/lib/klaviyo-api-sdk/models/source_mapping_create_query_resource_object.rb +237 -0
- data/lib/klaviyo-api-sdk/models/source_mapping_create_query_resource_object_attributes.rb +235 -0
- data/lib/klaviyo-api-sdk/models/source_mapping_create_query_resource_object_attributes_property_mappings_inner.rb +104 -0
- data/lib/klaviyo-api-sdk/models/source_mapping_enum.rb +35 -0
- data/lib/klaviyo-api-sdk/models/source_mapping_partial_update_query.rb +223 -0
- data/lib/klaviyo-api-sdk/models/source_mapping_partial_update_query_resource_object.rb +252 -0
- data/lib/klaviyo-api-sdk/models/spin_to_win_properties.rb +11 -1
- data/lib/klaviyo-api-sdk/models/string_phone_operator_string_array_filter.rb +1 -1
- data/lib/klaviyo-api-sdk/models/table_fallback_image_sub_block.rb +0 -13
- data/lib/klaviyo-api-sdk/models/table_image_sub_block.rb +0 -13
- data/lib/klaviyo-api-sdk/models/template_definition.rb +1 -0
- data/lib/klaviyo-api-sdk/models/text_properties.rb +11 -1
- data/lib/klaviyo-api-sdk/models/version.rb +39 -4
- data/lib/klaviyo-api-sdk/models/version_properties.rb +14 -4
- data/lib/klaviyo-api-sdk/models/version_styles.rb +15 -6
- data/lib/klaviyo-api-sdk/models/version_triggers_inner.rb +1 -0
- data/lib/klaviyo-api-sdk.rb +86 -23
- data/lib/klaviyo-api-sdk.rb.bak +87 -24
- metadata +88 -25
- data/lib/klaviyo-api-sdk/models/custom_object_property_condition_filter.rb +0 -117
- data/lib/klaviyo-api-sdk/models/flow_email_additional_filters_condition_groups_inner_conditions_inner.rb +0 -116
- data/lib/klaviyo-api-sdk/models/flow_push_notification_additional_filters_condition_groups_inner_conditions_inner.rb +0 -116
- data/lib/klaviyo-api-sdk/models/flow_sms_additional_filters_condition_groups_inner_conditions_inner.rb +0 -116
- data/lib/klaviyo-api-sdk/models/metric_property_condition_filter2.rb +0 -117
- data/lib/klaviyo-api-sdk/models/price_drop_condition_filter.rb +0 -225
|
@@ -13,7 +13,7 @@ require 'date'
|
|
|
13
13
|
require 'time'
|
|
14
14
|
|
|
15
15
|
module KlaviyoAPI
|
|
16
|
-
class
|
|
16
|
+
class LowInventoryTriggerTriggerFilter
|
|
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<
|
|
34
|
+
:'condition_groups' => :'Array<LowInventoryTriggerTriggerFilterConditionGroupsInner>'
|
|
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::
|
|
48
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `KlaviyoAPI::LowInventoryTriggerTriggerFilter` 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::
|
|
54
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `KlaviyoAPI::LowInventoryTriggerTriggerFilter`. 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
|
|
16
|
+
class LowInventoryTriggerTriggerFilterConditionGroupsInner
|
|
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::
|
|
48
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `KlaviyoAPI::LowInventoryTriggerTriggerFilterConditionGroupsInner` 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::
|
|
54
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `KlaviyoAPI::LowInventoryTriggerTriggerFilterConditionGroupsInner`. 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
|
}
|
|
@@ -211,7 +211,7 @@ module KlaviyoAPI
|
|
|
211
211
|
interval_validator = EnumAttributeValidator.new('String', ["day", "hour", "month", "week"])
|
|
212
212
|
return false unless interval_validator.valid?(@interval)
|
|
213
213
|
return false if @filter.nil?
|
|
214
|
-
sort_validator = EnumAttributeValidator.new('String', ["$attributed_channel", "-$attributed_channel", "$attributed_flow", "-$attributed_flow", "$attributed_message", "-$attributed_message", "$attributed_variation", "-$attributed_variation", "$campaign_channel", "-$campaign_channel", "$flow", "-$flow", "$flow_channel", "-$flow_channel", "$message", "-$message", "$message_send_cohort", "-$message_send_cohort", "$usage_amount", "-$usage_amount", "$value_currency", "-$value_currency", "$variation", "-$variation", "$variation_send_cohort", "-$variation_send_cohort", "Bot Click", "-Bot Click", "Bounce Type", "-Bounce Type", "Campaign Name", "-Campaign Name", "Client Canonical", "-Client Canonical", "Client Name", "-Client Name", "Client Type", "-Client Type", "Email Domain", "-Email Domain", "Failure Source", "-Failure Source", "Failure Type", "-Failure Type", "From Number", "-From Number", "From Phone Region", "-From Phone Region", "Inbox Provider", "-Inbox Provider", "List", "-List", "Message Name", "-Message Name", "Message Type", "-Message Type", "Method", "-Method", "Segment Count", "-Segment Count", "Subject", "-Subject", "To Number", "-To Number", "To Phone Region", "-To Phone Region", "URL", "-URL", "count", "-count", "form_id", "-form_id", "sum_value", "-sum_value", "unique", "-unique"])
|
|
214
|
+
sort_validator = EnumAttributeValidator.new('String', ["$attributed_channel", "-$attributed_channel", "$attributed_flow", "-$attributed_flow", "$attributed_message", "-$attributed_message", "$attributed_variation", "-$attributed_variation", "$campaign_channel", "-$campaign_channel", "$flow", "-$flow", "$flow_channel", "-$flow_channel", "$message", "-$message", "$message_send_cohort", "-$message_send_cohort", "$usage_amount", "-$usage_amount", "$value_currency", "-$value_currency", "$variation", "-$variation", "$variation_send_cohort", "-$variation_send_cohort", "Bot Click", "-Bot Click", "Bounce Type", "-Bounce Type", "Campaign Name", "-Campaign Name", "Client Canonical", "-Client Canonical", "Client Name", "-Client Name", "Client Type", "-Client Type", "Email Domain", "-Email Domain", "Failure Source", "-Failure Source", "Failure Type", "-Failure Type", "From Number", "-From Number", "From Phone Region", "-From Phone Region", "Inbox Provider", "-Inbox Provider", "List", "-List", "Message Format", "-Message Format", "Message Name", "-Message Name", "Message Type", "-Message Type", "Method", "-Method", "Segment Count", "-Segment Count", "Subject", "-Subject", "To Number", "-To Number", "To Phone Region", "-To Phone Region", "URL", "-URL", "count", "-count", "form_id", "-form_id", "sum_value", "-sum_value", "unique", "-unique"])
|
|
215
215
|
return false unless sort_validator.valid?(@sort)
|
|
216
216
|
true
|
|
217
217
|
end
|
|
@@ -229,7 +229,7 @@ module KlaviyoAPI
|
|
|
229
229
|
# Custom attribute writer method checking allowed values (enum).
|
|
230
230
|
# @param [Object] sort Object to be assigned
|
|
231
231
|
def sort=(sort)
|
|
232
|
-
validator = EnumAttributeValidator.new('String', ["$attributed_channel", "-$attributed_channel", "$attributed_flow", "-$attributed_flow", "$attributed_message", "-$attributed_message", "$attributed_variation", "-$attributed_variation", "$campaign_channel", "-$campaign_channel", "$flow", "-$flow", "$flow_channel", "-$flow_channel", "$message", "-$message", "$message_send_cohort", "-$message_send_cohort", "$usage_amount", "-$usage_amount", "$value_currency", "-$value_currency", "$variation", "-$variation", "$variation_send_cohort", "-$variation_send_cohort", "Bot Click", "-Bot Click", "Bounce Type", "-Bounce Type", "Campaign Name", "-Campaign Name", "Client Canonical", "-Client Canonical", "Client Name", "-Client Name", "Client Type", "-Client Type", "Email Domain", "-Email Domain", "Failure Source", "-Failure Source", "Failure Type", "-Failure Type", "From Number", "-From Number", "From Phone Region", "-From Phone Region", "Inbox Provider", "-Inbox Provider", "List", "-List", "Message Name", "-Message Name", "Message Type", "-Message Type", "Method", "-Method", "Segment Count", "-Segment Count", "Subject", "-Subject", "To Number", "-To Number", "To Phone Region", "-To Phone Region", "URL", "-URL", "count", "-count", "form_id", "-form_id", "sum_value", "-sum_value", "unique", "-unique"])
|
|
232
|
+
validator = EnumAttributeValidator.new('String', ["$attributed_channel", "-$attributed_channel", "$attributed_flow", "-$attributed_flow", "$attributed_message", "-$attributed_message", "$attributed_variation", "-$attributed_variation", "$campaign_channel", "-$campaign_channel", "$flow", "-$flow", "$flow_channel", "-$flow_channel", "$message", "-$message", "$message_send_cohort", "-$message_send_cohort", "$usage_amount", "-$usage_amount", "$value_currency", "-$value_currency", "$variation", "-$variation", "$variation_send_cohort", "-$variation_send_cohort", "Bot Click", "-Bot Click", "Bounce Type", "-Bounce Type", "Campaign Name", "-Campaign Name", "Client Canonical", "-Client Canonical", "Client Name", "-Client Name", "Client Type", "-Client Type", "Email Domain", "-Email Domain", "Failure Source", "-Failure Source", "Failure Type", "-Failure Type", "From Number", "-From Number", "From Phone Region", "-From Phone Region", "Inbox Provider", "-Inbox Provider", "List", "-List", "Message Format", "-Message Format", "Message Name", "-Message Name", "Message Type", "-Message Type", "Method", "-Method", "Segment Count", "-Segment Count", "Subject", "-Subject", "To Number", "-To Number", "To Phone Region", "-To Phone Region", "URL", "-URL", "count", "-count", "form_id", "-form_id", "sum_value", "-sum_value", "unique", "-unique"])
|
|
233
233
|
unless validator.valid?(sort)
|
|
234
234
|
fail ArgumentError, "invalid value for \"sort\", must be one of #{validator.allowable_values}."
|
|
235
235
|
end
|
|
@@ -13,213 +13,105 @@ require 'date'
|
|
|
13
13
|
require 'time'
|
|
14
14
|
|
|
15
15
|
module KlaviyoAPI
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
# List of attributes with nullable: true
|
|
39
|
-
def self.openapi_nullable
|
|
40
|
-
Set.new([
|
|
41
|
-
])
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
# Initializes the object
|
|
45
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
46
|
-
def initialize(attributes = {})
|
|
47
|
-
if (!attributes.is_a?(Hash))
|
|
48
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `KlaviyoAPI::MetricPropertyConditionFilter` initialize method"
|
|
16
|
+
module MetricPropertyConditionFilter
|
|
17
|
+
class << self
|
|
18
|
+
# List of class defined in oneOf (OpenAPI v3)
|
|
19
|
+
def openapi_one_of
|
|
20
|
+
[
|
|
21
|
+
:'AnniversaryDateFilter',
|
|
22
|
+
:'BooleanFilter',
|
|
23
|
+
:'CalendarDateFilter',
|
|
24
|
+
:'ExistenceOperatorExistenceFilter',
|
|
25
|
+
:'ListContainsOperatorListContainsFilter',
|
|
26
|
+
:'ListLengthFilter',
|
|
27
|
+
:'NumericOperatorNumericFilter',
|
|
28
|
+
:'NumericRangeFilter',
|
|
29
|
+
:'RelativeAnniversaryDateFilter',
|
|
30
|
+
:'RelativeDateOperatorBaseRelativeDateFilter',
|
|
31
|
+
:'RelativeDateRangeFilter',
|
|
32
|
+
:'StaticDateFilter',
|
|
33
|
+
:'StaticDateRangeFilter',
|
|
34
|
+
:'StringArrayOperatorStringArrayFilter',
|
|
35
|
+
:'StringOperatorStringFilter'
|
|
36
|
+
]
|
|
49
37
|
end
|
|
50
38
|
|
|
51
|
-
#
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
39
|
+
# Builds the object
|
|
40
|
+
# @param [Mixed] Data to be matched against the list of oneOf items
|
|
41
|
+
# @return [Object] Returns the model or the data itself
|
|
42
|
+
def build(data)
|
|
43
|
+
# Go through the list of oneOf items and attempt to identify the appropriate one.
|
|
44
|
+
# Note:
|
|
45
|
+
# - We do not attempt to check whether exactly one item matches.
|
|
46
|
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
47
|
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
48
|
+
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
49
|
+
# - TODO: logging when debugging is set.
|
|
50
|
+
openapi_one_of.each do |klass|
|
|
51
|
+
begin
|
|
52
|
+
next if klass == :AnyType # "nullable: true"
|
|
53
|
+
typed_data = find_and_cast_into_type(klass, data)
|
|
54
|
+
return typed_data if typed_data
|
|
55
|
+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
|
56
|
+
end
|
|
55
57
|
end
|
|
56
|
-
h[k.to_sym] = v
|
|
57
|
-
}
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
if (value = attributes[:'condition_groups']).is_a?(Array)
|
|
61
|
-
self.condition_groups = value
|
|
62
|
-
end
|
|
59
|
+
openapi_one_of.include?(:AnyType) ? data : nil
|
|
63
60
|
end
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
|
67
|
-
# @return Array for valid properties with the reasons
|
|
68
|
-
def list_invalid_properties
|
|
69
|
-
invalid_properties = Array.new
|
|
70
|
-
if @condition_groups.nil?
|
|
71
|
-
invalid_properties.push('invalid value for "condition_groups", condition_groups cannot be nil.')
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
invalid_properties
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
# Check to see if the all the properties in the model are valid
|
|
78
|
-
# @return true if the model is valid
|
|
79
|
-
def valid?
|
|
80
|
-
return false if @condition_groups.nil?
|
|
81
|
-
true
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
# Checks equality by comparing each attribute.
|
|
85
|
-
# @param [Object] Object to be compared
|
|
86
|
-
def ==(o)
|
|
87
|
-
return true if self.equal?(o)
|
|
88
|
-
self.class == o.class &&
|
|
89
|
-
condition_groups == o.condition_groups
|
|
90
|
-
end
|
|
91
|
-
|
|
92
|
-
# @see the `==` method
|
|
93
|
-
# @param [Object] Object to be compared
|
|
94
|
-
def eql?(o)
|
|
95
|
-
self == o
|
|
96
|
-
end
|
|
97
|
-
|
|
98
|
-
# Calculates hash code according to all attributes.
|
|
99
|
-
# @return [Integer] Hash code
|
|
100
|
-
def hash
|
|
101
|
-
[condition_groups].hash
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
# Builds the object from hash
|
|
105
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
|
106
|
-
# @return [Object] Returns the model itself
|
|
107
|
-
def self.build_from_hash(attributes)
|
|
108
|
-
new.build_from_hash(attributes)
|
|
109
|
-
end
|
|
110
61
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
if
|
|
124
|
-
|
|
62
|
+
private
|
|
63
|
+
|
|
64
|
+
SchemaMismatchError = Class.new(StandardError)
|
|
65
|
+
|
|
66
|
+
# Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
|
|
67
|
+
def find_and_cast_into_type(klass, data)
|
|
68
|
+
return if data.nil?
|
|
69
|
+
|
|
70
|
+
case klass.to_s
|
|
71
|
+
when 'Boolean'
|
|
72
|
+
return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
|
|
73
|
+
when 'Float'
|
|
74
|
+
return data if data.instance_of?(Float)
|
|
75
|
+
when 'Integer'
|
|
76
|
+
return data if data.instance_of?(Integer)
|
|
77
|
+
when 'Time'
|
|
78
|
+
return Time.parse(data)
|
|
79
|
+
when 'Date'
|
|
80
|
+
return Date.parse(data)
|
|
81
|
+
when 'String'
|
|
82
|
+
return data if data.instance_of?(String)
|
|
83
|
+
when 'Object' # "type: object"
|
|
84
|
+
return data if data.instance_of?(Hash)
|
|
85
|
+
when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
|
|
86
|
+
if data.instance_of?(Array)
|
|
87
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
88
|
+
return data.map { |item| find_and_cast_into_type(sub_type, item) }
|
|
125
89
|
end
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
Date.parse(value)
|
|
144
|
-
when :String
|
|
145
|
-
value.to_s
|
|
146
|
-
when :Integer
|
|
147
|
-
value.to_i
|
|
148
|
-
when :Float
|
|
149
|
-
value.to_f
|
|
150
|
-
when :Boolean
|
|
151
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
152
|
-
true
|
|
153
|
-
else
|
|
154
|
-
false
|
|
155
|
-
end
|
|
156
|
-
when :Object
|
|
157
|
-
# generic object (usually a Hash), return directly
|
|
158
|
-
value
|
|
159
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
|
160
|
-
inner_type = Regexp.last_match[:inner_type]
|
|
161
|
-
value.map { |v| _deserialize(inner_type, v) }
|
|
162
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
163
|
-
k_type = Regexp.last_match[:k_type]
|
|
164
|
-
v_type = Regexp.last_match[:v_type]
|
|
165
|
-
{}.tap do |hash|
|
|
166
|
-
value.each do |k, v|
|
|
167
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
90
|
+
when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
|
|
91
|
+
if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
|
|
92
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
93
|
+
return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
|
|
94
|
+
end
|
|
95
|
+
else # model
|
|
96
|
+
const = KlaviyoAPI.const_get(klass)
|
|
97
|
+
if const
|
|
98
|
+
if const.respond_to?(:openapi_one_of) # nested oneOf model
|
|
99
|
+
model = const.build(data)
|
|
100
|
+
return model if model
|
|
101
|
+
else
|
|
102
|
+
# raise if data contains keys that are not known to the model
|
|
103
|
+
raise unless (data.keys - const.acceptable_attributes).empty?
|
|
104
|
+
model = const.build_from_hash(data)
|
|
105
|
+
return model if model && model.valid?
|
|
106
|
+
end
|
|
168
107
|
end
|
|
169
|
-
end
|
|
170
|
-
else # model
|
|
171
|
-
# models (e.g. Pet) or oneOf
|
|
172
|
-
klass = KlaviyoAPI.const_get(type)
|
|
173
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
174
|
-
end
|
|
175
|
-
end
|
|
176
|
-
|
|
177
|
-
# Returns the string representation of the object
|
|
178
|
-
# @return [String] String presentation of the object
|
|
179
|
-
def to_s
|
|
180
|
-
to_hash.to_s
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
# to_body is an alias to to_hash (backward compatibility)
|
|
184
|
-
# @return [Hash] Returns the object in the form of hash
|
|
185
|
-
def to_body
|
|
186
|
-
to_hash
|
|
187
|
-
end
|
|
188
|
-
|
|
189
|
-
# Returns the object in the form of hash
|
|
190
|
-
# @return [Hash] Returns the object in the form of hash
|
|
191
|
-
def to_hash
|
|
192
|
-
hash = {}
|
|
193
|
-
self.class.attribute_map.each_pair do |attr, param|
|
|
194
|
-
value = self.send(attr)
|
|
195
|
-
if value.nil?
|
|
196
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
197
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
198
108
|
end
|
|
199
109
|
|
|
200
|
-
|
|
110
|
+
raise # if no match by now, raise
|
|
111
|
+
rescue
|
|
112
|
+
raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
|
|
201
113
|
end
|
|
202
|
-
hash
|
|
203
114
|
end
|
|
204
|
-
|
|
205
|
-
# Outputs non-array value in the form of hash
|
|
206
|
-
# For object, use to_hash. Otherwise, just return the value
|
|
207
|
-
# @param [Object] value Any valid value
|
|
208
|
-
# @return [Hash] Returns the value in the form of hash
|
|
209
|
-
def _to_hash(value)
|
|
210
|
-
if value.is_a?(Array)
|
|
211
|
-
value.compact.map { |v| _to_hash(v) }
|
|
212
|
-
elsif value.is_a?(Hash)
|
|
213
|
-
{}.tap do |hash|
|
|
214
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
215
|
-
end
|
|
216
|
-
elsif value.respond_to? :to_hash
|
|
217
|
-
value.to_hash
|
|
218
|
-
else
|
|
219
|
-
value
|
|
220
|
-
end
|
|
221
|
-
end
|
|
222
|
-
|
|
223
115
|
end
|
|
224
116
|
|
|
225
117
|
end
|
|
@@ -61,7 +61,7 @@ module KlaviyoAPI
|
|
|
61
61
|
{
|
|
62
62
|
:'type' => :'String',
|
|
63
63
|
:'id' => :'String',
|
|
64
|
-
:'trigger_filter' => :'
|
|
64
|
+
:'trigger_filter' => :'MetricTriggerTriggerFilter'
|
|
65
65
|
}
|
|
66
66
|
end
|
|
67
67
|
|
|
@@ -69,6 +69,7 @@ module KlaviyoAPI
|
|
|
69
69
|
def self.openapi_nullable
|
|
70
70
|
Set.new([
|
|
71
71
|
:'id',
|
|
72
|
+
:'trigger_filter'
|
|
72
73
|
])
|
|
73
74
|
end
|
|
74
75
|
|
|
@@ -13,7 +13,7 @@ require 'date'
|
|
|
13
13
|
require 'time'
|
|
14
14
|
|
|
15
15
|
module KlaviyoAPI
|
|
16
|
-
class
|
|
16
|
+
class MetricTriggerTriggerFilter
|
|
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<
|
|
34
|
+
:'condition_groups' => :'Array<MetricTriggerTriggerFilterConditionGroupsInner>'
|
|
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::
|
|
48
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `KlaviyoAPI::MetricTriggerTriggerFilter` 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::
|
|
54
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `KlaviyoAPI::MetricTriggerTriggerFilter`. 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
|
|
16
|
+
class MetricTriggerTriggerFilterConditionGroupsInner
|
|
17
17
|
attr_accessor :conditions
|
|
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
|
-
:'conditions' => :'Array<
|
|
34
|
+
:'conditions' => :'Array<MetricPropertyCondition>'
|
|
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::
|
|
48
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `KlaviyoAPI::MetricTriggerTriggerFilterConditionGroupsInner` 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::
|
|
54
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `KlaviyoAPI::MetricTriggerTriggerFilterConditionGroupsInner`. 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
|
}
|
|
@@ -23,12 +23,16 @@ module KlaviyoAPI
|
|
|
23
23
|
# The dynamic image to be used in the push notification
|
|
24
24
|
attr_accessor :dynamic_image
|
|
25
25
|
|
|
26
|
+
# Action buttons for the push notification (max 3, positions 0-indexed with no gaps)
|
|
27
|
+
attr_accessor :action_buttons
|
|
28
|
+
|
|
26
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
30
|
def self.attribute_map
|
|
28
31
|
{
|
|
29
32
|
:'title' => :'title',
|
|
30
33
|
:'body' => :'body',
|
|
31
|
-
:'dynamic_image' => :'dynamic_image'
|
|
34
|
+
:'dynamic_image' => :'dynamic_image',
|
|
35
|
+
:'action_buttons' => :'action_buttons'
|
|
32
36
|
}
|
|
33
37
|
end
|
|
34
38
|
|
|
@@ -42,7 +46,8 @@ module KlaviyoAPI
|
|
|
42
46
|
{
|
|
43
47
|
:'title' => :'String',
|
|
44
48
|
:'body' => :'String',
|
|
45
|
-
:'dynamic_image' => :'String'
|
|
49
|
+
:'dynamic_image' => :'String',
|
|
50
|
+
:'action_buttons' => :'Array<PushActionButtonDefinition>'
|
|
46
51
|
}
|
|
47
52
|
end
|
|
48
53
|
|
|
@@ -50,7 +55,8 @@ module KlaviyoAPI
|
|
|
50
55
|
def self.openapi_nullable
|
|
51
56
|
Set.new([
|
|
52
57
|
:'title',
|
|
53
|
-
:'dynamic_image'
|
|
58
|
+
:'dynamic_image',
|
|
59
|
+
:'action_buttons'
|
|
54
60
|
])
|
|
55
61
|
end
|
|
56
62
|
|
|
@@ -80,6 +86,12 @@ module KlaviyoAPI
|
|
|
80
86
|
if attributes.key?(:'dynamic_image')
|
|
81
87
|
self.dynamic_image = attributes[:'dynamic_image']
|
|
82
88
|
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'action_buttons')
|
|
91
|
+
if (value = attributes[:'action_buttons']).is_a?(Array)
|
|
92
|
+
self.action_buttons = value
|
|
93
|
+
end
|
|
94
|
+
end
|
|
83
95
|
end
|
|
84
96
|
|
|
85
97
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -107,7 +119,8 @@ module KlaviyoAPI
|
|
|
107
119
|
self.class == o.class &&
|
|
108
120
|
title == o.title &&
|
|
109
121
|
body == o.body &&
|
|
110
|
-
dynamic_image == o.dynamic_image
|
|
122
|
+
dynamic_image == o.dynamic_image &&
|
|
123
|
+
action_buttons == o.action_buttons
|
|
111
124
|
end
|
|
112
125
|
|
|
113
126
|
# @see the `==` method
|
|
@@ -119,7 +132,7 @@ module KlaviyoAPI
|
|
|
119
132
|
# Calculates hash code according to all attributes.
|
|
120
133
|
# @return [Integer] Hash code
|
|
121
134
|
def hash
|
|
122
|
-
[title, body, dynamic_image].hash
|
|
135
|
+
[title, body, dynamic_image, action_buttons].hash
|
|
123
136
|
end
|
|
124
137
|
|
|
125
138
|
# Builds the object from hash
|
|
@@ -23,12 +23,16 @@ module KlaviyoAPI
|
|
|
23
23
|
# The dynamic image to be used in the push notification
|
|
24
24
|
attr_accessor :dynamic_image
|
|
25
25
|
|
|
26
|
+
# Action buttons for the push notification (max 3, positions 0-indexed with no gaps)
|
|
27
|
+
attr_accessor :action_buttons
|
|
28
|
+
|
|
26
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
30
|
def self.attribute_map
|
|
28
31
|
{
|
|
29
32
|
:'title' => :'title',
|
|
30
33
|
:'body' => :'body',
|
|
31
|
-
:'dynamic_image' => :'dynamic_image'
|
|
34
|
+
:'dynamic_image' => :'dynamic_image',
|
|
35
|
+
:'action_buttons' => :'action_buttons'
|
|
32
36
|
}
|
|
33
37
|
end
|
|
34
38
|
|
|
@@ -42,7 +46,8 @@ module KlaviyoAPI
|
|
|
42
46
|
{
|
|
43
47
|
:'title' => :'String',
|
|
44
48
|
:'body' => :'String',
|
|
45
|
-
:'dynamic_image' => :'String'
|
|
49
|
+
:'dynamic_image' => :'String',
|
|
50
|
+
:'action_buttons' => :'Array<PushActionButtonDefinition>'
|
|
46
51
|
}
|
|
47
52
|
end
|
|
48
53
|
|
|
@@ -51,7 +56,8 @@ module KlaviyoAPI
|
|
|
51
56
|
Set.new([
|
|
52
57
|
:'title',
|
|
53
58
|
:'body',
|
|
54
|
-
:'dynamic_image'
|
|
59
|
+
:'dynamic_image',
|
|
60
|
+
:'action_buttons'
|
|
55
61
|
])
|
|
56
62
|
end
|
|
57
63
|
|
|
@@ -81,6 +87,12 @@ module KlaviyoAPI
|
|
|
81
87
|
if attributes.key?(:'dynamic_image')
|
|
82
88
|
self.dynamic_image = attributes[:'dynamic_image']
|
|
83
89
|
end
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'action_buttons')
|
|
92
|
+
if (value = attributes[:'action_buttons']).is_a?(Array)
|
|
93
|
+
self.action_buttons = value
|
|
94
|
+
end
|
|
95
|
+
end
|
|
84
96
|
end
|
|
85
97
|
|
|
86
98
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -103,7 +115,8 @@ module KlaviyoAPI
|
|
|
103
115
|
self.class == o.class &&
|
|
104
116
|
title == o.title &&
|
|
105
117
|
body == o.body &&
|
|
106
|
-
dynamic_image == o.dynamic_image
|
|
118
|
+
dynamic_image == o.dynamic_image &&
|
|
119
|
+
action_buttons == o.action_buttons
|
|
107
120
|
end
|
|
108
121
|
|
|
109
122
|
# @see the `==` method
|
|
@@ -115,7 +128,7 @@ module KlaviyoAPI
|
|
|
115
128
|
# Calculates hash code according to all attributes.
|
|
116
129
|
# @return [Integer] Hash code
|
|
117
130
|
def hash
|
|
118
|
-
[title, body, dynamic_image].hash
|
|
131
|
+
[title, body, dynamic_image, action_buttons].hash
|
|
119
132
|
end
|
|
120
133
|
|
|
121
134
|
# Builds the object from hash
|
|
@@ -23,10 +23,15 @@ module KlaviyoAPI
|
|
|
23
23
|
:'MetricPropertyCondition',
|
|
24
24
|
:'ProfileHasCustomObjectCondition',
|
|
25
25
|
:'ProfileHasGroupMembershipCondition',
|
|
26
|
+
:'ProfileHasNotReceivedEmailMessageCondition',
|
|
27
|
+
:'ProfileHasNotReceivedPushMessageCondition',
|
|
28
|
+
:'ProfileHasNotReceivedSmsMessageCondition',
|
|
26
29
|
:'ProfileMarketingConsentCondition',
|
|
27
30
|
:'ProfileNoGroupMembershipCondition',
|
|
28
31
|
:'ProfilePermissionsCondition',
|
|
29
32
|
:'ProfilePostalCodeDistanceCondition',
|
|
33
|
+
:'ProfilePredictiveAnalyticsChannelAffinityPriorityCondition',
|
|
34
|
+
:'ProfilePredictiveAnalyticsChannelAffinityRankCondition',
|
|
30
35
|
:'ProfilePredictiveAnalyticsDateCondition',
|
|
31
36
|
:'ProfilePredictiveAnalyticsNumericCondition',
|
|
32
37
|
:'ProfilePredictiveAnalyticsStringCondition',
|