klaviyo-api-sdk 1.1.0 → 1.2.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 (324) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/README.md +314 -136
  4. data/docs/CampaignRecipientEstimationJobCreateQuery.md +18 -0
  5. data/docs/CampaignRecipientEstimationJobCreateQueryAsSubResource.md +20 -0
  6. data/docs/CampaignRecipientEstimationJobCreateQueryAsSubResourceAttributes.md +18 -0
  7. data/docs/CampaignTagOp.md +18 -0
  8. data/docs/CampaignTagOpDataInner.md +20 -0
  9. data/docs/CampaignsApi.md +1277 -0
  10. data/docs/CatalogCategoryCreateJobCreateQueryAsSubResourceAttributes.md +1 -1
  11. data/docs/CatalogCategoryCreateQueryAsSubResourceAttributes.md +6 -6
  12. data/docs/CatalogCategoryDeleteJobCreateQueryAsSubResourceAttributes.md +1 -1
  13. data/docs/CatalogCategoryDeleteQueryAsSubResource.md +2 -2
  14. data/docs/CatalogCategoryUpdateJobCreateQueryAsSubResourceAttributes.md +1 -1
  15. data/docs/CatalogCategoryUpdateQueryAsSubResource.md +2 -2
  16. data/docs/CatalogCategoryUpdateQueryAsSubResourceAttributes.md +2 -2
  17. data/docs/CatalogItemCreateJobCreateQueryAsSubResourceAttributes.md +1 -1
  18. data/docs/CatalogItemCreateQueryAsSubResourceAttributes.md +21 -19
  19. data/docs/CatalogItemDeleteJobCreateQueryAsSubResourceAttributes.md +1 -1
  20. data/docs/CatalogItemDeleteQueryAsSubResource.md +2 -2
  21. data/docs/CatalogItemUpdateJobCreateQueryAsSubResourceAttributes.md +1 -1
  22. data/docs/CatalogItemUpdateQueryAsSubResource.md +2 -2
  23. data/docs/CatalogItemUpdateQueryAsSubResourceAttributes.md +18 -16
  24. data/docs/CatalogJobErrorPayload.md +8 -8
  25. data/docs/CatalogVariantCreateJobCreateQueryAsSubResourceAttributes.md +1 -1
  26. data/docs/CatalogVariantCreateQueryAsSubResourceAttributes.md +27 -27
  27. data/docs/CatalogVariantDeleteJobCreateQueryAsSubResourceAttributes.md +1 -1
  28. data/docs/CatalogVariantDeleteQueryAsSubResource.md +2 -2
  29. data/docs/CatalogVariantUpdateJobCreateQueryAsSubResourceAttributes.md +1 -1
  30. data/docs/CatalogVariantUpdateQueryAsSubResource.md +2 -2
  31. data/docs/CatalogVariantUpdateQueryAsSubResourceAttributes.md +22 -22
  32. data/docs/CatalogsApi.md +238 -238
  33. data/docs/ErrorSource.md +1 -1
  34. data/docs/EventsApi.md +26 -26
  35. data/docs/FlowsApi.md +64 -56
  36. data/docs/GetCampaigns4XXResponse.md +18 -0
  37. data/docs/GetCampaigns4XXResponseErrorsInner.md +26 -0
  38. data/docs/GetCampaigns4XXResponseErrorsInnerSource.md +20 -0
  39. data/docs/IncludedCategories.md +2 -2
  40. data/docs/IncludedCategoriesAttributes.md +5 -5
  41. data/docs/IncludedItems.md +2 -2
  42. data/docs/IncludedItemsAttributes.md +22 -20
  43. data/docs/IncludedLists.md +2 -2
  44. data/docs/IncludedListsAttributes.md +4 -4
  45. data/docs/IncludedProfiles.md +2 -2
  46. data/docs/IncludedProfilesAttributes.md +21 -21
  47. data/docs/IncludedSegments.md +1 -1
  48. data/docs/IncludedSegmentsAttributes.md +22 -0
  49. data/docs/IncludedTags.md +24 -0
  50. data/docs/IncludedVariants.md +2 -2
  51. data/docs/IncludedVariantsAttributes.md +28 -28
  52. data/docs/ListCreateQueryAsSubResourceAttributes.md +2 -2
  53. data/docs/ListPartialUpdateQueryAsSubResource.md +2 -2
  54. data/docs/ListsApi.md +30 -30
  55. data/docs/MetricAggregateQueryAsSubResourceAttributes.md +5 -5
  56. data/docs/MetricsApi.md +9 -9
  57. data/docs/OnsiteProfileMetaIdentifiers.md +10 -10
  58. data/docs/ProfileCreateQueryAsSubResourceAttributes.md +18 -18
  59. data/docs/ProfileLocation.md +15 -15
  60. data/docs/ProfileLocationLongitude.md +49 -0
  61. data/docs/ProfilePartialUpdateQueryAsSubResource.md +2 -2
  62. data/docs/ProfilesApi.md +26 -26
  63. data/docs/STOScheduleOptions.md +18 -0
  64. data/docs/SegmentPartialUpdateQueryAsSubResource.md +1 -1
  65. data/docs/SegmentPartialUpdateQueryAsSubResourceAttributes.md +18 -0
  66. data/docs/SegmentsApi.md +19 -19
  67. data/docs/SendOptionsSubObject.md +1 -3
  68. data/docs/SendStrategySubObject.md +4 -2
  69. data/docs/Subscription.md +8 -4
  70. data/docs/SubscriptionChannels.md +20 -0
  71. data/docs/SubscriptionCreateJobCreateQueryAsSubResourceAttributes.md +2 -2
  72. data/docs/Suppression.md +1 -1
  73. data/docs/TagsApi.md +24 -24
  74. data/docs/TemplateCloneQueryAsSubResource.md +0 -2
  75. data/docs/TemplatesApi.md +11 -11
  76. data/docs/ThrottledScheduleOptions.md +1 -1
  77. data/docs/UnsubscriptionCreateJobCreateQueryAsSubResourceAttributes.md +3 -3
  78. data/klaviyo-api-sdk.gemspec +2 -2
  79. data/lib/klaviyo-api-sdk/api/campaigns_api.rb +1275 -0
  80. data/lib/klaviyo-api-sdk/api/catalogs_api.rb +299 -299
  81. data/lib/klaviyo-api-sdk/api/client_api.rb +3 -3
  82. data/lib/klaviyo-api-sdk/api/data_privacy_api.rb +2 -2
  83. data/lib/klaviyo-api-sdk/api/events_api.rb +33 -33
  84. data/lib/klaviyo-api-sdk/api/flows_api.rb +86 -74
  85. data/lib/klaviyo-api-sdk/api/lists_api.rb +39 -39
  86. data/lib/klaviyo-api-sdk/api/metrics_api.rb +14 -14
  87. data/lib/klaviyo-api-sdk/api/profiles_api.rb +34 -34
  88. data/lib/klaviyo-api-sdk/api/segments_api.rb +25 -25
  89. data/lib/klaviyo-api-sdk/api/tags_api.rb +41 -41
  90. data/lib/klaviyo-api-sdk/api/templates_api.rb +18 -18
  91. data/lib/klaviyo-api-sdk/api_client.rb +2 -2
  92. data/lib/klaviyo-api-sdk/api_error.rb +1 -1
  93. data/lib/klaviyo-api-sdk/configuration.rb +1 -1
  94. data/lib/klaviyo-api-sdk/models/audiences_sub_object.rb +1 -1
  95. data/lib/klaviyo-api-sdk/models/campaign_clone_query.rb +1 -1
  96. data/lib/klaviyo-api-sdk/models/campaign_clone_query_as_sub_resource.rb +1 -1
  97. data/lib/klaviyo-api-sdk/models/campaign_clone_query_as_sub_resource_attributes.rb +1 -1
  98. data/lib/klaviyo-api-sdk/models/campaign_create_query.rb +1 -1
  99. data/lib/klaviyo-api-sdk/models/campaign_create_query_as_sub_resource.rb +1 -1
  100. data/lib/klaviyo-api-sdk/models/campaign_create_query_as_sub_resource_attributes.rb +1 -1
  101. data/lib/klaviyo-api-sdk/models/campaign_message_assign_template_query.rb +1 -1
  102. data/lib/klaviyo-api-sdk/models/campaign_message_assign_template_query_as_sub_resource.rb +1 -1
  103. data/lib/klaviyo-api-sdk/models/campaign_message_assign_template_query_as_sub_resource_attributes.rb +1 -1
  104. data/lib/klaviyo-api-sdk/models/campaign_message_partial_update_query.rb +1 -1
  105. data/lib/klaviyo-api-sdk/models/campaign_message_partial_update_query_as_sub_resource.rb +1 -1
  106. data/lib/klaviyo-api-sdk/models/campaign_message_partial_update_query_as_sub_resource_attributes.rb +1 -1
  107. data/lib/klaviyo-api-sdk/models/campaign_partial_update_query.rb +1 -1
  108. data/lib/klaviyo-api-sdk/models/campaign_partial_update_query_as_sub_resource.rb +1 -1
  109. data/lib/klaviyo-api-sdk/models/campaign_partial_update_query_as_sub_resource_attributes.rb +1 -1
  110. data/lib/klaviyo-api-sdk/models/campaign_recipient_estimation_job_create_query.rb +224 -0
  111. data/lib/klaviyo-api-sdk/models/campaign_recipient_estimation_job_create_query_as_sub_resource.rb +272 -0
  112. data/lib/klaviyo-api-sdk/models/campaign_recipient_estimation_job_create_query_as_sub_resource_attributes.rb +225 -0
  113. data/lib/klaviyo-api-sdk/models/campaign_send_job_create_query.rb +1 -1
  114. data/lib/klaviyo-api-sdk/models/campaign_send_job_create_query_as_sub_resource.rb +1 -1
  115. data/lib/klaviyo-api-sdk/models/campaign_send_job_create_query_as_sub_resource_attributes.rb +1 -1
  116. data/lib/klaviyo-api-sdk/models/campaign_send_job_partial_update_query.rb +1 -1
  117. data/lib/klaviyo-api-sdk/models/campaign_send_job_partial_update_query_as_sub_resource.rb +1 -1
  118. data/lib/klaviyo-api-sdk/models/campaign_send_job_partial_update_query_as_sub_resource_attributes.rb +1 -1
  119. data/lib/klaviyo-api-sdk/models/campaign_tag_op.rb +226 -0
  120. data/lib/klaviyo-api-sdk/models/campaign_tag_op_data_inner.rb +272 -0
  121. data/lib/klaviyo-api-sdk/models/catalog_category_create_job_create_query.rb +1 -1
  122. data/lib/klaviyo-api-sdk/models/catalog_category_create_job_create_query_as_sub_resource.rb +1 -1
  123. data/lib/klaviyo-api-sdk/models/catalog_category_create_job_create_query_as_sub_resource_attributes.rb +2 -1
  124. data/lib/klaviyo-api-sdk/models/catalog_category_create_query.rb +1 -1
  125. data/lib/klaviyo-api-sdk/models/catalog_category_create_query_as_sub_resource.rb +1 -1
  126. data/lib/klaviyo-api-sdk/models/catalog_category_create_query_as_sub_resource_attributes.rb +5 -2
  127. data/lib/klaviyo-api-sdk/models/catalog_category_delete_job_create_query.rb +1 -1
  128. data/lib/klaviyo-api-sdk/models/catalog_category_delete_job_create_query_as_sub_resource.rb +1 -1
  129. data/lib/klaviyo-api-sdk/models/catalog_category_delete_job_create_query_as_sub_resource_attributes.rb +2 -1
  130. data/lib/klaviyo-api-sdk/models/catalog_category_delete_query_as_sub_resource.rb +2 -2
  131. data/lib/klaviyo-api-sdk/models/catalog_category_item_op.rb +1 -1
  132. data/lib/klaviyo-api-sdk/models/catalog_category_update_job_create_query.rb +1 -1
  133. data/lib/klaviyo-api-sdk/models/catalog_category_update_job_create_query_as_sub_resource.rb +1 -1
  134. data/lib/klaviyo-api-sdk/models/catalog_category_update_job_create_query_as_sub_resource_attributes.rb +2 -1
  135. data/lib/klaviyo-api-sdk/models/catalog_category_update_query.rb +1 -1
  136. data/lib/klaviyo-api-sdk/models/catalog_category_update_query_as_sub_resource.rb +2 -2
  137. data/lib/klaviyo-api-sdk/models/catalog_category_update_query_as_sub_resource_attributes.rb +2 -1
  138. data/lib/klaviyo-api-sdk/models/catalog_item_category_op.rb +1 -1
  139. data/lib/klaviyo-api-sdk/models/catalog_item_create_job_create_query.rb +1 -1
  140. data/lib/klaviyo-api-sdk/models/catalog_item_create_job_create_query_as_sub_resource.rb +1 -1
  141. data/lib/klaviyo-api-sdk/models/catalog_item_create_job_create_query_as_sub_resource_attributes.rb +2 -1
  142. data/lib/klaviyo-api-sdk/models/catalog_item_create_query.rb +1 -1
  143. data/lib/klaviyo-api-sdk/models/catalog_item_create_query_as_sub_resource.rb +1 -1
  144. data/lib/klaviyo-api-sdk/models/catalog_item_create_query_as_sub_resource_attributes.rb +23 -3
  145. data/lib/klaviyo-api-sdk/models/catalog_item_create_query_as_sub_resource_relationships.rb +1 -1
  146. data/lib/klaviyo-api-sdk/models/catalog_item_create_query_as_sub_resource_relationships_categories.rb +1 -1
  147. data/lib/klaviyo-api-sdk/models/catalog_item_create_query_as_sub_resource_relationships_categories_data_inner.rb +1 -1
  148. data/lib/klaviyo-api-sdk/models/catalog_item_delete_job_create_query.rb +1 -1
  149. data/lib/klaviyo-api-sdk/models/catalog_item_delete_job_create_query_as_sub_resource.rb +1 -1
  150. data/lib/klaviyo-api-sdk/models/catalog_item_delete_job_create_query_as_sub_resource_attributes.rb +2 -1
  151. data/lib/klaviyo-api-sdk/models/catalog_item_delete_query_as_sub_resource.rb +2 -2
  152. data/lib/klaviyo-api-sdk/models/catalog_item_update_job_create_query.rb +1 -1
  153. data/lib/klaviyo-api-sdk/models/catalog_item_update_job_create_query_as_sub_resource.rb +1 -1
  154. data/lib/klaviyo-api-sdk/models/catalog_item_update_job_create_query_as_sub_resource_attributes.rb +2 -1
  155. data/lib/klaviyo-api-sdk/models/catalog_item_update_query.rb +1 -1
  156. data/lib/klaviyo-api-sdk/models/catalog_item_update_query_as_sub_resource.rb +2 -2
  157. data/lib/klaviyo-api-sdk/models/catalog_item_update_query_as_sub_resource_attributes.rb +20 -2
  158. data/lib/klaviyo-api-sdk/models/catalog_job_error_payload.rb +5 -1
  159. data/lib/klaviyo-api-sdk/models/catalog_variant_create_job_create_query.rb +1 -1
  160. data/lib/klaviyo-api-sdk/models/catalog_variant_create_job_create_query_as_sub_resource.rb +1 -1
  161. data/lib/klaviyo-api-sdk/models/catalog_variant_create_job_create_query_as_sub_resource_attributes.rb +2 -1
  162. data/lib/klaviyo-api-sdk/models/catalog_variant_create_query.rb +1 -1
  163. data/lib/klaviyo-api-sdk/models/catalog_variant_create_query_as_sub_resource.rb +1 -1
  164. data/lib/klaviyo-api-sdk/models/catalog_variant_create_query_as_sub_resource_attributes.rb +16 -8
  165. data/lib/klaviyo-api-sdk/models/catalog_variant_create_query_as_sub_resource_relationships.rb +1 -1
  166. data/lib/klaviyo-api-sdk/models/catalog_variant_create_query_as_sub_resource_relationships_items.rb +1 -1
  167. data/lib/klaviyo-api-sdk/models/catalog_variant_create_query_as_sub_resource_relationships_items_data_inner.rb +1 -1
  168. data/lib/klaviyo-api-sdk/models/catalog_variant_delete_job_create_query.rb +1 -1
  169. data/lib/klaviyo-api-sdk/models/catalog_variant_delete_job_create_query_as_sub_resource.rb +1 -1
  170. data/lib/klaviyo-api-sdk/models/catalog_variant_delete_job_create_query_as_sub_resource_attributes.rb +2 -1
  171. data/lib/klaviyo-api-sdk/models/catalog_variant_delete_query_as_sub_resource.rb +2 -2
  172. data/lib/klaviyo-api-sdk/models/catalog_variant_update_job_create_query.rb +1 -1
  173. data/lib/klaviyo-api-sdk/models/catalog_variant_update_job_create_query_as_sub_resource.rb +1 -1
  174. data/lib/klaviyo-api-sdk/models/catalog_variant_update_job_create_query_as_sub_resource_attributes.rb +2 -1
  175. data/lib/klaviyo-api-sdk/models/catalog_variant_update_query.rb +1 -1
  176. data/lib/klaviyo-api-sdk/models/catalog_variant_update_query_as_sub_resource.rb +2 -2
  177. data/lib/klaviyo-api-sdk/models/catalog_variant_update_query_as_sub_resource_attributes.rb +12 -2
  178. data/lib/klaviyo-api-sdk/models/content_sub_object.rb +1 -1
  179. data/lib/klaviyo-api-sdk/models/data_privacy_create_deletion_job_query.rb +1 -1
  180. data/lib/klaviyo-api-sdk/models/data_privacy_create_deletion_job_query_as_sub_resource.rb +1 -1
  181. data/lib/klaviyo-api-sdk/models/data_privacy_create_deletion_job_query_as_sub_resource_attributes.rb +1 -1
  182. data/lib/klaviyo-api-sdk/models/email_message_content.rb +1 -1
  183. data/lib/klaviyo-api-sdk/models/email_tracking_options.rb +1 -1
  184. data/lib/klaviyo-api-sdk/models/error_source.rb +2 -1
  185. data/lib/klaviyo-api-sdk/models/event_create_query.rb +1 -1
  186. data/lib/klaviyo-api-sdk/models/event_create_query_as_sub_resource.rb +1 -1
  187. data/lib/klaviyo-api-sdk/models/event_create_query_as_sub_resource_attributes.rb +1 -1
  188. data/lib/klaviyo-api-sdk/models/flow_update_query.rb +1 -1
  189. data/lib/klaviyo-api-sdk/models/flow_update_query_as_sub_resource.rb +1 -1
  190. data/lib/klaviyo-api-sdk/models/flow_update_query_as_sub_resource_attributes.rb +1 -1
  191. data/lib/klaviyo-api-sdk/models/get_campaigns4_xx_response.rb +226 -0
  192. data/lib/klaviyo-api-sdk/models/get_campaigns4_xx_response_errors_inner.rb +275 -0
  193. data/lib/klaviyo-api-sdk/models/get_campaigns4_xx_response_errors_inner_source.rb +228 -0
  194. data/lib/klaviyo-api-sdk/models/included_categories.rb +2 -2
  195. data/lib/klaviyo-api-sdk/models/included_categories_attributes.rb +4 -1
  196. data/lib/klaviyo-api-sdk/models/included_flow_action.rb +1 -1
  197. data/lib/klaviyo-api-sdk/models/included_flow_actions.rb +1 -1
  198. data/lib/klaviyo-api-sdk/models/included_flow_actions_attributes.rb +1 -1
  199. data/lib/klaviyo-api-sdk/models/included_flow_actions_attributes_tracking_options.rb +1 -1
  200. data/lib/klaviyo-api-sdk/models/included_flow_messages.rb +1 -1
  201. data/lib/klaviyo-api-sdk/models/included_flow_messages_attributes.rb +1 -1
  202. data/lib/klaviyo-api-sdk/models/included_flow_messages_attributes_content.rb +1 -1
  203. data/lib/klaviyo-api-sdk/models/included_flows.rb +1 -1
  204. data/lib/klaviyo-api-sdk/models/included_flows_attributes.rb +1 -1
  205. data/lib/klaviyo-api-sdk/models/included_items.rb +2 -1
  206. data/lib/klaviyo-api-sdk/models/included_items_attributes.rb +23 -2
  207. data/lib/klaviyo-api-sdk/models/included_lists.rb +2 -1
  208. data/lib/klaviyo-api-sdk/models/included_lists_attributes.rb +4 -1
  209. data/lib/klaviyo-api-sdk/models/included_metrics.rb +1 -1
  210. data/lib/klaviyo-api-sdk/models/included_metrics_attributes.rb +1 -1
  211. data/lib/klaviyo-api-sdk/models/included_profiles.rb +2 -1
  212. data/lib/klaviyo-api-sdk/models/included_profiles_attributes.rb +13 -1
  213. data/lib/klaviyo-api-sdk/models/included_segments.rb +2 -2
  214. data/lib/klaviyo-api-sdk/models/included_segments_attributes.rb +240 -0
  215. data/lib/klaviyo-api-sdk/models/included_tags.rb +301 -0
  216. data/lib/klaviyo-api-sdk/models/included_variants.rb +2 -1
  217. data/lib/klaviyo-api-sdk/models/included_variants_attributes.rb +16 -2
  218. data/lib/klaviyo-api-sdk/models/included_variants_links.rb +1 -1
  219. data/lib/klaviyo-api-sdk/models/list_create_query.rb +1 -1
  220. data/lib/klaviyo-api-sdk/models/list_create_query_as_sub_resource.rb +1 -1
  221. data/lib/klaviyo-api-sdk/models/list_create_query_as_sub_resource_attributes.rb +2 -1
  222. data/lib/klaviyo-api-sdk/models/list_members_add_query.rb +1 -1
  223. data/lib/klaviyo-api-sdk/models/list_members_add_query_data_inner.rb +1 -1
  224. data/lib/klaviyo-api-sdk/models/list_members_delete_query.rb +1 -1
  225. data/lib/klaviyo-api-sdk/models/list_partial_update_query.rb +1 -1
  226. data/lib/klaviyo-api-sdk/models/list_partial_update_query_as_sub_resource.rb +2 -1
  227. data/lib/klaviyo-api-sdk/models/metric_aggregate_query.rb +1 -1
  228. data/lib/klaviyo-api-sdk/models/metric_aggregate_query_as_sub_resource.rb +1 -1
  229. data/lib/klaviyo-api-sdk/models/metric_aggregate_query_as_sub_resource_attributes.rb +17 -15
  230. data/lib/klaviyo-api-sdk/models/metric_aggregate_row_dto.rb +1 -1
  231. data/lib/klaviyo-api-sdk/models/metric_create_query.rb +1 -1
  232. data/lib/klaviyo-api-sdk/models/onsite_profile_create_query.rb +1 -1
  233. data/lib/klaviyo-api-sdk/models/onsite_profile_create_query_as_sub_resource.rb +1 -1
  234. data/lib/klaviyo-api-sdk/models/onsite_profile_meta.rb +1 -1
  235. data/lib/klaviyo-api-sdk/models/onsite_profile_meta_identifiers.rb +16 -11
  236. data/lib/klaviyo-api-sdk/models/onsite_subscription_create_query.rb +1 -1
  237. data/lib/klaviyo-api-sdk/models/onsite_subscription_create_query_as_sub_resource.rb +1 -1
  238. data/lib/klaviyo-api-sdk/models/onsite_subscription_create_query_as_sub_resource_attributes.rb +1 -1
  239. data/lib/klaviyo-api-sdk/models/profile_create_query.rb +1 -1
  240. data/lib/klaviyo-api-sdk/models/profile_create_query_as_sub_resource.rb +1 -1
  241. data/lib/klaviyo-api-sdk/models/profile_create_query_as_sub_resource_attributes.rb +10 -1
  242. data/lib/klaviyo-api-sdk/models/profile_location.rb +9 -2
  243. data/lib/klaviyo-api-sdk/models/profile_location_latitude.rb +2 -1
  244. data/lib/klaviyo-api-sdk/models/profile_location_longitude.rb +106 -0
  245. data/lib/klaviyo-api-sdk/models/profile_partial_update_query.rb +1 -1
  246. data/lib/klaviyo-api-sdk/models/profile_partial_update_query_as_sub_resource.rb +2 -1
  247. data/lib/klaviyo-api-sdk/models/segment_partial_update_query.rb +1 -1
  248. data/lib/klaviyo-api-sdk/models/segment_partial_update_query_as_sub_resource.rb +2 -2
  249. data/lib/klaviyo-api-sdk/models/segment_partial_update_query_as_sub_resource_attributes.rb +224 -0
  250. data/lib/klaviyo-api-sdk/models/send_options.rb +1 -1
  251. data/lib/klaviyo-api-sdk/models/send_options_sub_object.rb +5 -15
  252. data/lib/klaviyo-api-sdk/models/send_strategy_sub_object.rb +15 -6
  253. data/lib/klaviyo-api-sdk/models/send_time_sub_object.rb +1 -1
  254. data/lib/klaviyo-api-sdk/models/sms_message_content.rb +1 -1
  255. data/lib/klaviyo-api-sdk/models/sms_render_options.rb +1 -1
  256. data/lib/klaviyo-api-sdk/models/sms_tracking_options.rb +1 -1
  257. data/lib/klaviyo-api-sdk/models/static_schedule_options.rb +1 -1
  258. data/lib/klaviyo-api-sdk/models/sto_schedule_options.rb +225 -0
  259. data/lib/klaviyo-api-sdk/models/subscription.rb +26 -5
  260. data/lib/klaviyo-api-sdk/models/subscription_channels.rb +256 -0
  261. data/lib/klaviyo-api-sdk/models/subscription_create_job_create_query.rb +1 -1
  262. data/lib/klaviyo-api-sdk/models/subscription_create_job_create_query_as_sub_resource.rb +1 -1
  263. data/lib/klaviyo-api-sdk/models/subscription_create_job_create_query_as_sub_resource_attributes.rb +1 -1
  264. data/lib/klaviyo-api-sdk/models/suppression.rb +1 -1
  265. data/lib/klaviyo-api-sdk/models/suppression_create_job_create_query.rb +1 -1
  266. data/lib/klaviyo-api-sdk/models/suppression_create_job_create_query_as_sub_resource.rb +1 -1
  267. data/lib/klaviyo-api-sdk/models/suppression_create_job_create_query_as_sub_resource_attributes.rb +1 -1
  268. data/lib/klaviyo-api-sdk/models/tag_create_query.rb +1 -1
  269. data/lib/klaviyo-api-sdk/models/tag_create_query_as_sub_resource.rb +1 -1
  270. data/lib/klaviyo-api-sdk/models/tag_create_query_as_sub_resource_attributes.rb +1 -1
  271. data/lib/klaviyo-api-sdk/models/tag_group_create_query.rb +1 -1
  272. data/lib/klaviyo-api-sdk/models/tag_group_create_query_as_sub_resource.rb +1 -1
  273. data/lib/klaviyo-api-sdk/models/tag_group_create_query_as_sub_resource_attributes.rb +1 -1
  274. data/lib/klaviyo-api-sdk/models/tag_group_update_query.rb +1 -1
  275. data/lib/klaviyo-api-sdk/models/tag_group_update_query_as_sub_resource.rb +1 -1
  276. data/lib/klaviyo-api-sdk/models/tag_group_update_query_as_sub_resource_attributes.rb +1 -1
  277. data/lib/klaviyo-api-sdk/models/tag_segment_op.rb +1 -1
  278. data/lib/klaviyo-api-sdk/models/tag_segment_op_data_inner.rb +1 -1
  279. data/lib/klaviyo-api-sdk/models/tag_update_query.rb +1 -1
  280. data/lib/klaviyo-api-sdk/models/tag_update_query_as_sub_resource.rb +1 -1
  281. data/lib/klaviyo-api-sdk/models/tag_update_query_as_sub_resource_attributes.rb +1 -1
  282. data/lib/klaviyo-api-sdk/models/template_clone_query.rb +1 -1
  283. data/lib/klaviyo-api-sdk/models/template_clone_query_as_sub_resource.rb +2 -13
  284. data/lib/klaviyo-api-sdk/models/template_clone_query_as_sub_resource_attributes.rb +1 -1
  285. data/lib/klaviyo-api-sdk/models/template_create_query.rb +1 -1
  286. data/lib/klaviyo-api-sdk/models/template_create_query_as_sub_resource.rb +1 -1
  287. data/lib/klaviyo-api-sdk/models/template_create_query_as_sub_resource_attributes.rb +1 -1
  288. data/lib/klaviyo-api-sdk/models/template_render_query.rb +1 -1
  289. data/lib/klaviyo-api-sdk/models/template_render_query_as_sub_resource.rb +1 -1
  290. data/lib/klaviyo-api-sdk/models/template_render_query_as_sub_resource_attributes.rb +1 -1
  291. data/lib/klaviyo-api-sdk/models/template_update_query.rb +1 -1
  292. data/lib/klaviyo-api-sdk/models/template_update_query_as_sub_resource.rb +1 -1
  293. data/lib/klaviyo-api-sdk/models/template_update_query_as_sub_resource_attributes.rb +1 -1
  294. data/lib/klaviyo-api-sdk/models/throttled_schedule_options.rb +1 -1
  295. data/lib/klaviyo-api-sdk/models/tracking_options_sub_object.rb +1 -1
  296. data/lib/klaviyo-api-sdk/models/unsubscription_create_job_create_query.rb +1 -1
  297. data/lib/klaviyo-api-sdk/models/unsubscription_create_job_create_query_as_sub_resource.rb +1 -1
  298. data/lib/klaviyo-api-sdk/models/unsubscription_create_job_create_query_as_sub_resource_attributes.rb +1 -1
  299. data/lib/klaviyo-api-sdk/models/unsuppression_create_job_create_query.rb +1 -1
  300. data/lib/klaviyo-api-sdk/models/unsuppression_create_job_create_query_as_sub_resource.rb +1 -1
  301. data/lib/klaviyo-api-sdk/models/unsuppression_create_job_create_query_as_sub_resource_attributes.rb +1 -1
  302. data/lib/klaviyo-api-sdk/models/utm_param_info.rb +1 -1
  303. data/lib/klaviyo-api-sdk/models/utm_params_sub_object.rb +1 -1
  304. data/lib/klaviyo-api-sdk/version.rb +1 -1
  305. data/lib/klaviyo-api-sdk.rb +14 -5
  306. data/spec/api/campaigns_api_spec.rb +284 -0
  307. data/spec/api_client_spec.rb +1 -1
  308. data/spec/configuration_spec.rb +1 -1
  309. data/spec/models/campaign_recipient_estimation_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
  310. data/spec/models/campaign_recipient_estimation_job_create_query_as_sub_resource_spec.rb +44 -0
  311. data/spec/models/campaign_recipient_estimation_job_create_query_spec.rb +34 -0
  312. data/spec/models/campaign_tag_op_data_inner_spec.rb +44 -0
  313. data/spec/models/campaign_tag_op_spec.rb +34 -0
  314. data/spec/models/get_campaigns4_xx_response_errors_inner_source_spec.rb +40 -0
  315. data/spec/models/get_campaigns4_xx_response_errors_inner_spec.rb +58 -0
  316. data/spec/models/get_campaigns4_xx_response_spec.rb +34 -0
  317. data/spec/models/included_segments_attributes_spec.rb +46 -0
  318. data/spec/models/included_tags_spec.rb +56 -0
  319. data/spec/models/profile_location_longitude_spec.rb +31 -0
  320. data/spec/models/segment_partial_update_query_as_sub_resource_attributes_spec.rb +34 -0
  321. data/spec/models/sto_schedule_options_spec.rb +34 -0
  322. data/spec/models/subscription_channels_spec.rb +48 -0
  323. data/spec/spec_helper.rb +1 -1
  324. metadata +51 -6
