klaviyo-api-sdk 13.0.1 → 14.0.1

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 (95) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +434 -286
  4. data/klaviyo-api-sdk.gemspec +1 -1
  5. data/lib/klaviyo-api-sdk/api/accounts_api.rb +6 -6
  6. data/lib/klaviyo-api-sdk/api/campaigns_api.rb +87 -87
  7. data/lib/klaviyo-api-sdk/api/catalogs_api.rb +235 -235
  8. data/lib/klaviyo-api-sdk/api/coupons_api.rb +68 -68
  9. data/lib/klaviyo-api-sdk/api/custom_objects_api.rb +384 -0
  10. data/lib/klaviyo-api-sdk/api/data_privacy_api.rb +1 -1
  11. data/lib/klaviyo-api-sdk/api/events_api.rb +35 -35
  12. data/lib/klaviyo-api-sdk/api/flows_api.rb +93 -93
  13. data/lib/klaviyo-api-sdk/api/forms_api.rb +40 -40
  14. data/lib/klaviyo-api-sdk/api/images_api.rb +15 -15
  15. data/lib/klaviyo-api-sdk/api/lists_api.rb +60 -60
  16. data/lib/klaviyo-api-sdk/api/metrics_api.rb +643 -59
  17. data/lib/klaviyo-api-sdk/api/profiles_api.rb +134 -134
  18. data/lib/klaviyo-api-sdk/api/reporting_api.rb +13 -13
  19. data/lib/klaviyo-api-sdk/api/reviews_api.rb +21 -21
  20. data/lib/klaviyo-api-sdk/api/segments_api.rb +54 -54
  21. data/lib/klaviyo-api-sdk/api/tags_api.rb +58 -58
  22. data/lib/klaviyo-api-sdk/api/templates_api.rb +36 -36
  23. data/lib/klaviyo-api-sdk/api/tracking_settings_api.rb +15 -15
  24. data/lib/klaviyo-api-sdk/api/web_feeds_api.rb +15 -15
  25. data/lib/klaviyo-api-sdk/api/webhooks_api.rb +15 -15
  26. data/lib/klaviyo-api-sdk/api_client.rb +1 -1
  27. data/lib/klaviyo-api-sdk/models/ab_test_action_data_current_experiment.rb +2 -15
  28. data/lib/klaviyo-api-sdk/models/base_event_create_query_bulk_entry_resource_object_attributes.rb +1 -1
  29. data/lib/klaviyo-api-sdk/models/button_block.rb +247 -0
  30. data/lib/klaviyo-api-sdk/models/{custom_object_property_enum.rb → button_enum.rb} +4 -4
  31. data/lib/klaviyo-api-sdk/models/campaign_values_request_dto_resource_object_attributes_timeframe.rb +1 -1
  32. data/lib/klaviyo-api-sdk/models/condition_group_conditions_inner.rb +3 -0
  33. data/lib/klaviyo-api-sdk/models/conditional_branch_action_data_profile_filter_condition_groups_inner_conditions_inner.rb +1 -0
  34. data/lib/klaviyo-api-sdk/models/coupon_create_query_resource_object_attributes.rb +16 -5
  35. data/lib/klaviyo-api-sdk/models/coupon_update_query_resource_object_attributes.rb +16 -5
  36. data/lib/klaviyo-api-sdk/models/custom_timeframe.rb +2 -0
  37. data/lib/klaviyo-api-sdk/models/data_source_create_query.rb +223 -0
  38. data/lib/klaviyo-api-sdk/models/data_source_create_query_resource_object.rb +237 -0
  39. data/lib/klaviyo-api-sdk/models/data_source_create_query_resource_object_attributes.rb +284 -0
  40. data/lib/klaviyo-api-sdk/models/data_source_enum.rb +35 -0
  41. data/lib/klaviyo-api-sdk/models/data_source_record_bulk_create_job_create_query.rb +223 -0
  42. data/lib/klaviyo-api-sdk/models/data_source_record_bulk_create_job_create_query_resource_object.rb +246 -0
  43. data/lib/klaviyo-api-sdk/models/data_source_record_bulk_create_job_create_query_resource_object_attributes.rb +219 -0
  44. data/lib/klaviyo-api-sdk/models/data_source_record_bulk_create_job_create_query_resource_object_relationships.rb +218 -0
  45. data/lib/klaviyo-api-sdk/models/data_source_record_bulk_create_job_create_query_resource_object_relationships_data_source.rb +218 -0
  46. data/lib/klaviyo-api-sdk/models/data_source_record_bulk_create_job_enum.rb +35 -0
  47. data/lib/klaviyo-api-sdk/models/data_source_record_enum.rb +35 -0
  48. data/lib/klaviyo-api-sdk/models/data_source_record_resource_object.rb +237 -0
  49. data/lib/klaviyo-api-sdk/models/data_source_record_resource_object_attributes.rb +223 -0
  50. data/lib/klaviyo-api-sdk/models/drop_shadow_block.rb +247 -0
  51. data/lib/klaviyo-api-sdk/models/drop_shadow_enum.rb +35 -0
  52. data/lib/klaviyo-api-sdk/models/{trigger_branch_action_data_trigger_filter.rb → dsr_bulk_create_attrs_data_source_records.rb} +15 -14
  53. data/lib/klaviyo-api-sdk/models/dsr_bulk_create_rels_data_source_data.rb +238 -0
  54. data/lib/klaviyo-api-sdk/models/event_create_query_v2_resource_object_attributes.rb +1 -1
  55. data/lib/klaviyo-api-sdk/models/flow_definition_profile_filter_condition_groups_inner_conditions_inner.rb +1 -0
  56. data/lib/klaviyo-api-sdk/models/flow_email_additional_filters_condition_groups_inner_conditions_inner.rb +1 -0
  57. data/lib/klaviyo-api-sdk/models/flow_push_notification_additional_filters_condition_groups_inner_conditions_inner.rb +1 -0
  58. data/lib/klaviyo-api-sdk/models/flow_sms_additional_filters_condition_groups_inner_conditions_inner.rb +1 -0
  59. data/lib/klaviyo-api-sdk/models/has_sms_marketing_subscribed_filters_inner.rb +2 -1
  60. data/lib/klaviyo-api-sdk/models/horizontal_rule_block.rb +247 -0
  61. data/lib/klaviyo-api-sdk/models/horizontal_rule_enum.rb +35 -0
  62. data/lib/klaviyo-api-sdk/models/image_block.rb +247 -0
  63. data/lib/klaviyo-api-sdk/models/is_rcs_capable_enum.rb +35 -0
  64. data/lib/klaviyo-api-sdk/models/low_inventory_condition.rb +1 -1
  65. data/lib/klaviyo-api-sdk/models/low_inventory_condition_filter2.rb +117 -0
  66. data/lib/klaviyo-api-sdk/models/mapped_metric_enum.rb +35 -0
  67. data/lib/klaviyo-api-sdk/models/mapped_metric_partial_update_query.rb +223 -0
  68. data/lib/klaviyo-api-sdk/models/mapped_metric_partial_update_query_resource_object.rb +281 -0
  69. data/lib/klaviyo-api-sdk/models/mapped_metric_partial_update_query_resource_object_relationships.rb +227 -0
  70. data/lib/klaviyo-api-sdk/models/{trigger_branch_action_data_trigger_filter_condition_groups_inner.rb → mapped_metric_partial_update_query_resource_object_relationships_custom_metric.rb} +10 -17
  71. data/lib/klaviyo-api-sdk/models/mapped_metric_partial_update_query_resource_object_relationships_custom_metric_data.rb +238 -0
  72. data/lib/klaviyo-api-sdk/models/mapped_metric_partial_update_query_resource_object_relationships_metric.rb +218 -0
  73. data/lib/klaviyo-api-sdk/models/mapped_metric_partial_update_query_resource_object_relationships_metric_data.rb +238 -0
  74. data/lib/klaviyo-api-sdk/models/metric_property_condition.rb +1 -1
  75. data/lib/klaviyo-api-sdk/models/metric_property_condition_filter.rb +195 -87
  76. data/lib/klaviyo-api-sdk/models/metric_property_condition_filter2.rb +117 -0
  77. data/lib/klaviyo-api-sdk/models/price_drop_condition.rb +1 -1
  78. data/lib/klaviyo-api-sdk/models/{trigger_branch_action_data_trigger_filter_condition_groups_inner_conditions_inner.rb → price_drop_condition_filter2.rb} +16 -5
  79. data/lib/klaviyo-api-sdk/models/priority_enum.rb +35 -0
  80. data/lib/klaviyo-api-sdk/models/profile_predictive_analytics_channel_affinity_priority_condition.rb +327 -0
  81. data/lib/klaviyo-api-sdk/models/profile_predictive_analytics_channel_affinity_priority_filter.rb +251 -0
  82. data/lib/klaviyo-api-sdk/models/profile_predictive_analytics_channel_affinity_rank_condition.rb +327 -0
  83. data/lib/klaviyo-api-sdk/models/profile_predictive_analytics_channel_affinity_rank_filter.rb +286 -0
  84. data/lib/klaviyo-api-sdk/models/profile_predictive_analytics_date_condition.rb +286 -0
  85. data/lib/klaviyo-api-sdk/models/rank_enum.rb +35 -0
  86. data/lib/klaviyo-api-sdk/models/segment_values_request_dto_resource_object_attributes_timeframe.rb +1 -1
  87. data/lib/klaviyo-api-sdk/models/spacer_block.rb +247 -0
  88. data/lib/klaviyo-api-sdk/models/spacer_enum.rb +35 -0
  89. data/lib/klaviyo-api-sdk/models/{custom_object_property_condition.rb → subscribed_smsis_rcs_capable_filter.rb} +6 -34
  90. data/lib/klaviyo-api-sdk/models/trigger_branch_action_data.rb +6 -2
  91. data/lib/klaviyo-api-sdk/models/universal_content_create_query_resource_object_attributes_definition.rb +5 -0
  92. data/lib/klaviyo-api-sdk/models/universal_content_partial_update_query_resource_object_attributes_definition.rb +5 -0
  93. data/lib/klaviyo-api-sdk.rb +46 -6
  94. data/lib/klaviyo-api-sdk.rb.bak +979 -0
  95. metadata +48 -7
