klaviyo-api-sdk 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
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,309 @@
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 'date'
14
+ require 'time'
15
+
16
+ module KlaviyoAPI
17
+ class ProfileCreateQueryAsSubResourceAttributes
18
+ attr_accessor :email
19
+
20
+ attr_accessor :phone_number
21
+
22
+ attr_accessor :external_id
23
+
24
+ attr_accessor :anonymous_id
25
+
26
+ attr_accessor :first_name
27
+
28
+ attr_accessor :last_name
29
+
30
+ attr_accessor :organization
31
+
32
+ attr_accessor :title
33
+
34
+ attr_accessor :image
35
+
36
+ attr_accessor :location
37
+
38
+ attr_accessor :properties
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'email' => :'email',
44
+ :'phone_number' => :'phone_number',
45
+ :'external_id' => :'external_id',
46
+ :'anonymous_id' => :'anonymous_id',
47
+ :'first_name' => :'first_name',
48
+ :'last_name' => :'last_name',
49
+ :'organization' => :'organization',
50
+ :'title' => :'title',
51
+ :'image' => :'image',
52
+ :'location' => :'location',
53
+ :'properties' => :'properties'
54
+ }
55
+ end
56
+
57
+ # Returns all the JSON keys this model knows about
58
+ def self.acceptable_attributes
59
+ attribute_map.values
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.openapi_types
64
+ {
65
+ :'email' => :'String',
66
+ :'phone_number' => :'String',
67
+ :'external_id' => :'String',
68
+ :'anonymous_id' => :'String',
69
+ :'first_name' => :'String',
70
+ :'last_name' => :'String',
71
+ :'organization' => :'String',
72
+ :'title' => :'String',
73
+ :'image' => :'String',
74
+ :'location' => :'ProfileLocation',
75
+ :'properties' => :'Object'
76
+ }
77
+ end
78
+
79
+ # List of attributes with nullable: true
80
+ def self.openapi_nullable
81
+ Set.new([
82
+ ])
83
+ end
84
+
85
+ # Initializes the object
86
+ # @param [Hash] attributes Model attributes in the form of hash
87
+ def initialize(attributes = {})
88
+ if (!attributes.is_a?(Hash))
89
+ fail ArgumentError, "The input argument (attributes) must be a hash in `KlaviyoAPI::ProfileCreateQueryAsSubResourceAttributes` initialize method"
90
+ end
91
+
92
+ # check to see if the attribute exists and convert string to symbol for hash key
93
+ attributes = attributes.each_with_object({}) { |(k, v), h|
94
+ if (!self.class.attribute_map.key?(k.to_sym))
95
+ fail ArgumentError, "`#{k}` is not a valid attribute in `KlaviyoAPI::ProfileCreateQueryAsSubResourceAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
96
+ end
97
+ h[k.to_sym] = v
98
+ }
99
+
100
+ if attributes.key?(:'email')
101
+ self.email = attributes[:'email']
102
+ end
103
+
104
+ if attributes.key?(:'phone_number')
105
+ self.phone_number = attributes[:'phone_number']
106
+ end
107
+
108
+ if attributes.key?(:'external_id')
109
+ self.external_id = attributes[:'external_id']
110
+ end
111
+
112
+ if attributes.key?(:'anonymous_id')
113
+ self.anonymous_id = attributes[:'anonymous_id']
114
+ end
115
+
116
+ if attributes.key?(:'first_name')
117
+ self.first_name = attributes[:'first_name']
118
+ end
119
+
120
+ if attributes.key?(:'last_name')
121
+ self.last_name = attributes[:'last_name']
122
+ end
123
+
124
+ if attributes.key?(:'organization')
125
+ self.organization = attributes[:'organization']
126
+ end
127
+
128
+ if attributes.key?(:'title')
129
+ self.title = attributes[:'title']
130
+ end
131
+
132
+ if attributes.key?(:'image')
133
+ self.image = attributes[:'image']
134
+ end
135
+
136
+ if attributes.key?(:'location')
137
+ self.location = attributes[:'location']
138
+ end
139
+
140
+ if attributes.key?(:'properties')
141
+ self.properties = attributes[:'properties']
142
+ end
143
+ end
144
+
145
+ # Show invalid properties with the reasons. Usually used together with valid?
146
+ # @return Array for valid properties with the reasons
147
+ def list_invalid_properties
148
+ invalid_properties = Array.new
149
+ invalid_properties
150
+ end
151
+
152
+ # Check to see if the all the properties in the model are valid
153
+ # @return true if the model is valid
154
+ def valid?
155
+ true
156
+ end
157
+
158
+ # Checks equality by comparing each attribute.
159
+ # @param [Object] Object to be compared
160
+ def ==(o)
161
+ return true if self.equal?(o)
162
+ self.class == o.class &&
163
+ email == o.email &&
164
+ phone_number == o.phone_number &&
165
+ external_id == o.external_id &&
166
+ anonymous_id == o.anonymous_id &&
167
+ first_name == o.first_name &&
168
+ last_name == o.last_name &&
169
+ organization == o.organization &&
170
+ title == o.title &&
171
+ image == o.image &&
172
+ location == o.location &&
173
+ properties == o.properties
174
+ end
175
+
176
+ # @see the `==` method
177
+ # @param [Object] Object to be compared
178
+ def eql?(o)
179
+ self == o
180
+ end
181
+
182
+ # Calculates hash code according to all attributes.
183
+ # @return [Integer] Hash code
184
+ def hash
185
+ [email, phone_number, external_id, anonymous_id, first_name, last_name, organization, title, image, location, properties].hash
186
+ end
187
+
188
+ # Builds the object from hash
189
+ # @param [Hash] attributes Model attributes in the form of hash
190
+ # @return [Object] Returns the model itself
191
+ def self.build_from_hash(attributes)
192
+ new.build_from_hash(attributes)
193
+ end
194
+
195
+ # Builds the object from hash
196
+ # @param [Hash] attributes Model attributes in the form of hash
197
+ # @return [Object] Returns the model itself
198
+ def build_from_hash(attributes)
199
+ return nil unless attributes.is_a?(Hash)
200
+ attributes = attributes.transform_keys(&:to_sym)
201
+ self.class.openapi_types.each_pair do |key, type|
202
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
203
+ self.send("#{key}=", nil)
204
+ elsif type =~ /\AArray<(.*)>/i
205
+ # check to ensure the input is an array given that the attribute
206
+ # is documented as an array but the input is not
207
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
208
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
209
+ end
210
+ elsif !attributes[self.class.attribute_map[key]].nil?
211
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
212
+ end
213
+ end
214
+
215
+ self
216
+ end
217
+
218
+ # Deserializes the data based on type
219
+ # @param string type Data type
220
+ # @param string value Value to be deserialized
221
+ # @return [Object] Deserialized data
222
+ def _deserialize(type, value)
223
+ case type.to_sym
224
+ when :Time
225
+ Time.parse(value)
226
+ when :Date
227
+ Date.parse(value)
228
+ when :String
229
+ value.to_s
230
+ when :Integer
231
+ value.to_i
232
+ when :Float
233
+ value.to_f
234
+ when :Boolean
235
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
236
+ true
237
+ else
238
+ false
239
+ end
240
+ when :Object
241
+ # generic object (usually a Hash), return directly
242
+ value
243
+ when /\AArray<(?<inner_type>.+)>\z/
244
+ inner_type = Regexp.last_match[:inner_type]
245
+ value.map { |v| _deserialize(inner_type, v) }
246
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
247
+ k_type = Regexp.last_match[:k_type]
248
+ v_type = Regexp.last_match[:v_type]
249
+ {}.tap do |hash|
250
+ value.each do |k, v|
251
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
252
+ end
253
+ end
254
+ else # model
255
+ # models (e.g. Pet) or oneOf
256
+ klass = KlaviyoAPI.const_get(type)
257
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
258
+ end
259
+ end
260
+
261
+ # Returns the string representation of the object
262
+ # @return [String] String presentation of the object
263
+ def to_s
264
+ to_hash.to_s
265
+ end
266
+
267
+ # to_body is an alias to to_hash (backward compatibility)
268
+ # @return [Hash] Returns the object in the form of hash
269
+ def to_body
270
+ to_hash
271
+ end
272
+
273
+ # Returns the object in the form of hash
274
+ # @return [Hash] Returns the object in the form of hash
275
+ def to_hash
276
+ hash = {}
277
+ self.class.attribute_map.each_pair do |attr, param|
278
+ value = self.send(attr)
279
+ if value.nil?
280
+ is_nullable = self.class.openapi_nullable.include?(attr)
281
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
282
+ end
283
+
284
+ hash[param] = _to_hash(value)
285
+ end
286
+ hash
287
+ end
288
+
289
+ # Outputs non-array value in the form of hash
290
+ # For object, use to_hash. Otherwise, just return the value
291
+ # @param [Object] value Any valid value
292
+ # @return [Hash] Returns the value in the form of hash
293
+ def _to_hash(value)
294
+ if value.is_a?(Array)
295
+ value.compact.map { |v| _to_hash(v) }
296
+ elsif value.is_a?(Hash)
297
+ {}.tap do |hash|
298
+ value.each { |k, v| hash[k] = _to_hash(v) }
299
+ end
300
+ elsif value.respond_to? :to_hash
301
+ value.to_hash
302
+ else
303
+ value
304
+ end
305
+ end
306
+
307
+ end
308
+
309
+ end
@@ -0,0 +1,291 @@
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 'date'
14
+ require 'time'
15
+
16
+ module KlaviyoAPI
17
+ class ProfileLocation
18
+ attr_accessor :address1
19
+
20
+ attr_accessor :address2
21
+
22
+ attr_accessor :city
23
+
24
+ attr_accessor :country
25
+
26
+ attr_accessor :latitude
27
+
28
+ attr_accessor :longitude
29
+
30
+ attr_accessor :region
31
+
32
+ attr_accessor :zip
33
+
34
+ attr_accessor :timezone
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'address1' => :'address1',
40
+ :'address2' => :'address2',
41
+ :'city' => :'city',
42
+ :'country' => :'country',
43
+ :'latitude' => :'latitude',
44
+ :'longitude' => :'longitude',
45
+ :'region' => :'region',
46
+ :'zip' => :'zip',
47
+ :'timezone' => :'timezone'
48
+ }
49
+ end
50
+
51
+ # Returns all the JSON keys this model knows about
52
+ def self.acceptable_attributes
53
+ attribute_map.values
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.openapi_types
58
+ {
59
+ :'address1' => :'String',
60
+ :'address2' => :'String',
61
+ :'city' => :'String',
62
+ :'country' => :'String',
63
+ :'latitude' => :'ProfileLocationLatitude',
64
+ :'longitude' => :'ProfileLocationLatitude',
65
+ :'region' => :'String',
66
+ :'zip' => :'String',
67
+ :'timezone' => :'String'
68
+ }
69
+ end
70
+
71
+ # List of attributes with nullable: true
72
+ def self.openapi_nullable
73
+ Set.new([
74
+ ])
75
+ end
76
+
77
+ # Initializes the object
78
+ # @param [Hash] attributes Model attributes in the form of hash
79
+ def initialize(attributes = {})
80
+ if (!attributes.is_a?(Hash))
81
+ fail ArgumentError, "The input argument (attributes) must be a hash in `KlaviyoAPI::ProfileLocation` initialize method"
82
+ end
83
+
84
+ # check to see if the attribute exists and convert string to symbol for hash key
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!self.class.attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `KlaviyoAPI::ProfileLocation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'address1')
93
+ self.address1 = attributes[:'address1']
94
+ end
95
+
96
+ if attributes.key?(:'address2')
97
+ self.address2 = attributes[:'address2']
98
+ end
99
+
100
+ if attributes.key?(:'city')
101
+ self.city = attributes[:'city']
102
+ end
103
+
104
+ if attributes.key?(:'country')
105
+ self.country = attributes[:'country']
106
+ end
107
+
108
+ if attributes.key?(:'latitude')
109
+ self.latitude = attributes[:'latitude']
110
+ end
111
+
112
+ if attributes.key?(:'longitude')
113
+ self.longitude = attributes[:'longitude']
114
+ end
115
+
116
+ if attributes.key?(:'region')
117
+ self.region = attributes[:'region']
118
+ end
119
+
120
+ if attributes.key?(:'zip')
121
+ self.zip = attributes[:'zip']
122
+ end
123
+
124
+ if attributes.key?(:'timezone')
125
+ self.timezone = attributes[:'timezone']
126
+ end
127
+ end
128
+
129
+ # Show invalid properties with the reasons. Usually used together with valid?
130
+ # @return Array for valid properties with the reasons
131
+ def list_invalid_properties
132
+ invalid_properties = Array.new
133
+ invalid_properties
134
+ end
135
+
136
+ # Check to see if the all the properties in the model are valid
137
+ # @return true if the model is valid
138
+ def valid?
139
+ true
140
+ end
141
+
142
+ # Checks equality by comparing each attribute.
143
+ # @param [Object] Object to be compared
144
+ def ==(o)
145
+ return true if self.equal?(o)
146
+ self.class == o.class &&
147
+ address1 == o.address1 &&
148
+ address2 == o.address2 &&
149
+ city == o.city &&
150
+ country == o.country &&
151
+ latitude == o.latitude &&
152
+ longitude == o.longitude &&
153
+ region == o.region &&
154
+ zip == o.zip &&
155
+ timezone == o.timezone
156
+ end
157
+
158
+ # @see the `==` method
159
+ # @param [Object] Object to be compared
160
+ def eql?(o)
161
+ self == o
162
+ end
163
+
164
+ # Calculates hash code according to all attributes.
165
+ # @return [Integer] Hash code
166
+ def hash
167
+ [address1, address2, city, country, latitude, longitude, region, zip, timezone].hash
168
+ end
169
+
170
+ # Builds the object from hash
171
+ # @param [Hash] attributes Model attributes in the form of hash
172
+ # @return [Object] Returns the model itself
173
+ def self.build_from_hash(attributes)
174
+ new.build_from_hash(attributes)
175
+ end
176
+
177
+ # Builds the object from hash
178
+ # @param [Hash] attributes Model attributes in the form of hash
179
+ # @return [Object] Returns the model itself
180
+ def build_from_hash(attributes)
181
+ return nil unless attributes.is_a?(Hash)
182
+ attributes = attributes.transform_keys(&:to_sym)
183
+ self.class.openapi_types.each_pair do |key, type|
184
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
185
+ self.send("#{key}=", nil)
186
+ elsif type =~ /\AArray<(.*)>/i
187
+ # check to ensure the input is an array given that the attribute
188
+ # is documented as an array but the input is not
189
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
190
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
191
+ end
192
+ elsif !attributes[self.class.attribute_map[key]].nil?
193
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
194
+ end
195
+ end
196
+
197
+ self
198
+ end
199
+
200
+ # Deserializes the data based on type
201
+ # @param string type Data type
202
+ # @param string value Value to be deserialized
203
+ # @return [Object] Deserialized data
204
+ def _deserialize(type, value)
205
+ case type.to_sym
206
+ when :Time
207
+ Time.parse(value)
208
+ when :Date
209
+ Date.parse(value)
210
+ when :String
211
+ value.to_s
212
+ when :Integer
213
+ value.to_i
214
+ when :Float
215
+ value.to_f
216
+ when :Boolean
217
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
218
+ true
219
+ else
220
+ false
221
+ end
222
+ when :Object
223
+ # generic object (usually a Hash), return directly
224
+ value
225
+ when /\AArray<(?<inner_type>.+)>\z/
226
+ inner_type = Regexp.last_match[:inner_type]
227
+ value.map { |v| _deserialize(inner_type, v) }
228
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
229
+ k_type = Regexp.last_match[:k_type]
230
+ v_type = Regexp.last_match[:v_type]
231
+ {}.tap do |hash|
232
+ value.each do |k, v|
233
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
234
+ end
235
+ end
236
+ else # model
237
+ # models (e.g. Pet) or oneOf
238
+ klass = KlaviyoAPI.const_get(type)
239
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
240
+ end
241
+ end
242
+
243
+ # Returns the string representation of the object
244
+ # @return [String] String presentation of the object
245
+ def to_s
246
+ to_hash.to_s
247
+ end
248
+
249
+ # to_body is an alias to to_hash (backward compatibility)
250
+ # @return [Hash] Returns the object in the form of hash
251
+ def to_body
252
+ to_hash
253
+ end
254
+
255
+ # Returns the object in the form of hash
256
+ # @return [Hash] Returns the object in the form of hash
257
+ def to_hash
258
+ hash = {}
259
+ self.class.attribute_map.each_pair do |attr, param|
260
+ value = self.send(attr)
261
+ if value.nil?
262
+ is_nullable = self.class.openapi_nullable.include?(attr)
263
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
264
+ end
265
+
266
+ hash[param] = _to_hash(value)
267
+ end
268
+ hash
269
+ end
270
+
271
+ # Outputs non-array value in the form of hash
272
+ # For object, use to_hash. Otherwise, just return the value
273
+ # @param [Object] value Any valid value
274
+ # @return [Hash] Returns the value in the form of hash
275
+ def _to_hash(value)
276
+ if value.is_a?(Array)
277
+ value.compact.map { |v| _to_hash(v) }
278
+ elsif value.is_a?(Hash)
279
+ {}.tap do |hash|
280
+ value.each { |k, v| hash[k] = _to_hash(v) }
281
+ end
282
+ elsif value.respond_to? :to_hash
283
+ value.to_hash
284
+ else
285
+ value
286
+ end
287
+ end
288
+
289
+ end
290
+
291
+ end
@@ -0,0 +1,105 @@
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 'date'
14
+ require 'time'
15
+
16
+ module KlaviyoAPI
17
+ module ProfileLocationLatitude
18
+ class << self
19
+ # List of class defined in oneOf (OpenAPI v3)
20
+ def openapi_one_of
21
+ [
22
+ :'Float',
23
+ :'String'
24
+ ]
25
+ end
26
+
27
+ # Builds the object
28
+ # @param [Mixed] Data to be matched against the list of oneOf items
29
+ # @return [Object] Returns the model or the data itself
30
+ def build(data)
31
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
32
+ # Note:
33
+ # - We do not attempt to check whether exactly one item matches.
34
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
35
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
36
+ # - TODO: scalar values are de facto behaving as if they were nullable.
37
+ # - TODO: logging when debugging is set.
38
+ openapi_one_of.each do |klass|
39
+ begin
40
+ next if klass == :AnyType # "nullable: true"
41
+ typed_data = find_and_cast_into_type(klass, data)
42
+ return typed_data if typed_data
43
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
44
+ end
45
+ end
46
+
47
+ openapi_one_of.include?(:AnyType) ? data : nil
48
+ end
49
+
50
+ private
51
+
52
+ SchemaMismatchError = Class.new(StandardError)
53
+
54
+ # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
55
+ def find_and_cast_into_type(klass, data)
56
+ return if data.nil?
57
+
58
+ case klass.to_s
59
+ when 'Boolean'
60
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
61
+ when 'Float'
62
+ return data if data.instance_of?(Float)
63
+ when 'Integer'
64
+ return data if data.instance_of?(Integer)
65
+ when 'Time'
66
+ return Time.parse(data)
67
+ when 'Date'
68
+ return Date.parse(data)
69
+ when 'String'
70
+ return data if data.instance_of?(String)
71
+ when 'Object' # "type: object"
72
+ return data if data.instance_of?(Hash)
73
+ when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
74
+ if data.instance_of?(Array)
75
+ sub_type = Regexp.last_match[:sub_type]
76
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
77
+ end
78
+ when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
79
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
80
+ sub_type = Regexp.last_match[:sub_type]
81
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
82
+ end
83
+ else # model
84
+ const = KlaviyoAPI.const_get(klass)
85
+ if const
86
+ if const.respond_to?(:openapi_one_of) # nested oneOf model
87
+ model = const.build(data)
88
+ return model if model
89
+ else
90
+ # raise if data contains keys that are not known to the model
91
+ raise unless (data.keys - const.acceptable_attributes).empty?
92
+ model = const.build_from_hash(data)
93
+ return model if model && model.valid?
94
+ end
95
+ end
96
+ end
97
+
98
+ raise # if no match by now, raise
99
+ rescue
100
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
101
+ end
102
+ end
103
+ end
104
+
105
+ end