@@ -0,0 +1,240 @@
1
+ =begin
2
+ #Klaviyo API
3
+
4
+ #The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
5
+
6
+ The version of the OpenAPI document: 2023-02-22
7
+ Contact: developers@klaviyo.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module KlaviyoAPI
17
+ class IncludedSegmentsAttributes
18
+ # A helpful name to label the segment
19
+ attr_accessor :name
20
+
21
+ # Date and time when the segment was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
22
+ attr_accessor :created
23
+
24
+ # Date and time when the segment was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)
25
+ attr_accessor :updated
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'name' => :'name',
31
+ :'created' => :'created',
32
+ :'updated' => :'updated'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'name' => :'String',
45
+ :'created' => :'Time',
46
+ :'updated' => :'Time'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `KlaviyoAPI::IncludedSegmentsAttributes` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!self.class.attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `KlaviyoAPI::IncludedSegmentsAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'name')
72
+ self.name = attributes[:'name']
73
+ end
74
+
75
+ if attributes.key?(:'created')
76
+ self.created = attributes[:'created']
77
+ end
78
+
79
+ if attributes.key?(:'updated')
80
+ self.updated = attributes[:'updated']
81
+ end
82
+ end
83
+
84
+ # Show invalid properties with the reasons. Usually used together with valid?
85
+ # @return Array for valid properties with the reasons
86
+ def list_invalid_properties
87
+ invalid_properties = Array.new
88
+ invalid_properties
89
+ end
90
+
91
+ # Check to see if the all the properties in the model are valid
92
+ # @return true if the model is valid
93
+ def valid?
94
+ true
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param [Object] Object to be compared
99
+ def ==(o)
100
+ return true if self.equal?(o)
101
+ self.class == o.class &&
102
+ name == o.name &&
103
+ created == o.created &&
104
+ updated == o.updated
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param [Object] Object to be compared
109
+ def eql?(o)
110
+ self == o
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Integer] Hash code
115
+ def hash
116
+ [name, created, updated].hash
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def self.build_from_hash(attributes)
123
+ new.build_from_hash(attributes)
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 build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ self.class.openapi_types.each_pair do |key, type|
133
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
+ self.send("#{key}=", nil)
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ end
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :Time
156
+ Time.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :Boolean
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ # models (e.g. Pet) or oneOf
187
+ klass = KlaviyoAPI.const_get(type)
188
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+
238
+ end
239
+
240
+ end
@@ -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
+ The version of the OpenAPI document: 2023-02-22
7
+ Contact: developers@klaviyo.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module KlaviyoAPI
17
+ class IncludedTags
18
+ attr_accessor :type
19
+
20
+ # The Tag ID
21
+ attr_accessor :id
22
+
23
+ attr_accessor :attributes
24
+
25
+ attr_accessor :links
26
+
27
+ class EnumAttributeValidator
28
+ attr_reader :datatype
29
+ attr_reader :allowable_values
30
+
31
+ def initialize(datatype, allowable_values)
32
+ @allowable_values = allowable_values.map do |value|
33
+ case datatype.to_s
34
+ when /Integer/i
35
+ value.to_i
36
+ when /Float/i
37
+ value.to_f
38
+ else
39
+ value
40
+ end
41
+ end
42
+ end
43
+
44
+ def valid?(value)
45
+ !value || allowable_values.include?(value)
46
+ end
47
+ end
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ :'type' => :'type',
53
+ :'id' => :'id',
54
+ :'attributes' => :'attributes',
55
+ :'links' => :'links'
56
+ }
57
+ end
58
+
59
+ # Returns all the JSON keys this model knows about
60
+ def self.acceptable_attributes
61
+ attribute_map.values
62
+ end
63
+
64
+ # Attribute type mapping.
65
+ def self.openapi_types
66
+ {
67
+ :'type' => :'String',
68
+ :'id' => :'String',
69
+ :'attributes' => :'TagUpdateQueryAsSubResourceAttributes',
70
+ :'links' => :'IncludedVariantsLinks'
71
+ }
72
+ end
73
+
74
+ # List of attributes with nullable: true
75
+ def self.openapi_nullable
76
+ Set.new([
77
+ ])
78
+ end
79
+
80
+ # Initializes the object
81
+ # @param [Hash] attributes Model attributes in the form of hash
82
+ def initialize(attributes = {})
83
+ if (!attributes.is_a?(Hash))
84
+ fail ArgumentError, "The input argument (attributes) must be a hash in `KlaviyoAPI::IncludedTags` initialize method"
85
+ end
86
+
87
+ # check to see if the attribute exists and convert string to symbol for hash key
88
+ attributes = attributes.each_with_object({}) { |(k, v), h|
89
+ if (!self.class.attribute_map.key?(k.to_sym))
90
+ fail ArgumentError, "`#{k}` is not a valid attribute in `KlaviyoAPI::IncludedTags`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
91
+ end
92
+ h[k.to_sym] = v
93
+ }
94
+
95
+ if attributes.key?(:'type')
96
+ self.type = attributes[:'type']
97
+ end
98
+
99
+ if attributes.key?(:'id')
100
+ self.id = attributes[:'id']
101
+ end
102
+
103
+ if attributes.key?(:'attributes')
104
+ self.attributes = attributes[:'attributes']
105
+ end
106
+
107
+ if attributes.key?(:'links')
108
+ self.links = attributes[:'links']
109
+ end
110
+ end
111
+
112
+ # Show invalid properties with the reasons. Usually used together with valid?
113
+ # @return Array for valid properties with the reasons
114
+ def list_invalid_properties
115
+ invalid_properties = Array.new
116
+ if @type.nil?
117
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
118
+ end
119
+
120
+ if @id.nil?
121
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
122
+ end
123
+
124
+ if @attributes.nil?
125
+ invalid_properties.push('invalid value for "attributes", attributes cannot be nil.')
126
+ end
127
+
128
+ if @links.nil?
129
+ invalid_properties.push('invalid value for "links", links cannot be nil.')
130
+ end
131
+
132
+ invalid_properties
133
+ end
134
+
135
+ # Check to see if the all the properties in the model are valid
136
+ # @return true if the model is valid
137
+ def valid?
138
+ return false if @type.nil?
139
+ type_validator = EnumAttributeValidator.new('String', ["tag"])
140
+ return false unless type_validator.valid?(@type)
141
+ return false if @id.nil?
142
+ return false if @attributes.nil?
143
+ return false if @links.nil?
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', ["tag"])
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
+ type == o.type &&
163
+ id == o.id &&
164
+ attributes == o.attributes &&
165
+ links == o.links
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
+ [type, id, attributes, links].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
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
5
5
 