@@ -87,7 +87,9 @@ module KlaviyoAPI
87
87
  Set.new([
88
88
  :'id',
89
89
  :'name',
90
+ :'allocations',
90
91
  :'started',
92
+ :'winner_metric',
91
93
  ])
92
94
  end
93
95
 
@@ -145,18 +147,6 @@ module KlaviyoAPI
145
147
  invalid_properties.push('invalid value for "variations", variations cannot be nil.')
146
148
  end
147
149
 
148
- if @allocations.nil?
149
- invalid_properties.push('invalid value for "allocations", allocations cannot be nil.')
150
- end
151
-
152
- if @winner_metric.nil?
153
- invalid_properties.push('invalid value for "winner_metric", winner_metric cannot be nil.')
154
- end
155
-
156
- if @automatic_winner_selection_settings.nil?
157
- invalid_properties.push('invalid value for "automatic_winner_selection_settings", automatic_winner_selection_settings cannot be nil.')
158
- end
159
-
160
150
  invalid_properties
161
151
  end
162
152
 
@@ -164,11 +154,8 @@ module KlaviyoAPI
164
154
  # @return true if the model is valid
165
155
  def valid?
166
156
  return false if @variations.nil?
167
- return false if @allocations.nil?
168
- return false if @winner_metric.nil?
169
157
  winner_metric_validator = EnumAttributeValidator.new('String', ["submission", "unique-clicks", "unique-opens", "unique-placed-orders"])
