klaviyo-api-sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (506) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +17 -0
  3. data/Gemfile +9 -0
  4. data/LICENSE.md +21 -0
  5. data/README.md +1316 -0
  6. data/Rakefile +10 -0
  7. data/docs/CatalogCategoryCreateJobCreateQuery.md +18 -0
  8. data/docs/CatalogCategoryCreateJobCreateQueryAsSubResource.md +20 -0
  9. data/docs/CatalogCategoryCreateJobCreateQueryAsSubResourceAttributes.md +18 -0
  10. data/docs/CatalogCategoryCreateQuery.md +18 -0
  11. data/docs/CatalogCategoryCreateQueryAsSubResource.md +22 -0
  12. data/docs/CatalogCategoryCreateQueryAsSubResourceAttributes.md +24 -0
  13. data/docs/CatalogCategoryDeleteJobCreateQuery.md +18 -0
  14. data/docs/CatalogCategoryDeleteJobCreateQueryAsSubResource.md +20 -0
  15. data/docs/CatalogCategoryDeleteJobCreateQueryAsSubResourceAttributes.md +18 -0
  16. data/docs/CatalogCategoryDeleteQueryAsSubResource.md +20 -0
  17. data/docs/CatalogCategoryItemOp.md +18 -0
  18. data/docs/CatalogCategoryUpdateJobCreateQuery.md +18 -0
  19. data/docs/CatalogCategoryUpdateJobCreateQueryAsSubResource.md +20 -0
  20. data/docs/CatalogCategoryUpdateJobCreateQueryAsSubResourceAttributes.md +18 -0
  21. data/docs/CatalogCategoryUpdateQuery.md +18 -0
  22. data/docs/CatalogCategoryUpdateQueryAsSubResource.md +24 -0
  23. data/docs/CatalogCategoryUpdateQueryAsSubResourceAttributes.md +18 -0
  24. data/docs/CatalogItemCategoryOp.md +18 -0
  25. data/docs/CatalogItemCreateJobCreateQuery.md +18 -0
  26. data/docs/CatalogItemCreateJobCreateQueryAsSubResource.md +20 -0
  27. data/docs/CatalogItemCreateJobCreateQueryAsSubResourceAttributes.md +18 -0
  28. data/docs/CatalogItemCreateQuery.md +18 -0
  29. data/docs/CatalogItemCreateQueryAsSubResource.md +22 -0
  30. data/docs/CatalogItemCreateQueryAsSubResourceAttributes.md +38 -0
  31. data/docs/CatalogItemCreateQueryAsSubResourceRelationships.md +18 -0
  32. data/docs/CatalogItemCreateQueryAsSubResourceRelationshipsCategories.md +18 -0
  33. data/docs/CatalogItemCreateQueryAsSubResourceRelationshipsCategoriesDataInner.md +20 -0
  34. data/docs/CatalogItemDeleteJobCreateQuery.md +18 -0
  35. data/docs/CatalogItemDeleteJobCreateQueryAsSubResource.md +20 -0
  36. data/docs/CatalogItemDeleteJobCreateQueryAsSubResourceAttributes.md +18 -0
  37. data/docs/CatalogItemDeleteQueryAsSubResource.md +20 -0
  38. data/docs/CatalogItemUpdateJobCreateQuery.md +18 -0
  39. data/docs/CatalogItemUpdateJobCreateQueryAsSubResource.md +20 -0
  40. data/docs/CatalogItemUpdateJobCreateQueryAsSubResourceAttributes.md +18 -0
  41. data/docs/CatalogItemUpdateQuery.md +18 -0
  42. data/docs/CatalogItemUpdateQueryAsSubResource.md +24 -0
  43. data/docs/CatalogItemUpdateQueryAsSubResourceAttributes.md +32 -0
  44. data/docs/CatalogJobErrorPayload.md +26 -0
  45. data/docs/CatalogVariantCreateJobCreateQuery.md +18 -0
  46. data/docs/CatalogVariantCreateJobCreateQueryAsSubResource.md +20 -0
  47. data/docs/CatalogVariantCreateJobCreateQueryAsSubResourceAttributes.md +18 -0
  48. data/docs/CatalogVariantCreateQuery.md +18 -0
  49. data/docs/CatalogVariantCreateQueryAsSubResource.md +22 -0
  50. data/docs/CatalogVariantCreateQueryAsSubResourceAttributes.md +46 -0
  51. data/docs/CatalogVariantCreateQueryAsSubResourceRelationships.md +18 -0
  52. data/docs/CatalogVariantCreateQueryAsSubResourceRelationshipsItems.md +18 -0
  53. data/docs/CatalogVariantCreateQueryAsSubResourceRelationshipsItemsDataInner.md +20 -0
  54. data/docs/CatalogVariantDeleteJobCreateQuery.md +18 -0
  55. data/docs/CatalogVariantDeleteJobCreateQueryAsSubResource.md +20 -0
  56. data/docs/CatalogVariantDeleteJobCreateQueryAsSubResourceAttributes.md +18 -0
  57. data/docs/CatalogVariantDeleteQueryAsSubResource.md +20 -0
  58. data/docs/CatalogVariantUpdateJobCreateQuery.md +18 -0
  59. data/docs/CatalogVariantUpdateJobCreateQueryAsSubResource.md +20 -0
  60. data/docs/CatalogVariantUpdateJobCreateQueryAsSubResourceAttributes.md +18 -0
  61. data/docs/CatalogVariantUpdateQuery.md +18 -0
  62. data/docs/CatalogVariantUpdateQueryAsSubResource.md +22 -0
  63. data/docs/CatalogVariantUpdateQueryAsSubResourceAttributes.md +38 -0
  64. data/docs/CatalogsApi.md +4048 -0
  65. data/docs/ClientApi.md +205 -0
  66. data/docs/EmailMessageContent.md +24 -0
  67. data/docs/EmailTrackingOptions.md +24 -0
  68. data/docs/ErrorSource.md +18 -0
  69. data/docs/EventCreateQuery.md +18 -0
  70. data/docs/EventCreateQueryAsSubResource.md +20 -0
  71. data/docs/EventCreateQueryAsSubResourceAttributes.md +28 -0
  72. data/docs/EventsApi.md +472 -0
  73. data/docs/FlowUpdateQuery.md +18 -0
  74. data/docs/FlowUpdateQueryAsSubResource.md +22 -0
  75. data/docs/FlowUpdateQueryAsSubResourceAttributes.md +18 -0
  76. data/docs/FlowsApi.md +951 -0
  77. data/docs/GetCatalogItems4XXResponse.md +18 -0
  78. data/docs/GetCatalogItems4XXResponseErrorsInner.md +26 -0
  79. data/docs/GetCatalogItems4XXResponseErrorsInnerSource.md +20 -0
  80. data/docs/IncludedCategories.md +24 -0
  81. data/docs/IncludedCategoriesAttributes.md +22 -0
  82. data/docs/IncludedFlowAction.md +24 -0
  83. data/docs/IncludedFlowActions.md +24 -0
  84. data/docs/IncludedFlowActionsAttributes.md +32 -0
  85. data/docs/IncludedFlowActionsAttributesTrackingOptions.md +49 -0
  86. data/docs/IncludedFlowMessages.md +24 -0
  87. data/docs/IncludedFlowMessagesAttributes.md +26 -0
  88. data/docs/IncludedFlowMessagesAttributesContent.md +49 -0
  89. data/docs/IncludedFlows.md +24 -0
  90. data/docs/IncludedFlowsAttributes.md +28 -0
  91. data/docs/IncludedItems.md +24 -0
  92. data/docs/IncludedItemsAttributes.md +38 -0
  93. data/docs/IncludedLists.md +24 -0
  94. data/docs/IncludedListsAttributes.md +22 -0
  95. data/docs/IncludedMetrics.md +24 -0
  96. data/docs/IncludedMetricsAttributes.md +24 -0
  97. data/docs/IncludedProfile.md +24 -0
  98. data/docs/IncludedProfiles.md +24 -0
  99. data/docs/IncludedProfilesAttributes.md +44 -0
  100. data/docs/IncludedSegments.md +24 -0
  101. data/docs/IncludedVariants.md +24 -0
  102. data/docs/IncludedVariantsAttributes.md +46 -0
  103. data/docs/IncludedVariantsLinks.md +18 -0
  104. data/docs/ListCreateQuery.md +18 -0
  105. data/docs/ListCreateQueryAsSubResource.md +20 -0
  106. data/docs/ListCreateQueryAsSubResourceAttributes.md +18 -0
  107. data/docs/ListDeleteQueryAsSubResource.md +20 -0
  108. data/docs/ListMembersAddQuery.md +18 -0
  109. data/docs/ListMembersAddQueryDataInner.md +20 -0
  110. data/docs/ListMembersDeleteQuery.md +18 -0
  111. data/docs/ListPartialUpdateQuery.md +18 -0
  112. data/docs/ListPartialUpdateQueryAsSubResource.md +22 -0
  113. data/docs/ListsApi.md +686 -0
  114. data/docs/MetricAggregateQuery.md +18 -0
  115. data/docs/MetricAggregateQueryAsSubResource.md +20 -0
  116. data/docs/MetricAggregateQueryAsSubResourceAttributes.md +36 -0
  117. data/docs/MetricAggregateRowDTO.md +20 -0
  118. data/docs/MetricCreateQuery.md +20 -0
  119. data/docs/MetricsApi.md +233 -0
  120. data/docs/OnsiteProfileCreateQuery.md +18 -0
  121. data/docs/OnsiteProfileCreateQueryAsSubResource.md +22 -0
  122. data/docs/OnsiteProfileMeta.md +18 -0
  123. data/docs/OnsiteProfileMetaIdentifiers.md +28 -0
  124. data/docs/OnsiteSubscriptionCreateQuery.md +18 -0
  125. data/docs/OnsiteSubscriptionCreateQueryAsSubResource.md +20 -0
  126. data/docs/OnsiteSubscriptionCreateQueryAsSubResourceAttributes.md +26 -0
  127. data/docs/ProfileCreateQuery.md +18 -0
  128. data/docs/ProfileCreateQueryAsSubResource.md +20 -0
  129. data/docs/ProfileCreateQueryAsSubResourceAttributes.md +38 -0
  130. data/docs/ProfileLocation.md +34 -0
  131. data/docs/ProfileLocationLatitude.md +49 -0
  132. data/docs/ProfilePartialUpdateQuery.md +18 -0
  133. data/docs/ProfilePartialUpdateQueryAsSubResource.md +22 -0
  134. data/docs/ProfilesApi.md +825 -0
  135. data/docs/SMSMessageContent.md +20 -0
  136. data/docs/SMSRenderOptions.md +24 -0
  137. data/docs/SMSTrackingOptions.md +20 -0
  138. data/docs/SegmentPartialUpdateQuery.md +18 -0
  139. data/docs/SegmentPartialUpdateQueryAsSubResource.md +22 -0
  140. data/docs/SegmentsApi.md +390 -0
  141. data/docs/SendOptions.md +20 -0
  142. data/docs/Subscription.md +20 -0
  143. data/docs/SubscriptionCreateJobCreateQuery.md +18 -0
  144. data/docs/SubscriptionCreateJobCreateQueryAsSubResource.md +20 -0
  145. data/docs/SubscriptionCreateJobCreateQueryAsSubResourceAttributes.md +22 -0
  146. data/docs/Suppression.md +18 -0
  147. data/docs/SuppressionCreateJobCreateQuery.md +18 -0
  148. data/docs/SuppressionCreateJobCreateQueryAsSubResource.md +20 -0
  149. data/docs/SuppressionCreateJobCreateQueryAsSubResourceAttributes.md +18 -0
  150. data/docs/TemplateCloneQuery.md +18 -0
  151. data/docs/TemplateCloneQueryAsSubResource.md +20 -0
  152. data/docs/TemplateCloneQueryAsSubResourceAttributes.md +20 -0
  153. data/docs/TemplateCreateQuery.md +18 -0
  154. data/docs/TemplateCreateQueryAsSubResource.md +20 -0
  155. data/docs/TemplateCreateQueryAsSubResourceAttributes.md +26 -0
  156. data/docs/TemplateDeleteQueryAsSubResource.md +20 -0
  157. data/docs/TemplateUpdateQuery.md +18 -0
  158. data/docs/TemplateUpdateQueryAsSubResource.md +22 -0
  159. data/docs/TemplateUpdateQueryAsSubResourceAttributes.md +24 -0
  160. data/docs/TemplatesApi.md +529 -0
  161. data/docs/UnsubscriptionCreateJobCreateQuery.md +18 -0
  162. data/docs/UnsubscriptionCreateJobCreateQueryAsSubResource.md +20 -0
  163. data/docs/UnsubscriptionCreateJobCreateQueryAsSubResourceAttributes.md +22 -0
  164. data/docs/UnsuppressionCreateJobCreateQuery.md +18 -0
  165. data/docs/UnsuppressionCreateJobCreateQueryAsSubResource.md +20 -0
  166. data/docs/UtmParamInfo.md +20 -0
  167. data/docs/V2TemplateRenderQuery.md +18 -0
  168. data/docs/V2TemplateRenderQueryAsSubResource.md +20 -0
  169. data/docs/V2TemplateRenderQueryAsSubResourceAttributes.md +20 -0
  170. data/git_push.sh +57 -0
  171. data/klaviyo-api-sdk.gemspec +40 -0
  172. data/lib/klaviyo-api-sdk/api/catalogs_api.rb +4095 -0
  173. data/lib/klaviyo-api-sdk/api/client_api.rb +249 -0
  174. data/lib/klaviyo-api-sdk/api/events_api.rb +505 -0
  175. data/lib/klaviyo-api-sdk/api/flows_api.rb +1009 -0
  176. data/lib/klaviyo-api-sdk/api/lists_api.rb +708 -0
  177. data/lib/klaviyo-api-sdk/api/metrics_api.rb +236 -0
  178. data/lib/klaviyo-api-sdk/api/profiles_api.rb +840 -0
  179. data/lib/klaviyo-api-sdk/api/segments_api.rb +392 -0
  180. data/lib/klaviyo-api-sdk/api/templates_api.rb +536 -0
  181. data/lib/klaviyo-api-sdk/api_client.rb +390 -0
  182. data/lib/klaviyo-api-sdk/api_error.rb +57 -0
  183. data/lib/klaviyo-api-sdk/configuration.rb +283 -0
  184. data/lib/klaviyo-api-sdk/models/catalog_category_create_job_create_query.rb +224 -0
  185. data/lib/klaviyo-api-sdk/models/catalog_category_create_job_create_query_as_sub_resource.rb +272 -0
  186. data/lib/klaviyo-api-sdk/models/catalog_category_create_job_create_query_as_sub_resource_attributes.rb +226 -0
  187. data/lib/klaviyo-api-sdk/models/catalog_category_create_query.rb +224 -0
  188. data/lib/klaviyo-api-sdk/models/catalog_category_create_query_as_sub_resource.rb +281 -0
  189. data/lib/klaviyo-api-sdk/models/catalog_category_create_query_as_sub_resource_attributes.rb +291 -0
  190. data/lib/klaviyo-api-sdk/models/catalog_category_delete_job_create_query.rb +224 -0
  191. data/lib/klaviyo-api-sdk/models/catalog_category_delete_job_create_query_as_sub_resource.rb +272 -0
  192. data/lib/klaviyo-api-sdk/models/catalog_category_delete_job_create_query_as_sub_resource_attributes.rb +226 -0
  193. data/lib/klaviyo-api-sdk/models/catalog_category_delete_query_as_sub_resource.rb +272 -0
  194. data/lib/klaviyo-api-sdk/models/catalog_category_item_op.rb +226 -0
  195. data/lib/klaviyo-api-sdk/models/catalog_category_update_job_create_query.rb +224 -0
  196. data/lib/klaviyo-api-sdk/models/catalog_category_update_job_create_query_as_sub_resource.rb +272 -0
  197. data/lib/klaviyo-api-sdk/models/catalog_category_update_job_create_query_as_sub_resource_attributes.rb +226 -0
  198. data/lib/klaviyo-api-sdk/models/catalog_category_update_query.rb +224 -0
  199. data/lib/klaviyo-api-sdk/models/catalog_category_update_query_as_sub_resource.rb +295 -0
  200. data/lib/klaviyo-api-sdk/models/catalog_category_update_query_as_sub_resource_attributes.rb +219 -0
  201. data/lib/klaviyo-api-sdk/models/catalog_item_category_op.rb +226 -0
  202. data/lib/klaviyo-api-sdk/models/catalog_item_create_job_create_query.rb +224 -0
  203. data/lib/klaviyo-api-sdk/models/catalog_item_create_job_create_query_as_sub_resource.rb +272 -0
  204. data/lib/klaviyo-api-sdk/models/catalog_item_create_job_create_query_as_sub_resource_attributes.rb +226 -0
  205. data/lib/klaviyo-api-sdk/models/catalog_item_create_query.rb +224 -0
  206. data/lib/klaviyo-api-sdk/models/catalog_item_create_query_as_sub_resource.rb +281 -0
  207. data/lib/klaviyo-api-sdk/models/catalog_item_create_query_as_sub_resource_attributes.rb +366 -0
  208. data/lib/klaviyo-api-sdk/models/catalog_item_create_query_as_sub_resource_relationships.rb +219 -0
  209. data/lib/klaviyo-api-sdk/models/catalog_item_create_query_as_sub_resource_relationships_categories.rb +226 -0
  210. data/lib/klaviyo-api-sdk/models/catalog_item_create_query_as_sub_resource_relationships_categories_data_inner.rb +272 -0
  211. data/lib/klaviyo-api-sdk/models/catalog_item_delete_job_create_query.rb +224 -0
  212. data/lib/klaviyo-api-sdk/models/catalog_item_delete_job_create_query_as_sub_resource.rb +272 -0
  213. data/lib/klaviyo-api-sdk/models/catalog_item_delete_job_create_query_as_sub_resource_attributes.rb +226 -0
  214. data/lib/klaviyo-api-sdk/models/catalog_item_delete_query_as_sub_resource.rb +272 -0
  215. data/lib/klaviyo-api-sdk/models/catalog_item_update_job_create_query.rb +224 -0
  216. data/lib/klaviyo-api-sdk/models/catalog_item_update_job_create_query_as_sub_resource.rb +272 -0
  217. data/lib/klaviyo-api-sdk/models/catalog_item_update_job_create_query_as_sub_resource_attributes.rb +226 -0
  218. data/lib/klaviyo-api-sdk/models/catalog_item_update_query.rb +224 -0
  219. data/lib/klaviyo-api-sdk/models/catalog_item_update_query_as_sub_resource.rb +295 -0
  220. data/lib/klaviyo-api-sdk/models/catalog_item_update_query_as_sub_resource_attributes.rb +284 -0
  221. data/lib/klaviyo-api-sdk/models/catalog_job_error_payload.rb +280 -0
  222. data/lib/klaviyo-api-sdk/models/catalog_variant_create_job_create_query.rb +224 -0
  223. data/lib/klaviyo-api-sdk/models/catalog_variant_create_job_create_query_as_sub_resource.rb +272 -0
  224. data/lib/klaviyo-api-sdk/models/catalog_variant_create_job_create_query_as_sub_resource_attributes.rb +226 -0
  225. data/lib/klaviyo-api-sdk/models/catalog_variant_create_query.rb +224 -0
  226. data/lib/klaviyo-api-sdk/models/catalog_variant_create_query_as_sub_resource.rb +281 -0
  227. data/lib/klaviyo-api-sdk/models/catalog_variant_create_query_as_sub_resource_attributes.rb +435 -0
  228. data/lib/klaviyo-api-sdk/models/catalog_variant_create_query_as_sub_resource_relationships.rb +219 -0
  229. data/lib/klaviyo-api-sdk/models/catalog_variant_create_query_as_sub_resource_relationships_items.rb +226 -0
  230. data/lib/klaviyo-api-sdk/models/catalog_variant_create_query_as_sub_resource_relationships_items_data_inner.rb +272 -0
  231. data/lib/klaviyo-api-sdk/models/catalog_variant_delete_job_create_query.rb +224 -0
  232. data/lib/klaviyo-api-sdk/models/catalog_variant_delete_job_create_query_as_sub_resource.rb +272 -0
  233. data/lib/klaviyo-api-sdk/models/catalog_variant_delete_job_create_query_as_sub_resource_attributes.rb +226 -0
  234. data/lib/klaviyo-api-sdk/models/catalog_variant_delete_query_as_sub_resource.rb +272 -0
  235. data/lib/klaviyo-api-sdk/models/catalog_variant_update_job_create_query.rb +224 -0
  236. data/lib/klaviyo-api-sdk/models/catalog_variant_update_job_create_query_as_sub_resource.rb +272 -0
  237. data/lib/klaviyo-api-sdk/models/catalog_variant_update_job_create_query_as_sub_resource_attributes.rb +226 -0
  238. data/lib/klaviyo-api-sdk/models/catalog_variant_update_query.rb +224 -0
  239. data/lib/klaviyo-api-sdk/models/catalog_variant_update_query_as_sub_resource.rb +286 -0
  240. data/lib/klaviyo-api-sdk/models/catalog_variant_update_query_as_sub_resource_attributes.rb +346 -0
  241. data/lib/klaviyo-api-sdk/models/email_message_content.rb +266 -0
  242. data/lib/klaviyo-api-sdk/models/email_tracking_options.rb +268 -0
  243. data/lib/klaviyo-api-sdk/models/error_source.rb +224 -0
  244. data/lib/klaviyo-api-sdk/models/event_create_query.rb +224 -0
  245. data/lib/klaviyo-api-sdk/models/event_create_query_as_sub_resource.rb +272 -0
  246. data/lib/klaviyo-api-sdk/models/event_create_query_as_sub_resource_attributes.rb +279 -0
  247. data/lib/klaviyo-api-sdk/models/flow_update_query.rb +224 -0
  248. data/lib/klaviyo-api-sdk/models/flow_update_query_as_sub_resource.rb +286 -0
  249. data/lib/klaviyo-api-sdk/models/flow_update_query_as_sub_resource_attributes.rb +224 -0
  250. data/lib/klaviyo-api-sdk/models/get_catalog_items4_xx_response.rb +226 -0
  251. data/lib/klaviyo-api-sdk/models/get_catalog_items4_xx_response_errors_inner.rb +275 -0
  252. data/lib/klaviyo-api-sdk/models/get_catalog_items4_xx_response_errors_inner_source.rb +228 -0
  253. data/lib/klaviyo-api-sdk/models/included_categories.rb +300 -0
  254. data/lib/klaviyo-api-sdk/models/included_categories_attributes.rb +237 -0
  255. data/lib/klaviyo-api-sdk/models/included_flow_action.rb +300 -0
  256. data/lib/klaviyo-api-sdk/models/included_flow_actions.rb +300 -0
  257. data/lib/klaviyo-api-sdk/models/included_flow_actions_attributes.rb +282 -0
  258. data/lib/klaviyo-api-sdk/models/included_flow_actions_attributes_tracking_options.rb +105 -0
  259. data/lib/klaviyo-api-sdk/models/included_flow_messages.rb +300 -0
  260. data/lib/klaviyo-api-sdk/models/included_flow_messages_attributes.rb +270 -0
  261. data/lib/klaviyo-api-sdk/models/included_flow_messages_attributes_content.rb +105 -0
  262. data/lib/klaviyo-api-sdk/models/included_flows.rb +300 -0
  263. data/lib/klaviyo-api-sdk/models/included_flows_attributes.rb +264 -0
  264. data/lib/klaviyo-api-sdk/models/included_items.rb +300 -0
  265. data/lib/klaviyo-api-sdk/models/included_items_attributes.rb +311 -0
  266. data/lib/klaviyo-api-sdk/models/included_lists.rb +300 -0
  267. data/lib/klaviyo-api-sdk/models/included_lists_attributes.rb +237 -0
  268. data/lib/klaviyo-api-sdk/models/included_metrics.rb +300 -0
  269. data/lib/klaviyo-api-sdk/models/included_metrics_attributes.rb +246 -0
  270. data/lib/klaviyo-api-sdk/models/included_profile.rb +300 -0
  271. data/lib/klaviyo-api-sdk/models/included_profiles.rb +300 -0
  272. data/lib/klaviyo-api-sdk/models/included_profiles_attributes.rb +336 -0
  273. data/lib/klaviyo-api-sdk/models/included_segments.rb +300 -0
  274. data/lib/klaviyo-api-sdk/models/included_variants.rb +300 -0
  275. data/lib/klaviyo-api-sdk/models/included_variants_attributes.rb +382 -0
  276. data/lib/klaviyo-api-sdk/models/included_variants_links.rb +224 -0
  277. data/lib/klaviyo-api-sdk/models/list_create_query.rb +224 -0
  278. data/lib/klaviyo-api-sdk/models/list_create_query_as_sub_resource.rb +272 -0
  279. data/lib/klaviyo-api-sdk/models/list_create_query_as_sub_resource_attributes.rb +224 -0
  280. data/lib/klaviyo-api-sdk/models/list_delete_query_as_sub_resource.rb +272 -0
  281. data/lib/klaviyo-api-sdk/models/list_members_add_query.rb +226 -0
  282. data/lib/klaviyo-api-sdk/models/list_members_add_query_data_inner.rb +272 -0
  283. data/lib/klaviyo-api-sdk/models/list_members_delete_query.rb +226 -0
  284. data/lib/klaviyo-api-sdk/models/list_partial_update_query.rb +224 -0
  285. data/lib/klaviyo-api-sdk/models/list_partial_update_query_as_sub_resource.rb +286 -0
  286. data/lib/klaviyo-api-sdk/models/metric_aggregate_query.rb +224 -0
  287. data/lib/klaviyo-api-sdk/models/metric_aggregate_query_as_sub_resource.rb +272 -0
  288. data/lib/klaviyo-api-sdk/models/metric_aggregate_query_as_sub_resource_attributes.rb +380 -0
  289. data/lib/klaviyo-api-sdk/models/metric_aggregate_row_dto.rb +240 -0
  290. data/lib/klaviyo-api-sdk/models/metric_create_query.rb +233 -0
  291. data/lib/klaviyo-api-sdk/models/onsite_profile_create_query.rb +224 -0
  292. data/lib/klaviyo-api-sdk/models/onsite_profile_create_query_as_sub_resource.rb +281 -0
  293. data/lib/klaviyo-api-sdk/models/onsite_profile_meta.rb +224 -0
  294. data/lib/klaviyo-api-sdk/models/onsite_profile_meta_identifiers.rb +264 -0
  295. data/lib/klaviyo-api-sdk/models/onsite_subscription_create_query.rb +224 -0
  296. data/lib/klaviyo-api-sdk/models/onsite_subscription_create_query_as_sub_resource.rb +272 -0
  297. data/lib/klaviyo-api-sdk/models/onsite_subscription_create_query_as_sub_resource_attributes.rb +260 -0
  298. data/lib/klaviyo-api-sdk/models/profile_create_query.rb +224 -0
  299. data/lib/klaviyo-api-sdk/models/profile_create_query_as_sub_resource.rb +272 -0
  300. data/lib/klaviyo-api-sdk/models/profile_create_query_as_sub_resource_attributes.rb +309 -0
  301. data/lib/klaviyo-api-sdk/models/profile_location.rb +291 -0
  302. data/lib/klaviyo-api-sdk/models/profile_location_latitude.rb +105 -0
  303. data/lib/klaviyo-api-sdk/models/profile_partial_update_query.rb +224 -0
  304. data/lib/klaviyo-api-sdk/models/profile_partial_update_query_as_sub_resource.rb +286 -0
  305. data/lib/klaviyo-api-sdk/models/segment_partial_update_query.rb +224 -0
  306. data/lib/klaviyo-api-sdk/models/segment_partial_update_query_as_sub_resource.rb +286 -0
  307. data/lib/klaviyo-api-sdk/models/send_options.rb +238 -0
  308. data/lib/klaviyo-api-sdk/models/sms_message_content.rb +238 -0
  309. data/lib/klaviyo-api-sdk/models/sms_render_options.rb +266 -0
  310. data/lib/klaviyo-api-sdk/models/sms_tracking_options.rb +240 -0
  311. data/lib/klaviyo-api-sdk/models/subscription.rb +228 -0
  312. data/lib/klaviyo-api-sdk/models/subscription_create_job_create_query.rb +224 -0
  313. data/lib/klaviyo-api-sdk/models/subscription_create_job_create_query_as_sub_resource.rb +272 -0
  314. data/lib/klaviyo-api-sdk/models/subscription_create_job_create_query_as_sub_resource_attributes.rb +249 -0
  315. data/lib/klaviyo-api-sdk/models/suppression.rb +224 -0
  316. data/lib/klaviyo-api-sdk/models/suppression_create_job_create_query.rb +224 -0
  317. data/lib/klaviyo-api-sdk/models/suppression_create_job_create_query_as_sub_resource.rb +272 -0
  318. data/lib/klaviyo-api-sdk/models/suppression_create_job_create_query_as_sub_resource_attributes.rb +226 -0
  319. data/lib/klaviyo-api-sdk/models/template_clone_query.rb +224 -0
  320. data/lib/klaviyo-api-sdk/models/template_clone_query_as_sub_resource.rb +272 -0
  321. data/lib/klaviyo-api-sdk/models/template_clone_query_as_sub_resource_attributes.rb +230 -0
  322. data/lib/klaviyo-api-sdk/models/template_create_query.rb +224 -0
  323. data/lib/klaviyo-api-sdk/models/template_create_query_as_sub_resource.rb +272 -0
  324. data/lib/klaviyo-api-sdk/models/template_create_query_as_sub_resource_attributes.rb +267 -0
  325. data/lib/klaviyo-api-sdk/models/template_delete_query_as_sub_resource.rb +272 -0
  326. data/lib/klaviyo-api-sdk/models/template_update_query.rb +224 -0
  327. data/lib/klaviyo-api-sdk/models/template_update_query_as_sub_resource.rb +286 -0
  328. data/lib/klaviyo-api-sdk/models/template_update_query_as_sub_resource_attributes.rb +248 -0
  329. data/lib/klaviyo-api-sdk/models/unsubscription_create_job_create_query.rb +224 -0
  330. data/lib/klaviyo-api-sdk/models/unsubscription_create_job_create_query_as_sub_resource.rb +272 -0
  331. data/lib/klaviyo-api-sdk/models/unsubscription_create_job_create_query_as_sub_resource_attributes.rb +246 -0
  332. data/lib/klaviyo-api-sdk/models/unsuppression_create_job_create_query.rb +224 -0
  333. data/lib/klaviyo-api-sdk/models/unsuppression_create_job_create_query_as_sub_resource.rb +272 -0
  334. data/lib/klaviyo-api-sdk/models/utm_param_info.rb +238 -0
  335. data/lib/klaviyo-api-sdk/models/v2_template_render_query.rb +224 -0
  336. data/lib/klaviyo-api-sdk/models/v2_template_render_query_as_sub_resource.rb +272 -0
  337. data/lib/klaviyo-api-sdk/models/v2_template_render_query_as_sub_resource_attributes.rb +235 -0
  338. data/lib/klaviyo-api-sdk/version.rb +15 -0
  339. data/lib/klaviyo-api-sdk.rb +253 -0
  340. data/spec/api/catalogs_api_spec.rb +759 -0
  341. data/spec/api/client_api_spec.rb +74 -0
  342. data/spec/api/events_api_spec.rb +120 -0
  343. data/spec/api/flows_api_spec.rb +209 -0
  344. data/spec/api/lists_api_spec.rb +156 -0
  345. data/spec/api/metrics_api_spec.rb +74 -0
  346. data/spec/api/profiles_api_spec.rb +178 -0
  347. data/spec/api/segments_api_spec.rb +103 -0
  348. data/spec/api/templates_api_spec.rb +126 -0
  349. data/spec/api_client_spec.rb +226 -0
  350. data/spec/configuration_spec.rb +42 -0
  351. data/spec/models/catalog_category_create_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
  352. data/spec/models/catalog_category_create_job_create_query_as_sub_resource_spec.rb +44 -0
  353. data/spec/models/catalog_category_create_job_create_query_spec.rb +34 -0
  354. data/spec/models/catalog_category_create_query_as_sub_resource_attributes_spec.rb +56 -0
  355. data/spec/models/catalog_category_create_query_as_sub_resource_spec.rb +50 -0
  356. data/spec/models/catalog_category_create_query_spec.rb +34 -0
  357. data/spec/models/catalog_category_delete_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
  358. data/spec/models/catalog_category_delete_job_create_query_as_sub_resource_spec.rb +44 -0
  359. data/spec/models/catalog_category_delete_job_create_query_spec.rb +34 -0
  360. data/spec/models/catalog_category_delete_query_as_sub_resource_spec.rb +44 -0
  361. data/spec/models/catalog_category_item_op_spec.rb +34 -0
  362. data/spec/models/catalog_category_update_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
  363. data/spec/models/catalog_category_update_job_create_query_as_sub_resource_spec.rb +44 -0
  364. data/spec/models/catalog_category_update_job_create_query_spec.rb +34 -0
  365. data/spec/models/catalog_category_update_query_as_sub_resource_attributes_spec.rb +34 -0
  366. data/spec/models/catalog_category_update_query_as_sub_resource_spec.rb +56 -0
  367. data/spec/models/catalog_category_update_query_spec.rb +34 -0
  368. data/spec/models/catalog_item_category_op_spec.rb +34 -0
  369. data/spec/models/catalog_item_create_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
  370. data/spec/models/catalog_item_create_job_create_query_as_sub_resource_spec.rb +44 -0
  371. data/spec/models/catalog_item_create_job_create_query_spec.rb +34 -0
  372. data/spec/models/catalog_item_create_query_as_sub_resource_attributes_spec.rb +98 -0
  373. data/spec/models/catalog_item_create_query_as_sub_resource_relationships_categories_data_inner_spec.rb +44 -0
  374. data/spec/models/catalog_item_create_query_as_sub_resource_relationships_categories_spec.rb +34 -0
  375. data/spec/models/catalog_item_create_query_as_sub_resource_relationships_spec.rb +34 -0
  376. data/spec/models/catalog_item_create_query_as_sub_resource_spec.rb +50 -0
  377. data/spec/models/catalog_item_create_query_spec.rb +34 -0
  378. data/spec/models/catalog_item_delete_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
  379. data/spec/models/catalog_item_delete_job_create_query_as_sub_resource_spec.rb +44 -0
  380. data/spec/models/catalog_item_delete_job_create_query_spec.rb +34 -0
  381. data/spec/models/catalog_item_delete_query_as_sub_resource_spec.rb +44 -0
  382. data/spec/models/catalog_item_update_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
  383. data/spec/models/catalog_item_update_job_create_query_as_sub_resource_spec.rb +44 -0
  384. data/spec/models/catalog_item_update_job_create_query_spec.rb +34 -0
  385. data/spec/models/catalog_item_update_query_as_sub_resource_attributes_spec.rb +76 -0
  386. data/spec/models/catalog_item_update_query_as_sub_resource_spec.rb +56 -0
  387. data/spec/models/catalog_item_update_query_spec.rb +34 -0
  388. data/spec/models/catalog_job_error_payload_spec.rb +58 -0
  389. data/spec/models/catalog_variant_create_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
  390. data/spec/models/catalog_variant_create_job_create_query_as_sub_resource_spec.rb +44 -0
  391. data/spec/models/catalog_variant_create_job_create_query_spec.rb +34 -0
  392. data/spec/models/catalog_variant_create_query_as_sub_resource_attributes_spec.rb +126 -0
  393. data/spec/models/catalog_variant_create_query_as_sub_resource_relationships_items_data_inner_spec.rb +44 -0
  394. data/spec/models/catalog_variant_create_query_as_sub_resource_relationships_items_spec.rb +34 -0
  395. data/spec/models/catalog_variant_create_query_as_sub_resource_relationships_spec.rb +34 -0
  396. data/spec/models/catalog_variant_create_query_as_sub_resource_spec.rb +50 -0
  397. data/spec/models/catalog_variant_create_query_spec.rb +34 -0
  398. data/spec/models/catalog_variant_delete_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
  399. data/spec/models/catalog_variant_delete_job_create_query_as_sub_resource_spec.rb +44 -0
  400. data/spec/models/catalog_variant_delete_job_create_query_spec.rb +34 -0
  401. data/spec/models/catalog_variant_delete_query_as_sub_resource_spec.rb +44 -0
  402. data/spec/models/catalog_variant_update_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
  403. data/spec/models/catalog_variant_update_job_create_query_as_sub_resource_spec.rb +44 -0
  404. data/spec/models/catalog_variant_update_job_create_query_spec.rb +34 -0
  405. data/spec/models/catalog_variant_update_query_as_sub_resource_attributes_spec.rb +98 -0
  406. data/spec/models/catalog_variant_update_query_as_sub_resource_spec.rb +50 -0
  407. data/spec/models/catalog_variant_update_query_spec.rb +34 -0
  408. data/spec/models/email_message_content_spec.rb +52 -0
  409. data/spec/models/email_tracking_options_spec.rb +52 -0
  410. data/spec/models/error_source_spec.rb +34 -0
  411. data/spec/models/event_create_query_as_sub_resource_attributes_spec.rb +64 -0
  412. data/spec/models/event_create_query_as_sub_resource_spec.rb +44 -0
  413. data/spec/models/event_create_query_spec.rb +34 -0
  414. data/spec/models/flow_update_query_as_sub_resource_attributes_spec.rb +34 -0
  415. data/spec/models/flow_update_query_as_sub_resource_spec.rb +50 -0
  416. data/spec/models/flow_update_query_spec.rb +34 -0
  417. data/spec/models/get_catalog_items4_xx_response_errors_inner_source_spec.rb +40 -0
  418. data/spec/models/get_catalog_items4_xx_response_errors_inner_spec.rb +58 -0
  419. data/spec/models/get_catalog_items4_xx_response_spec.rb +34 -0
  420. data/spec/models/included_categories_attributes_spec.rb +46 -0
  421. data/spec/models/included_categories_spec.rb +56 -0
  422. data/spec/models/included_flow_action_spec.rb +56 -0
  423. data/spec/models/included_flow_actions_attributes_spec.rb +76 -0
  424. data/spec/models/included_flow_actions_attributes_tracking_options_spec.rb +31 -0
  425. data/spec/models/included_flow_actions_spec.rb +56 -0
  426. data/spec/models/included_flow_messages_attributes_content_spec.rb +31 -0
  427. data/spec/models/included_flow_messages_attributes_spec.rb +58 -0
  428. data/spec/models/included_flow_messages_spec.rb +56 -0
  429. data/spec/models/included_flows_attributes_spec.rb +64 -0
  430. data/spec/models/included_flows_spec.rb +56 -0
  431. data/spec/models/included_items_attributes_spec.rb +94 -0
  432. data/spec/models/included_items_spec.rb +56 -0
  433. data/spec/models/included_lists_attributes_spec.rb +46 -0
  434. data/spec/models/included_lists_spec.rb +56 -0
  435. data/spec/models/included_metrics_attributes_spec.rb +52 -0
  436. data/spec/models/included_metrics_spec.rb +56 -0
  437. data/spec/models/included_profile_spec.rb +56 -0
  438. data/spec/models/included_profiles_attributes_spec.rb +112 -0
  439. data/spec/models/included_profiles_spec.rb +56 -0
  440. data/spec/models/included_segments_spec.rb +56 -0
  441. data/spec/models/included_variants_attributes_spec.rb +122 -0
  442. data/spec/models/included_variants_links_spec.rb +34 -0
  443. data/spec/models/included_variants_spec.rb +56 -0
  444. data/spec/models/list_create_query_as_sub_resource_attributes_spec.rb +34 -0
  445. data/spec/models/list_create_query_as_sub_resource_spec.rb +44 -0
  446. data/spec/models/list_create_query_spec.rb +34 -0
  447. data/spec/models/list_delete_query_as_sub_resource_spec.rb +44 -0
  448. data/spec/models/list_members_add_query_data_inner_spec.rb +44 -0
  449. data/spec/models/list_members_add_query_spec.rb +34 -0
  450. data/spec/models/list_members_delete_query_spec.rb +34 -0
  451. data/spec/models/list_partial_update_query_as_sub_resource_spec.rb +50 -0
  452. data/spec/models/list_partial_update_query_spec.rb +34 -0
  453. data/spec/models/metric_aggregate_query_as_sub_resource_attributes_spec.rb +104 -0
  454. data/spec/models/metric_aggregate_query_as_sub_resource_spec.rb +44 -0
  455. data/spec/models/metric_aggregate_query_spec.rb +34 -0
  456. data/spec/models/metric_aggregate_row_dto_spec.rb +40 -0
  457. data/spec/models/metric_create_query_spec.rb +40 -0
  458. data/spec/models/onsite_profile_create_query_as_sub_resource_spec.rb +50 -0
  459. data/spec/models/onsite_profile_create_query_spec.rb +34 -0
  460. data/spec/models/onsite_profile_meta_identifiers_spec.rb +64 -0
  461. data/spec/models/onsite_profile_meta_spec.rb +34 -0
  462. data/spec/models/onsite_subscription_create_query_as_sub_resource_attributes_spec.rb +58 -0
  463. data/spec/models/onsite_subscription_create_query_as_sub_resource_spec.rb +44 -0
  464. data/spec/models/onsite_subscription_create_query_spec.rb +34 -0
  465. data/spec/models/profile_create_query_as_sub_resource_attributes_spec.rb +94 -0
  466. data/spec/models/profile_create_query_as_sub_resource_spec.rb +44 -0
  467. data/spec/models/profile_create_query_spec.rb +34 -0
  468. data/spec/models/profile_location_latitude_spec.rb +31 -0
  469. data/spec/models/profile_location_spec.rb +82 -0
  470. data/spec/models/profile_partial_update_query_as_sub_resource_spec.rb +50 -0
  471. data/spec/models/profile_partial_update_query_spec.rb +34 -0
  472. data/spec/models/segment_partial_update_query_as_sub_resource_spec.rb +50 -0
  473. data/spec/models/segment_partial_update_query_spec.rb +34 -0
  474. data/spec/models/send_options_spec.rb +40 -0
  475. data/spec/models/sms_message_content_spec.rb +40 -0
  476. data/spec/models/sms_render_options_spec.rb +52 -0
  477. data/spec/models/sms_tracking_options_spec.rb +40 -0
  478. data/spec/models/subscription_create_job_create_query_as_sub_resource_attributes_spec.rb +46 -0
  479. data/spec/models/subscription_create_job_create_query_as_sub_resource_spec.rb +44 -0
  480. data/spec/models/subscription_create_job_create_query_spec.rb +34 -0
  481. data/spec/models/subscription_spec.rb +40 -0
  482. data/spec/models/suppression_create_job_create_query_as_sub_resource_attributes_spec.rb +34 -0
  483. data/spec/models/suppression_create_job_create_query_as_sub_resource_spec.rb +44 -0
  484. data/spec/models/suppression_create_job_create_query_spec.rb +34 -0
  485. data/spec/models/suppression_spec.rb +34 -0
  486. data/spec/models/template_clone_query_as_sub_resource_attributes_spec.rb +40 -0
  487. data/spec/models/template_clone_query_as_sub_resource_spec.rb +44 -0
  488. data/spec/models/template_clone_query_spec.rb +34 -0
  489. data/spec/models/template_create_query_as_sub_resource_attributes_spec.rb +58 -0
  490. data/spec/models/template_create_query_as_sub_resource_spec.rb +44 -0
  491. data/spec/models/template_create_query_spec.rb +34 -0
  492. data/spec/models/template_delete_query_as_sub_resource_spec.rb +44 -0
  493. data/spec/models/template_update_query_as_sub_resource_attributes_spec.rb +52 -0
  494. data/spec/models/template_update_query_as_sub_resource_spec.rb +50 -0
  495. data/spec/models/template_update_query_spec.rb +34 -0
  496. data/spec/models/unsubscription_create_job_create_query_as_sub_resource_attributes_spec.rb +46 -0
  497. data/spec/models/unsubscription_create_job_create_query_as_sub_resource_spec.rb +44 -0
  498. data/spec/models/unsubscription_create_job_create_query_spec.rb +34 -0
  499. data/spec/models/unsuppression_create_job_create_query_as_sub_resource_spec.rb +44 -0
  500. data/spec/models/unsuppression_create_job_create_query_spec.rb +34 -0
  501. data/spec/models/utm_param_info_spec.rb +40 -0
  502. data/spec/models/v2_template_render_query_as_sub_resource_attributes_spec.rb +40 -0
  503. data/spec/models/v2_template_render_query_as_sub_resource_spec.rb +44 -0
  504. data/spec/models/v2_template_render_query_spec.rb +34 -0
  505. data/spec/spec_helper.rb +111 -0
  506. metadata +583 -0