6
- The version of the OpenAPI document: 2023-01-24
6
+ The version of the OpenAPI document: 2023-02-22
7
7
  Contact: developers@klaviyo.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.2.1
@@ -17,6 +17,7 @@ module KlaviyoAPI
17
17
  class IncludedVariants
18
18
  attr_accessor :type
19
19
 
20
+ # The catalog variant ID is a compound ID (string), with format: `${integration}:::${catalog}:::${external_id}`. Currently, the only supported integration type is `$custom`, and the only supported catalog is `$default`.
20
21
  attr_accessor :id
21
22
 
22
23
  attr_accessor :attributes
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
5
5
 
6
- The version of the OpenAPI document: 2023-01-24
6
+ The version of the OpenAPI document: 2023-02-22
7
7
  Contact: developers@klaviyo.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.2.1
@@ -15,35 +15,49 @@ require 'time'
15
15
 
16
16
  module KlaviyoAPI
17
17
  class IncludedVariantsAttributes
18
+ # The ID of the catalog item variant in an external system.
18
19
  attr_accessor :external_id
19
20
 
21
+ # The title of the catalog item variant.
20
22
  attr_accessor :title
21
23
 
24
+ # A description of the catalog item variant.
22
25
  attr_accessor :description
23
26
 
27
+ # The SKU of the catalog item variant.
24
28
  attr_accessor :sku