170
158
  return false unless winner_metric_validator.valid?(@winner_metric)
171
- return false if @automatic_winner_selection_settings.nil?
172
159
  true
173
160
  end
174
161
 
@@ -14,7 +14,7 @@ require 'time'
14
14
 
15
15
  module KlaviyoAPI
16
16
  class BaseEventCreateQueryBulkEntryResourceObjectAttributes
17
- # Properties of this event. Any top level property (that are not objects) can be used to create segments. The $extra property is a special property. This records any non-segmentable values that can be referenced later. For example, HTML templates are useful on a segment but are not used to create a segment. There are limits placed onto the size of the data present. This must not exceed 5 MB. This must not exceed 300 event properties. A single string cannot be larger than 100 KB. The maximum allowed sum of profile strings is 100KB. Each array must not exceed 4000 elements. The properties cannot contain more than 10 nested levels.
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
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.
@@ -0,0 +1,247 @@
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 ButtonBlock
17
+ attr_accessor :content_type
18
+
19
+ attr_accessor :type
20
+
21
+ attr_accessor :data
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'content_type' => :'content_type',
27
+ :'type' => :'type',
28
+ :'data' => :'data'
29
+ }
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'content_type' => :'BlockEnum',
41
+ :'type' => :'ButtonEnum',
42
+ :'data' => :'Object'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ :'data'
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `KlaviyoAPI::ButtonBlock` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `KlaviyoAPI::ButtonBlock`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'content_type')
69
+ self.content_type = attributes[:'content_type']
70
+ end
71
+
72
+ if attributes.key?(:'type')
73
+ self.type = attributes[:'type']
74
+ end
75
+
76
+ if attributes.key?(:'data')
77
+ self.data = attributes[:'data']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
84
+ invalid_properties = Array.new
85
+ if @content_type.nil?
86
+ invalid_properties.push('invalid value for "content_type", content_type cannot be nil.')
87
+ end
88
+
89
+ if @type.nil?
90
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
91
+ end
92
+
93
+ invalid_properties
94
+ end
95
+
96
+ # Check to see if the all the properties in the model are valid
97
+ # @return true if the model is valid
98
+ def valid?
99
+ return false if @content_type.nil?
100
+ return false if @type.nil?
101
+ true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ content_type == o.content_type &&
110
+ type == o.type &&
111
+ data == o.data
112
+ end
113
+
114
+ # @see the `==` method
115
+ # @param [Object] Object to be compared
116
+ def eql?(o)
117
+ self == o
118
+ end
119
+
120
+ # Calculates hash code according to all attributes.
121
+ # @return [Integer] Hash code
122
+ def hash
123
+ [content_type, type, data].hash
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def self.build_from_hash(attributes)
130
+ new.build_from_hash(attributes)
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ attributes = attributes.transform_keys(&:to_sym)
139
+ self.class.openapi_types.each_pair do |key, type|
140
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
141
+ self.send("#{key}=", nil)
142
+ elsif type =~ /\AArray<(.*)>/i
143
+ # check to ensure the input is an array given that the attribute
144
+ # is documented as an array but the input is not
145
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
146
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
147
+ end
148
+ elsif !attributes[self.class.attribute_map[key]].nil?
149
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
150
+ end
151
+ end
152
+
153
+ self
154
+ end
155
+
156
+ # Deserializes the data based on type
157
+ # @param string type Data type
158
+ # @param string value Value to be deserialized
159
+ # @return [Object] Deserialized data
160
+ def _deserialize(type, value)
161
+ case type.to_sym
162
+ when :Time
163
+ Time.parse(value)
164
+ when :Date
165
+ Date.parse(value)
166
+ when :String
167
+ value.to_s
168
+ when :Integer
169
+ value.to_i
170
+ when :Float
171
+ value.to_f
172
+ when :Boolean
173
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
174
+ true
175
+ else
176
+ false
177
+ end
178
+ when :Object
179
+ # generic object (usually a Hash), return directly
180
+ value
181
+ when /\AArray<(?<inner_type>.+)>\z/
182
+ inner_type = Regexp.last_match[:inner_type]
183
+ value.map { |v| _deserialize(inner_type, v) }
184
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
185
+ k_type = Regexp.last_match[:k_type]
186
+ v_type = Regexp.last_match[:v_type]
187
+ {}.tap do |hash|
188
+ value.each do |k, v|
189
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
190
+ end
191
+ end
192
+ else # model
193
+ # models (e.g. Pet) or oneOf
194
+ klass = KlaviyoAPI.const_get(type)
195
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
196
+ end
197
+ end
198
+
199
+ # Returns the string representation of the object
200
+ # @return [String] String presentation of the object
201
+ def to_s
202
+ to_hash.to_s
203
+ end
204
+
205
+ # to_body is an alias to to_hash (backward compatibility)
206
+ # @return [Hash] Returns the object in the form of hash
207
+ def to_body
208
+ to_hash
209
+ end
210
+
211
+ # Returns the object in the form of hash
212
+ # @return [Hash] Returns the object in the form of hash
213
+ def to_hash
214
+ hash = {}
215
+ self.class.attribute_map.each_pair do |attr, param|
216
+ value = self.send(attr)
217
+ if value.nil?
218
+ is_nullable = self.class.openapi_nullable.include?(attr)
219
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
220
+ end
221
+
222
+ hash[param] = _to_hash(value)
223
+ end
224
+ hash
225
+ end
226
+
227
+ # Outputs non-array value in the form of hash
228
+ # For object, use to_hash. Otherwise, just return the value
229
+ # @param [Object] value Any valid value
230
+ # @return [Hash] Returns the value in the form of hash
231
+ def _to_hash(value)
232
+ if value.is_a?(Array)
233
+ value.compact.map { |v| _to_hash(v) }
234
+ elsif value.is_a?(Hash)
235
+ {}.tap do |hash|
236
+ value.each { |k, v| hash[k] = _to_hash(v) }
237
+ end
238
+ elsif value.respond_to? :to_hash
239
+ value.to_hash
240
+ else
241
+ value
242
+ end
243
+ end
244
+
245
+ end
246
+
247
+ end
@@ -13,8 +13,8 @@ require 'date'
13
13
  require 'time'