@@ -0,0 +1,4095 @@
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: 2022-10-17
7
+ Contact: developers@klaviyo.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module KlaviyoAPI
16
+ class CatalogsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create Catalog Category
23
+ # Create a new catalog category.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
24
+ # @param catalog_category_create_query [CatalogCategoryCreateQuery]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [Hash<String, Object>]
27
+ def create_catalog_category(catalog_category_create_query, opts = {})
28
+ data, _status_code, _headers = create_catalog_category_with_http_info(catalog_category_create_query, opts)
29
+ data
30
+ end
31
+
32
+ # Create Catalog Category
33
+ # Create a new catalog category.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
34
+ # @param catalog_category_create_query [CatalogCategoryCreateQuery]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
37
+ def create_catalog_category_with_http_info(catalog_category_create_query, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.create_catalog_category ...'
40
+ end
41
+ # verify the required parameter 'catalog_category_create_query' is set
42
+ if @api_client.config.client_side_validation && catalog_category_create_query.nil?
43
+ fail ArgumentError, "Missing the required parameter 'catalog_category_create_query' when calling CatalogsApi.create_catalog_category"
44
+ end
45
+ # resource path
46
+ local_var_path = '/api/catalog-categories/'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # klaviyo api revision
54
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
55
+ # HTTP header 'Accept' (if needed)
56
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
57
+ # HTTP header 'Content-Type'
58
+ content_type = @api_client.select_header_content_type(['application/json'])
59
+ if !content_type.nil?
60
+ header_params['Content-Type'] = content_type
61
+ end
62
+
63
+ # form parameters
64
+ form_params = opts[:form_params] || {}
65
+
66
+ # http body (model)
67
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_category_create_query)
68
+
69
+ # return_type
70
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
71
+
72
+ # auth_names
73
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
74
+
75
+ new_options = opts.merge(
76
+ :operation => :"CatalogsApi.create_catalog_category",
77
+ :header_params => header_params,
78
+ :query_params => query_params,
79
+ :form_params => form_params,
80
+ :body => post_body,
81
+ :auth_names => auth_names,
82
+ :return_type => return_type
83
+ )
84
+
85
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug "API called: CatalogsApi#create_catalog_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+
92
+ # Create Catalog Category Relationships
93
+ # Create a new item relationship for the given category ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
94
+ # @param id [String]
95
+ # @param related_resource [String]
96
+ # @param catalog_category_item_op [CatalogCategoryItemOp]
97
+ # @param [Hash] opts the optional parameters
98
+ # @return [nil]
99
+ def create_catalog_category_relationships(id, related_resource, catalog_category_item_op, opts = {})
100
+ create_catalog_category_relationships_with_http_info(id, related_resource, catalog_category_item_op, opts)
101
+ nil
102
+ end
103
+
104
+ # Create Catalog Category Relationships
105
+ # Create a new item relationship for the given category ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
106
+ # @param id [String]
107
+ # @param related_resource [String]
108
+ # @param catalog_category_item_op [CatalogCategoryItemOp]
109
+ # @param [Hash] opts the optional parameters
110
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
111
+ def create_catalog_category_relationships_with_http_info(id, related_resource, catalog_category_item_op, opts = {})
112
+ if @api_client.config.debugging
113
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.create_catalog_category_relationships ...'
114
+ end
115
+ # verify the required parameter 'id' is set
116
+ if @api_client.config.client_side_validation && id.nil?
117
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogsApi.create_catalog_category_relationships"
118
+ end
119
+ # verify the required parameter 'related_resource' is set
120
+ if @api_client.config.client_side_validation && related_resource.nil?
121
+ fail ArgumentError, "Missing the required parameter 'related_resource' when calling CatalogsApi.create_catalog_category_relationships"
122
+ end
123
+ # verify enum value
124
+ allowable_values = ["items"]
125
+ if @api_client.config.client_side_validation && !allowable_values.include?(related_resource)
126
+ fail ArgumentError, "invalid value for \"related_resource\", must be one of #{allowable_values}"
127
+ end
128
+ # verify the required parameter 'catalog_category_item_op' is set
129
+ if @api_client.config.client_side_validation && catalog_category_item_op.nil?
130
+ fail ArgumentError, "Missing the required parameter 'catalog_category_item_op' when calling CatalogsApi.create_catalog_category_relationships"
131
+ end
132
+ # resource path
133
+ local_var_path = '/api/catalog-categories/{id}/relationships/{related_resource}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'related_resource' + '}', CGI.escape(related_resource.to_s))
134
+
135
+ # query parameters
136
+ query_params = opts[:query_params] || {}
137
+
138
+ # header parameters
139
+ header_params = opts[:header_params] || {}
140
+ # klaviyo api revision
141
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
142
+ # HTTP header 'Accept' (if needed)
143
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
144
+ # HTTP header 'Content-Type'
145
+ content_type = @api_client.select_header_content_type(['application/json'])
146
+ if !content_type.nil?
147
+ header_params['Content-Type'] = content_type
148
+ end
149
+
150
+ # form parameters
151
+ form_params = opts[:form_params] || {}
152
+
153
+ # http body (model)
154
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_category_item_op)
155
+
156
+ # return_type
157
+ return_type = opts[:debug_return_type]
158
+
159
+ # auth_names
160
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
161
+
162
+ new_options = opts.merge(
163
+ :operation => :"CatalogsApi.create_catalog_category_relationships",
164
+ :header_params => header_params,
165
+ :query_params => query_params,
166
+ :form_params => form_params,
167
+ :body => post_body,
168
+ :auth_names => auth_names,
169
+ :return_type => return_type
170
+ )
171
+
172
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
173
+ if @api_client.config.debugging
174
+ @api_client.config.logger.debug "API called: CatalogsApi#create_catalog_category_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
175
+ end
176
+ return data, status_code, headers
177
+ end
178
+
179
+ # Create Catalog Item
180
+ # Create a new catalog item.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
181
+ # @param catalog_item_create_query [CatalogItemCreateQuery]
182
+ # @param [Hash] opts the optional parameters
183
+ # @return [Hash<String, Object>]
184
+ def create_catalog_item(catalog_item_create_query, opts = {})
185
+ data, _status_code, _headers = create_catalog_item_with_http_info(catalog_item_create_query, opts)
186
+ data
187
+ end
188
+
189
+ # Create Catalog Item
190
+ # Create a new catalog item.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
191
+ # @param catalog_item_create_query [CatalogItemCreateQuery]
192
+ # @param [Hash] opts the optional parameters
193
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
194
+ def create_catalog_item_with_http_info(catalog_item_create_query, opts = {})
195
+ if @api_client.config.debugging
196
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.create_catalog_item ...'
197
+ end
198
+ # verify the required parameter 'catalog_item_create_query' is set
199
+ if @api_client.config.client_side_validation && catalog_item_create_query.nil?
200
+ fail ArgumentError, "Missing the required parameter 'catalog_item_create_query' when calling CatalogsApi.create_catalog_item"
201
+ end
202
+ # resource path
203
+ local_var_path = '/api/catalog-items/'
204
+
205
+ # query parameters
206
+ query_params = opts[:query_params] || {}
207
+
208
+ # header parameters
209
+ header_params = opts[:header_params] || {}
210
+ # klaviyo api revision
211
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
212
+ # HTTP header 'Accept' (if needed)
213
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
214
+ # HTTP header 'Content-Type'
215
+ content_type = @api_client.select_header_content_type(['application/json'])
216
+ if !content_type.nil?
217
+ header_params['Content-Type'] = content_type
218
+ end
219
+
220
+ # form parameters
221
+ form_params = opts[:form_params] || {}
222
+
223
+ # http body (model)
224
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_item_create_query)
225
+
226
+ # return_type
227
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
228
+
229
+ # auth_names
230
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
231
+
232
+ new_options = opts.merge(
233
+ :operation => :"CatalogsApi.create_catalog_item",
234
+ :header_params => header_params,
235
+ :query_params => query_params,
236
+ :form_params => form_params,
237
+ :body => post_body,
238
+ :auth_names => auth_names,
239
+ :return_type => return_type
240
+ )
241
+
242
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
243
+ if @api_client.config.debugging
244
+ @api_client.config.logger.debug "API called: CatalogsApi#create_catalog_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
245
+ end
246
+ return data, status_code, headers
247
+ end
248
+
249
+ # Create Catalog Item Relationships
250
+ # Create a new catalog category relationship for the given item ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
251
+ # @param id [String]
252
+ # @param related_resource [String]
253
+ # @param catalog_item_category_op [CatalogItemCategoryOp]
254
+ # @param [Hash] opts the optional parameters
255
+ # @return [nil]
256
+ def create_catalog_item_relationships(id, related_resource, catalog_item_category_op, opts = {})
257
+ create_catalog_item_relationships_with_http_info(id, related_resource, catalog_item_category_op, opts)
258
+ nil
259
+ end
260
+
261
+ # Create Catalog Item Relationships
262
+ # Create a new catalog category relationship for the given item ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
263
+ # @param id [String]
264
+ # @param related_resource [String]
265
+ # @param catalog_item_category_op [CatalogItemCategoryOp]
266
+ # @param [Hash] opts the optional parameters
267
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
268
+ def create_catalog_item_relationships_with_http_info(id, related_resource, catalog_item_category_op, opts = {})
269
+ if @api_client.config.debugging
270
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.create_catalog_item_relationships ...'
271
+ end
272
+ # verify the required parameter 'id' is set
273
+ if @api_client.config.client_side_validation && id.nil?
274
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogsApi.create_catalog_item_relationships"
275
+ end
276
+ # verify the required parameter 'related_resource' is set
277
+ if @api_client.config.client_side_validation && related_resource.nil?
278
+ fail ArgumentError, "Missing the required parameter 'related_resource' when calling CatalogsApi.create_catalog_item_relationships"
279
+ end
280
+ # verify enum value
281
+ allowable_values = ["categories"]
282
+ if @api_client.config.client_side_validation && !allowable_values.include?(related_resource)
283
+ fail ArgumentError, "invalid value for \"related_resource\", must be one of #{allowable_values}"
284
+ end
285
+ # verify the required parameter 'catalog_item_category_op' is set
286
+ if @api_client.config.client_side_validation && catalog_item_category_op.nil?
287
+ fail ArgumentError, "Missing the required parameter 'catalog_item_category_op' when calling CatalogsApi.create_catalog_item_relationships"
288
+ end
289
+ # resource path
290
+ local_var_path = '/api/catalog-items/{id}/relationships/{related_resource}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'related_resource' + '}', CGI.escape(related_resource.to_s))
291
+
292
+ # query parameters
293
+ query_params = opts[:query_params] || {}
294
+
295
+ # header parameters
296
+ header_params = opts[:header_params] || {}
297
+ # klaviyo api revision
298
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
299
+ # HTTP header 'Accept' (if needed)
300
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
301
+ # HTTP header 'Content-Type'
302
+ content_type = @api_client.select_header_content_type(['application/json'])
303
+ if !content_type.nil?
304
+ header_params['Content-Type'] = content_type
305
+ end
306
+
307
+ # form parameters
308
+ form_params = opts[:form_params] || {}
309
+
310
+ # http body (model)
311
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_item_category_op)
312
+
313
+ # return_type
314
+ return_type = opts[:debug_return_type]
315
+
316
+ # auth_names
317
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
318
+
319
+ new_options = opts.merge(
320
+ :operation => :"CatalogsApi.create_catalog_item_relationships",
321
+ :header_params => header_params,
322
+ :query_params => query_params,
323
+ :form_params => form_params,
324
+ :body => post_body,
325
+ :auth_names => auth_names,
326
+ :return_type => return_type
327
+ )
328
+
329
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
330
+ if @api_client.config.debugging
331
+ @api_client.config.logger.debug "API called: CatalogsApi#create_catalog_item_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
332
+ end
333
+ return data, status_code, headers
334
+ end
335
+
336
+ # Create Catalog Variant
337
+ # Create a new variant for a related catalog item.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
338
+ # @param catalog_variant_create_query [CatalogVariantCreateQuery]
339
+ # @param [Hash] opts the optional parameters
340
+ # @return [Hash<String, Object>]
341
+ def create_catalog_variant(catalog_variant_create_query, opts = {})
342
+ data, _status_code, _headers = create_catalog_variant_with_http_info(catalog_variant_create_query, opts)
343
+ data
344
+ end
345
+
346
+ # Create Catalog Variant
347
+ # Create a new variant for a related catalog item.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
348
+ # @param catalog_variant_create_query [CatalogVariantCreateQuery]
349
+ # @param [Hash] opts the optional parameters
350
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
351
+ def create_catalog_variant_with_http_info(catalog_variant_create_query, opts = {})
352
+ if @api_client.config.debugging
353
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.create_catalog_variant ...'
354
+ end
355
+ # verify the required parameter 'catalog_variant_create_query' is set
356
+ if @api_client.config.client_side_validation && catalog_variant_create_query.nil?
357
+ fail ArgumentError, "Missing the required parameter 'catalog_variant_create_query' when calling CatalogsApi.create_catalog_variant"
358
+ end
359
+ # resource path
360
+ local_var_path = '/api/catalog-variants/'
361
+
362
+ # query parameters
363
+ query_params = opts[:query_params] || {}
364
+
365
+ # header parameters
366
+ header_params = opts[:header_params] || {}
367
+ # klaviyo api revision
368
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
369
+ # HTTP header 'Accept' (if needed)
370
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
371
+ # HTTP header 'Content-Type'
372
+ content_type = @api_client.select_header_content_type(['application/json'])
373
+ if !content_type.nil?
374
+ header_params['Content-Type'] = content_type
375
+ end
376
+
377
+ # form parameters
378
+ form_params = opts[:form_params] || {}
379
+
380
+ # http body (model)
381
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_variant_create_query)
382
+
383
+ # return_type
384
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
385
+
386
+ # auth_names
387
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
388
+
389
+ new_options = opts.merge(
390
+ :operation => :"CatalogsApi.create_catalog_variant",
391
+ :header_params => header_params,
392
+ :query_params => query_params,
393
+ :form_params => form_params,
394
+ :body => post_body,
395
+ :auth_names => auth_names,
396
+ :return_type => return_type
397
+ )
398
+
399
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
400
+ if @api_client.config.debugging
401
+ @api_client.config.logger.debug "API called: CatalogsApi#create_catalog_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
402
+ end
403
+ return data, status_code, headers
404
+ end
405
+
406
+ # Delete Catalog Category
407
+ # Delete a catalog category using the given category ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
408
+ # @param id [String]
409
+ # @param [Hash] opts the optional parameters
410
+ # @return [nil]
411
+ def delete_catalog_category(id, opts = {})
412
+ delete_catalog_category_with_http_info(id, opts)
413
+ nil
414
+ end
415
+
416
+ # Delete Catalog Category
417
+ # Delete a catalog category using the given category ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
418
+ # @param id [String]
419
+ # @param [Hash] opts the optional parameters
420
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
421
+ def delete_catalog_category_with_http_info(id, opts = {})
422
+ if @api_client.config.debugging
423
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.delete_catalog_category ...'
424
+ end
425
+ # verify the required parameter 'id' is set
426
+ if @api_client.config.client_side_validation && id.nil?
427
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogsApi.delete_catalog_category"
428
+ end
429
+ # resource path
430
+ local_var_path = '/api/catalog-categories/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
431
+
432
+ # query parameters
433
+ query_params = opts[:query_params] || {}
434
+
435
+ # header parameters
436
+ header_params = opts[:header_params] || {}
437
+ # klaviyo api revision
438
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
439
+ # HTTP header 'Accept' (if needed)
440
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
441
+
442
+ # form parameters
443
+ form_params = opts[:form_params] || {}
444
+
445
+ # http body (model)
446
+ post_body = opts[:debug_body]
447
+
448
+ # return_type
449
+ return_type = opts[:debug_return_type]
450
+
451
+ # auth_names
452
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
453
+
454
+ new_options = opts.merge(
455
+ :operation => :"CatalogsApi.delete_catalog_category",
456
+ :header_params => header_params,
457
+ :query_params => query_params,
458
+ :form_params => form_params,
459
+ :body => post_body,
460
+ :auth_names => auth_names,
461
+ :return_type => return_type
462
+ )
463
+
464
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
465
+ if @api_client.config.debugging
466
+ @api_client.config.logger.debug "API called: CatalogsApi#delete_catalog_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
467
+ end
468
+ return data, status_code, headers
469
+ end
470
+
471
+ # Delete Catalog Category Relationships
472
+ # Delete item relationships for the given category ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
473
+ # @param id [String]
474
+ # @param related_resource [String]
475
+ # @param catalog_category_item_op [CatalogCategoryItemOp]
476
+ # @param [Hash] opts the optional parameters
477
+ # @return [nil]
478
+ def delete_catalog_category_relationships(id, related_resource, catalog_category_item_op, opts = {})
479
+ delete_catalog_category_relationships_with_http_info(id, related_resource, catalog_category_item_op, opts)
480
+ nil
481
+ end
482
+
483
+ # Delete Catalog Category Relationships
484
+ # Delete item relationships for the given category ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
485
+ # @param id [String]
486
+ # @param related_resource [String]
487
+ # @param catalog_category_item_op [CatalogCategoryItemOp]
488
+ # @param [Hash] opts the optional parameters
489
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
490
+ def delete_catalog_category_relationships_with_http_info(id, related_resource, catalog_category_item_op, opts = {})
491
+ if @api_client.config.debugging
492
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.delete_catalog_category_relationships ...'
493
+ end
494
+ # verify the required parameter 'id' is set
495
+ if @api_client.config.client_side_validation && id.nil?
496
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogsApi.delete_catalog_category_relationships"
497
+ end
498
+ # verify the required parameter 'related_resource' is set
499
+ if @api_client.config.client_side_validation && related_resource.nil?
500
+ fail ArgumentError, "Missing the required parameter 'related_resource' when calling CatalogsApi.delete_catalog_category_relationships"
501
+ end
502
+ # verify enum value
503
+ allowable_values = ["items"]
504
+ if @api_client.config.client_side_validation && !allowable_values.include?(related_resource)
505
+ fail ArgumentError, "invalid value for \"related_resource\", must be one of #{allowable_values}"
506
+ end
507
+ # verify the required parameter 'catalog_category_item_op' is set
508
+ if @api_client.config.client_side_validation && catalog_category_item_op.nil?
509
+ fail ArgumentError, "Missing the required parameter 'catalog_category_item_op' when calling CatalogsApi.delete_catalog_category_relationships"
510
+ end
511
+ # resource path
512
+ local_var_path = '/api/catalog-categories/{id}/relationships/{related_resource}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'related_resource' + '}', CGI.escape(related_resource.to_s))
513
+
514
+ # query parameters
515
+ query_params = opts[:query_params] || {}
516
+
517
+ # header parameters
518
+ header_params = opts[:header_params] || {}
519
+ # klaviyo api revision
520
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
521
+ # HTTP header 'Accept' (if needed)
522
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
523
+ # HTTP header 'Content-Type'
524
+ content_type = @api_client.select_header_content_type(['application/json'])
525
+ if !content_type.nil?
526
+ header_params['Content-Type'] = content_type
527
+ end
528
+
529
+ # form parameters
530
+ form_params = opts[:form_params] || {}
531
+
532
+ # http body (model)
533
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_category_item_op)
534
+
535
+ # return_type
536
+ return_type = opts[:debug_return_type]
537
+
538
+ # auth_names
539
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
540
+
541
+ new_options = opts.merge(
542
+ :operation => :"CatalogsApi.delete_catalog_category_relationships",
543
+ :header_params => header_params,
544
+ :query_params => query_params,
545
+ :form_params => form_params,
546
+ :body => post_body,
547
+ :auth_names => auth_names,
548
+ :return_type => return_type
549
+ )
550
+
551
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
552
+ if @api_client.config.debugging
553
+ @api_client.config.logger.debug "API called: CatalogsApi#delete_catalog_category_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
554
+ end
555
+ return data, status_code, headers
556
+ end
557
+
558
+ # Delete Catalog Item
559
+ # Delete a catalog item with the given item ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
560
+ # @param id [String]
561
+ # @param [Hash] opts the optional parameters
562
+ # @return [nil]
563
+ def delete_catalog_item(id, opts = {})
564
+ delete_catalog_item_with_http_info(id, opts)
565
+ nil
566
+ end
567
+
568
+ # Delete Catalog Item
569
+ # Delete a catalog item with the given item ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
570
+ # @param id [String]
571
+ # @param [Hash] opts the optional parameters
572
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
573
+ def delete_catalog_item_with_http_info(id, opts = {})
574
+ if @api_client.config.debugging
575
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.delete_catalog_item ...'
576
+ end
577
+ # verify the required parameter 'id' is set
578
+ if @api_client.config.client_side_validation && id.nil?
579
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogsApi.delete_catalog_item"
580
+ end
581
+ # resource path
582
+ local_var_path = '/api/catalog-items/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
583
+
584
+ # query parameters
585
+ query_params = opts[:query_params] || {}
586
+
587
+ # header parameters
588
+ header_params = opts[:header_params] || {}
589
+ # klaviyo api revision
590
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
591
+ # HTTP header 'Accept' (if needed)
592
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
593
+
594
+ # form parameters
595
+ form_params = opts[:form_params] || {}
596
+
597
+ # http body (model)
598
+ post_body = opts[:debug_body]
599
+
600
+ # return_type
601
+ return_type = opts[:debug_return_type]
602
+
603
+ # auth_names
604
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
605
+
606
+ new_options = opts.merge(
607
+ :operation => :"CatalogsApi.delete_catalog_item",
608
+ :header_params => header_params,
609
+ :query_params => query_params,
610
+ :form_params => form_params,
611
+ :body => post_body,
612
+ :auth_names => auth_names,
613
+ :return_type => return_type
614
+ )
615
+
616
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
617
+ if @api_client.config.debugging
618
+ @api_client.config.logger.debug "API called: CatalogsApi#delete_catalog_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
619
+ end
620
+ return data, status_code, headers
621
+ end
622
+
623
+ # Delete Catalog Item Relationships
624
+ # Delete catalog category relationships for the given item ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
625
+ # @param id [String]
626
+ # @param related_resource [String]
627
+ # @param catalog_item_category_op [CatalogItemCategoryOp]
628
+ # @param [Hash] opts the optional parameters
629
+ # @return [nil]
630
+ def delete_catalog_item_relationships(id, related_resource, catalog_item_category_op, opts = {})
631
+ delete_catalog_item_relationships_with_http_info(id, related_resource, catalog_item_category_op, opts)
632
+ nil
633
+ end
634
+
635
+ # Delete Catalog Item Relationships
636
+ # Delete catalog category relationships for the given item ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
637
+ # @param id [String]
638
+ # @param related_resource [String]
639
+ # @param catalog_item_category_op [CatalogItemCategoryOp]
640
+ # @param [Hash] opts the optional parameters
641
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
642
+ def delete_catalog_item_relationships_with_http_info(id, related_resource, catalog_item_category_op, opts = {})
643
+ if @api_client.config.debugging
644
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.delete_catalog_item_relationships ...'
645
+ end
646
+ # verify the required parameter 'id' is set
647
+ if @api_client.config.client_side_validation && id.nil?
648
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogsApi.delete_catalog_item_relationships"
649
+ end
650
+ # verify the required parameter 'related_resource' is set
651
+ if @api_client.config.client_side_validation && related_resource.nil?
652
+ fail ArgumentError, "Missing the required parameter 'related_resource' when calling CatalogsApi.delete_catalog_item_relationships"
653
+ end
654
+ # verify enum value
655
+ allowable_values = ["categories"]
656
+ if @api_client.config.client_side_validation && !allowable_values.include?(related_resource)
657
+ fail ArgumentError, "invalid value for \"related_resource\", must be one of #{allowable_values}"
658
+ end
659
+ # verify the required parameter 'catalog_item_category_op' is set
660
+ if @api_client.config.client_side_validation && catalog_item_category_op.nil?
661
+ fail ArgumentError, "Missing the required parameter 'catalog_item_category_op' when calling CatalogsApi.delete_catalog_item_relationships"
662
+ end
663
+ # resource path
664
+ local_var_path = '/api/catalog-items/{id}/relationships/{related_resource}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'related_resource' + '}', CGI.escape(related_resource.to_s))
665
+
666
+ # query parameters
667
+ query_params = opts[:query_params] || {}
668
+
669
+ # header parameters
670
+ header_params = opts[:header_params] || {}
671
+ # klaviyo api revision
672
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
673
+ # HTTP header 'Accept' (if needed)
674
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
675
+ # HTTP header 'Content-Type'
676
+ content_type = @api_client.select_header_content_type(['application/json'])
677
+ if !content_type.nil?
678
+ header_params['Content-Type'] = content_type
679
+ end
680
+
681
+ # form parameters
682
+ form_params = opts[:form_params] || {}
683
+
684
+ # http body (model)
685
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_item_category_op)
686
+
687
+ # return_type
688
+ return_type = opts[:debug_return_type]
689
+
690
+ # auth_names
691
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
692
+
693
+ new_options = opts.merge(
694
+ :operation => :"CatalogsApi.delete_catalog_item_relationships",
695
+ :header_params => header_params,
696
+ :query_params => query_params,
697
+ :form_params => form_params,
698
+ :body => post_body,
699
+ :auth_names => auth_names,
700
+ :return_type => return_type
701
+ )
702
+
703
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
704
+ if @api_client.config.debugging
705
+ @api_client.config.logger.debug "API called: CatalogsApi#delete_catalog_item_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
706
+ end
707
+ return data, status_code, headers
708
+ end
709
+
710
+ # Delete Catalog Variant
711
+ # Delete a catalog item variant with the given variant ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
712
+ # @param id [String]
713
+ # @param [Hash] opts the optional parameters
714
+ # @return [nil]
715
+ def delete_catalog_variant(id, opts = {})
716
+ delete_catalog_variant_with_http_info(id, opts)
717
+ nil
718
+ end
719
+
720
+ # Delete Catalog Variant
721
+ # Delete a catalog item variant with the given variant ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
722
+ # @param id [String]
723
+ # @param [Hash] opts the optional parameters
724
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
725
+ def delete_catalog_variant_with_http_info(id, opts = {})
726
+ if @api_client.config.debugging
727
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.delete_catalog_variant ...'
728
+ end
729
+ # verify the required parameter 'id' is set
730
+ if @api_client.config.client_side_validation && id.nil?
731
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogsApi.delete_catalog_variant"
732
+ end
733
+ # resource path
734
+ local_var_path = '/api/catalog-variants/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
735
+
736
+ # query parameters
737
+ query_params = opts[:query_params] || {}
738
+
739
+ # header parameters
740
+ header_params = opts[:header_params] || {}
741
+ # klaviyo api revision
742
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
743
+ # HTTP header 'Accept' (if needed)
744
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
745
+
746
+ # form parameters
747
+ form_params = opts[:form_params] || {}
748
+
749
+ # http body (model)
750
+ post_body = opts[:debug_body]
751
+
752
+ # return_type
753
+ return_type = opts[:debug_return_type]
754
+
755
+ # auth_names
756
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
757
+
758
+ new_options = opts.merge(
759
+ :operation => :"CatalogsApi.delete_catalog_variant",
760
+ :header_params => header_params,
761
+ :query_params => query_params,
762
+ :form_params => form_params,
763
+ :body => post_body,
764
+ :auth_names => auth_names,
765
+ :return_type => return_type
766
+ )
767
+
768
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
769
+ if @api_client.config.debugging
770
+ @api_client.config.logger.debug "API called: CatalogsApi#delete_catalog_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
771
+ end
772
+ return data, status_code, headers
773
+ end
774
+
775
+ # Get Catalog Categories
776
+ # Get all catalog categories in an account. Catalog categories can be sorted by the following fields, in ascending and descending order: `created` Use filters to return specific fields. Request specific fields [sparse fieldsets](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#sparse-fieldsets). Returns a maximum of 100 categories per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
777
+ # @param [Hash] opts the optional parameters
778
+ # @option opts [Array<String>] :fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
779
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;ids&#x60;: &#x60;any&#x60;&lt;br&gt;&#x60;item&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;name&#x60;: &#x60;contains&#x60;
780
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
781
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sorting
782
+ # @return [Hash<String, Object>]
783
+ def get_catalog_categories(opts = {})
784
+ data, _status_code, _headers = get_catalog_categories_with_http_info(opts)
785
+ data
786
+ end
787
+
788
+ # Get Catalog Categories
789
+ # Get all catalog categories in an account. Catalog categories can be sorted by the following fields, in ascending and descending order: &#x60;created&#x60; Use filters to return specific fields. Request specific fields [sparse fieldsets](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#sparse-fieldsets). Returns a maximum of 100 categories per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
790
+ # @param [Hash] opts the optional parameters
791
+ # @option opts [Array<String>] :fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
792
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;ids&#x60;: &#x60;any&#x60;&lt;br&gt;&#x60;item&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;name&#x60;: &#x60;contains&#x60;
793
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
794
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sorting
795
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
796
+ def get_catalog_categories_with_http_info(opts = {})
797
+ if @api_client.config.debugging
798
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_catalog_categories ...'
799
+ end
800
+ allowable_values = ["external_id", "name", "updated"]
801
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_category'] && !opts[:'fields_catalog_category'].all? { |item| allowable_values.include?(item) }
802
+ fail ArgumentError, "invalid value for \"fields_catalog_category\", must include one of #{allowable_values}"
803
+ end
804
+ allowable_values = ["created", "-created"]
805
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
806
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
807
+ end
808
+ # resource path
809
+ local_var_path = '/api/catalog-categories/'
810
+
811
+ # query parameters
812
+ query_params = opts[:query_params] || {}
813
+ query_params[:'fields[catalog-category]'] = @api_client.build_collection_param(opts[:'fields_catalog_category'], :csv) if !opts[:'fields_catalog_category'].nil?
814
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
815
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
816
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
817
+
818
+ # header parameters
819
+ header_params = opts[:header_params] || {}
820
+ # klaviyo api revision
821
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
822
+ # HTTP header 'Accept' (if needed)
823
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
824
+
825
+ # form parameters
826
+ form_params = opts[:form_params] || {}
827
+
828
+ # http body (model)
829
+ post_body = opts[:debug_body]
830
+
831
+ # return_type
832
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
833
+
834
+ # auth_names
835
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
836
+
837
+ new_options = opts.merge(
838
+ :operation => :"CatalogsApi.get_catalog_categories",
839
+ :header_params => header_params,
840
+ :query_params => query_params,
841
+ :form_params => form_params,
842
+ :body => post_body,
843
+ :auth_names => auth_names,
844
+ :return_type => return_type
845
+ )
846
+
847
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
848
+ if @api_client.config.debugging
849
+ @api_client.config.logger.debug "API called: CatalogsApi#get_catalog_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
850
+ end
851
+ return data, status_code, headers
852
+ end
853
+
854
+ # Get Catalog Category
855
+ # Get a catalog category with the given category ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
856
+ # @param id [String]
857
+ # @param [Hash] opts the optional parameters
858
+ # @option opts [Array<String>] :fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
859
+ # @return [Hash<String, Object>]
860
+ def get_catalog_category(id, opts = {})
861
+ data, _status_code, _headers = get_catalog_category_with_http_info(id, opts)
862
+ data
863
+ end
864
+
865
+ # Get Catalog Category
866
+ # Get a catalog category with the given category ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
867
+ # @param id [String]
868
+ # @param [Hash] opts the optional parameters
869
+ # @option opts [Array<String>] :fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
870
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
871
+ def get_catalog_category_with_http_info(id, opts = {})
872
+ if @api_client.config.debugging
873
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_catalog_category ...'
874
+ end
875
+ # verify the required parameter 'id' is set
876
+ if @api_client.config.client_side_validation && id.nil?
877
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogsApi.get_catalog_category"
878
+ end
879
+ allowable_values = ["external_id", "name", "updated"]
880
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_category'] && !opts[:'fields_catalog_category'].all? { |item| allowable_values.include?(item) }
881
+ fail ArgumentError, "invalid value for \"fields_catalog_category\", must include one of #{allowable_values}"
882
+ end
883
+ # resource path
884
+ local_var_path = '/api/catalog-categories/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
885
+
886
+ # query parameters
887
+ query_params = opts[:query_params] || {}
888
+ query_params[:'fields[catalog-category]'] = @api_client.build_collection_param(opts[:'fields_catalog_category'], :csv) if !opts[:'fields_catalog_category'].nil?
889
+
890
+ # header parameters
891
+ header_params = opts[:header_params] || {}
892
+ # klaviyo api revision
893
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
894
+ # HTTP header 'Accept' (if needed)
895
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
896
+
897
+ # form parameters
898
+ form_params = opts[:form_params] || {}
899
+
900
+ # http body (model)
901
+ post_body = opts[:debug_body]
902
+
903
+ # return_type
904
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
905
+
906
+ # auth_names
907
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
908
+
909
+ new_options = opts.merge(
910
+ :operation => :"CatalogsApi.get_catalog_category",
911
+ :header_params => header_params,
912
+ :query_params => query_params,
913
+ :form_params => form_params,
914
+ :body => post_body,
915
+ :auth_names => auth_names,
916
+ :return_type => return_type
917
+ )
918
+
919
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
920
+ if @api_client.config.debugging
921
+ @api_client.config.logger.debug "API called: CatalogsApi#get_catalog_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
922
+ end
923
+ return data, status_code, headers
924
+ end
925
+
926
+ # Get Catalog Category Items
927
+ # Get all items in a category with the given category ID. Items can be sorted by the following fields, in ascending and descending order: `created` Use filters to return specific fields and any variants. Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#sparse-fieldsets). Include parameters can be provided to get the following related resource data: `variants` Returns a maximum of 100 items per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
928
+ # @param category_id [String]
929
+ # @param [Hash] opts the optional parameters
930
+ # @option opts [Array<String>] :fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
931
+ # @option opts [Array<String>] :fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
932
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;ids&#x60;: &#x60;any&#x60;&lt;br&gt;&#x60;category&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;title&#x60;: &#x60;contains&#x60;&lt;br&gt;&#x60;published&#x60;: &#x60;equals&#x60;
933
+ # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#relationships
934
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
935
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sorting
936
+ # @return [Hash<String, Object>]
937
+ def get_catalog_category_items(category_id, opts = {})
938
+ data, _status_code, _headers = get_catalog_category_items_with_http_info(category_id, opts)
939
+ data
940
+ end
941
+
942
+ # Get Catalog Category Items
943
+ # Get all items in a category with the given category ID. Items can be sorted by the following fields, in ascending and descending order: &#x60;created&#x60; Use filters to return specific fields and any variants. Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#sparse-fieldsets). Include parameters can be provided to get the following related resource data: &#x60;variants&#x60; Returns a maximum of 100 items per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
944
+ # @param category_id [String]
945
+ # @param [Hash] opts the optional parameters
946
+ # @option opts [Array<String>] :fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
947
+ # @option opts [Array<String>] :fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
948
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;ids&#x60;: &#x60;any&#x60;&lt;br&gt;&#x60;category&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;title&#x60;: &#x60;contains&#x60;&lt;br&gt;&#x60;published&#x60;: &#x60;equals&#x60;
949
+ # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#relationships
950
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
951
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sorting
952
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
953
+ def get_catalog_category_items_with_http_info(category_id, opts = {})
954
+ if @api_client.config.debugging
955
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_catalog_category_items ...'
956
+ end
957
+ # verify the required parameter 'category_id' is set
958
+ if @api_client.config.client_side_validation && category_id.nil?
959
+ fail ArgumentError, "Missing the required parameter 'category_id' when calling CatalogsApi.get_catalog_category_items"
960
+ end
961
+ allowable_values = ["external_id", "title", "description", "url", "image_full_url", "image_thumbnail_url", "images", "custom_metadata", "published", "created", "updated"]
962
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_item'] && !opts[:'fields_catalog_item'].all? { |item| allowable_values.include?(item) }
963
+ fail ArgumentError, "invalid value for \"fields_catalog_item\", must include one of #{allowable_values}"
964
+ end
965
+ allowable_values = ["external_id", "title", "description", "sku", "inventory_policy", "inventory_quantity", "price", "url", "image_full_url", "image_thumbnail_url", "images", "custom_metadata", "published", "created", "updated"]
966
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_variant'] && !opts[:'fields_catalog_variant'].all? { |item| allowable_values.include?(item) }
967
+ fail ArgumentError, "invalid value for \"fields_catalog_variant\", must include one of #{allowable_values}"
968
+ end
969
+ allowable_values = ["variants"]
970
+ if @api_client.config.client_side_validation && opts[:'include'] && !opts[:'include'].all? { |item| allowable_values.include?(item) }
971
+ fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}"
972
+ end
973
+ allowable_values = ["created", "-created"]
974
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
975
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
976
+ end
977
+ # resource path
978
+ local_var_path = '/api/catalog-categories/{category_id}/items/'.sub('{' + 'category_id' + '}', CGI.escape(category_id.to_s))
979
+
980
+ # query parameters
981
+ query_params = opts[:query_params] || {}
982
+ query_params[:'fields[catalog-item]'] = @api_client.build_collection_param(opts[:'fields_catalog_item'], :csv) if !opts[:'fields_catalog_item'].nil?
983
+ query_params[:'fields[catalog-variant]'] = @api_client.build_collection_param(opts[:'fields_catalog_variant'], :csv) if !opts[:'fields_catalog_variant'].nil?
984
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
985
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
986
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
987
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
988
+
989
+ # header parameters
990
+ header_params = opts[:header_params] || {}
991
+ # klaviyo api revision
992
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
993
+ # HTTP header 'Accept' (if needed)
994
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
995
+
996
+ # form parameters
997
+ form_params = opts[:form_params] || {}
998
+
999
+ # http body (model)
1000
+ post_body = opts[:debug_body]
1001
+
1002
+ # return_type
1003
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1004
+
1005
+ # auth_names
1006
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1007
+
1008
+ new_options = opts.merge(
1009
+ :operation => :"CatalogsApi.get_catalog_category_items",
1010
+ :header_params => header_params,
1011
+ :query_params => query_params,
1012
+ :form_params => form_params,
1013
+ :body => post_body,
1014
+ :auth_names => auth_names,
1015
+ :return_type => return_type
1016
+ )
1017
+
1018
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1019
+ if @api_client.config.debugging
1020
+ @api_client.config.logger.debug "API called: CatalogsApi#get_catalog_category_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1021
+ end
1022
+ return data, status_code, headers
1023
+ end
1024
+
1025
+ # Get Catalog Category Relationships
1026
+ # Get all items in the given category ID. Returns a maximum of 100 items per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
1027
+ # @param id [String]
1028
+ # @param related_resource [String]
1029
+ # @param [Hash] opts the optional parameters
1030
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
1031
+ # @return [Hash<String, Object>]
1032
+ def get_catalog_category_relationships(id, related_resource, opts = {})
1033
+ data, _status_code, _headers = get_catalog_category_relationships_with_http_info(id, related_resource, opts)
1034
+ data
1035
+ end
1036
+
1037
+ # Get Catalog Category Relationships
1038
+ # Get all items in the given category ID. Returns a maximum of 100 items per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
1039
+ # @param id [String]
1040
+ # @param related_resource [String]
1041
+ # @param [Hash] opts the optional parameters
1042
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
1043
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
1044
+ def get_catalog_category_relationships_with_http_info(id, related_resource, opts = {})
1045
+ if @api_client.config.debugging
1046
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_catalog_category_relationships ...'
1047
+ end
1048
+ # verify the required parameter 'id' is set
1049
+ if @api_client.config.client_side_validation && id.nil?
1050
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogsApi.get_catalog_category_relationships"
1051
+ end
1052
+ # verify the required parameter 'related_resource' is set
1053
+ if @api_client.config.client_side_validation && related_resource.nil?
1054
+ fail ArgumentError, "Missing the required parameter 'related_resource' when calling CatalogsApi.get_catalog_category_relationships"
1055
+ end
1056
+ # verify enum value
1057
+ allowable_values = ["items"]
1058
+ if @api_client.config.client_side_validation && !allowable_values.include?(related_resource)
1059
+ fail ArgumentError, "invalid value for \"related_resource\", must be one of #{allowable_values}"
1060
+ end
1061
+ # resource path
1062
+ local_var_path = '/api/catalog-categories/{id}/relationships/{related_resource}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'related_resource' + '}', CGI.escape(related_resource.to_s))
1063
+
1064
+ # query parameters
1065
+ query_params = opts[:query_params] || {}
1066
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
1067
+
1068
+ # header parameters
1069
+ header_params = opts[:header_params] || {}
1070
+ # klaviyo api revision
1071
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
1072
+ # HTTP header 'Accept' (if needed)
1073
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1074
+
1075
+ # form parameters
1076
+ form_params = opts[:form_params] || {}
1077
+
1078
+ # http body (model)
1079
+ post_body = opts[:debug_body]
1080
+
1081
+ # return_type
1082
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1083
+
1084
+ # auth_names
1085
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1086
+
1087
+ new_options = opts.merge(
1088
+ :operation => :"CatalogsApi.get_catalog_category_relationships",
1089
+ :header_params => header_params,
1090
+ :query_params => query_params,
1091
+ :form_params => form_params,
1092
+ :body => post_body,
1093
+ :auth_names => auth_names,
1094
+ :return_type => return_type
1095
+ )
1096
+
1097
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1098
+ if @api_client.config.debugging
1099
+ @api_client.config.logger.debug "API called: CatalogsApi#get_catalog_category_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1100
+ end
1101
+ return data, status_code, headers
1102
+ end
1103
+
1104
+ # Get Catalog Item
1105
+ # Get a specific catalog item with the given item ID. Request specific fields and variants using [sparse fieldsets](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#sparse-fieldsets). Include parameters can be provided to get the following related resource data: `variants`<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
1106
+ # @param id [String]
1107
+ # @param [Hash] opts the optional parameters
1108
+ # @option opts [Array<String>] :fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1109
+ # @option opts [Array<String>] :fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1110
+ # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#relationships
1111
+ # @return [Hash<String, Object>]
1112
+ def get_catalog_item(id, opts = {})
1113
+ data, _status_code, _headers = get_catalog_item_with_http_info(id, opts)
1114
+ data
1115
+ end
1116
+
1117
+ # Get Catalog Item
1118
+ # Get a specific catalog item with the given item ID. Request specific fields and variants using [sparse fieldsets](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#sparse-fieldsets). Include parameters can be provided to get the following related resource data: &#x60;variants&#x60;&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
1119
+ # @param id [String]
1120
+ # @param [Hash] opts the optional parameters
1121
+ # @option opts [Array<String>] :fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1122
+ # @option opts [Array<String>] :fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1123
+ # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#relationships
1124
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
1125
+ def get_catalog_item_with_http_info(id, opts = {})
1126
+ if @api_client.config.debugging
1127
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_catalog_item ...'
1128
+ end
1129
+ # verify the required parameter 'id' is set
1130
+ if @api_client.config.client_side_validation && id.nil?
1131
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogsApi.get_catalog_item"
1132
+ end
1133
+ allowable_values = ["external_id", "title", "description", "url", "image_full_url", "image_thumbnail_url", "images", "custom_metadata", "published", "created", "updated"]
1134
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_item'] && !opts[:'fields_catalog_item'].all? { |item| allowable_values.include?(item) }
1135
+ fail ArgumentError, "invalid value for \"fields_catalog_item\", must include one of #{allowable_values}"
1136
+ end
1137
+ allowable_values = ["external_id", "title", "description", "sku", "inventory_policy", "inventory_quantity", "price", "url", "image_full_url", "image_thumbnail_url", "images", "custom_metadata", "published", "created", "updated"]
1138
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_variant'] && !opts[:'fields_catalog_variant'].all? { |item| allowable_values.include?(item) }
1139
+ fail ArgumentError, "invalid value for \"fields_catalog_variant\", must include one of #{allowable_values}"
1140
+ end
1141
+ allowable_values = ["variants"]
1142
+ if @api_client.config.client_side_validation && opts[:'include'] && !opts[:'include'].all? { |item| allowable_values.include?(item) }
1143
+ fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}"
1144
+ end
1145
+ # resource path
1146
+ local_var_path = '/api/catalog-items/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1147
+
1148
+ # query parameters
1149
+ query_params = opts[:query_params] || {}
1150
+ query_params[:'fields[catalog-item]'] = @api_client.build_collection_param(opts[:'fields_catalog_item'], :csv) if !opts[:'fields_catalog_item'].nil?
1151
+ query_params[:'fields[catalog-variant]'] = @api_client.build_collection_param(opts[:'fields_catalog_variant'], :csv) if !opts[:'fields_catalog_variant'].nil?
1152
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
1153
+
1154
+ # header parameters
1155
+ header_params = opts[:header_params] || {}
1156
+ # klaviyo api revision
1157
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
1158
+ # HTTP header 'Accept' (if needed)
1159
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1160
+
1161
+ # form parameters
1162
+ form_params = opts[:form_params] || {}
1163
+
1164
+ # http body (model)
1165
+ post_body = opts[:debug_body]
1166
+
1167
+ # return_type
1168
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1169
+
1170
+ # auth_names
1171
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1172
+
1173
+ new_options = opts.merge(
1174
+ :operation => :"CatalogsApi.get_catalog_item",
1175
+ :header_params => header_params,
1176
+ :query_params => query_params,
1177
+ :form_params => form_params,
1178
+ :body => post_body,
1179
+ :auth_names => auth_names,
1180
+ :return_type => return_type
1181
+ )
1182
+
1183
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1184
+ if @api_client.config.debugging
1185
+ @api_client.config.logger.debug "API called: CatalogsApi#get_catalog_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1186
+ end
1187
+ return data, status_code, headers
1188
+ end
1189
+
1190
+ # Get Catalog Item Categories
1191
+ # Get all catalog categories that an item with the given item ID is in. Catalog categories can be sorted by the following fields, in ascending and descending order: `created` Use filters to return specific fields. Request specific fields [sparse fieldsets](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#sparse-fieldsets). Returns a maximum of 100 categories per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
1192
+ # @param item_id [String]
1193
+ # @param [Hash] opts the optional parameters
1194
+ # @option opts [Array<String>] :fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1195
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;ids&#x60;: &#x60;any&#x60;&lt;br&gt;&#x60;item&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;name&#x60;: &#x60;contains&#x60;
1196
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
1197
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sorting
1198
+ # @return [Hash<String, Object>]
1199
+ def get_catalog_item_categories(item_id, opts = {})
1200
+ data, _status_code, _headers = get_catalog_item_categories_with_http_info(item_id, opts)
1201
+ data
1202
+ end
1203
+
1204
+ # Get Catalog Item Categories
1205
+ # Get all catalog categories that an item with the given item ID is in. Catalog categories can be sorted by the following fields, in ascending and descending order: &#x60;created&#x60; Use filters to return specific fields. Request specific fields [sparse fieldsets](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#sparse-fieldsets). Returns a maximum of 100 categories per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
1206
+ # @param item_id [String]
1207
+ # @param [Hash] opts the optional parameters
1208
+ # @option opts [Array<String>] :fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1209
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;ids&#x60;: &#x60;any&#x60;&lt;br&gt;&#x60;item&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;name&#x60;: &#x60;contains&#x60;
1210
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
1211
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sorting
1212
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
1213
+ def get_catalog_item_categories_with_http_info(item_id, opts = {})
1214
+ if @api_client.config.debugging
1215
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_catalog_item_categories ...'
1216
+ end
1217
+ # verify the required parameter 'item_id' is set
1218
+ if @api_client.config.client_side_validation && item_id.nil?
1219
+ fail ArgumentError, "Missing the required parameter 'item_id' when calling CatalogsApi.get_catalog_item_categories"
1220
+ end
1221
+ allowable_values = ["external_id", "name", "updated"]
1222
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_category'] && !opts[:'fields_catalog_category'].all? { |item| allowable_values.include?(item) }
1223
+ fail ArgumentError, "invalid value for \"fields_catalog_category\", must include one of #{allowable_values}"
1224
+ end
1225
+ allowable_values = ["created", "-created"]
1226
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1227
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1228
+ end
1229
+ # resource path
1230
+ local_var_path = '/api/catalog-items/{item_id}/categories/'.sub('{' + 'item_id' + '}', CGI.escape(item_id.to_s))
1231
+
1232
+ # query parameters
1233
+ query_params = opts[:query_params] || {}
1234
+ query_params[:'fields[catalog-category]'] = @api_client.build_collection_param(opts[:'fields_catalog_category'], :csv) if !opts[:'fields_catalog_category'].nil?
1235
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
1236
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
1237
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1238
+
1239
+ # header parameters
1240
+ header_params = opts[:header_params] || {}
1241
+ # klaviyo api revision
1242
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
1243
+ # HTTP header 'Accept' (if needed)
1244
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1245
+
1246
+ # form parameters
1247
+ form_params = opts[:form_params] || {}
1248
+
1249
+ # http body (model)
1250
+ post_body = opts[:debug_body]
1251
+
1252
+ # return_type
1253
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1254
+
1255
+ # auth_names
1256
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1257
+
1258
+ new_options = opts.merge(
1259
+ :operation => :"CatalogsApi.get_catalog_item_categories",
1260
+ :header_params => header_params,
1261
+ :query_params => query_params,
1262
+ :form_params => form_params,
1263
+ :body => post_body,
1264
+ :auth_names => auth_names,
1265
+ :return_type => return_type
1266
+ )
1267
+
1268
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1269
+ if @api_client.config.debugging
1270
+ @api_client.config.logger.debug "API called: CatalogsApi#get_catalog_item_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1271
+ end
1272
+ return data, status_code, headers
1273
+ end
1274
+
1275
+ # Get Catalog Item Relationships
1276
+ # Get all catalog categories that a particular item is in. Returns a maximum of 100 categories per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
1277
+ # @param id [String]
1278
+ # @param related_resource [String]
1279
+ # @param [Hash] opts the optional parameters
1280
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
1281
+ # @return [Hash<String, Object>]
1282
+ def get_catalog_item_relationships(id, related_resource, opts = {})
1283
+ data, _status_code, _headers = get_catalog_item_relationships_with_http_info(id, related_resource, opts)
1284
+ data
1285
+ end
1286
+
1287
+ # Get Catalog Item Relationships
1288
+ # Get all catalog categories that a particular item is in. Returns a maximum of 100 categories per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
1289
+ # @param id [String]
1290
+ # @param related_resource [String]
1291
+ # @param [Hash] opts the optional parameters
1292
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
1293
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
1294
+ def get_catalog_item_relationships_with_http_info(id, related_resource, opts = {})
1295
+ if @api_client.config.debugging
1296
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_catalog_item_relationships ...'
1297
+ end
1298
+ # verify the required parameter 'id' is set
1299
+ if @api_client.config.client_side_validation && id.nil?
1300
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogsApi.get_catalog_item_relationships"
1301
+ end
1302
+ # verify the required parameter 'related_resource' is set
1303
+ if @api_client.config.client_side_validation && related_resource.nil?
1304
+ fail ArgumentError, "Missing the required parameter 'related_resource' when calling CatalogsApi.get_catalog_item_relationships"
1305
+ end
1306
+ # verify enum value
1307
+ allowable_values = ["categories"]
1308
+ if @api_client.config.client_side_validation && !allowable_values.include?(related_resource)
1309
+ fail ArgumentError, "invalid value for \"related_resource\", must be one of #{allowable_values}"
1310
+ end
1311
+ # resource path
1312
+ local_var_path = '/api/catalog-items/{id}/relationships/{related_resource}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'related_resource' + '}', CGI.escape(related_resource.to_s))
1313
+
1314
+ # query parameters
1315
+ query_params = opts[:query_params] || {}
1316
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
1317
+
1318
+ # header parameters
1319
+ header_params = opts[:header_params] || {}
1320
+ # klaviyo api revision
1321
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
1322
+ # HTTP header 'Accept' (if needed)
1323
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1324
+
1325
+ # form parameters
1326
+ form_params = opts[:form_params] || {}
1327
+
1328
+ # http body (model)
1329
+ post_body = opts[:debug_body]
1330
+
1331
+ # return_type
1332
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1333
+
1334
+ # auth_names
1335
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1336
+
1337
+ new_options = opts.merge(
1338
+ :operation => :"CatalogsApi.get_catalog_item_relationships",
1339
+ :header_params => header_params,
1340
+ :query_params => query_params,
1341
+ :form_params => form_params,
1342
+ :body => post_body,
1343
+ :auth_names => auth_names,
1344
+ :return_type => return_type
1345
+ )
1346
+
1347
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1348
+ if @api_client.config.debugging
1349
+ @api_client.config.logger.debug "API called: CatalogsApi#get_catalog_item_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1350
+ end
1351
+ return data, status_code, headers
1352
+ end
1353
+
1354
+ # Get Catalog Item Variants
1355
+ # Get all variants related to the given item ID. Use filters to return specific fields. Request specific fields [sparse fieldsets](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#sparse-fieldsets). Variants can be sorted by the following fields, in ascending and descending order: `created` Returns a maximum of 100 variants per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
1356
+ # @param item_id [String]
1357
+ # @param [Hash] opts the optional parameters
1358
+ # @option opts [Array<String>] :fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1359
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;ids&#x60;: &#x60;any&#x60;&lt;br&gt;&#x60;item&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;sku&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;title&#x60;: &#x60;contains&#x60;&lt;br&gt;&#x60;published&#x60;: &#x60;equals&#x60;
1360
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
1361
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sorting
1362
+ # @return [Hash<String, Object>]
1363
+ def get_catalog_item_variants(item_id, opts = {})
1364
+ data, _status_code, _headers = get_catalog_item_variants_with_http_info(item_id, opts)
1365
+ data
1366
+ end
1367
+
1368
+ # Get Catalog Item Variants
1369
+ # Get all variants related to the given item ID. Use filters to return specific fields. Request specific fields [sparse fieldsets](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#sparse-fieldsets). Variants can be sorted by the following fields, in ascending and descending order: &#x60;created&#x60; Returns a maximum of 100 variants per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
1370
+ # @param item_id [String]
1371
+ # @param [Hash] opts the optional parameters
1372
+ # @option opts [Array<String>] :fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1373
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;ids&#x60;: &#x60;any&#x60;&lt;br&gt;&#x60;item&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;sku&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;title&#x60;: &#x60;contains&#x60;&lt;br&gt;&#x60;published&#x60;: &#x60;equals&#x60;
1374
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
1375
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sorting
1376
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
1377
+ def get_catalog_item_variants_with_http_info(item_id, opts = {})
1378
+ if @api_client.config.debugging
1379
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_catalog_item_variants ...'
1380
+ end
1381
+ # verify the required parameter 'item_id' is set
1382
+ if @api_client.config.client_side_validation && item_id.nil?
1383
+ fail ArgumentError, "Missing the required parameter 'item_id' when calling CatalogsApi.get_catalog_item_variants"
1384
+ end
1385
+ allowable_values = ["external_id", "title", "description", "sku", "inventory_policy", "inventory_quantity", "price", "url", "image_full_url", "image_thumbnail_url", "images", "custom_metadata", "published", "created", "updated"]
1386
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_variant'] && !opts[:'fields_catalog_variant'].all? { |item| allowable_values.include?(item) }
1387
+ fail ArgumentError, "invalid value for \"fields_catalog_variant\", must include one of #{allowable_values}"
1388
+ end
1389
+ allowable_values = ["created", "-created"]
1390
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1391
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1392
+ end
1393
+ # resource path
1394
+ local_var_path = '/api/catalog-items/{item_id}/variants/'.sub('{' + 'item_id' + '}', CGI.escape(item_id.to_s))
1395
+
1396
+ # query parameters
1397
+ query_params = opts[:query_params] || {}
1398
+ query_params[:'fields[catalog-variant]'] = @api_client.build_collection_param(opts[:'fields_catalog_variant'], :csv) if !opts[:'fields_catalog_variant'].nil?
1399
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
1400
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
1401
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1402
+
1403
+ # header parameters
1404
+ header_params = opts[:header_params] || {}
1405
+ # klaviyo api revision
1406
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
1407
+ # HTTP header 'Accept' (if needed)
1408
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1409
+
1410
+ # form parameters
1411
+ form_params = opts[:form_params] || {}
1412
+
1413
+ # http body (model)
1414
+ post_body = opts[:debug_body]
1415
+
1416
+ # return_type
1417
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1418
+
1419
+ # auth_names
1420
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1421
+
1422
+ new_options = opts.merge(
1423
+ :operation => :"CatalogsApi.get_catalog_item_variants",
1424
+ :header_params => header_params,
1425
+ :query_params => query_params,
1426
+ :form_params => form_params,
1427
+ :body => post_body,
1428
+ :auth_names => auth_names,
1429
+ :return_type => return_type
1430
+ )
1431
+
1432
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1433
+ if @api_client.config.debugging
1434
+ @api_client.config.logger.debug "API called: CatalogsApi#get_catalog_item_variants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1435
+ end
1436
+ return data, status_code, headers
1437
+ end
1438
+
1439
+ # Get Catalog Items
1440
+ # Get all catalog items in an account. Catalog items can be sorted by the following fields, in ascending and descending order: `created` Use filters to return specific fields and any variants. Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#sparse-fieldsets). Include parameters can be provided to get the following related resource data: `variants` Returns a maximum of 100 items per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
1441
+ # @param [Hash] opts the optional parameters
1442
+ # @option opts [Array<String>] :fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1443
+ # @option opts [Array<String>] :fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1444
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;ids&#x60;: &#x60;any&#x60;&lt;br&gt;&#x60;category&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;title&#x60;: &#x60;contains&#x60;&lt;br&gt;&#x60;published&#x60;: &#x60;equals&#x60;
1445
+ # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#relationships
1446
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
1447
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sorting
1448
+ # @return [Hash<String, Object>]
1449
+ def get_catalog_items(opts = {})
1450
+ data, _status_code, _headers = get_catalog_items_with_http_info(opts)
1451
+ data
1452
+ end
1453
+
1454
+ # Get Catalog Items
1455
+ # Get all catalog items in an account. Catalog items can be sorted by the following fields, in ascending and descending order: &#x60;created&#x60; Use filters to return specific fields and any variants. Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#sparse-fieldsets). Include parameters can be provided to get the following related resource data: &#x60;variants&#x60; Returns a maximum of 100 items per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
1456
+ # @param [Hash] opts the optional parameters
1457
+ # @option opts [Array<String>] :fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1458
+ # @option opts [Array<String>] :fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1459
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;ids&#x60;: &#x60;any&#x60;&lt;br&gt;&#x60;category&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;title&#x60;: &#x60;contains&#x60;&lt;br&gt;&#x60;published&#x60;: &#x60;equals&#x60;
1460
+ # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#relationships
1461
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
1462
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sorting
1463
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
1464
+ def get_catalog_items_with_http_info(opts = {})
1465
+ if @api_client.config.debugging
1466
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_catalog_items ...'
1467
+ end
1468
+ allowable_values = ["external_id", "title", "description", "url", "image_full_url", "image_thumbnail_url", "images", "custom_metadata", "published", "created", "updated"]
1469
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_item'] && !opts[:'fields_catalog_item'].all? { |item| allowable_values.include?(item) }
1470
+ fail ArgumentError, "invalid value for \"fields_catalog_item\", must include one of #{allowable_values}"
1471
+ end
1472
+ allowable_values = ["external_id", "title", "description", "sku", "inventory_policy", "inventory_quantity", "price", "url", "image_full_url", "image_thumbnail_url", "images", "custom_metadata", "published", "created", "updated"]
1473
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_variant'] && !opts[:'fields_catalog_variant'].all? { |item| allowable_values.include?(item) }
1474
+ fail ArgumentError, "invalid value for \"fields_catalog_variant\", must include one of #{allowable_values}"
1475
+ end
1476
+ allowable_values = ["variants"]
1477
+ if @api_client.config.client_side_validation && opts[:'include'] && !opts[:'include'].all? { |item| allowable_values.include?(item) }
1478
+ fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}"
1479
+ end
1480
+ allowable_values = ["created", "-created"]
1481
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1482
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1483
+ end
1484
+ # resource path
1485
+ local_var_path = '/api/catalog-items/'
1486
+
1487
+ # query parameters
1488
+ query_params = opts[:query_params] || {}
1489
+ query_params[:'fields[catalog-item]'] = @api_client.build_collection_param(opts[:'fields_catalog_item'], :csv) if !opts[:'fields_catalog_item'].nil?
1490
+ query_params[:'fields[catalog-variant]'] = @api_client.build_collection_param(opts[:'fields_catalog_variant'], :csv) if !opts[:'fields_catalog_variant'].nil?
1491
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
1492
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
1493
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
1494
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1495
+
1496
+ # header parameters
1497
+ header_params = opts[:header_params] || {}
1498
+ # klaviyo api revision
1499
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
1500
+ # HTTP header 'Accept' (if needed)
1501
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1502
+
1503
+ # form parameters
1504
+ form_params = opts[:form_params] || {}
1505
+
1506
+ # http body (model)
1507
+ post_body = opts[:debug_body]
1508
+
1509
+ # return_type
1510
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1511
+
1512
+ # auth_names
1513
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1514
+
1515
+ new_options = opts.merge(
1516
+ :operation => :"CatalogsApi.get_catalog_items",
1517
+ :header_params => header_params,
1518
+ :query_params => query_params,
1519
+ :form_params => form_params,
1520
+ :body => post_body,
1521
+ :auth_names => auth_names,
1522
+ :return_type => return_type
1523
+ )
1524
+
1525
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1526
+ if @api_client.config.debugging
1527
+ @api_client.config.logger.debug "API called: CatalogsApi#get_catalog_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1528
+ end
1529
+ return data, status_code, headers
1530
+ end
1531
+
1532
+ # Get Catalog Variant
1533
+ # Get a catalog item variant with the given variant ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
1534
+ # @param id [String]
1535
+ # @param [Hash] opts the optional parameters
1536
+ # @option opts [Array<String>] :fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1537
+ # @return [Hash<String, Object>]
1538
+ def get_catalog_variant(id, opts = {})
1539
+ data, _status_code, _headers = get_catalog_variant_with_http_info(id, opts)
1540
+ data
1541
+ end
1542
+
1543
+ # Get Catalog Variant
1544
+ # Get a catalog item variant with the given variant ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
1545
+ # @param id [String]
1546
+ # @param [Hash] opts the optional parameters
1547
+ # @option opts [Array<String>] :fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1548
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
1549
+ def get_catalog_variant_with_http_info(id, opts = {})
1550
+ if @api_client.config.debugging
1551
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_catalog_variant ...'
1552
+ end
1553
+ # verify the required parameter 'id' is set
1554
+ if @api_client.config.client_side_validation && id.nil?
1555
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogsApi.get_catalog_variant"
1556
+ end
1557
+ allowable_values = ["external_id", "title", "description", "sku", "inventory_policy", "inventory_quantity", "price", "url", "image_full_url", "image_thumbnail_url", "images", "custom_metadata", "published", "created", "updated"]
1558
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_variant'] && !opts[:'fields_catalog_variant'].all? { |item| allowable_values.include?(item) }
1559
+ fail ArgumentError, "invalid value for \"fields_catalog_variant\", must include one of #{allowable_values}"
1560
+ end
1561
+ # resource path
1562
+ local_var_path = '/api/catalog-variants/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1563
+
1564
+ # query parameters
1565
+ query_params = opts[:query_params] || {}
1566
+ query_params[:'fields[catalog-variant]'] = @api_client.build_collection_param(opts[:'fields_catalog_variant'], :csv) if !opts[:'fields_catalog_variant'].nil?
1567
+
1568
+ # header parameters
1569
+ header_params = opts[:header_params] || {}
1570
+ # klaviyo api revision
1571
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
1572
+ # HTTP header 'Accept' (if needed)
1573
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1574
+
1575
+ # form parameters
1576
+ form_params = opts[:form_params] || {}
1577
+
1578
+ # http body (model)
1579
+ post_body = opts[:debug_body]
1580
+
1581
+ # return_type
1582
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1583
+
1584
+ # auth_names
1585
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1586
+
1587
+ new_options = opts.merge(
1588
+ :operation => :"CatalogsApi.get_catalog_variant",
1589
+ :header_params => header_params,
1590
+ :query_params => query_params,
1591
+ :form_params => form_params,
1592
+ :body => post_body,
1593
+ :auth_names => auth_names,
1594
+ :return_type => return_type
1595
+ )
1596
+
1597
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1598
+ if @api_client.config.debugging
1599
+ @api_client.config.logger.debug "API called: CatalogsApi#get_catalog_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1600
+ end
1601
+ return data, status_code, headers
1602
+ end
1603
+
1604
+ # Get Catalog Variants
1605
+ # Get all variants in an account. Use filters to return specific fields. Request specific fields [sparse fieldsets](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#sparse-fieldsets). Variants can be sorted by the following fields, in ascending and descending order: `created` Returns a maximum of 100 variants per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
1606
+ # @param [Hash] opts the optional parameters
1607
+ # @option opts [Array<String>] :fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1608
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;ids&#x60;: &#x60;any&#x60;&lt;br&gt;&#x60;item&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;sku&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;title&#x60;: &#x60;contains&#x60;&lt;br&gt;&#x60;published&#x60;: &#x60;equals&#x60;
1609
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
1610
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sorting
1611
+ # @return [Hash<String, Object>]
1612
+ def get_catalog_variants(opts = {})
1613
+ data, _status_code, _headers = get_catalog_variants_with_http_info(opts)
1614
+ data
1615
+ end
1616
+
1617
+ # Get Catalog Variants
1618
+ # Get all variants in an account. Use filters to return specific fields. Request specific fields [sparse fieldsets](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#sparse-fieldsets). Variants can be sorted by the following fields, in ascending and descending order: &#x60;created&#x60; Returns a maximum of 100 variants per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
1619
+ # @param [Hash] opts the optional parameters
1620
+ # @option opts [Array<String>] :fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1621
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;ids&#x60;: &#x60;any&#x60;&lt;br&gt;&#x60;item&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;sku&#x60;: &#x60;equals&#x60;&lt;br&gt;&#x60;title&#x60;: &#x60;contains&#x60;&lt;br&gt;&#x60;published&#x60;: &#x60;equals&#x60;
1622
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
1623
+ # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sorting
1624
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
1625
+ def get_catalog_variants_with_http_info(opts = {})
1626
+ if @api_client.config.debugging
1627
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_catalog_variants ...'
1628
+ end
1629
+ allowable_values = ["external_id", "title", "description", "sku", "inventory_policy", "inventory_quantity", "price", "url", "image_full_url", "image_thumbnail_url", "images", "custom_metadata", "published", "created", "updated"]
1630
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_variant'] && !opts[:'fields_catalog_variant'].all? { |item| allowable_values.include?(item) }
1631
+ fail ArgumentError, "invalid value for \"fields_catalog_variant\", must include one of #{allowable_values}"
1632
+ end
1633
+ allowable_values = ["created", "-created"]
1634
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1635
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1636
+ end
1637
+ # resource path
1638
+ local_var_path = '/api/catalog-variants/'
1639
+
1640
+ # query parameters
1641
+ query_params = opts[:query_params] || {}
1642
+ query_params[:'fields[catalog-variant]'] = @api_client.build_collection_param(opts[:'fields_catalog_variant'], :csv) if !opts[:'fields_catalog_variant'].nil?
1643
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
1644
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
1645
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1646
+
1647
+ # header parameters
1648
+ header_params = opts[:header_params] || {}
1649
+ # klaviyo api revision
1650
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
1651
+ # HTTP header 'Accept' (if needed)
1652
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1653
+
1654
+ # form parameters
1655
+ form_params = opts[:form_params] || {}
1656
+
1657
+ # http body (model)
1658
+ post_body = opts[:debug_body]
1659
+
1660
+ # return_type
1661
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1662
+
1663
+ # auth_names
1664
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1665
+
1666
+ new_options = opts.merge(
1667
+ :operation => :"CatalogsApi.get_catalog_variants",
1668
+ :header_params => header_params,
1669
+ :query_params => query_params,
1670
+ :form_params => form_params,
1671
+ :body => post_body,
1672
+ :auth_names => auth_names,
1673
+ :return_type => return_type
1674
+ )
1675
+
1676
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1677
+ if @api_client.config.debugging
1678
+ @api_client.config.logger.debug "API called: CatalogsApi#get_catalog_variants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1679
+ end
1680
+ return data, status_code, headers
1681
+ end
1682
+
1683
+ # Get Create Categories Job
1684
+ # Get a catalog category bulk create job with the given job ID. Include parameters can be provided to get the following related resource data: `categories`<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
1685
+ # @param job_id [String]
1686
+ # @param [Hash] opts the optional parameters
1687
+ # @option opts [Array<String>] :fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1688
+ # @option opts [Array<String>] :fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1689
+ # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#relationships
1690
+ # @return [Hash<String, Object>]
1691
+ def get_create_categories_job(job_id, opts = {})
1692
+ data, _status_code, _headers = get_create_categories_job_with_http_info(job_id, opts)
1693
+ data
1694
+ end
1695
+
1696
+ # Get Create Categories Job
1697
+ # Get a catalog category bulk create job with the given job ID. Include parameters can be provided to get the following related resource data: &#x60;categories&#x60;&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
1698
+ # @param job_id [String]
1699
+ # @param [Hash] opts the optional parameters
1700
+ # @option opts [Array<String>] :fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1701
+ # @option opts [Array<String>] :fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1702
+ # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#relationships
1703
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
1704
+ def get_create_categories_job_with_http_info(job_id, opts = {})
1705
+ if @api_client.config.debugging
1706
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_create_categories_job ...'
1707
+ end
1708
+ # verify the required parameter 'job_id' is set
1709
+ if @api_client.config.client_side_validation && job_id.nil?
1710
+ fail ArgumentError, "Missing the required parameter 'job_id' when calling CatalogsApi.get_create_categories_job"
1711
+ end
1712
+ allowable_values = ["job_id", "status", "created_at", "total_count", "completed_count", "failed_count", "completed_at", "expires_at", "errors"]
1713
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_category_bulk_create_job'] && !opts[:'fields_catalog_category_bulk_create_job'].all? { |item| allowable_values.include?(item) }
1714
+ fail ArgumentError, "invalid value for \"fields_catalog_category_bulk_create_job\", must include one of #{allowable_values}"
1715
+ end
1716
+ allowable_values = ["external_id", "name", "updated"]
1717
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_category'] && !opts[:'fields_catalog_category'].all? { |item| allowable_values.include?(item) }
1718
+ fail ArgumentError, "invalid value for \"fields_catalog_category\", must include one of #{allowable_values}"
1719
+ end
1720
+ allowable_values = ["categories"]
1721
+ if @api_client.config.client_side_validation && opts[:'include'] && !opts[:'include'].all? { |item| allowable_values.include?(item) }
1722
+ fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}"
1723
+ end
1724
+ # resource path
1725
+ local_var_path = '/api/catalog-category-bulk-create-jobs/{job_id}/'.sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s))
1726
+
1727
+ # query parameters
1728
+ query_params = opts[:query_params] || {}
1729
+ query_params[:'fields[catalog-category-bulk-create-job]'] = @api_client.build_collection_param(opts[:'fields_catalog_category_bulk_create_job'], :csv) if !opts[:'fields_catalog_category_bulk_create_job'].nil?
1730
+ query_params[:'fields[catalog-category]'] = @api_client.build_collection_param(opts[:'fields_catalog_category'], :csv) if !opts[:'fields_catalog_category'].nil?
1731
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
1732
+
1733
+ # header parameters
1734
+ header_params = opts[:header_params] || {}
1735
+ # klaviyo api revision
1736
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
1737
+ # HTTP header 'Accept' (if needed)
1738
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1739
+
1740
+ # form parameters
1741
+ form_params = opts[:form_params] || {}
1742
+
1743
+ # http body (model)
1744
+ post_body = opts[:debug_body]
1745
+
1746
+ # return_type
1747
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1748
+
1749
+ # auth_names
1750
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1751
+
1752
+ new_options = opts.merge(
1753
+ :operation => :"CatalogsApi.get_create_categories_job",
1754
+ :header_params => header_params,
1755
+ :query_params => query_params,
1756
+ :form_params => form_params,
1757
+ :body => post_body,
1758
+ :auth_names => auth_names,
1759
+ :return_type => return_type
1760
+ )
1761
+
1762
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1763
+ if @api_client.config.debugging
1764
+ @api_client.config.logger.debug "API called: CatalogsApi#get_create_categories_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1765
+ end
1766
+ return data, status_code, headers
1767
+ end
1768
+
1769
+ # Get Create Categories Jobs
1770
+ # Get all catalog category bulk create jobs. Returns a maximum of 100 jobs per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
1771
+ # @param [Hash] opts the optional parameters
1772
+ # @option opts [Array<String>] :fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1773
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;status&#x60;: &#x60;equals&#x60;
1774
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
1775
+ # @return [Hash<String, Object>]
1776
+ def get_create_categories_jobs(opts = {})
1777
+ data, _status_code, _headers = get_create_categories_jobs_with_http_info(opts)
1778
+ data
1779
+ end
1780
+
1781
+ # Get Create Categories Jobs
1782
+ # Get all catalog category bulk create jobs. Returns a maximum of 100 jobs per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
1783
+ # @param [Hash] opts the optional parameters
1784
+ # @option opts [Array<String>] :fields_catalog_category_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1785
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;status&#x60;: &#x60;equals&#x60;
1786
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
1787
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
1788
+ def get_create_categories_jobs_with_http_info(opts = {})
1789
+ if @api_client.config.debugging
1790
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_create_categories_jobs ...'
1791
+ end
1792
+ allowable_values = ["job_id", "status", "created_at", "total_count", "completed_count", "failed_count", "completed_at", "expires_at", "errors"]
1793
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_category_bulk_create_job'] && !opts[:'fields_catalog_category_bulk_create_job'].all? { |item| allowable_values.include?(item) }
1794
+ fail ArgumentError, "invalid value for \"fields_catalog_category_bulk_create_job\", must include one of #{allowable_values}"
1795
+ end
1796
+ # resource path
1797
+ local_var_path = '/api/catalog-category-bulk-create-jobs/'
1798
+
1799
+ # query parameters
1800
+ query_params = opts[:query_params] || {}
1801
+ query_params[:'fields[catalog-category-bulk-create-job]'] = @api_client.build_collection_param(opts[:'fields_catalog_category_bulk_create_job'], :csv) if !opts[:'fields_catalog_category_bulk_create_job'].nil?
1802
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
1803
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
1804
+
1805
+ # header parameters
1806
+ header_params = opts[:header_params] || {}
1807
+ # klaviyo api revision
1808
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
1809
+ # HTTP header 'Accept' (if needed)
1810
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1811
+
1812
+ # form parameters
1813
+ form_params = opts[:form_params] || {}
1814
+
1815
+ # http body (model)
1816
+ post_body = opts[:debug_body]
1817
+
1818
+ # return_type
1819
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1820
+
1821
+ # auth_names
1822
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1823
+
1824
+ new_options = opts.merge(
1825
+ :operation => :"CatalogsApi.get_create_categories_jobs",
1826
+ :header_params => header_params,
1827
+ :query_params => query_params,
1828
+ :form_params => form_params,
1829
+ :body => post_body,
1830
+ :auth_names => auth_names,
1831
+ :return_type => return_type
1832
+ )
1833
+
1834
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1835
+ if @api_client.config.debugging
1836
+ @api_client.config.logger.debug "API called: CatalogsApi#get_create_categories_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1837
+ end
1838
+ return data, status_code, headers
1839
+ end
1840
+
1841
+ # Get Create Items Job
1842
+ # Get a catalog item bulk create job with the given job ID. Include parameters can be provided to get the following related resource data: `items`<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
1843
+ # @param job_id [String]
1844
+ # @param [Hash] opts the optional parameters
1845
+ # @option opts [Array<String>] :fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1846
+ # @option opts [Array<String>] :fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1847
+ # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#relationships
1848
+ # @return [Hash<String, Object>]
1849
+ def get_create_items_job(job_id, opts = {})
1850
+ data, _status_code, _headers = get_create_items_job_with_http_info(job_id, opts)
1851
+ data
1852
+ end
1853
+
1854
+ # Get Create Items Job
1855
+ # Get a catalog item bulk create job with the given job ID. Include parameters can be provided to get the following related resource data: &#x60;items&#x60;&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
1856
+ # @param job_id [String]
1857
+ # @param [Hash] opts the optional parameters
1858
+ # @option opts [Array<String>] :fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1859
+ # @option opts [Array<String>] :fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1860
+ # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#relationships
1861
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
1862
+ def get_create_items_job_with_http_info(job_id, opts = {})
1863
+ if @api_client.config.debugging
1864
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_create_items_job ...'
1865
+ end
1866
+ # verify the required parameter 'job_id' is set
1867
+ if @api_client.config.client_side_validation && job_id.nil?
1868
+ fail ArgumentError, "Missing the required parameter 'job_id' when calling CatalogsApi.get_create_items_job"
1869
+ end
1870
+ allowable_values = ["job_id", "status", "created_at", "total_count", "completed_count", "failed_count", "completed_at", "expires_at", "errors"]
1871
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_item_bulk_create_job'] && !opts[:'fields_catalog_item_bulk_create_job'].all? { |item| allowable_values.include?(item) }
1872
+ fail ArgumentError, "invalid value for \"fields_catalog_item_bulk_create_job\", must include one of #{allowable_values}"
1873
+ end
1874
+ allowable_values = ["external_id", "title", "description", "url", "image_full_url", "image_thumbnail_url", "images", "custom_metadata", "published", "created", "updated"]
1875
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_item'] && !opts[:'fields_catalog_item'].all? { |item| allowable_values.include?(item) }
1876
+ fail ArgumentError, "invalid value for \"fields_catalog_item\", must include one of #{allowable_values}"
1877
+ end
1878
+ allowable_values = ["items"]
1879
+ if @api_client.config.client_side_validation && opts[:'include'] && !opts[:'include'].all? { |item| allowable_values.include?(item) }
1880
+ fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}"
1881
+ end
1882
+ # resource path
1883
+ local_var_path = '/api/catalog-item-bulk-create-jobs/{job_id}/'.sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s))
1884
+
1885
+ # query parameters
1886
+ query_params = opts[:query_params] || {}
1887
+ query_params[:'fields[catalog-item-bulk-create-job]'] = @api_client.build_collection_param(opts[:'fields_catalog_item_bulk_create_job'], :csv) if !opts[:'fields_catalog_item_bulk_create_job'].nil?
1888
+ query_params[:'fields[catalog-item]'] = @api_client.build_collection_param(opts[:'fields_catalog_item'], :csv) if !opts[:'fields_catalog_item'].nil?
1889
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
1890
+
1891
+ # header parameters
1892
+ header_params = opts[:header_params] || {}
1893
+ # klaviyo api revision
1894
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
1895
+ # HTTP header 'Accept' (if needed)
1896
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1897
+
1898
+ # form parameters
1899
+ form_params = opts[:form_params] || {}
1900
+
1901
+ # http body (model)
1902
+ post_body = opts[:debug_body]
1903
+
1904
+ # return_type
1905
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1906
+
1907
+ # auth_names
1908
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1909
+
1910
+ new_options = opts.merge(
1911
+ :operation => :"CatalogsApi.get_create_items_job",
1912
+ :header_params => header_params,
1913
+ :query_params => query_params,
1914
+ :form_params => form_params,
1915
+ :body => post_body,
1916
+ :auth_names => auth_names,
1917
+ :return_type => return_type
1918
+ )
1919
+
1920
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1921
+ if @api_client.config.debugging
1922
+ @api_client.config.logger.debug "API called: CatalogsApi#get_create_items_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1923
+ end
1924
+ return data, status_code, headers
1925
+ end
1926
+
1927
+ # Get Create Items Jobs
1928
+ # Get all catalog item bulk create jobs. Returns a maximum of 100 jobs per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
1929
+ # @param [Hash] opts the optional parameters
1930
+ # @option opts [Array<String>] :fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1931
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;status&#x60;: &#x60;equals&#x60;
1932
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
1933
+ # @return [Hash<String, Object>]
1934
+ def get_create_items_jobs(opts = {})
1935
+ data, _status_code, _headers = get_create_items_jobs_with_http_info(opts)
1936
+ data
1937
+ end
1938
+
1939
+ # Get Create Items Jobs
1940
+ # Get all catalog item bulk create jobs. Returns a maximum of 100 jobs per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
1941
+ # @param [Hash] opts the optional parameters
1942
+ # @option opts [Array<String>] :fields_catalog_item_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
1943
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;status&#x60;: &#x60;equals&#x60;
1944
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
1945
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
1946
+ def get_create_items_jobs_with_http_info(opts = {})
1947
+ if @api_client.config.debugging
1948
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_create_items_jobs ...'
1949
+ end
1950
+ allowable_values = ["job_id", "status", "created_at", "total_count", "completed_count", "failed_count", "completed_at", "expires_at", "errors"]
1951
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_item_bulk_create_job'] && !opts[:'fields_catalog_item_bulk_create_job'].all? { |item| allowable_values.include?(item) }
1952
+ fail ArgumentError, "invalid value for \"fields_catalog_item_bulk_create_job\", must include one of #{allowable_values}"
1953
+ end
1954
+ # resource path
1955
+ local_var_path = '/api/catalog-item-bulk-create-jobs/'
1956
+
1957
+ # query parameters
1958
+ query_params = opts[:query_params] || {}
1959
+ query_params[:'fields[catalog-item-bulk-create-job]'] = @api_client.build_collection_param(opts[:'fields_catalog_item_bulk_create_job'], :csv) if !opts[:'fields_catalog_item_bulk_create_job'].nil?
1960
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
1961
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
1962
+
1963
+ # header parameters
1964
+ header_params = opts[:header_params] || {}
1965
+ # klaviyo api revision
1966
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
1967
+ # HTTP header 'Accept' (if needed)
1968
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1969
+
1970
+ # form parameters
1971
+ form_params = opts[:form_params] || {}
1972
+
1973
+ # http body (model)
1974
+ post_body = opts[:debug_body]
1975
+
1976
+ # return_type
1977
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
1978
+
1979
+ # auth_names
1980
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
1981
+
1982
+ new_options = opts.merge(
1983
+ :operation => :"CatalogsApi.get_create_items_jobs",
1984
+ :header_params => header_params,
1985
+ :query_params => query_params,
1986
+ :form_params => form_params,
1987
+ :body => post_body,
1988
+ :auth_names => auth_names,
1989
+ :return_type => return_type
1990
+ )
1991
+
1992
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1993
+ if @api_client.config.debugging
1994
+ @api_client.config.logger.debug "API called: CatalogsApi#get_create_items_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1995
+ end
1996
+ return data, status_code, headers
1997
+ end
1998
+
1999
+ # Get Create Variants Job
2000
+ # Get a catalog variant bulk create job with the given job ID. Include parameters can be provided to get the following related resource data: `variants`.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
2001
+ # @param job_id [String]
2002
+ # @param [Hash] opts the optional parameters
2003
+ # @option opts [Array<String>] :fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2004
+ # @option opts [Array<String>] :fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2005
+ # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#relationships
2006
+ # @return [Hash<String, Object>]
2007
+ def get_create_variants_job(job_id, opts = {})
2008
+ data, _status_code, _headers = get_create_variants_job_with_http_info(job_id, opts)
2009
+ data
2010
+ end
2011
+
2012
+ # Get Create Variants Job
2013
+ # Get a catalog variant bulk create job with the given job ID. Include parameters can be provided to get the following related resource data: &#x60;variants&#x60;.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
2014
+ # @param job_id [String]
2015
+ # @param [Hash] opts the optional parameters
2016
+ # @option opts [Array<String>] :fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2017
+ # @option opts [Array<String>] :fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2018
+ # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#relationships
2019
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2020
+ def get_create_variants_job_with_http_info(job_id, opts = {})
2021
+ if @api_client.config.debugging
2022
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_create_variants_job ...'
2023
+ end
2024
+ # verify the required parameter 'job_id' is set
2025
+ if @api_client.config.client_side_validation && job_id.nil?
2026
+ fail ArgumentError, "Missing the required parameter 'job_id' when calling CatalogsApi.get_create_variants_job"
2027
+ end
2028
+ allowable_values = ["job_id", "status", "created_at", "total_count", "completed_count", "failed_count", "completed_at", "expires_at", "errors"]
2029
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_variant_bulk_create_job'] && !opts[:'fields_catalog_variant_bulk_create_job'].all? { |item| allowable_values.include?(item) }
2030
+ fail ArgumentError, "invalid value for \"fields_catalog_variant_bulk_create_job\", must include one of #{allowable_values}"
2031
+ end
2032
+ allowable_values = ["external_id", "title", "description", "sku", "inventory_policy", "inventory_quantity", "price", "url", "image_full_url", "image_thumbnail_url", "images", "custom_metadata", "published", "created", "updated"]
2033
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_variant'] && !opts[:'fields_catalog_variant'].all? { |item| allowable_values.include?(item) }
2034
+ fail ArgumentError, "invalid value for \"fields_catalog_variant\", must include one of #{allowable_values}"
2035
+ end
2036
+ allowable_values = ["variants"]
2037
+ if @api_client.config.client_side_validation && opts[:'include'] && !opts[:'include'].all? { |item| allowable_values.include?(item) }
2038
+ fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}"
2039
+ end
2040
+ # resource path
2041
+ local_var_path = '/api/catalog-variant-bulk-create-jobs/{job_id}/'.sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s))
2042
+
2043
+ # query parameters
2044
+ query_params = opts[:query_params] || {}
2045
+ query_params[:'fields[catalog-variant-bulk-create-job]'] = @api_client.build_collection_param(opts[:'fields_catalog_variant_bulk_create_job'], :csv) if !opts[:'fields_catalog_variant_bulk_create_job'].nil?
2046
+ query_params[:'fields[catalog-variant]'] = @api_client.build_collection_param(opts[:'fields_catalog_variant'], :csv) if !opts[:'fields_catalog_variant'].nil?
2047
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
2048
+
2049
+ # header parameters
2050
+ header_params = opts[:header_params] || {}
2051
+ # klaviyo api revision
2052
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
2053
+ # HTTP header 'Accept' (if needed)
2054
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2055
+
2056
+ # form parameters
2057
+ form_params = opts[:form_params] || {}
2058
+
2059
+ # http body (model)
2060
+ post_body = opts[:debug_body]
2061
+
2062
+ # return_type
2063
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2064
+
2065
+ # auth_names
2066
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
2067
+
2068
+ new_options = opts.merge(
2069
+ :operation => :"CatalogsApi.get_create_variants_job",
2070
+ :header_params => header_params,
2071
+ :query_params => query_params,
2072
+ :form_params => form_params,
2073
+ :body => post_body,
2074
+ :auth_names => auth_names,
2075
+ :return_type => return_type
2076
+ )
2077
+
2078
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2079
+ if @api_client.config.debugging
2080
+ @api_client.config.logger.debug "API called: CatalogsApi#get_create_variants_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2081
+ end
2082
+ return data, status_code, headers
2083
+ end
2084
+
2085
+ # Get Create Variants Jobs
2086
+ # Get all catalog variant bulk create jobs. Returns a maximum of 100 jobs per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
2087
+ # @param [Hash] opts the optional parameters
2088
+ # @option opts [Array<String>] :fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2089
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;status&#x60;: &#x60;equals&#x60;
2090
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
2091
+ # @return [Hash<String, Object>]
2092
+ def get_create_variants_jobs(opts = {})
2093
+ data, _status_code, _headers = get_create_variants_jobs_with_http_info(opts)
2094
+ data
2095
+ end
2096
+
2097
+ # Get Create Variants Jobs
2098
+ # Get all catalog variant bulk create jobs. Returns a maximum of 100 jobs per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
2099
+ # @param [Hash] opts the optional parameters
2100
+ # @option opts [Array<String>] :fields_catalog_variant_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2101
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;status&#x60;: &#x60;equals&#x60;
2102
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
2103
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2104
+ def get_create_variants_jobs_with_http_info(opts = {})
2105
+ if @api_client.config.debugging
2106
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_create_variants_jobs ...'
2107
+ end
2108
+ allowable_values = ["job_id", "status", "created_at", "total_count", "completed_count", "failed_count", "completed_at", "expires_at", "errors"]
2109
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_variant_bulk_create_job'] && !opts[:'fields_catalog_variant_bulk_create_job'].all? { |item| allowable_values.include?(item) }
2110
+ fail ArgumentError, "invalid value for \"fields_catalog_variant_bulk_create_job\", must include one of #{allowable_values}"
2111
+ end
2112
+ # resource path
2113
+ local_var_path = '/api/catalog-variant-bulk-create-jobs/'
2114
+
2115
+ # query parameters
2116
+ query_params = opts[:query_params] || {}
2117
+ query_params[:'fields[catalog-variant-bulk-create-job]'] = @api_client.build_collection_param(opts[:'fields_catalog_variant_bulk_create_job'], :csv) if !opts[:'fields_catalog_variant_bulk_create_job'].nil?
2118
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
2119
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
2120
+
2121
+ # header parameters
2122
+ header_params = opts[:header_params] || {}
2123
+ # klaviyo api revision
2124
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
2125
+ # HTTP header 'Accept' (if needed)
2126
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2127
+
2128
+ # form parameters
2129
+ form_params = opts[:form_params] || {}
2130
+
2131
+ # http body (model)
2132
+ post_body = opts[:debug_body]
2133
+
2134
+ # return_type
2135
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2136
+
2137
+ # auth_names
2138
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
2139
+
2140
+ new_options = opts.merge(
2141
+ :operation => :"CatalogsApi.get_create_variants_jobs",
2142
+ :header_params => header_params,
2143
+ :query_params => query_params,
2144
+ :form_params => form_params,
2145
+ :body => post_body,
2146
+ :auth_names => auth_names,
2147
+ :return_type => return_type
2148
+ )
2149
+
2150
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2151
+ if @api_client.config.debugging
2152
+ @api_client.config.logger.debug "API called: CatalogsApi#get_create_variants_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2153
+ end
2154
+ return data, status_code, headers
2155
+ end
2156
+
2157
+ # Get Delete Categories Job
2158
+ # Get a catalog category bulk delete job with the given job ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
2159
+ # @param job_id [String]
2160
+ # @param [Hash] opts the optional parameters
2161
+ # @option opts [Array<String>] :fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2162
+ # @return [Hash<String, Object>]
2163
+ def get_delete_categories_job(job_id, opts = {})
2164
+ data, _status_code, _headers = get_delete_categories_job_with_http_info(job_id, opts)
2165
+ data
2166
+ end
2167
+
2168
+ # Get Delete Categories Job
2169
+ # Get a catalog category bulk delete job with the given job ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
2170
+ # @param job_id [String]
2171
+ # @param [Hash] opts the optional parameters
2172
+ # @option opts [Array<String>] :fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2173
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2174
+ def get_delete_categories_job_with_http_info(job_id, opts = {})
2175
+ if @api_client.config.debugging
2176
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_delete_categories_job ...'
2177
+ end
2178
+ # verify the required parameter 'job_id' is set
2179
+ if @api_client.config.client_side_validation && job_id.nil?
2180
+ fail ArgumentError, "Missing the required parameter 'job_id' when calling CatalogsApi.get_delete_categories_job"
2181
+ end
2182
+ allowable_values = ["job_id", "status", "created_at", "total_count", "completed_count", "failed_count", "completed_at", "expires_at", "errors"]
2183
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_category_bulk_delete_job'] && !opts[:'fields_catalog_category_bulk_delete_job'].all? { |item| allowable_values.include?(item) }
2184
+ fail ArgumentError, "invalid value for \"fields_catalog_category_bulk_delete_job\", must include one of #{allowable_values}"
2185
+ end
2186
+ # resource path
2187
+ local_var_path = '/api/catalog-category-bulk-delete-jobs/{job_id}/'.sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s))
2188
+
2189
+ # query parameters
2190
+ query_params = opts[:query_params] || {}
2191
+ query_params[:'fields[catalog-category-bulk-delete-job]'] = @api_client.build_collection_param(opts[:'fields_catalog_category_bulk_delete_job'], :csv) if !opts[:'fields_catalog_category_bulk_delete_job'].nil?
2192
+
2193
+ # header parameters
2194
+ header_params = opts[:header_params] || {}
2195
+ # klaviyo api revision
2196
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
2197
+ # HTTP header 'Accept' (if needed)
2198
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2199
+
2200
+ # form parameters
2201
+ form_params = opts[:form_params] || {}
2202
+
2203
+ # http body (model)
2204
+ post_body = opts[:debug_body]
2205
+
2206
+ # return_type
2207
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2208
+
2209
+ # auth_names
2210
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
2211
+
2212
+ new_options = opts.merge(
2213
+ :operation => :"CatalogsApi.get_delete_categories_job",
2214
+ :header_params => header_params,
2215
+ :query_params => query_params,
2216
+ :form_params => form_params,
2217
+ :body => post_body,
2218
+ :auth_names => auth_names,
2219
+ :return_type => return_type
2220
+ )
2221
+
2222
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2223
+ if @api_client.config.debugging
2224
+ @api_client.config.logger.debug "API called: CatalogsApi#get_delete_categories_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2225
+ end
2226
+ return data, status_code, headers
2227
+ end
2228
+
2229
+ # Get Delete Categories Jobs
2230
+ # Get all catalog category bulk delete jobs. Returns a maximum of 100 jobs per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
2231
+ # @param [Hash] opts the optional parameters
2232
+ # @option opts [Array<String>] :fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2233
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;status&#x60;: &#x60;equals&#x60;
2234
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
2235
+ # @return [Hash<String, Object>]
2236
+ def get_delete_categories_jobs(opts = {})
2237
+ data, _status_code, _headers = get_delete_categories_jobs_with_http_info(opts)
2238
+ data
2239
+ end
2240
+
2241
+ # Get Delete Categories Jobs
2242
+ # Get all catalog category bulk delete jobs. Returns a maximum of 100 jobs per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
2243
+ # @param [Hash] opts the optional parameters
2244
+ # @option opts [Array<String>] :fields_catalog_category_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2245
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;status&#x60;: &#x60;equals&#x60;
2246
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
2247
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2248
+ def get_delete_categories_jobs_with_http_info(opts = {})
2249
+ if @api_client.config.debugging
2250
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_delete_categories_jobs ...'
2251
+ end
2252
+ allowable_values = ["job_id", "status", "created_at", "total_count", "completed_count", "failed_count", "completed_at", "expires_at", "errors"]
2253
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_category_bulk_delete_job'] && !opts[:'fields_catalog_category_bulk_delete_job'].all? { |item| allowable_values.include?(item) }
2254
+ fail ArgumentError, "invalid value for \"fields_catalog_category_bulk_delete_job\", must include one of #{allowable_values}"
2255
+ end
2256
+ # resource path
2257
+ local_var_path = '/api/catalog-category-bulk-delete-jobs/'
2258
+
2259
+ # query parameters
2260
+ query_params = opts[:query_params] || {}
2261
+ query_params[:'fields[catalog-category-bulk-delete-job]'] = @api_client.build_collection_param(opts[:'fields_catalog_category_bulk_delete_job'], :csv) if !opts[:'fields_catalog_category_bulk_delete_job'].nil?
2262
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
2263
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
2264
+
2265
+ # header parameters
2266
+ header_params = opts[:header_params] || {}
2267
+ # klaviyo api revision
2268
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
2269
+ # HTTP header 'Accept' (if needed)
2270
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2271
+
2272
+ # form parameters
2273
+ form_params = opts[:form_params] || {}
2274
+
2275
+ # http body (model)
2276
+ post_body = opts[:debug_body]
2277
+
2278
+ # return_type
2279
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2280
+
2281
+ # auth_names
2282
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
2283
+
2284
+ new_options = opts.merge(
2285
+ :operation => :"CatalogsApi.get_delete_categories_jobs",
2286
+ :header_params => header_params,
2287
+ :query_params => query_params,
2288
+ :form_params => form_params,
2289
+ :body => post_body,
2290
+ :auth_names => auth_names,
2291
+ :return_type => return_type
2292
+ )
2293
+
2294
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2295
+ if @api_client.config.debugging
2296
+ @api_client.config.logger.debug "API called: CatalogsApi#get_delete_categories_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2297
+ end
2298
+ return data, status_code, headers
2299
+ end
2300
+
2301
+ # Get Delete Items Job
2302
+ # Get a catalog item bulk delete job with the given job ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
2303
+ # @param job_id [String]
2304
+ # @param [Hash] opts the optional parameters
2305
+ # @option opts [Array<String>] :fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2306
+ # @return [Hash<String, Object>]
2307
+ def get_delete_items_job(job_id, opts = {})
2308
+ data, _status_code, _headers = get_delete_items_job_with_http_info(job_id, opts)
2309
+ data
2310
+ end
2311
+
2312
+ # Get Delete Items Job
2313
+ # Get a catalog item bulk delete job with the given job ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
2314
+ # @param job_id [String]
2315
+ # @param [Hash] opts the optional parameters
2316
+ # @option opts [Array<String>] :fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2317
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2318
+ def get_delete_items_job_with_http_info(job_id, opts = {})
2319
+ if @api_client.config.debugging
2320
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_delete_items_job ...'
2321
+ end
2322
+ # verify the required parameter 'job_id' is set
2323
+ if @api_client.config.client_side_validation && job_id.nil?
2324
+ fail ArgumentError, "Missing the required parameter 'job_id' when calling CatalogsApi.get_delete_items_job"
2325
+ end
2326
+ allowable_values = ["job_id", "status", "created_at", "total_count", "completed_count", "failed_count", "completed_at", "expires_at", "errors"]
2327
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_item_bulk_delete_job'] && !opts[:'fields_catalog_item_bulk_delete_job'].all? { |item| allowable_values.include?(item) }
2328
+ fail ArgumentError, "invalid value for \"fields_catalog_item_bulk_delete_job\", must include one of #{allowable_values}"
2329
+ end
2330
+ # resource path
2331
+ local_var_path = '/api/catalog-item-bulk-delete-jobs/{job_id}/'.sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s))
2332
+
2333
+ # query parameters
2334
+ query_params = opts[:query_params] || {}
2335
+ query_params[:'fields[catalog-item-bulk-delete-job]'] = @api_client.build_collection_param(opts[:'fields_catalog_item_bulk_delete_job'], :csv) if !opts[:'fields_catalog_item_bulk_delete_job'].nil?
2336
+
2337
+ # header parameters
2338
+ header_params = opts[:header_params] || {}
2339
+ # klaviyo api revision
2340
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
2341
+ # HTTP header 'Accept' (if needed)
2342
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2343
+
2344
+ # form parameters
2345
+ form_params = opts[:form_params] || {}
2346
+
2347
+ # http body (model)
2348
+ post_body = opts[:debug_body]
2349
+
2350
+ # return_type
2351
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2352
+
2353
+ # auth_names
2354
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
2355
+
2356
+ new_options = opts.merge(
2357
+ :operation => :"CatalogsApi.get_delete_items_job",
2358
+ :header_params => header_params,
2359
+ :query_params => query_params,
2360
+ :form_params => form_params,
2361
+ :body => post_body,
2362
+ :auth_names => auth_names,
2363
+ :return_type => return_type
2364
+ )
2365
+
2366
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2367
+ if @api_client.config.debugging
2368
+ @api_client.config.logger.debug "API called: CatalogsApi#get_delete_items_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2369
+ end
2370
+ return data, status_code, headers
2371
+ end
2372
+
2373
+ # Get Delete Items Jobs
2374
+ # Get all catalog item bulk delete jobs. Returns a maximum of 100 jobs per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
2375
+ # @param [Hash] opts the optional parameters
2376
+ # @option opts [Array<String>] :fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2377
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;status&#x60;: &#x60;equals&#x60;
2378
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
2379
+ # @return [Hash<String, Object>]
2380
+ def get_delete_items_jobs(opts = {})
2381
+ data, _status_code, _headers = get_delete_items_jobs_with_http_info(opts)
2382
+ data
2383
+ end
2384
+
2385
+ # Get Delete Items Jobs
2386
+ # Get all catalog item bulk delete jobs. Returns a maximum of 100 jobs per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
2387
+ # @param [Hash] opts the optional parameters
2388
+ # @option opts [Array<String>] :fields_catalog_item_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2389
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;status&#x60;: &#x60;equals&#x60;
2390
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
2391
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2392
+ def get_delete_items_jobs_with_http_info(opts = {})
2393
+ if @api_client.config.debugging
2394
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_delete_items_jobs ...'
2395
+ end
2396
+ allowable_values = ["job_id", "status", "created_at", "total_count", "completed_count", "failed_count", "completed_at", "expires_at", "errors"]
2397
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_item_bulk_delete_job'] && !opts[:'fields_catalog_item_bulk_delete_job'].all? { |item| allowable_values.include?(item) }
2398
+ fail ArgumentError, "invalid value for \"fields_catalog_item_bulk_delete_job\", must include one of #{allowable_values}"
2399
+ end
2400
+ # resource path
2401
+ local_var_path = '/api/catalog-item-bulk-delete-jobs/'
2402
+
2403
+ # query parameters
2404
+ query_params = opts[:query_params] || {}
2405
+ query_params[:'fields[catalog-item-bulk-delete-job]'] = @api_client.build_collection_param(opts[:'fields_catalog_item_bulk_delete_job'], :csv) if !opts[:'fields_catalog_item_bulk_delete_job'].nil?
2406
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
2407
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
2408
+
2409
+ # header parameters
2410
+ header_params = opts[:header_params] || {}
2411
+ # klaviyo api revision
2412
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
2413
+ # HTTP header 'Accept' (if needed)
2414
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2415
+
2416
+ # form parameters
2417
+ form_params = opts[:form_params] || {}
2418
+
2419
+ # http body (model)
2420
+ post_body = opts[:debug_body]
2421
+
2422
+ # return_type
2423
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2424
+
2425
+ # auth_names
2426
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
2427
+
2428
+ new_options = opts.merge(
2429
+ :operation => :"CatalogsApi.get_delete_items_jobs",
2430
+ :header_params => header_params,
2431
+ :query_params => query_params,
2432
+ :form_params => form_params,
2433
+ :body => post_body,
2434
+ :auth_names => auth_names,
2435
+ :return_type => return_type
2436
+ )
2437
+
2438
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2439
+ if @api_client.config.debugging
2440
+ @api_client.config.logger.debug "API called: CatalogsApi#get_delete_items_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2441
+ end
2442
+ return data, status_code, headers
2443
+ end
2444
+
2445
+ # Get Delete Variants Job
2446
+ # Get a catalog variant bulk delete job with the given job ID.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
2447
+ # @param job_id [String]
2448
+ # @param [Hash] opts the optional parameters
2449
+ # @option opts [Array<String>] :fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2450
+ # @return [Hash<String, Object>]
2451
+ def get_delete_variants_job(job_id, opts = {})
2452
+ data, _status_code, _headers = get_delete_variants_job_with_http_info(job_id, opts)
2453
+ data
2454
+ end
2455
+
2456
+ # Get Delete Variants Job
2457
+ # Get a catalog variant bulk delete job with the given job ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
2458
+ # @param job_id [String]
2459
+ # @param [Hash] opts the optional parameters
2460
+ # @option opts [Array<String>] :fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2461
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2462
+ def get_delete_variants_job_with_http_info(job_id, opts = {})
2463
+ if @api_client.config.debugging
2464
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_delete_variants_job ...'
2465
+ end
2466
+ # verify the required parameter 'job_id' is set
2467
+ if @api_client.config.client_side_validation && job_id.nil?
2468
+ fail ArgumentError, "Missing the required parameter 'job_id' when calling CatalogsApi.get_delete_variants_job"
2469
+ end
2470
+ allowable_values = ["job_id", "status", "created_at", "total_count", "completed_count", "failed_count", "completed_at", "expires_at", "errors"]
2471
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_variant_bulk_delete_job'] && !opts[:'fields_catalog_variant_bulk_delete_job'].all? { |item| allowable_values.include?(item) }
2472
+ fail ArgumentError, "invalid value for \"fields_catalog_variant_bulk_delete_job\", must include one of #{allowable_values}"
2473
+ end
2474
+ # resource path
2475
+ local_var_path = '/api/catalog-variant-bulk-delete-jobs/{job_id}/'.sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s))
2476
+
2477
+ # query parameters
2478
+ query_params = opts[:query_params] || {}
2479
+ query_params[:'fields[catalog-variant-bulk-delete-job]'] = @api_client.build_collection_param(opts[:'fields_catalog_variant_bulk_delete_job'], :csv) if !opts[:'fields_catalog_variant_bulk_delete_job'].nil?
2480
+
2481
+ # header parameters
2482
+ header_params = opts[:header_params] || {}
2483
+ # klaviyo api revision
2484
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
2485
+ # HTTP header 'Accept' (if needed)
2486
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2487
+
2488
+ # form parameters
2489
+ form_params = opts[:form_params] || {}
2490
+
2491
+ # http body (model)
2492
+ post_body = opts[:debug_body]
2493
+
2494
+ # return_type
2495
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2496
+
2497
+ # auth_names
2498
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
2499
+
2500
+ new_options = opts.merge(
2501
+ :operation => :"CatalogsApi.get_delete_variants_job",
2502
+ :header_params => header_params,
2503
+ :query_params => query_params,
2504
+ :form_params => form_params,
2505
+ :body => post_body,
2506
+ :auth_names => auth_names,
2507
+ :return_type => return_type
2508
+ )
2509
+
2510
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2511
+ if @api_client.config.debugging
2512
+ @api_client.config.logger.debug "API called: CatalogsApi#get_delete_variants_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2513
+ end
2514
+ return data, status_code, headers
2515
+ end
2516
+
2517
+ # Get Delete Variants Jobs
2518
+ # Get all catalog variant bulk delete jobs. Returns a maximum of 100 jobs per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
2519
+ # @param [Hash] opts the optional parameters
2520
+ # @option opts [Array<String>] :fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2521
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;status&#x60;: &#x60;equals&#x60;
2522
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
2523
+ # @return [Hash<String, Object>]
2524
+ def get_delete_variants_jobs(opts = {})
2525
+ data, _status_code, _headers = get_delete_variants_jobs_with_http_info(opts)
2526
+ data
2527
+ end
2528
+
2529
+ # Get Delete Variants Jobs
2530
+ # Get all catalog variant bulk delete jobs. Returns a maximum of 100 jobs per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
2531
+ # @param [Hash] opts the optional parameters
2532
+ # @option opts [Array<String>] :fields_catalog_variant_bulk_delete_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2533
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;status&#x60;: &#x60;equals&#x60;
2534
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
2535
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2536
+ def get_delete_variants_jobs_with_http_info(opts = {})
2537
+ if @api_client.config.debugging
2538
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_delete_variants_jobs ...'
2539
+ end
2540
+ allowable_values = ["job_id", "status", "created_at", "total_count", "completed_count", "failed_count", "completed_at", "expires_at", "errors"]
2541
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_variant_bulk_delete_job'] && !opts[:'fields_catalog_variant_bulk_delete_job'].all? { |item| allowable_values.include?(item) }
2542
+ fail ArgumentError, "invalid value for \"fields_catalog_variant_bulk_delete_job\", must include one of #{allowable_values}"
2543
+ end
2544
+ # resource path
2545
+ local_var_path = '/api/catalog-variant-bulk-delete-jobs/'
2546
+
2547
+ # query parameters
2548
+ query_params = opts[:query_params] || {}
2549
+ query_params[:'fields[catalog-variant-bulk-delete-job]'] = @api_client.build_collection_param(opts[:'fields_catalog_variant_bulk_delete_job'], :csv) if !opts[:'fields_catalog_variant_bulk_delete_job'].nil?
2550
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
2551
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
2552
+
2553
+ # header parameters
2554
+ header_params = opts[:header_params] || {}
2555
+ # klaviyo api revision
2556
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
2557
+ # HTTP header 'Accept' (if needed)
2558
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2559
+
2560
+ # form parameters
2561
+ form_params = opts[:form_params] || {}
2562
+
2563
+ # http body (model)
2564
+ post_body = opts[:debug_body]
2565
+
2566
+ # return_type
2567
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2568
+
2569
+ # auth_names
2570
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
2571
+
2572
+ new_options = opts.merge(
2573
+ :operation => :"CatalogsApi.get_delete_variants_jobs",
2574
+ :header_params => header_params,
2575
+ :query_params => query_params,
2576
+ :form_params => form_params,
2577
+ :body => post_body,
2578
+ :auth_names => auth_names,
2579
+ :return_type => return_type
2580
+ )
2581
+
2582
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2583
+ if @api_client.config.debugging
2584
+ @api_client.config.logger.debug "API called: CatalogsApi#get_delete_variants_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2585
+ end
2586
+ return data, status_code, headers
2587
+ end
2588
+
2589
+ # Get Update Categories Job
2590
+ # Get a catalog category bulk update job with the given job ID. Include parameters can be provided to get the following related resource data: `categories`<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
2591
+ # @param job_id [String]
2592
+ # @param [Hash] opts the optional parameters
2593
+ # @option opts [Array<String>] :fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2594
+ # @option opts [Array<String>] :fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2595
+ # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#relationships
2596
+ # @return [Hash<String, Object>]
2597
+ def get_update_categories_job(job_id, opts = {})
2598
+ data, _status_code, _headers = get_update_categories_job_with_http_info(job_id, opts)
2599
+ data
2600
+ end
2601
+
2602
+ # Get Update Categories Job
2603
+ # Get a catalog category bulk update job with the given job ID. Include parameters can be provided to get the following related resource data: &#x60;categories&#x60;&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
2604
+ # @param job_id [String]
2605
+ # @param [Hash] opts the optional parameters
2606
+ # @option opts [Array<String>] :fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2607
+ # @option opts [Array<String>] :fields_catalog_category For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2608
+ # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#relationships
2609
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2610
+ def get_update_categories_job_with_http_info(job_id, opts = {})
2611
+ if @api_client.config.debugging
2612
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_update_categories_job ...'
2613
+ end
2614
+ # verify the required parameter 'job_id' is set
2615
+ if @api_client.config.client_side_validation && job_id.nil?
2616
+ fail ArgumentError, "Missing the required parameter 'job_id' when calling CatalogsApi.get_update_categories_job"
2617
+ end
2618
+ allowable_values = ["job_id", "status", "created_at", "total_count", "completed_count", "failed_count", "completed_at", "expires_at", "errors"]
2619
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_category_bulk_update_job'] && !opts[:'fields_catalog_category_bulk_update_job'].all? { |item| allowable_values.include?(item) }
2620
+ fail ArgumentError, "invalid value for \"fields_catalog_category_bulk_update_job\", must include one of #{allowable_values}"
2621
+ end
2622
+ allowable_values = ["external_id", "name", "updated"]
2623
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_category'] && !opts[:'fields_catalog_category'].all? { |item| allowable_values.include?(item) }
2624
+ fail ArgumentError, "invalid value for \"fields_catalog_category\", must include one of #{allowable_values}"
2625
+ end
2626
+ allowable_values = ["categories"]
2627
+ if @api_client.config.client_side_validation && opts[:'include'] && !opts[:'include'].all? { |item| allowable_values.include?(item) }
2628
+ fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}"
2629
+ end
2630
+ # resource path
2631
+ local_var_path = '/api/catalog-category-bulk-update-jobs/{job_id}/'.sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s))
2632
+
2633
+ # query parameters
2634
+ query_params = opts[:query_params] || {}
2635
+ query_params[:'fields[catalog-category-bulk-update-job]'] = @api_client.build_collection_param(opts[:'fields_catalog_category_bulk_update_job'], :csv) if !opts[:'fields_catalog_category_bulk_update_job'].nil?
2636
+ query_params[:'fields[catalog-category]'] = @api_client.build_collection_param(opts[:'fields_catalog_category'], :csv) if !opts[:'fields_catalog_category'].nil?
2637
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
2638
+
2639
+ # header parameters
2640
+ header_params = opts[:header_params] || {}
2641
+ # klaviyo api revision
2642
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
2643
+ # HTTP header 'Accept' (if needed)
2644
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2645
+
2646
+ # form parameters
2647
+ form_params = opts[:form_params] || {}
2648
+
2649
+ # http body (model)
2650
+ post_body = opts[:debug_body]
2651
+
2652
+ # return_type
2653
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2654
+
2655
+ # auth_names
2656
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
2657
+
2658
+ new_options = opts.merge(
2659
+ :operation => :"CatalogsApi.get_update_categories_job",
2660
+ :header_params => header_params,
2661
+ :query_params => query_params,
2662
+ :form_params => form_params,
2663
+ :body => post_body,
2664
+ :auth_names => auth_names,
2665
+ :return_type => return_type
2666
+ )
2667
+
2668
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2669
+ if @api_client.config.debugging
2670
+ @api_client.config.logger.debug "API called: CatalogsApi#get_update_categories_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2671
+ end
2672
+ return data, status_code, headers
2673
+ end
2674
+
2675
+ # Get Update Categories Jobs
2676
+ # Get all catalog category bulk update jobs. Returns a maximum of 100 jobs per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
2677
+ # @param [Hash] opts the optional parameters
2678
+ # @option opts [Array<String>] :fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2679
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;status&#x60;: &#x60;equals&#x60;
2680
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
2681
+ # @return [Hash<String, Object>]
2682
+ def get_update_categories_jobs(opts = {})
2683
+ data, _status_code, _headers = get_update_categories_jobs_with_http_info(opts)
2684
+ data
2685
+ end
2686
+
2687
+ # Get Update Categories Jobs
2688
+ # Get all catalog category bulk update jobs. Returns a maximum of 100 jobs per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
2689
+ # @param [Hash] opts the optional parameters
2690
+ # @option opts [Array<String>] :fields_catalog_category_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2691
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;status&#x60;: &#x60;equals&#x60;
2692
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
2693
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2694
+ def get_update_categories_jobs_with_http_info(opts = {})
2695
+ if @api_client.config.debugging
2696
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_update_categories_jobs ...'
2697
+ end
2698
+ allowable_values = ["job_id", "status", "created_at", "total_count", "completed_count", "failed_count", "completed_at", "expires_at", "errors"]
2699
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_category_bulk_update_job'] && !opts[:'fields_catalog_category_bulk_update_job'].all? { |item| allowable_values.include?(item) }
2700
+ fail ArgumentError, "invalid value for \"fields_catalog_category_bulk_update_job\", must include one of #{allowable_values}"
2701
+ end
2702
+ # resource path
2703
+ local_var_path = '/api/catalog-category-bulk-update-jobs/'
2704
+
2705
+ # query parameters
2706
+ query_params = opts[:query_params] || {}
2707
+ query_params[:'fields[catalog-category-bulk-update-job]'] = @api_client.build_collection_param(opts[:'fields_catalog_category_bulk_update_job'], :csv) if !opts[:'fields_catalog_category_bulk_update_job'].nil?
2708
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
2709
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
2710
+
2711
+ # header parameters
2712
+ header_params = opts[:header_params] || {}
2713
+ # klaviyo api revision
2714
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
2715
+ # HTTP header 'Accept' (if needed)
2716
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2717
+
2718
+ # form parameters
2719
+ form_params = opts[:form_params] || {}
2720
+
2721
+ # http body (model)
2722
+ post_body = opts[:debug_body]
2723
+
2724
+ # return_type
2725
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2726
+
2727
+ # auth_names
2728
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
2729
+
2730
+ new_options = opts.merge(
2731
+ :operation => :"CatalogsApi.get_update_categories_jobs",
2732
+ :header_params => header_params,
2733
+ :query_params => query_params,
2734
+ :form_params => form_params,
2735
+ :body => post_body,
2736
+ :auth_names => auth_names,
2737
+ :return_type => return_type
2738
+ )
2739
+
2740
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2741
+ if @api_client.config.debugging
2742
+ @api_client.config.logger.debug "API called: CatalogsApi#get_update_categories_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2743
+ end
2744
+ return data, status_code, headers
2745
+ end
2746
+
2747
+ # Get Update Items Job
2748
+ # Get a catalog item bulk update job with the given job ID. Include parameters can be provided to get the following related resource data: `items`<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
2749
+ # @param job_id [String]
2750
+ # @param [Hash] opts the optional parameters
2751
+ # @option opts [Array<String>] :fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2752
+ # @option opts [Array<String>] :fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2753
+ # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#relationships
2754
+ # @return [Hash<String, Object>]
2755
+ def get_update_items_job(job_id, opts = {})
2756
+ data, _status_code, _headers = get_update_items_job_with_http_info(job_id, opts)
2757
+ data
2758
+ end
2759
+
2760
+ # Get Update Items Job
2761
+ # Get a catalog item bulk update job with the given job ID. Include parameters can be provided to get the following related resource data: &#x60;items&#x60;&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
2762
+ # @param job_id [String]
2763
+ # @param [Hash] opts the optional parameters
2764
+ # @option opts [Array<String>] :fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2765
+ # @option opts [Array<String>] :fields_catalog_item For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2766
+ # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#relationships
2767
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2768
+ def get_update_items_job_with_http_info(job_id, opts = {})
2769
+ if @api_client.config.debugging
2770
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_update_items_job ...'
2771
+ end
2772
+ # verify the required parameter 'job_id' is set
2773
+ if @api_client.config.client_side_validation && job_id.nil?
2774
+ fail ArgumentError, "Missing the required parameter 'job_id' when calling CatalogsApi.get_update_items_job"
2775
+ end
2776
+ allowable_values = ["job_id", "status", "created_at", "total_count", "completed_count", "failed_count", "completed_at", "expires_at", "errors"]
2777
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_item_bulk_update_job'] && !opts[:'fields_catalog_item_bulk_update_job'].all? { |item| allowable_values.include?(item) }
2778
+ fail ArgumentError, "invalid value for \"fields_catalog_item_bulk_update_job\", must include one of #{allowable_values}"
2779
+ end
2780
+ allowable_values = ["external_id", "title", "description", "url", "image_full_url", "image_thumbnail_url", "images", "custom_metadata", "published", "created", "updated"]
2781
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_item'] && !opts[:'fields_catalog_item'].all? { |item| allowable_values.include?(item) }
2782
+ fail ArgumentError, "invalid value for \"fields_catalog_item\", must include one of #{allowable_values}"
2783
+ end
2784
+ allowable_values = ["items"]
2785
+ if @api_client.config.client_side_validation && opts[:'include'] && !opts[:'include'].all? { |item| allowable_values.include?(item) }
2786
+ fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}"
2787
+ end
2788
+ # resource path
2789
+ local_var_path = '/api/catalog-item-bulk-update-jobs/{job_id}/'.sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s))
2790
+
2791
+ # query parameters
2792
+ query_params = opts[:query_params] || {}
2793
+ query_params[:'fields[catalog-item-bulk-update-job]'] = @api_client.build_collection_param(opts[:'fields_catalog_item_bulk_update_job'], :csv) if !opts[:'fields_catalog_item_bulk_update_job'].nil?
2794
+ query_params[:'fields[catalog-item]'] = @api_client.build_collection_param(opts[:'fields_catalog_item'], :csv) if !opts[:'fields_catalog_item'].nil?
2795
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
2796
+
2797
+ # header parameters
2798
+ header_params = opts[:header_params] || {}
2799
+ # klaviyo api revision
2800
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
2801
+ # HTTP header 'Accept' (if needed)
2802
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2803
+
2804
+ # form parameters
2805
+ form_params = opts[:form_params] || {}
2806
+
2807
+ # http body (model)
2808
+ post_body = opts[:debug_body]
2809
+
2810
+ # return_type
2811
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2812
+
2813
+ # auth_names
2814
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
2815
+
2816
+ new_options = opts.merge(
2817
+ :operation => :"CatalogsApi.get_update_items_job",
2818
+ :header_params => header_params,
2819
+ :query_params => query_params,
2820
+ :form_params => form_params,
2821
+ :body => post_body,
2822
+ :auth_names => auth_names,
2823
+ :return_type => return_type
2824
+ )
2825
+
2826
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2827
+ if @api_client.config.debugging
2828
+ @api_client.config.logger.debug "API called: CatalogsApi#get_update_items_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2829
+ end
2830
+ return data, status_code, headers
2831
+ end
2832
+
2833
+ # Get Update Items Jobs
2834
+ # Get all catalog item bulk update jobs. Returns a maximum of 100 jobs per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
2835
+ # @param [Hash] opts the optional parameters
2836
+ # @option opts [Array<String>] :fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2837
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;status&#x60;: &#x60;equals&#x60;
2838
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
2839
+ # @return [Hash<String, Object>]
2840
+ def get_update_items_jobs(opts = {})
2841
+ data, _status_code, _headers = get_update_items_jobs_with_http_info(opts)
2842
+ data
2843
+ end
2844
+
2845
+ # Get Update Items Jobs
2846
+ # Get all catalog item bulk update jobs. Returns a maximum of 100 jobs per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
2847
+ # @param [Hash] opts the optional parameters
2848
+ # @option opts [Array<String>] :fields_catalog_item_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2849
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;status&#x60;: &#x60;equals&#x60;
2850
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
2851
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2852
+ def get_update_items_jobs_with_http_info(opts = {})
2853
+ if @api_client.config.debugging
2854
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_update_items_jobs ...'
2855
+ end
2856
+ allowable_values = ["job_id", "status", "created_at", "total_count", "completed_count", "failed_count", "completed_at", "expires_at", "errors"]
2857
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_item_bulk_update_job'] && !opts[:'fields_catalog_item_bulk_update_job'].all? { |item| allowable_values.include?(item) }
2858
+ fail ArgumentError, "invalid value for \"fields_catalog_item_bulk_update_job\", must include one of #{allowable_values}"
2859
+ end
2860
+ # resource path
2861
+ local_var_path = '/api/catalog-item-bulk-update-jobs/'
2862
+
2863
+ # query parameters
2864
+ query_params = opts[:query_params] || {}
2865
+ query_params[:'fields[catalog-item-bulk-update-job]'] = @api_client.build_collection_param(opts[:'fields_catalog_item_bulk_update_job'], :csv) if !opts[:'fields_catalog_item_bulk_update_job'].nil?
2866
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
2867
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
2868
+
2869
+ # header parameters
2870
+ header_params = opts[:header_params] || {}
2871
+ # klaviyo api revision
2872
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
2873
+ # HTTP header 'Accept' (if needed)
2874
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2875
+
2876
+ # form parameters
2877
+ form_params = opts[:form_params] || {}
2878
+
2879
+ # http body (model)
2880
+ post_body = opts[:debug_body]
2881
+
2882
+ # return_type
2883
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2884
+
2885
+ # auth_names
2886
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
2887
+
2888
+ new_options = opts.merge(
2889
+ :operation => :"CatalogsApi.get_update_items_jobs",
2890
+ :header_params => header_params,
2891
+ :query_params => query_params,
2892
+ :form_params => form_params,
2893
+ :body => post_body,
2894
+ :auth_names => auth_names,
2895
+ :return_type => return_type
2896
+ )
2897
+
2898
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2899
+ if @api_client.config.debugging
2900
+ @api_client.config.logger.debug "API called: CatalogsApi#get_update_items_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2901
+ end
2902
+ return data, status_code, headers
2903
+ end
2904
+
2905
+ # Get Update Variants Job
2906
+ # Get a catalog variate bulk update job with the given job ID. Include parameters can be provided to get the following related resource data: `variants`.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
2907
+ # @param job_id [String]
2908
+ # @param [Hash] opts the optional parameters
2909
+ # @option opts [Array<String>] :fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2910
+ # @option opts [Array<String>] :fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2911
+ # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#relationships
2912
+ # @return [Hash<String, Object>]
2913
+ def get_update_variants_job(job_id, opts = {})
2914
+ data, _status_code, _headers = get_update_variants_job_with_http_info(job_id, opts)
2915
+ data
2916
+ end
2917
+
2918
+ # Get Update Variants Job
2919
+ # Get a catalog variate bulk update job with the given job ID. Include parameters can be provided to get the following related resource data: &#x60;variants&#x60;.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
2920
+ # @param job_id [String]
2921
+ # @param [Hash] opts the optional parameters
2922
+ # @option opts [Array<String>] :fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2923
+ # @option opts [Array<String>] :fields_catalog_variant For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2924
+ # @option opts [Array<String>] :include For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#relationships
2925
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
2926
+ def get_update_variants_job_with_http_info(job_id, opts = {})
2927
+ if @api_client.config.debugging
2928
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_update_variants_job ...'
2929
+ end
2930
+ # verify the required parameter 'job_id' is set
2931
+ if @api_client.config.client_side_validation && job_id.nil?
2932
+ fail ArgumentError, "Missing the required parameter 'job_id' when calling CatalogsApi.get_update_variants_job"
2933
+ end
2934
+ allowable_values = ["job_id", "status", "created_at", "total_count", "completed_count", "failed_count", "completed_at", "expires_at", "errors"]
2935
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_variant_bulk_update_job'] && !opts[:'fields_catalog_variant_bulk_update_job'].all? { |item| allowable_values.include?(item) }
2936
+ fail ArgumentError, "invalid value for \"fields_catalog_variant_bulk_update_job\", must include one of #{allowable_values}"
2937
+ end
2938
+ allowable_values = ["external_id", "title", "description", "sku", "inventory_policy", "inventory_quantity", "price", "url", "image_full_url", "image_thumbnail_url", "images", "custom_metadata", "published", "created", "updated"]
2939
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_variant'] && !opts[:'fields_catalog_variant'].all? { |item| allowable_values.include?(item) }
2940
+ fail ArgumentError, "invalid value for \"fields_catalog_variant\", must include one of #{allowable_values}"
2941
+ end
2942
+ allowable_values = ["variants"]
2943
+ if @api_client.config.client_side_validation && opts[:'include'] && !opts[:'include'].all? { |item| allowable_values.include?(item) }
2944
+ fail ArgumentError, "invalid value for \"include\", must include one of #{allowable_values}"
2945
+ end
2946
+ # resource path
2947
+ local_var_path = '/api/catalog-variant-bulk-update-jobs/{job_id}/'.sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s))
2948
+
2949
+ # query parameters
2950
+ query_params = opts[:query_params] || {}
2951
+ query_params[:'fields[catalog-variant-bulk-update-job]'] = @api_client.build_collection_param(opts[:'fields_catalog_variant_bulk_update_job'], :csv) if !opts[:'fields_catalog_variant_bulk_update_job'].nil?
2952
+ query_params[:'fields[catalog-variant]'] = @api_client.build_collection_param(opts[:'fields_catalog_variant'], :csv) if !opts[:'fields_catalog_variant'].nil?
2953
+ query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
2954
+
2955
+ # header parameters
2956
+ header_params = opts[:header_params] || {}
2957
+ # klaviyo api revision
2958
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
2959
+ # HTTP header 'Accept' (if needed)
2960
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2961
+
2962
+ # form parameters
2963
+ form_params = opts[:form_params] || {}
2964
+
2965
+ # http body (model)
2966
+ post_body = opts[:debug_body]
2967
+
2968
+ # return_type
2969
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
2970
+
2971
+ # auth_names
2972
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
2973
+
2974
+ new_options = opts.merge(
2975
+ :operation => :"CatalogsApi.get_update_variants_job",
2976
+ :header_params => header_params,
2977
+ :query_params => query_params,
2978
+ :form_params => form_params,
2979
+ :body => post_body,
2980
+ :auth_names => auth_names,
2981
+ :return_type => return_type
2982
+ )
2983
+
2984
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2985
+ if @api_client.config.debugging
2986
+ @api_client.config.logger.debug "API called: CatalogsApi#get_update_variants_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2987
+ end
2988
+ return data, status_code, headers
2989
+ end
2990
+
2991
+ # Get Update Variants Jobs
2992
+ # Get all catalog variant bulk update jobs. Returns a maximum of 100 jobs per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `Catalogs Read`
2993
+ # @param [Hash] opts the optional parameters
2994
+ # @option opts [Array<String>] :fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
2995
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;status&#x60;: &#x60;equals&#x60;
2996
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
2997
+ # @return [Hash<String, Object>]
2998
+ def get_update_variants_jobs(opts = {})
2999
+ data, _status_code, _headers = get_update_variants_jobs_with_http_info(opts)
3000
+ data
3001
+ end
3002
+
3003
+ # Get Update Variants Jobs
3004
+ # Get all catalog variant bulk update jobs. Returns a maximum of 100 jobs per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;350/s&#x60;&lt;br&gt;Steady: &#x60;3500/m&#x60; **Scopes:** &#x60;Catalogs Read&#x60;
3005
+ # @param [Hash] opts the optional parameters
3006
+ # @option opts [Array<String>] :fields_catalog_variant_bulk_update_job For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#sparse-fieldsets
3007
+ # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#filtering&lt;br&gt;Allowed field(s)/operator(s):&lt;br&gt;&#x60;status&#x60;: &#x60;equals&#x60;
3008
+ # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2022-10-17/reference/api-overview#pagination
3009
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
3010
+ def get_update_variants_jobs_with_http_info(opts = {})
3011
+ if @api_client.config.debugging
3012
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.get_update_variants_jobs ...'
3013
+ end
3014
+ allowable_values = ["job_id", "status", "created_at", "total_count", "completed_count", "failed_count", "completed_at", "expires_at", "errors"]
3015
+ if @api_client.config.client_side_validation && opts[:'fields_catalog_variant_bulk_update_job'] && !opts[:'fields_catalog_variant_bulk_update_job'].all? { |item| allowable_values.include?(item) }
3016
+ fail ArgumentError, "invalid value for \"fields_catalog_variant_bulk_update_job\", must include one of #{allowable_values}"
3017
+ end
3018
+ # resource path
3019
+ local_var_path = '/api/catalog-variant-bulk-update-jobs/'
3020
+
3021
+ # query parameters
3022
+ query_params = opts[:query_params] || {}
3023
+ query_params[:'fields[catalog-variant-bulk-update-job]'] = @api_client.build_collection_param(opts[:'fields_catalog_variant_bulk_update_job'], :csv) if !opts[:'fields_catalog_variant_bulk_update_job'].nil?
3024
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
3025
+ query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
3026
+
3027
+ # header parameters
3028
+ header_params = opts[:header_params] || {}
3029
+ # klaviyo api revision
3030
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
3031
+ # HTTP header 'Accept' (if needed)
3032
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3033
+
3034
+ # form parameters
3035
+ form_params = opts[:form_params] || {}
3036
+
3037
+ # http body (model)
3038
+ post_body = opts[:debug_body]
3039
+
3040
+ # return_type
3041
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
3042
+
3043
+ # auth_names
3044
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
3045
+
3046
+ new_options = opts.merge(
3047
+ :operation => :"CatalogsApi.get_update_variants_jobs",
3048
+ :header_params => header_params,
3049
+ :query_params => query_params,
3050
+ :form_params => form_params,
3051
+ :body => post_body,
3052
+ :auth_names => auth_names,
3053
+ :return_type => return_type
3054
+ )
3055
+
3056
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3057
+ if @api_client.config.debugging
3058
+ @api_client.config.logger.debug "API called: CatalogsApi#get_update_variants_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3059
+ end
3060
+ return data, status_code, headers
3061
+ end
3062
+
3063
+ # Spawn Create Categories Job
3064
+ # Create a catalog category bulk create job to create a batch of catalog categories.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
3065
+ # @param catalog_category_create_job_create_query [CatalogCategoryCreateJobCreateQuery]
3066
+ # @param [Hash] opts the optional parameters
3067
+ # @return [Hash<String, Object>]
3068
+ def spawn_create_categories_job(catalog_category_create_job_create_query, opts = {})
3069
+ data, _status_code, _headers = spawn_create_categories_job_with_http_info(catalog_category_create_job_create_query, opts)
3070
+ data
3071
+ end
3072
+
3073
+ # Spawn Create Categories Job
3074
+ # Create a catalog category bulk create job to create a batch of catalog categories.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
3075
+ # @param catalog_category_create_job_create_query [CatalogCategoryCreateJobCreateQuery]
3076
+ # @param [Hash] opts the optional parameters
3077
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
3078
+ def spawn_create_categories_job_with_http_info(catalog_category_create_job_create_query, opts = {})
3079
+ if @api_client.config.debugging
3080
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.spawn_create_categories_job ...'
3081
+ end
3082
+ # verify the required parameter 'catalog_category_create_job_create_query' is set
3083
+ if @api_client.config.client_side_validation && catalog_category_create_job_create_query.nil?
3084
+ fail ArgumentError, "Missing the required parameter 'catalog_category_create_job_create_query' when calling CatalogsApi.spawn_create_categories_job"
3085
+ end
3086
+ # resource path
3087
+ local_var_path = '/api/catalog-category-bulk-create-jobs/'
3088
+
3089
+ # query parameters
3090
+ query_params = opts[:query_params] || {}
3091
+
3092
+ # header parameters
3093
+ header_params = opts[:header_params] || {}
3094
+ # klaviyo api revision
3095
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
3096
+ # HTTP header 'Accept' (if needed)
3097
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3098
+ # HTTP header 'Content-Type'
3099
+ content_type = @api_client.select_header_content_type(['application/json'])
3100
+ if !content_type.nil?
3101
+ header_params['Content-Type'] = content_type
3102
+ end
3103
+
3104
+ # form parameters
3105
+ form_params = opts[:form_params] || {}
3106
+
3107
+ # http body (model)
3108
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_category_create_job_create_query)
3109
+
3110
+ # return_type
3111
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
3112
+
3113
+ # auth_names
3114
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
3115
+
3116
+ new_options = opts.merge(
3117
+ :operation => :"CatalogsApi.spawn_create_categories_job",
3118
+ :header_params => header_params,
3119
+ :query_params => query_params,
3120
+ :form_params => form_params,
3121
+ :body => post_body,
3122
+ :auth_names => auth_names,
3123
+ :return_type => return_type
3124
+ )
3125
+
3126
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3127
+ if @api_client.config.debugging
3128
+ @api_client.config.logger.debug "API called: CatalogsApi#spawn_create_categories_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3129
+ end
3130
+ return data, status_code, headers
3131
+ end
3132
+
3133
+ # Spawn Create Items Job
3134
+ # Create a catalog item bulk create job to create a batch of catalog items.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
3135
+ # @param catalog_item_create_job_create_query [CatalogItemCreateJobCreateQuery]
3136
+ # @param [Hash] opts the optional parameters
3137
+ # @return [Hash<String, Object>]
3138
+ def spawn_create_items_job(catalog_item_create_job_create_query, opts = {})
3139
+ data, _status_code, _headers = spawn_create_items_job_with_http_info(catalog_item_create_job_create_query, opts)
3140
+ data
3141
+ end
3142
+
3143
+ # Spawn Create Items Job
3144
+ # Create a catalog item bulk create job to create a batch of catalog items.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
3145
+ # @param catalog_item_create_job_create_query [CatalogItemCreateJobCreateQuery]
3146
+ # @param [Hash] opts the optional parameters
3147
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
3148
+ def spawn_create_items_job_with_http_info(catalog_item_create_job_create_query, opts = {})
3149
+ if @api_client.config.debugging
3150
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.spawn_create_items_job ...'
3151
+ end
3152
+ # verify the required parameter 'catalog_item_create_job_create_query' is set
3153
+ if @api_client.config.client_side_validation && catalog_item_create_job_create_query.nil?
3154
+ fail ArgumentError, "Missing the required parameter 'catalog_item_create_job_create_query' when calling CatalogsApi.spawn_create_items_job"
3155
+ end
3156
+ # resource path
3157
+ local_var_path = '/api/catalog-item-bulk-create-jobs/'
3158
+
3159
+ # query parameters
3160
+ query_params = opts[:query_params] || {}
3161
+
3162
+ # header parameters
3163
+ header_params = opts[:header_params] || {}
3164
+ # klaviyo api revision
3165
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
3166
+ # HTTP header 'Accept' (if needed)
3167
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3168
+ # HTTP header 'Content-Type'
3169
+ content_type = @api_client.select_header_content_type(['application/json'])
3170
+ if !content_type.nil?
3171
+ header_params['Content-Type'] = content_type
3172
+ end
3173
+
3174
+ # form parameters
3175
+ form_params = opts[:form_params] || {}
3176
+
3177
+ # http body (model)
3178
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_item_create_job_create_query)
3179
+
3180
+ # return_type
3181
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
3182
+
3183
+ # auth_names
3184
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
3185
+
3186
+ new_options = opts.merge(
3187
+ :operation => :"CatalogsApi.spawn_create_items_job",
3188
+ :header_params => header_params,
3189
+ :query_params => query_params,
3190
+ :form_params => form_params,
3191
+ :body => post_body,
3192
+ :auth_names => auth_names,
3193
+ :return_type => return_type
3194
+ )
3195
+
3196
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3197
+ if @api_client.config.debugging
3198
+ @api_client.config.logger.debug "API called: CatalogsApi#spawn_create_items_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3199
+ end
3200
+ return data, status_code, headers
3201
+ end
3202
+
3203
+ # Spawn Create Variants Job
3204
+ # Create a catalog variant bulk create job to create a batch of catalog variants.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
3205
+ # @param catalog_variant_create_job_create_query [CatalogVariantCreateJobCreateQuery]
3206
+ # @param [Hash] opts the optional parameters
3207
+ # @return [Hash<String, Object>]
3208
+ def spawn_create_variants_job(catalog_variant_create_job_create_query, opts = {})
3209
+ data, _status_code, _headers = spawn_create_variants_job_with_http_info(catalog_variant_create_job_create_query, opts)
3210
+ data
3211
+ end
3212
+
3213
+ # Spawn Create Variants Job
3214
+ # Create a catalog variant bulk create job to create a batch of catalog variants.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
3215
+ # @param catalog_variant_create_job_create_query [CatalogVariantCreateJobCreateQuery]
3216
+ # @param [Hash] opts the optional parameters
3217
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
3218
+ def spawn_create_variants_job_with_http_info(catalog_variant_create_job_create_query, opts = {})
3219
+ if @api_client.config.debugging
3220
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.spawn_create_variants_job ...'
3221
+ end
3222
+ # verify the required parameter 'catalog_variant_create_job_create_query' is set
3223
+ if @api_client.config.client_side_validation && catalog_variant_create_job_create_query.nil?
3224
+ fail ArgumentError, "Missing the required parameter 'catalog_variant_create_job_create_query' when calling CatalogsApi.spawn_create_variants_job"
3225
+ end
3226
+ # resource path
3227
+ local_var_path = '/api/catalog-variant-bulk-create-jobs/'
3228
+
3229
+ # query parameters
3230
+ query_params = opts[:query_params] || {}
3231
+
3232
+ # header parameters
3233
+ header_params = opts[:header_params] || {}
3234
+ # klaviyo api revision
3235
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
3236
+ # HTTP header 'Accept' (if needed)
3237
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3238
+ # HTTP header 'Content-Type'
3239
+ content_type = @api_client.select_header_content_type(['application/json'])
3240
+ if !content_type.nil?
3241
+ header_params['Content-Type'] = content_type
3242
+ end
3243
+
3244
+ # form parameters
3245
+ form_params = opts[:form_params] || {}
3246
+
3247
+ # http body (model)
3248
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_variant_create_job_create_query)
3249
+
3250
+ # return_type
3251
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
3252
+
3253
+ # auth_names
3254
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
3255
+
3256
+ new_options = opts.merge(
3257
+ :operation => :"CatalogsApi.spawn_create_variants_job",
3258
+ :header_params => header_params,
3259
+ :query_params => query_params,
3260
+ :form_params => form_params,
3261
+ :body => post_body,
3262
+ :auth_names => auth_names,
3263
+ :return_type => return_type
3264
+ )
3265
+
3266
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3267
+ if @api_client.config.debugging
3268
+ @api_client.config.logger.debug "API called: CatalogsApi#spawn_create_variants_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3269
+ end
3270
+ return data, status_code, headers
3271
+ end
3272
+
3273
+ # Spawn Delete Categories Job
3274
+ # Create a catalog category bulk delete job to delete a batch of catalog categories.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
3275
+ # @param catalog_category_delete_job_create_query [CatalogCategoryDeleteJobCreateQuery]
3276
+ # @param [Hash] opts the optional parameters
3277
+ # @return [Hash<String, Object>]
3278
+ def spawn_delete_categories_job(catalog_category_delete_job_create_query, opts = {})
3279
+ data, _status_code, _headers = spawn_delete_categories_job_with_http_info(catalog_category_delete_job_create_query, opts)
3280
+ data
3281
+ end
3282
+
3283
+ # Spawn Delete Categories Job
3284
+ # Create a catalog category bulk delete job to delete a batch of catalog categories.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
3285
+ # @param catalog_category_delete_job_create_query [CatalogCategoryDeleteJobCreateQuery]
3286
+ # @param [Hash] opts the optional parameters
3287
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
3288
+ def spawn_delete_categories_job_with_http_info(catalog_category_delete_job_create_query, opts = {})
3289
+ if @api_client.config.debugging
3290
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.spawn_delete_categories_job ...'
3291
+ end
3292
+ # verify the required parameter 'catalog_category_delete_job_create_query' is set
3293
+ if @api_client.config.client_side_validation && catalog_category_delete_job_create_query.nil?
3294
+ fail ArgumentError, "Missing the required parameter 'catalog_category_delete_job_create_query' when calling CatalogsApi.spawn_delete_categories_job"
3295
+ end
3296
+ # resource path
3297
+ local_var_path = '/api/catalog-category-bulk-delete-jobs/'
3298
+
3299
+ # query parameters
3300
+ query_params = opts[:query_params] || {}
3301
+
3302
+ # header parameters
3303
+ header_params = opts[:header_params] || {}
3304
+ # klaviyo api revision
3305
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
3306
+ # HTTP header 'Accept' (if needed)
3307
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3308
+ # HTTP header 'Content-Type'
3309
+ content_type = @api_client.select_header_content_type(['application/json'])
3310
+ if !content_type.nil?
3311
+ header_params['Content-Type'] = content_type
3312
+ end
3313
+
3314
+ # form parameters
3315
+ form_params = opts[:form_params] || {}
3316
+
3317
+ # http body (model)
3318
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_category_delete_job_create_query)
3319
+
3320
+ # return_type
3321
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
3322
+
3323
+ # auth_names
3324
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
3325
+
3326
+ new_options = opts.merge(
3327
+ :operation => :"CatalogsApi.spawn_delete_categories_job",
3328
+ :header_params => header_params,
3329
+ :query_params => query_params,
3330
+ :form_params => form_params,
3331
+ :body => post_body,
3332
+ :auth_names => auth_names,
3333
+ :return_type => return_type
3334
+ )
3335
+
3336
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3337
+ if @api_client.config.debugging
3338
+ @api_client.config.logger.debug "API called: CatalogsApi#spawn_delete_categories_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3339
+ end
3340
+ return data, status_code, headers
3341
+ end
3342
+
3343
+ # Spawn Delete Items Job
3344
+ # Create a catalog item bulk delete job to delete a batch of catalog items.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
3345
+ # @param catalog_item_delete_job_create_query [CatalogItemDeleteJobCreateQuery]
3346
+ # @param [Hash] opts the optional parameters
3347
+ # @return [Hash<String, Object>]
3348
+ def spawn_delete_items_job(catalog_item_delete_job_create_query, opts = {})
3349
+ data, _status_code, _headers = spawn_delete_items_job_with_http_info(catalog_item_delete_job_create_query, opts)
3350
+ data
3351
+ end
3352
+
3353
+ # Spawn Delete Items Job
3354
+ # Create a catalog item bulk delete job to delete a batch of catalog items.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
3355
+ # @param catalog_item_delete_job_create_query [CatalogItemDeleteJobCreateQuery]
3356
+ # @param [Hash] opts the optional parameters
3357
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
3358
+ def spawn_delete_items_job_with_http_info(catalog_item_delete_job_create_query, opts = {})
3359
+ if @api_client.config.debugging
3360
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.spawn_delete_items_job ...'
3361
+ end
3362
+ # verify the required parameter 'catalog_item_delete_job_create_query' is set
3363
+ if @api_client.config.client_side_validation && catalog_item_delete_job_create_query.nil?
3364
+ fail ArgumentError, "Missing the required parameter 'catalog_item_delete_job_create_query' when calling CatalogsApi.spawn_delete_items_job"
3365
+ end
3366
+ # resource path
3367
+ local_var_path = '/api/catalog-item-bulk-delete-jobs/'
3368
+
3369
+ # query parameters
3370
+ query_params = opts[:query_params] || {}
3371
+
3372
+ # header parameters
3373
+ header_params = opts[:header_params] || {}
3374
+ # klaviyo api revision
3375
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
3376
+ # HTTP header 'Accept' (if needed)
3377
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3378
+ # HTTP header 'Content-Type'
3379
+ content_type = @api_client.select_header_content_type(['application/json'])
3380
+ if !content_type.nil?
3381
+ header_params['Content-Type'] = content_type
3382
+ end
3383
+
3384
+ # form parameters
3385
+ form_params = opts[:form_params] || {}
3386
+
3387
+ # http body (model)
3388
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_item_delete_job_create_query)
3389
+
3390
+ # return_type
3391
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
3392
+
3393
+ # auth_names
3394
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
3395
+
3396
+ new_options = opts.merge(
3397
+ :operation => :"CatalogsApi.spawn_delete_items_job",
3398
+ :header_params => header_params,
3399
+ :query_params => query_params,
3400
+ :form_params => form_params,
3401
+ :body => post_body,
3402
+ :auth_names => auth_names,
3403
+ :return_type => return_type
3404
+ )
3405
+
3406
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3407
+ if @api_client.config.debugging
3408
+ @api_client.config.logger.debug "API called: CatalogsApi#spawn_delete_items_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3409
+ end
3410
+ return data, status_code, headers
3411
+ end
3412
+
3413
+ # Spawn Delete Variants Job
3414
+ # Create a catalog variant bulk delete job to delete a batch of catalog variants.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
3415
+ # @param catalog_variant_delete_job_create_query [CatalogVariantDeleteJobCreateQuery]
3416
+ # @param [Hash] opts the optional parameters
3417
+ # @return [Hash<String, Object>]
3418
+ def spawn_delete_variants_job(catalog_variant_delete_job_create_query, opts = {})
3419
+ data, _status_code, _headers = spawn_delete_variants_job_with_http_info(catalog_variant_delete_job_create_query, opts)
3420
+ data
3421
+ end
3422
+
3423
+ # Spawn Delete Variants Job
3424
+ # Create a catalog variant bulk delete job to delete a batch of catalog variants.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
3425
+ # @param catalog_variant_delete_job_create_query [CatalogVariantDeleteJobCreateQuery]
3426
+ # @param [Hash] opts the optional parameters
3427
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
3428
+ def spawn_delete_variants_job_with_http_info(catalog_variant_delete_job_create_query, opts = {})
3429
+ if @api_client.config.debugging
3430
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.spawn_delete_variants_job ...'
3431
+ end
3432
+ # verify the required parameter 'catalog_variant_delete_job_create_query' is set
3433
+ if @api_client.config.client_side_validation && catalog_variant_delete_job_create_query.nil?
3434
+ fail ArgumentError, "Missing the required parameter 'catalog_variant_delete_job_create_query' when calling CatalogsApi.spawn_delete_variants_job"
3435
+ end
3436
+ # resource path
3437
+ local_var_path = '/api/catalog-variant-bulk-delete-jobs/'
3438
+
3439
+ # query parameters
3440
+ query_params = opts[:query_params] || {}
3441
+
3442
+ # header parameters
3443
+ header_params = opts[:header_params] || {}
3444
+ # klaviyo api revision
3445
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
3446
+ # HTTP header 'Accept' (if needed)
3447
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3448
+ # HTTP header 'Content-Type'
3449
+ content_type = @api_client.select_header_content_type(['application/json'])
3450
+ if !content_type.nil?
3451
+ header_params['Content-Type'] = content_type
3452
+ end
3453
+
3454
+ # form parameters
3455
+ form_params = opts[:form_params] || {}
3456
+
3457
+ # http body (model)
3458
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_variant_delete_job_create_query)
3459
+
3460
+ # return_type
3461
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
3462
+
3463
+ # auth_names
3464
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
3465
+
3466
+ new_options = opts.merge(
3467
+ :operation => :"CatalogsApi.spawn_delete_variants_job",
3468
+ :header_params => header_params,
3469
+ :query_params => query_params,
3470
+ :form_params => form_params,
3471
+ :body => post_body,
3472
+ :auth_names => auth_names,
3473
+ :return_type => return_type
3474
+ )
3475
+
3476
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3477
+ if @api_client.config.debugging
3478
+ @api_client.config.logger.debug "API called: CatalogsApi#spawn_delete_variants_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3479
+ end
3480
+ return data, status_code, headers
3481
+ end
3482
+
3483
+ # Spawn Update Categories Job
3484
+ # Create a catalog category bulk update job to update a batch of catalog categories.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
3485
+ # @param catalog_category_update_job_create_query [CatalogCategoryUpdateJobCreateQuery]
3486
+ # @param [Hash] opts the optional parameters
3487
+ # @return [Hash<String, Object>]
3488
+ def spawn_update_categories_job(catalog_category_update_job_create_query, opts = {})
3489
+ data, _status_code, _headers = spawn_update_categories_job_with_http_info(catalog_category_update_job_create_query, opts)
3490
+ data
3491
+ end
3492
+
3493
+ # Spawn Update Categories Job
3494
+ # Create a catalog category bulk update job to update a batch of catalog categories.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
3495
+ # @param catalog_category_update_job_create_query [CatalogCategoryUpdateJobCreateQuery]
3496
+ # @param [Hash] opts the optional parameters
3497
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
3498
+ def spawn_update_categories_job_with_http_info(catalog_category_update_job_create_query, opts = {})
3499
+ if @api_client.config.debugging
3500
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.spawn_update_categories_job ...'
3501
+ end
3502
+ # verify the required parameter 'catalog_category_update_job_create_query' is set
3503
+ if @api_client.config.client_side_validation && catalog_category_update_job_create_query.nil?
3504
+ fail ArgumentError, "Missing the required parameter 'catalog_category_update_job_create_query' when calling CatalogsApi.spawn_update_categories_job"
3505
+ end
3506
+ # resource path
3507
+ local_var_path = '/api/catalog-category-bulk-update-jobs/'
3508
+
3509
+ # query parameters
3510
+ query_params = opts[:query_params] || {}
3511
+
3512
+ # header parameters
3513
+ header_params = opts[:header_params] || {}
3514
+ # klaviyo api revision
3515
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
3516
+ # HTTP header 'Accept' (if needed)
3517
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3518
+ # HTTP header 'Content-Type'
3519
+ content_type = @api_client.select_header_content_type(['application/json'])
3520
+ if !content_type.nil?
3521
+ header_params['Content-Type'] = content_type
3522
+ end
3523
+
3524
+ # form parameters
3525
+ form_params = opts[:form_params] || {}
3526
+
3527
+ # http body (model)
3528
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_category_update_job_create_query)
3529
+
3530
+ # return_type
3531
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
3532
+
3533
+ # auth_names
3534
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
3535
+
3536
+ new_options = opts.merge(
3537
+ :operation => :"CatalogsApi.spawn_update_categories_job",
3538
+ :header_params => header_params,
3539
+ :query_params => query_params,
3540
+ :form_params => form_params,
3541
+ :body => post_body,
3542
+ :auth_names => auth_names,
3543
+ :return_type => return_type
3544
+ )
3545
+
3546
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3547
+ if @api_client.config.debugging
3548
+ @api_client.config.logger.debug "API called: CatalogsApi#spawn_update_categories_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3549
+ end
3550
+ return data, status_code, headers
3551
+ end
3552
+
3553
+ # Spawn Update Items Job
3554
+ # Create a catalog item bulk update job to update a batch of catalog items.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
3555
+ # @param catalog_item_update_job_create_query [CatalogItemUpdateJobCreateQuery]
3556
+ # @param [Hash] opts the optional parameters
3557
+ # @return [Hash<String, Object>]
3558
+ def spawn_update_items_job(catalog_item_update_job_create_query, opts = {})
3559
+ data, _status_code, _headers = spawn_update_items_job_with_http_info(catalog_item_update_job_create_query, opts)
3560
+ data
3561
+ end
3562
+
3563
+ # Spawn Update Items Job
3564
+ # Create a catalog item bulk update job to update a batch of catalog items.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
3565
+ # @param catalog_item_update_job_create_query [CatalogItemUpdateJobCreateQuery]
3566
+ # @param [Hash] opts the optional parameters
3567
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
3568
+ def spawn_update_items_job_with_http_info(catalog_item_update_job_create_query, opts = {})
3569
+ if @api_client.config.debugging
3570
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.spawn_update_items_job ...'
3571
+ end
3572
+ # verify the required parameter 'catalog_item_update_job_create_query' is set
3573
+ if @api_client.config.client_side_validation && catalog_item_update_job_create_query.nil?
3574
+ fail ArgumentError, "Missing the required parameter 'catalog_item_update_job_create_query' when calling CatalogsApi.spawn_update_items_job"
3575
+ end
3576
+ # resource path
3577
+ local_var_path = '/api/catalog-item-bulk-update-jobs/'
3578
+
3579
+ # query parameters
3580
+ query_params = opts[:query_params] || {}
3581
+
3582
+ # header parameters
3583
+ header_params = opts[:header_params] || {}
3584
+ # klaviyo api revision
3585
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
3586
+ # HTTP header 'Accept' (if needed)
3587
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3588
+ # HTTP header 'Content-Type'
3589
+ content_type = @api_client.select_header_content_type(['application/json'])
3590
+ if !content_type.nil?
3591
+ header_params['Content-Type'] = content_type
3592
+ end
3593
+
3594
+ # form parameters
3595
+ form_params = opts[:form_params] || {}
3596
+
3597
+ # http body (model)
3598
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_item_update_job_create_query)
3599
+
3600
+ # return_type
3601
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
3602
+
3603
+ # auth_names
3604
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
3605
+
3606
+ new_options = opts.merge(
3607
+ :operation => :"CatalogsApi.spawn_update_items_job",
3608
+ :header_params => header_params,
3609
+ :query_params => query_params,
3610
+ :form_params => form_params,
3611
+ :body => post_body,
3612
+ :auth_names => auth_names,
3613
+ :return_type => return_type
3614
+ )
3615
+
3616
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3617
+ if @api_client.config.debugging
3618
+ @api_client.config.logger.debug "API called: CatalogsApi#spawn_update_items_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3619
+ end
3620
+ return data, status_code, headers
3621
+ end
3622
+
3623
+ # Spawn Update Variants Job
3624
+ # Create a catalog variant bulk update job to update a batch of catalog variants.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
3625
+ # @param catalog_variant_update_job_create_query [CatalogVariantUpdateJobCreateQuery]
3626
+ # @param [Hash] opts the optional parameters
3627
+ # @return [Hash<String, Object>]
3628
+ def spawn_update_variants_job(catalog_variant_update_job_create_query, opts = {})
3629
+ data, _status_code, _headers = spawn_update_variants_job_with_http_info(catalog_variant_update_job_create_query, opts)
3630
+ data
3631
+ end
3632
+
3633
+ # Spawn Update Variants Job
3634
+ # Create a catalog variant bulk update job to update a batch of catalog variants.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
3635
+ # @param catalog_variant_update_job_create_query [CatalogVariantUpdateJobCreateQuery]
3636
+ # @param [Hash] opts the optional parameters
3637
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
3638
+ def spawn_update_variants_job_with_http_info(catalog_variant_update_job_create_query, opts = {})
3639
+ if @api_client.config.debugging
3640
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.spawn_update_variants_job ...'
3641
+ end
3642
+ # verify the required parameter 'catalog_variant_update_job_create_query' is set
3643
+ if @api_client.config.client_side_validation && catalog_variant_update_job_create_query.nil?
3644
+ fail ArgumentError, "Missing the required parameter 'catalog_variant_update_job_create_query' when calling CatalogsApi.spawn_update_variants_job"
3645
+ end
3646
+ # resource path
3647
+ local_var_path = '/api/catalog-variant-bulk-update-jobs/'
3648
+
3649
+ # query parameters
3650
+ query_params = opts[:query_params] || {}
3651
+
3652
+ # header parameters
3653
+ header_params = opts[:header_params] || {}
3654
+ # klaviyo api revision
3655
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
3656
+ # HTTP header 'Accept' (if needed)
3657
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3658
+ # HTTP header 'Content-Type'
3659
+ content_type = @api_client.select_header_content_type(['application/json'])
3660
+ if !content_type.nil?
3661
+ header_params['Content-Type'] = content_type
3662
+ end
3663
+
3664
+ # form parameters
3665
+ form_params = opts[:form_params] || {}
3666
+
3667
+ # http body (model)
3668
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_variant_update_job_create_query)
3669
+
3670
+ # return_type
3671
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
3672
+
3673
+ # auth_names
3674
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
3675
+
3676
+ new_options = opts.merge(
3677
+ :operation => :"CatalogsApi.spawn_update_variants_job",
3678
+ :header_params => header_params,
3679
+ :query_params => query_params,
3680
+ :form_params => form_params,
3681
+ :body => post_body,
3682
+ :auth_names => auth_names,
3683
+ :return_type => return_type
3684
+ )
3685
+
3686
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3687
+ if @api_client.config.debugging
3688
+ @api_client.config.logger.debug "API called: CatalogsApi#spawn_update_variants_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3689
+ end
3690
+ return data, status_code, headers
3691
+ end
3692
+
3693
+ # Update Catalog Category
3694
+ # Update a catalog category with the given category ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
3695
+ # @param id [String]
3696
+ # @param catalog_category_update_query [CatalogCategoryUpdateQuery]
3697
+ # @param [Hash] opts the optional parameters
3698
+ # @return [Hash<String, Object>]
3699
+ def update_catalog_category(id, catalog_category_update_query, opts = {})
3700
+ data, _status_code, _headers = update_catalog_category_with_http_info(id, catalog_category_update_query, opts)
3701
+ data
3702
+ end
3703
+
3704
+ # Update Catalog Category
3705
+ # Update a catalog category with the given category ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
3706
+ # @param id [String]
3707
+ # @param catalog_category_update_query [CatalogCategoryUpdateQuery]
3708
+ # @param [Hash] opts the optional parameters
3709
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
3710
+ def update_catalog_category_with_http_info(id, catalog_category_update_query, opts = {})
3711
+ if @api_client.config.debugging
3712
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.update_catalog_category ...'
3713
+ end
3714
+ # verify the required parameter 'id' is set
3715
+ if @api_client.config.client_side_validation && id.nil?
3716
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogsApi.update_catalog_category"
3717
+ end
3718
+ # verify the required parameter 'catalog_category_update_query' is set
3719
+ if @api_client.config.client_side_validation && catalog_category_update_query.nil?
3720
+ fail ArgumentError, "Missing the required parameter 'catalog_category_update_query' when calling CatalogsApi.update_catalog_category"
3721
+ end
3722
+ # resource path
3723
+ local_var_path = '/api/catalog-categories/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
3724
+
3725
+ # query parameters
3726
+ query_params = opts[:query_params] || {}
3727
+
3728
+ # header parameters
3729
+ header_params = opts[:header_params] || {}
3730
+ # klaviyo api revision
3731
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
3732
+ # HTTP header 'Accept' (if needed)
3733
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3734
+ # HTTP header 'Content-Type'
3735
+ content_type = @api_client.select_header_content_type(['application/json'])
3736
+ if !content_type.nil?
3737
+ header_params['Content-Type'] = content_type
3738
+ end
3739
+
3740
+ # form parameters
3741
+ form_params = opts[:form_params] || {}
3742
+
3743
+ # http body (model)
3744
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_category_update_query)
3745
+
3746
+ # return_type
3747
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
3748
+
3749
+ # auth_names
3750
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
3751
+
3752
+ new_options = opts.merge(
3753
+ :operation => :"CatalogsApi.update_catalog_category",
3754
+ :header_params => header_params,
3755
+ :query_params => query_params,
3756
+ :form_params => form_params,
3757
+ :body => post_body,
3758
+ :auth_names => auth_names,
3759
+ :return_type => return_type
3760
+ )
3761
+
3762
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
3763
+ if @api_client.config.debugging
3764
+ @api_client.config.logger.debug "API called: CatalogsApi#update_catalog_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3765
+ end
3766
+ return data, status_code, headers
3767
+ end
3768
+
3769
+ # Update Catalog Category Relationships
3770
+ # Update item relationships for the given category ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
3771
+ # @param id [String]
3772
+ # @param related_resource [String]
3773
+ # @param catalog_category_item_op [CatalogCategoryItemOp]
3774
+ # @param [Hash] opts the optional parameters
3775
+ # @return [nil]
3776
+ def update_catalog_category_relationships(id, related_resource, catalog_category_item_op, opts = {})
3777
+ update_catalog_category_relationships_with_http_info(id, related_resource, catalog_category_item_op, opts)
3778
+ nil
3779
+ end
3780
+
3781
+ # Update Catalog Category Relationships
3782
+ # Update item relationships for the given category ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
3783
+ # @param id [String]
3784
+ # @param related_resource [String]
3785
+ # @param catalog_category_item_op [CatalogCategoryItemOp]
3786
+ # @param [Hash] opts the optional parameters
3787
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
3788
+ def update_catalog_category_relationships_with_http_info(id, related_resource, catalog_category_item_op, opts = {})
3789
+ if @api_client.config.debugging
3790
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.update_catalog_category_relationships ...'
3791
+ end
3792
+ # verify the required parameter 'id' is set
3793
+ if @api_client.config.client_side_validation && id.nil?
3794
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogsApi.update_catalog_category_relationships"
3795
+ end
3796
+ # verify the required parameter 'related_resource' is set
3797
+ if @api_client.config.client_side_validation && related_resource.nil?
3798
+ fail ArgumentError, "Missing the required parameter 'related_resource' when calling CatalogsApi.update_catalog_category_relationships"
3799
+ end
3800
+ # verify enum value
3801
+ allowable_values = ["items"]
3802
+ if @api_client.config.client_side_validation && !allowable_values.include?(related_resource)
3803
+ fail ArgumentError, "invalid value for \"related_resource\", must be one of #{allowable_values}"
3804
+ end
3805
+ # verify the required parameter 'catalog_category_item_op' is set
3806
+ if @api_client.config.client_side_validation && catalog_category_item_op.nil?
3807
+ fail ArgumentError, "Missing the required parameter 'catalog_category_item_op' when calling CatalogsApi.update_catalog_category_relationships"
3808
+ end
3809
+ # resource path
3810
+ local_var_path = '/api/catalog-categories/{id}/relationships/{related_resource}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'related_resource' + '}', CGI.escape(related_resource.to_s))
3811
+
3812
+ # query parameters
3813
+ query_params = opts[:query_params] || {}
3814
+
3815
+ # header parameters
3816
+ header_params = opts[:header_params] || {}
3817
+ # klaviyo api revision
3818
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
3819
+ # HTTP header 'Accept' (if needed)
3820
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3821
+ # HTTP header 'Content-Type'
3822
+ content_type = @api_client.select_header_content_type(['application/json'])
3823
+ if !content_type.nil?
3824
+ header_params['Content-Type'] = content_type
3825
+ end
3826
+
3827
+ # form parameters
3828
+ form_params = opts[:form_params] || {}
3829
+
3830
+ # http body (model)
3831
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_category_item_op)
3832
+
3833
+ # return_type
3834
+ return_type = opts[:debug_return_type]
3835
+
3836
+ # auth_names
3837
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
3838
+
3839
+ new_options = opts.merge(
3840
+ :operation => :"CatalogsApi.update_catalog_category_relationships",
3841
+ :header_params => header_params,
3842
+ :query_params => query_params,
3843
+ :form_params => form_params,
3844
+ :body => post_body,
3845
+ :auth_names => auth_names,
3846
+ :return_type => return_type
3847
+ )
3848
+
3849
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
3850
+ if @api_client.config.debugging
3851
+ @api_client.config.logger.debug "API called: CatalogsApi#update_catalog_category_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3852
+ end
3853
+ return data, status_code, headers
3854
+ end
3855
+
3856
+ # Update Catalog Item
3857
+ # Update a catalog item with the given item ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
3858
+ # @param id [String]
3859
+ # @param catalog_item_update_query [CatalogItemUpdateQuery]
3860
+ # @param [Hash] opts the optional parameters
3861
+ # @return [Hash<String, Object>]
3862
+ def update_catalog_item(id, catalog_item_update_query, opts = {})
3863
+ data, _status_code, _headers = update_catalog_item_with_http_info(id, catalog_item_update_query, opts)
3864
+ data
3865
+ end
3866
+
3867
+ # Update Catalog Item
3868
+ # Update a catalog item with the given item ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
3869
+ # @param id [String]
3870
+ # @param catalog_item_update_query [CatalogItemUpdateQuery]
3871
+ # @param [Hash] opts the optional parameters
3872
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
3873
+ def update_catalog_item_with_http_info(id, catalog_item_update_query, opts = {})
3874
+ if @api_client.config.debugging
3875
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.update_catalog_item ...'
3876
+ end
3877
+ # verify the required parameter 'id' is set
3878
+ if @api_client.config.client_side_validation && id.nil?
3879
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogsApi.update_catalog_item"
3880
+ end
3881
+ # verify the required parameter 'catalog_item_update_query' is set
3882
+ if @api_client.config.client_side_validation && catalog_item_update_query.nil?
3883
+ fail ArgumentError, "Missing the required parameter 'catalog_item_update_query' when calling CatalogsApi.update_catalog_item"
3884
+ end
3885
+ # resource path
3886
+ local_var_path = '/api/catalog-items/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
3887
+
3888
+ # query parameters
3889
+ query_params = opts[:query_params] || {}
3890
+
3891
+ # header parameters
3892
+ header_params = opts[:header_params] || {}
3893
+ # klaviyo api revision
3894
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
3895
+ # HTTP header 'Accept' (if needed)
3896
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3897
+ # HTTP header 'Content-Type'
3898
+ content_type = @api_client.select_header_content_type(['application/json'])
3899
+ if !content_type.nil?
3900
+ header_params['Content-Type'] = content_type
3901
+ end
3902
+
3903
+ # form parameters
3904
+ form_params = opts[:form_params] || {}
3905
+
3906
+ # http body (model)
3907
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_item_update_query)
3908
+
3909
+ # return_type
3910
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
3911
+
3912
+ # auth_names
3913
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
3914
+
3915
+ new_options = opts.merge(
3916
+ :operation => :"CatalogsApi.update_catalog_item",
3917
+ :header_params => header_params,
3918
+ :query_params => query_params,
3919
+ :form_params => form_params,
3920
+ :body => post_body,
3921
+ :auth_names => auth_names,
3922
+ :return_type => return_type
3923
+ )
3924
+
3925
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
3926
+ if @api_client.config.debugging
3927
+ @api_client.config.logger.debug "API called: CatalogsApi#update_catalog_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3928
+ end
3929
+ return data, status_code, headers
3930
+ end
3931
+
3932
+ # Update Catalog Item Relationships
3933
+ # Update catalog category relationships for the given item ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
3934
+ # @param id [String]
3935
+ # @param related_resource [String]
3936
+ # @param catalog_item_category_op [CatalogItemCategoryOp]
3937
+ # @param [Hash] opts the optional parameters
3938
+ # @return [nil]
3939
+ def update_catalog_item_relationships(id, related_resource, catalog_item_category_op, opts = {})
3940
+ update_catalog_item_relationships_with_http_info(id, related_resource, catalog_item_category_op, opts)
3941
+ nil
3942
+ end
3943
+
3944
+ # Update Catalog Item Relationships
3945
+ # Update catalog category relationships for the given item ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
3946
+ # @param id [String]
3947
+ # @param related_resource [String]
3948
+ # @param catalog_item_category_op [CatalogItemCategoryOp]
3949
+ # @param [Hash] opts the optional parameters
3950
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
3951
+ def update_catalog_item_relationships_with_http_info(id, related_resource, catalog_item_category_op, opts = {})
3952
+ if @api_client.config.debugging
3953
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.update_catalog_item_relationships ...'
3954
+ end
3955
+ # verify the required parameter 'id' is set
3956
+ if @api_client.config.client_side_validation && id.nil?
3957
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogsApi.update_catalog_item_relationships"
3958
+ end
3959
+ # verify the required parameter 'related_resource' is set
3960
+ if @api_client.config.client_side_validation && related_resource.nil?
3961
+ fail ArgumentError, "Missing the required parameter 'related_resource' when calling CatalogsApi.update_catalog_item_relationships"
3962
+ end
3963
+ # verify enum value
3964
+ allowable_values = ["categories"]
3965
+ if @api_client.config.client_side_validation && !allowable_values.include?(related_resource)
3966
+ fail ArgumentError, "invalid value for \"related_resource\", must be one of #{allowable_values}"
3967
+ end
3968
+ # verify the required parameter 'catalog_item_category_op' is set
3969
+ if @api_client.config.client_side_validation && catalog_item_category_op.nil?
3970
+ fail ArgumentError, "Missing the required parameter 'catalog_item_category_op' when calling CatalogsApi.update_catalog_item_relationships"
3971
+ end
3972
+ # resource path
3973
+ local_var_path = '/api/catalog-items/{id}/relationships/{related_resource}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'related_resource' + '}', CGI.escape(related_resource.to_s))
3974
+
3975
+ # query parameters
3976
+ query_params = opts[:query_params] || {}
3977
+
3978
+ # header parameters
3979
+ header_params = opts[:header_params] || {}
3980
+ # klaviyo api revision
3981
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
3982
+ # HTTP header 'Accept' (if needed)
3983
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3984
+ # HTTP header 'Content-Type'
3985
+ content_type = @api_client.select_header_content_type(['application/json'])
3986
+ if !content_type.nil?
3987
+ header_params['Content-Type'] = content_type
3988
+ end
3989
+
3990
+ # form parameters
3991
+ form_params = opts[:form_params] || {}
3992
+
3993
+ # http body (model)
3994
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_item_category_op)
3995
+
3996
+ # return_type
3997
+ return_type = opts[:debug_return_type]
3998
+
3999
+ # auth_names
4000
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
4001
+
4002
+ new_options = opts.merge(
4003
+ :operation => :"CatalogsApi.update_catalog_item_relationships",
4004
+ :header_params => header_params,
4005
+ :query_params => query_params,
4006
+ :form_params => form_params,
4007
+ :body => post_body,
4008
+ :auth_names => auth_names,
4009
+ :return_type => return_type
4010
+ )
4011
+
4012
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
4013
+ if @api_client.config.debugging
4014
+ @api_client.config.logger.debug "API called: CatalogsApi#update_catalog_item_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4015
+ end
4016
+ return data, status_code, headers
4017
+ end
4018
+
4019
+ # Update Catalog Variant
4020
+ # Update a catalog item variant with the given variant ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `Catalogs Write`
4021
+ # @param id [String]
4022
+ # @param catalog_variant_update_query [CatalogVariantUpdateQuery]
4023
+ # @param [Hash] opts the optional parameters
4024
+ # @return [Hash<String, Object>]
4025
+ def update_catalog_variant(id, catalog_variant_update_query, opts = {})
4026
+ data, _status_code, _headers = update_catalog_variant_with_http_info(id, catalog_variant_update_query, opts)
4027
+ data
4028
+ end
4029
+
4030
+ # Update Catalog Variant
4031
+ # Update a catalog item variant with the given variant ID.&lt;br&gt;&lt;br&gt;*Rate limits*:&lt;br&gt;Burst: &#x60;75/s&#x60;&lt;br&gt;Steady: &#x60;700/m&#x60; **Scopes:** &#x60;Catalogs Write&#x60;
4032
+ # @param id [String]
4033
+ # @param catalog_variant_update_query [CatalogVariantUpdateQuery]
4034
+ # @param [Hash] opts the optional parameters
4035
+ # @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
4036
+ def update_catalog_variant_with_http_info(id, catalog_variant_update_query, opts = {})
4037
+ if @api_client.config.debugging
4038
+ @api_client.config.logger.debug 'Calling API: CatalogsApi.update_catalog_variant ...'
4039
+ end
4040
+ # verify the required parameter 'id' is set
4041
+ if @api_client.config.client_side_validation && id.nil?
4042
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogsApi.update_catalog_variant"
4043
+ end
4044
+ # verify the required parameter 'catalog_variant_update_query' is set
4045
+ if @api_client.config.client_side_validation && catalog_variant_update_query.nil?
4046
+ fail ArgumentError, "Missing the required parameter 'catalog_variant_update_query' when calling CatalogsApi.update_catalog_variant"
4047
+ end
4048
+ # resource path
4049
+ local_var_path = '/api/catalog-variants/{id}/'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
4050
+
4051
+ # query parameters
4052
+ query_params = opts[:query_params] || {}
4053
+
4054
+ # header parameters
4055
+ header_params = opts[:header_params] || {}
4056
+ # klaviyo api revision
4057
+ header_params['revision'] = ENV['API_REVISION'] || "2022-10-17"
4058
+ # HTTP header 'Accept' (if needed)
4059
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4060
+ # HTTP header 'Content-Type'
4061
+ content_type = @api_client.select_header_content_type(['application/json'])
4062
+ if !content_type.nil?
4063
+ header_params['Content-Type'] = content_type
4064
+ end
4065
+
4066
+ # form parameters
4067
+ form_params = opts[:form_params] || {}
4068
+
4069
+ # http body (model)
4070
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(catalog_variant_update_query)
4071
+
4072
+ # return_type
4073
+ return_type = opts[:debug_return_type] || 'Hash<String, Object>'
4074
+
4075
+ # auth_names
4076
+ auth_names = opts[:debug_auth_names] || ['Klaviyo-API-Key']
4077
+
4078
+ new_options = opts.merge(
4079
+ :operation => :"CatalogsApi.update_catalog_variant",
4080
+ :header_params => header_params,
4081
+ :query_params => query_params,
4082
+ :form_params => form_params,
4083
+ :body => post_body,
4084
+ :auth_names => auth_names,
4085
+ :return_type => return_type
4086
+ )
4087
+
4088
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
4089
+ if @api_client.config.debugging
4090
+ @api_client.config.logger.debug "API called: CatalogsApi#update_catalog_variant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4091
+ end
4092
+ return data, status_code, headers
4093
+ end
4094
+ end
4095
+ end