25
29
 
26
- # A field that controls product visibility in product feeds/blocks. This field has two options: DENY (1): a product will not appear in dynamic product recommendation feeds and blocks if it is out of stock. CONTINUE (2): a product can appear in dynamic product recommendation feeds and blocks regardless of inventory quantity. UNKNOWN (0): the behavior will be the same as if it were set to 2 [Default]
30
+ # This field controls the visibility of this catalog item variant in product feeds/blocks. This field supports the following values: `1`: a product will not appear in dynamic product recommendation feeds and blocks if it is out of stock. `0` or `2`: a product can appear in dynamic product recommendation feeds and blocks regardless of inventory quantity.
27
31
  attr_accessor :inventory_policy
28
32
 
33
+ # The quantity of the catalog item variant currently in stock.
29
34
  attr_accessor :inventory_quantity
30
35
 
36
+ # This field can be used to set the price on the catalog item variant, which is what gets displayed for the item variant when included in emails. For most price-update use cases, you will also want to update the `price` on any parent items using the [Update Catalog Item Endpoint](https://developers.klaviyo.com/en/reference/update_catalog_item).
31
37
  attr_accessor :price
32
38
 
39
+ # URL pointing to the location of the catalog item variant on your website.
33
40
  attr_accessor :url
34
41
 