14
14
 
15
15
  module KlaviyoAPI
16
- class CustomObjectPropertyEnum
17
- CUSTOM_OBJECT_PROPERTY = "custom-object-property".freeze
16
+ class ButtonEnum
17
+ BUTTON = "button".freeze
18
18
 
19
19
  # Builds the enum from string
20
20
  # @param [String] The enum value in the form of the string
@@ -27,8 +27,8 @@ module KlaviyoAPI
27
27
  # @param [String] The enum value in the form of the string
28
28
  # @return [String] The enum value
29
29
  def build_from_hash(value)
30
- constantValues = CustomObjectPropertyEnum.constants.select { |c| CustomObjectPropertyEnum::const_get(c) == value }
31
- raise "Invalid ENUM value #{value} for class #CustomObjectPropertyEnum" if constantValues.empty?
30
+ constantValues = ButtonEnum.constants.select { |c| ButtonEnum::const_get(c) == value }
31
+ raise "Invalid ENUM value #{value} for class #ButtonEnum" if constantValues.empty?
32
32
  value
33
33
  end
34
34
  end
@@ -13,7 +13,7 @@ require 'date'
13
13
  require 'time'
14
14
 
15
15
  module KlaviyoAPI
16
- # The timeframe to query for data within. The max length a timeframe can be is 1 year
16
+ # The time frame to pull data from (Max length: 1 year). See [available time frames](https://developers.klaviyo.com/en/reference/reporting_api_overview#available-time-frames).
17
17
  module CampaignValuesRequestDTOResourceObjectAttributesTimeframe
18
18
  class << self
19
19
  # List of class defined in oneOf (OpenAPI v3)
@@ -22,6 +22,9 @@ module KlaviyoAPI
22
22
  :'ProfileMarketingConsentCondition',
23
23
  :'ProfileNoGroupMembershipCondition',
24
24
  :'ProfilePostalCodeDistanceCondition',
25
+ :'ProfilePredictiveAnalyticsChannelAffinityPriorityCondition',
26
+ :'ProfilePredictiveAnalyticsChannelAffinityRankCondition',
27
+ :'ProfilePredictiveAnalyticsDateCondition',
25
28
  :'ProfilePredictiveAnalyticsNumericCondition',
26
29
  :'ProfilePredictiveAnalyticsStringCondition',
27
30
  :'ProfilePropertyCondition',
@@ -23,6 +23,7 @@ module KlaviyoAPI
23
23
  :'ProfileMarketingConsentCondition',
24
24
  :'ProfileNoGroupMembershipCondition',
25
25
  :'ProfilePostalCodeDistanceCondition',
26
+ :'ProfilePredictiveAnalyticsDateCondition',
26
27
  :'ProfilePredictiveAnalyticsNumericCondition',
27
28
  :'ProfilePredictiveAnalyticsStringCondition',
28
29
  :'ProfilePropertyCondition',
@@ -20,11 +20,15 @@ module KlaviyoAPI
20
20
  # A description of the coupon.
21
21
  attr_accessor :description
22
22
 
23
+ # The monitor configuration for the coupon.
24
+ attr_accessor :monitor_configuration
25
+
23
26
  # Attribute mapping from ruby-style variable name to JSON key.
24
27
  def self.attribute_map
25
28
  {
26
29
  :'external_id' => :'external_id',
27
- :'description' => :'description'
30
+ :'description' => :'description',
31
+ :'monitor_configuration' => :'monitor_configuration'
28
32
  }
29
33
  end
30
34
 