42
+ # URL pointing to the location of a full image of the catalog item variant.
35
43
  attr_accessor :image_full_url
36
44
 
45
+ # URL pointing to the location of an image thumbnail of the catalog item variant.
37
46
  attr_accessor :image_thumbnail_url
38
47
 
48
+ # List of URLs pointing to the locations of images of the catalog item variant.
39
49
  attr_accessor :images
40
50
 
51
+ # Flat JSON blob to provide custom metadata about the catalog item variant. May not exceed 100kb.
41
52
  attr_accessor :custom_metadata
42
53
 
54
+ # Boolean value indicating whether the catalog item variant is published.
43
55
  attr_accessor :published
44
56
 
57
+ # Date and time when the catalog item variant was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
45
58
  attr_accessor :created
46
59
 
60
+ # Date and time when the catalog item variant was last updated, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm).
47
61
  attr_accessor :updated
48
62
 
49
63
  class EnumAttributeValidator
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
5
5
 
6
- The version of the OpenAPI document: 2023-01-24
6
+ The version of the OpenAPI document: 2023-02-22
7
7
  Contact: developers@klaviyo.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.2.1
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
5
5
 
6
- The version of the OpenAPI document: 2023-01-24
6
+ The version of the OpenAPI document: 2023-02-22
7
7
  Contact: developers@klaviyo.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.2.1
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
5
5
 
6
- The version of the OpenAPI document: 2023-01-24
6
+ The version of the OpenAPI document: 2023-02-22
7
7
  Contact: developers@klaviyo.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.2.1
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
5
5
 
6
- The version of the OpenAPI document: 2023-01-24
6
+ The version of the OpenAPI document: 2023-02-22
7
7
  Contact: developers@klaviyo.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.2.1
@@ -15,6 +15,7 @@ require 'time'
15
15
 
16
16
  module KlaviyoAPI
17
17
  class ListCreateQueryAsSubResourceAttributes
18
+ # A helpful name to label the list
18
19
  attr_accessor :name
19
20
 
20
21
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
5
5
 
6
- The version of the OpenAPI document: 2023-01-24
6
+ The version of the OpenAPI document: 2023-02-22
7
7
  Contact: developers@klaviyo.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.2.1
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
5
5
 
6
- The version of the OpenAPI document: 2023-01-24
6
+ The version of the OpenAPI document: 2023-02-22
7
7
  Contact: developers@klaviyo.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.2.1
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details.
5
5
 
6
- The version of the OpenAPI document: 2023-01-24
6
+ The version of the OpenAPI document: 2023-02-22
7
7
  Contact: developers@klaviyo.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 6.2.1