@@ -37,14 +41,16 @@ module KlaviyoAPI
37
41
  def self.openapi_types
38
42
  {
39
43
  :'external_id' => :'String',
40
- :'description' => :'String'
44
+ :'description' => :'String',
45
+ :'monitor_configuration' => :'Object'
41
46
  }
42
47
  end
43
48
 
44
49
  # List of attributes with nullable: true
45
50
  def self.openapi_nullable
46
51
  Set.new([
47
- :'description'
52
+ :'description',
53
+ :'monitor_configuration'
48
54
  ])
49
55
  end
50
56
 
@@ -70,6 +76,10 @@ module KlaviyoAPI
70
76
  if attributes.key?(:'description')
71
77
  self.description = attributes[:'description']
72
78
  end
79
+
80
+ if attributes.key?(:'monitor_configuration')
81
+ self.monitor_configuration = attributes[:'monitor_configuration']
82
+ end
73
83
  end
74
84
 
75
85
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -96,7 +106,8 @@ module KlaviyoAPI
96
106
  return true if self.equal?(o)
97
107
  self.class == o.class &&
98
108
  external_id == o.external_id &&
99
- description == o.description
109
+ description == o.description &&
110
+ monitor_configuration == o.monitor_configuration
100
111
  end
101
112
 
102
113
  # @see the `==` method
@@ -108,7 +119,7 @@ module KlaviyoAPI
108
119
  # Calculates hash code according to all attributes.
109
120
  # @return [Integer] Hash code
110
121
  def hash
111
- [external_id, description].hash
122
+ [external_id, description, monitor_configuration].hash
112
123
  end
113
124
 
114
125
  # Builds the object from hash
@@ -17,10 +17,14 @@ module KlaviyoAPI
17
17
  # A description of the coupon.
18
18
  attr_accessor :description
19
19
 
20
+ # The monitor configuration for the coupon.
21
+ attr_accessor :monitor_configuration
22
+
20
23
  # Attribute mapping from ruby-style variable name to JSON key.
21
24
  def self.attribute_map
22
25
  {
23
- :'description' => :'description'
26
+ :'description' => :'description',
27
+ :'monitor_configuration' => :'monitor_configuration'
24
28
  }
25
29
  end
26
30
 
@@ -32,14 +36,16 @@ module KlaviyoAPI
32
36
  # Attribute type mapping.
33
37
  def self.openapi_types
34
38
  {
35
- :'description' => :'String'
39
+ :'description' => :'String',
40
+ :'monitor_configuration' => :'Object'
36
41
  }
37
42
  end
38
43
 
39
44
  # List of attributes with nullable: true
40
45
  def self.openapi_nullable
41
46
  Set.new([
42
- :'description'
47
+ :'description',
48
+ :'monitor_configuration'
43
49
  ])
44
50
  end
45
51
 
@@ -61,6 +67,10 @@ module KlaviyoAPI
61
67
  if attributes.key?(:'description')
62
68
  self.description = attributes[:'description']
63
69
  end
70
+
71
+ if attributes.key?(:'monitor_configuration')
72
+ self.monitor_configuration = attributes[:'monitor_configuration']
73
+ end
64
74
  end
65
75
 
66
76
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -81,7 +91,8 @@ module KlaviyoAPI
81
91
  def ==(o)
82
92
  return true if self.equal?(o)
83
93
  self.class == o.class &&
84
- description == o.description
94
+ description == o.description &&
95
+ monitor_configuration == o.monitor_configuration
85
96
  end
86
97
 
87
98
  # @see the `==` method
@@ -93,7 +104,7 @@ module KlaviyoAPI
93
104
  # Calculates hash code according to all attributes.
94
105
  # @return [Integer] Hash code
95
106
  def hash
96
- [description].hash
107
+ [description, monitor_configuration].hash
97
108
  end
98
109
 
99
110
  # Builds the object from hash
@@ -14,8 +14,10 @@ require 'time'
14
14
 
15
15
  module KlaviyoAPI
16
16
  class CustomTimeframe
17
+ # A datetime that represents the start of a custom time frame. Offset is ignored and the company timezone is used.
17
18
  attr_accessor :start
18
19
 
20
+ # A datetime that represents the end of a custom time frame. Offset is ignored and the company timezone is used.
19
21
  attr_accessor :_end
20
22
 
21
23
  # Attribute mapping from ruby-style variable name to JSON key.