pinterest_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 (488) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +70 -0
  4. data/README.md +319 -0
  5. data/Rakefile +10 -0
  6. data/bin/bundle +114 -0
  7. data/bin/byebug +27 -0
  8. data/bin/coderay +27 -0
  9. data/bin/htmldiff +27 -0
  10. data/bin/ldiff +27 -0
  11. data/bin/pry +27 -0
  12. data/bin/rake +27 -0
  13. data/bin/rspec +27 -0
  14. data/bin/rubocop +27 -0
  15. data/bin/ruby-parse +27 -0
  16. data/bin/ruby-rewrite +27 -0
  17. data/docs/Account.md +24 -0
  18. data/docs/ActionType.md +15 -0
  19. data/docs/AdAccount.md +26 -0
  20. data/docs/AdAccountOwner.md +18 -0
  21. data/docs/AdAccountsApi.md +929 -0
  22. data/docs/AdGroupResponse.md +62 -0
  23. data/docs/AdGroupResponseAllOf.md +48 -0
  24. data/docs/AdGroupResponseAllOf1.md +30 -0
  25. data/docs/AdGroupSummaryStatus.md +15 -0
  26. data/docs/AdResponse.md +70 -0
  27. data/docs/AdResponseAllOf.md +48 -0
  28. data/docs/AdResponseAllOf1.md +38 -0
  29. data/docs/AdsAnalyticsCreateAsyncRequest.md +62 -0
  30. data/docs/AdsAnalyticsCreateAsyncRequestAllOf.md +32 -0
  31. data/docs/AdsAnalyticsCreateAsyncRequestAllOf1.md +22 -0
  32. data/docs/AdsAnalyticsCreateAsyncResponse.md +22 -0
  33. data/docs/AdsAnalyticsFilterColumn.md +15 -0
  34. data/docs/AdsAnalyticsFilterOperator.md +15 -0
  35. data/docs/AdsAnalyticsGetAsyncResponse.md +22 -0
  36. data/docs/AdsAnalyticsMetricsFilter.md +22 -0
  37. data/docs/AdsAnalyticsTargetingType.md +15 -0
  38. data/docs/AnalyticsMetricsResponse.md +20 -0
  39. data/docs/AnalyticsMetricsResponseDailyMetrics.md +22 -0
  40. data/docs/AvailabilityFilter.md +18 -0
  41. data/docs/BatchOperation.md +15 -0
  42. data/docs/BatchOperationStatus.md +15 -0
  43. data/docs/Board.md +26 -0
  44. data/docs/BoardOwner.md +18 -0
  45. data/docs/BoardSection.md +20 -0
  46. data/docs/BoardUpdate.md +22 -0
  47. data/docs/BoardsApi.md +811 -0
  48. data/docs/BrandFilter.md +18 -0
  49. data/docs/CampaignCommon.md +34 -0
  50. data/docs/CampaignResponse.md +44 -0
  51. data/docs/CampaignResponseAllOf.md +18 -0
  52. data/docs/CampaignResponseAllOf1.md +24 -0
  53. data/docs/CampaignSummaryStatus.md +15 -0
  54. data/docs/CatalogsApi.md +939 -0
  55. data/docs/CatalogsDbItem.md +22 -0
  56. data/docs/CatalogsFeed.md +42 -0
  57. data/docs/CatalogsFeedCredentials.md +20 -0
  58. data/docs/CatalogsFeedIngestionDetails.md +20 -0
  59. data/docs/CatalogsFeedIngestionErrors.md +26 -0
  60. data/docs/CatalogsFeedIngestionInfo.md +22 -0
  61. data/docs/CatalogsFeedProcessingResult.md +30 -0
  62. data/docs/CatalogsFeedProcessingResultFields.md +24 -0
  63. data/docs/CatalogsFeedProcessingSchedule.md +20 -0
  64. data/docs/CatalogsFeedProcessingStatus.md +15 -0
  65. data/docs/CatalogsFeedProductCounts.md +18 -0
  66. data/docs/CatalogsFeedValidationDetails.md +20 -0
  67. data/docs/CatalogsFeedValidationErrors.md +84 -0
  68. data/docs/CatalogsFeedValidationWarnings.md +106 -0
  69. data/docs/CatalogsFeedsCreateRequest.md +34 -0
  70. data/docs/CatalogsFeedsUpdateRequest.md +32 -0
  71. data/docs/CatalogsFormat.md +15 -0
  72. data/docs/CatalogsItems.md +18 -0
  73. data/docs/CatalogsItemsBatch.md +26 -0
  74. data/docs/CatalogsItemsBatchRequest.md +24 -0
  75. data/docs/CatalogsProductGroup.md +34 -0
  76. data/docs/CatalogsProductGroupCreateRequest.md +24 -0
  77. data/docs/CatalogsProductGroupCurrencyCriteria.md +20 -0
  78. data/docs/CatalogsProductGroupFilterKeys.md +68 -0
  79. data/docs/CatalogsProductGroupFilters.md +20 -0
  80. data/docs/CatalogsProductGroupFiltersAllOf.md +18 -0
  81. data/docs/CatalogsProductGroupFiltersAnyOf.md +18 -0
  82. data/docs/CatalogsProductGroupMultipleStringCriteria.md +20 -0
  83. data/docs/CatalogsProductGroupMultipleStringListCriteria.md +20 -0
  84. data/docs/CatalogsProductGroupPricingCriteria.md +22 -0
  85. data/docs/CatalogsProductGroupStatus.md +15 -0
  86. data/docs/CatalogsProductGroupType.md +15 -0
  87. data/docs/CatalogsProductGroupUpdateRequest.md +24 -0
  88. data/docs/CatalogsStatus.md +15 -0
  89. data/docs/ConditionFilter.md +18 -0
  90. data/docs/ConversionAttributionWindowDays.md +15 -0
  91. data/docs/ConversionReportAttributionType.md +15 -0
  92. data/docs/ConversionReportTimeType.md +15 -0
  93. data/docs/Country.md +15 -0
  94. data/docs/Currency.md +15 -0
  95. data/docs/CurrencyFilter.md +18 -0
  96. data/docs/CustomLabel0Filter.md +18 -0
  97. data/docs/CustomLabel1Filter.md +18 -0
  98. data/docs/CustomLabel2Filter.md +18 -0
  99. data/docs/CustomLabel3Filter.md +18 -0
  100. data/docs/CustomLabel4Filter.md +18 -0
  101. data/docs/DataOutputFormat.md +15 -0
  102. data/docs/EntityStatus.md +15 -0
  103. data/docs/Error.md +20 -0
  104. data/docs/FeedFields.md +36 -0
  105. data/docs/GenderFilter.md +18 -0
  106. data/docs/GoogleProductCategory0Filter.md +18 -0
  107. data/docs/GoogleProductCategory1Filter.md +18 -0
  108. data/docs/GoogleProductCategory2Filter.md +18 -0
  109. data/docs/GoogleProductCategory3Filter.md +18 -0
  110. data/docs/GoogleProductCategory4Filter.md +18 -0
  111. data/docs/GoogleProductCategory5Filter.md +18 -0
  112. data/docs/GoogleProductCategory6Filter.md +18 -0
  113. data/docs/Granularity.md +15 -0
  114. data/docs/ImageDetails.md +22 -0
  115. data/docs/ItemAttributes.md +104 -0
  116. data/docs/ItemBatchRecord.md +20 -0
  117. data/docs/ItemGroupIdFilter.md +18 -0
  118. data/docs/ItemIdFilter.md +18 -0
  119. data/docs/ItemProcessingRecord.md +24 -0
  120. data/docs/ItemProcessingStatus.md +15 -0
  121. data/docs/ItemValidationEvent.md +22 -0
  122. data/docs/Language.md +15 -0
  123. data/docs/MaxPriceFilter.md +18 -0
  124. data/docs/MediaApi.md +221 -0
  125. data/docs/MediaUpload.md +24 -0
  126. data/docs/MediaUploadAllOf.md +24 -0
  127. data/docs/MediaUploadAllOfUploadParameters.md +32 -0
  128. data/docs/MediaUploadDetails.md +22 -0
  129. data/docs/MediaUploadRequest.md +18 -0
  130. data/docs/MediaUploadStatus.md +15 -0
  131. data/docs/MediaUploadType.md +15 -0
  132. data/docs/MetricsReportingLevel.md +15 -0
  133. data/docs/MinPriceFilter.md +18 -0
  134. data/docs/NonNullableCatalogsCurrency.md +15 -0
  135. data/docs/NullableCurrency.md +15 -0
  136. data/docs/OauthAccessTokenRequest.md +18 -0
  137. data/docs/OauthAccessTokenRequestCode.md +20 -0
  138. data/docs/OauthAccessTokenRequestCodeAllOf.md +20 -0
  139. data/docs/OauthAccessTokenRequestRefresh.md +20 -0
  140. data/docs/OauthAccessTokenRequestRefreshAllOf.md +20 -0
  141. data/docs/OauthAccessTokenResponse.md +26 -0
  142. data/docs/OauthAccessTokenResponseCode.md +20 -0
  143. data/docs/OauthAccessTokenResponseCodeAllOf.md +20 -0
  144. data/docs/OauthAccessTokenResponseRefresh.md +15 -0
  145. data/docs/OauthApi.md +72 -0
  146. data/docs/ObjectiveType.md +15 -0
  147. data/docs/PacingDeliveryType.md +15 -0
  148. data/docs/Paginated.md +20 -0
  149. data/docs/Pin.md +38 -0
  150. data/docs/PinMedia.md +18 -0
  151. data/docs/PinMediaSource.md +81 -0
  152. data/docs/PinMediaSourceImageBase64.md +22 -0
  153. data/docs/PinMediaSourceImageURL.md +20 -0
  154. data/docs/PinMediaSourceVideoID.md +22 -0
  155. data/docs/PinMediaWithImage.md +18 -0
  156. data/docs/PinMediaWithImageAllOf.md +18 -0
  157. data/docs/PinPromotionSummaryStatus.md +15 -0
  158. data/docs/PinsApi.md +304 -0
  159. data/docs/PlacementGroupType.md +15 -0
  160. data/docs/ProductAvailabilityType.md +15 -0
  161. data/docs/ProductGroupSummaryStatus.md +15 -0
  162. data/docs/ProductType0Filter.md +18 -0
  163. data/docs/ProductType1Filter.md +18 -0
  164. data/docs/ProductType2Filter.md +18 -0
  165. data/docs/ProductType3Filter.md +18 -0
  166. data/docs/ProductType4Filter.md +18 -0
  167. data/docs/ReportingColumnAsync.md +15 -0
  168. data/docs/TargetingTypeFilter.md +18 -0
  169. data/docs/TrackingUrls.md +26 -0
  170. data/docs/UserAccountApi.md +165 -0
  171. data/git_push.sh +57 -0
  172. data/lib/pinterest_sdk/api/ad_accounts_api.rb +1287 -0
  173. data/lib/pinterest_sdk/api/boards_api.rb +888 -0
  174. data/lib/pinterest_sdk/api/catalogs_api.rb +965 -0
  175. data/lib/pinterest_sdk/api/media_api.rb +229 -0
  176. data/lib/pinterest_sdk/api/oauth_api.rb +96 -0
  177. data/lib/pinterest_sdk/api/pins_api.rb +330 -0
  178. data/lib/pinterest_sdk/api/user_account_api.rb +201 -0
  179. data/lib/pinterest_sdk/api_client.rb +390 -0
  180. data/lib/pinterest_sdk/api_error.rb +57 -0
  181. data/lib/pinterest_sdk/configuration.rb +285 -0
  182. data/lib/pinterest_sdk/models/account.rb +280 -0
  183. data/lib/pinterest_sdk/models/action_type.rb +39 -0
  184. data/lib/pinterest_sdk/models/ad_account.rb +254 -0
  185. data/lib/pinterest_sdk/models/ad_account_owner.rb +219 -0
  186. data/lib/pinterest_sdk/models/ad_group_response.rb +555 -0
  187. data/lib/pinterest_sdk/models/ad_group_response_all_of.rb +427 -0
  188. data/lib/pinterest_sdk/models/ad_group_response_all_of1.rb +329 -0
  189. data/lib/pinterest_sdk/models/ad_group_summary_status.rb +41 -0
  190. data/lib/pinterest_sdk/models/ad_response.rb +640 -0
  191. data/lib/pinterest_sdk/models/ad_response_all_of.rb +455 -0
  192. data/lib/pinterest_sdk/models/ad_response_all_of1.rb +409 -0
  193. data/lib/pinterest_sdk/models/ads_analytics_create_async_request.rb +831 -0
  194. data/lib/pinterest_sdk/models/ads_analytics_create_async_request_all_of.rb +356 -0
  195. data/lib/pinterest_sdk/models/ads_analytics_create_async_request_all_of1.rb +253 -0
  196. data/lib/pinterest_sdk/models/ads_analytics_create_async_response.rb +237 -0
  197. data/lib/pinterest_sdk/models/ads_analytics_filter_column.rb +37 -0
  198. data/lib/pinterest_sdk/models/ads_analytics_filter_operator.rb +37 -0
  199. data/lib/pinterest_sdk/models/ads_analytics_get_async_response.rb +238 -0
  200. data/lib/pinterest_sdk/models/ads_analytics_metrics_filter.rb +254 -0
  201. data/lib/pinterest_sdk/models/ads_analytics_targeting_type.rb +48 -0
  202. data/lib/pinterest_sdk/models/analytics_metrics_response.rb +233 -0
  203. data/lib/pinterest_sdk/models/analytics_metrics_response_daily_metrics.rb +275 -0
  204. data/lib/pinterest_sdk/models/availability_filter.rb +223 -0
  205. data/lib/pinterest_sdk/models/batch_operation.rb +38 -0
  206. data/lib/pinterest_sdk/models/batch_operation_status.rb +37 -0
  207. data/lib/pinterest_sdk/models/board.rb +301 -0
  208. data/lib/pinterest_sdk/models/board_owner.rb +218 -0
  209. data/lib/pinterest_sdk/models/board_section.rb +252 -0
  210. data/lib/pinterest_sdk/models/board_update.rb +272 -0
  211. data/lib/pinterest_sdk/models/brand_filter.rb +223 -0
  212. data/lib/pinterest_sdk/models/campaign_common.rb +352 -0
  213. data/lib/pinterest_sdk/models/campaign_response.rb +435 -0
  214. data/lib/pinterest_sdk/models/campaign_response_all_of.rb +245 -0
  215. data/lib/pinterest_sdk/models/campaign_response_all_of1.rb +248 -0
  216. data/lib/pinterest_sdk/models/campaign_summary_status.rb +41 -0
  217. data/lib/pinterest_sdk/models/catalogs_db_item.rb +236 -0
  218. data/lib/pinterest_sdk/models/catalogs_feed.rb +368 -0
  219. data/lib/pinterest_sdk/models/catalogs_feed_credentials.rb +240 -0
  220. data/lib/pinterest_sdk/models/catalogs_feed_ingestion_details.rb +237 -0
  221. data/lib/pinterest_sdk/models/catalogs_feed_ingestion_errors.rb +288 -0
  222. data/lib/pinterest_sdk/models/catalogs_feed_ingestion_info.rb +236 -0
  223. data/lib/pinterest_sdk/models/catalogs_feed_processing_result.rb +296 -0
  224. data/lib/pinterest_sdk/models/catalogs_feed_processing_result_fields.rb +261 -0
  225. data/lib/pinterest_sdk/models/catalogs_feed_processing_schedule.rb +291 -0
  226. data/lib/pinterest_sdk/models/catalogs_feed_processing_status.rb +43 -0
  227. data/lib/pinterest_sdk/models/catalogs_feed_product_counts.rb +220 -0
  228. data/lib/pinterest_sdk/models/catalogs_feed_validation_details.rb +237 -0
  229. data/lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb +515 -0
  230. data/lib/pinterest_sdk/models/catalogs_feed_validation_warnings.rb +614 -0
  231. data/lib/pinterest_sdk/models/catalogs_feeds_create_request.rb +313 -0
  232. data/lib/pinterest_sdk/models/catalogs_feeds_update_request.rb +288 -0
  233. data/lib/pinterest_sdk/models/catalogs_format.rb +38 -0
  234. data/lib/pinterest_sdk/models/catalogs_items.rb +222 -0
  235. data/lib/pinterest_sdk/models/catalogs_items_batch.rb +262 -0
  236. data/lib/pinterest_sdk/models/catalogs_items_batch_request.rb +249 -0
  237. data/lib/pinterest_sdk/models/catalogs_product_group.rb +345 -0
  238. data/lib/pinterest_sdk/models/catalogs_product_group_create_request.rb +284 -0
  239. data/lib/pinterest_sdk/models/catalogs_product_group_currency_criteria.rb +237 -0
  240. data/lib/pinterest_sdk/models/catalogs_product_group_filter_keys.rb +617 -0
  241. data/lib/pinterest_sdk/models/catalogs_product_group_filters.rb +252 -0
  242. data/lib/pinterest_sdk/models/catalogs_product_group_filters_all_of.rb +220 -0
  243. data/lib/pinterest_sdk/models/catalogs_product_group_filters_any_of.rb +220 -0
  244. data/lib/pinterest_sdk/models/catalogs_product_group_multiple_string_criteria.rb +239 -0
  245. data/lib/pinterest_sdk/models/catalogs_product_group_multiple_string_list_criteria.rb +239 -0
  246. data/lib/pinterest_sdk/models/catalogs_product_group_pricing_criteria.rb +251 -0
  247. data/lib/pinterest_sdk/models/catalogs_product_group_status.rb +37 -0
  248. data/lib/pinterest_sdk/models/catalogs_product_group_type.rb +42 -0
  249. data/lib/pinterest_sdk/models/catalogs_product_group_update_request.rb +284 -0
  250. data/lib/pinterest_sdk/models/catalogs_status.rb +37 -0
  251. data/lib/pinterest_sdk/models/condition_filter.rb +223 -0
  252. data/lib/pinterest_sdk/models/conversion_attribution_window_days.rb +39 -0
  253. data/lib/pinterest_sdk/models/conversion_report_attribution_type.rb +37 -0
  254. data/lib/pinterest_sdk/models/conversion_report_time_type.rb +37 -0
  255. data/lib/pinterest_sdk/models/country.rb +282 -0
  256. data/lib/pinterest_sdk/models/currency.rb +60 -0
  257. data/lib/pinterest_sdk/models/currency_filter.rb +223 -0
  258. data/lib/pinterest_sdk/models/custom_label0_filter.rb +223 -0
  259. data/lib/pinterest_sdk/models/custom_label1_filter.rb +223 -0
  260. data/lib/pinterest_sdk/models/custom_label2_filter.rb +223 -0
  261. data/lib/pinterest_sdk/models/custom_label3_filter.rb +223 -0
  262. data/lib/pinterest_sdk/models/custom_label4_filter.rb +223 -0
  263. data/lib/pinterest_sdk/models/data_output_format.rb +37 -0
  264. data/lib/pinterest_sdk/models/entity_status.rb +38 -0
  265. data/lib/pinterest_sdk/models/error.rb +237 -0
  266. data/lib/pinterest_sdk/models/feed_fields.rb +332 -0
  267. data/lib/pinterest_sdk/models/gender_filter.rb +223 -0
  268. data/lib/pinterest_sdk/models/google_product_category0_filter.rb +223 -0
  269. data/lib/pinterest_sdk/models/google_product_category1_filter.rb +223 -0
  270. data/lib/pinterest_sdk/models/google_product_category2_filter.rb +223 -0
  271. data/lib/pinterest_sdk/models/google_product_category3_filter.rb +223 -0
  272. data/lib/pinterest_sdk/models/google_product_category4_filter.rb +223 -0
  273. data/lib/pinterest_sdk/models/google_product_category5_filter.rb +223 -0
  274. data/lib/pinterest_sdk/models/google_product_category6_filter.rb +223 -0
  275. data/lib/pinterest_sdk/models/granularity.rb +40 -0
  276. data/lib/pinterest_sdk/models/image_details.rb +281 -0
  277. data/lib/pinterest_sdk/models/item_attributes.rb +833 -0
  278. data/lib/pinterest_sdk/models/item_batch_record.rb +229 -0
  279. data/lib/pinterest_sdk/models/item_group_id_filter.rb +223 -0
  280. data/lib/pinterest_sdk/models/item_id_filter.rb +223 -0
  281. data/lib/pinterest_sdk/models/item_processing_record.rb +253 -0
  282. data/lib/pinterest_sdk/models/item_processing_status.rb +38 -0
  283. data/lib/pinterest_sdk/models/item_validation_event.rb +240 -0
  284. data/lib/pinterest_sdk/models/language.rb +96 -0
  285. data/lib/pinterest_sdk/models/max_price_filter.rb +223 -0
  286. data/lib/pinterest_sdk/models/media_upload.rb +255 -0
  287. data/lib/pinterest_sdk/models/media_upload_all_of.rb +247 -0
  288. data/lib/pinterest_sdk/models/media_upload_all_of_upload_parameters.rb +282 -0
  289. data/lib/pinterest_sdk/models/media_upload_details.rb +254 -0
  290. data/lib/pinterest_sdk/models/media_upload_request.rb +224 -0
  291. data/lib/pinterest_sdk/models/media_upload_status.rb +39 -0
  292. data/lib/pinterest_sdk/models/media_upload_type.rb +36 -0
  293. data/lib/pinterest_sdk/models/metrics_reporting_level.rb +47 -0
  294. data/lib/pinterest_sdk/models/min_price_filter.rb +223 -0
  295. data/lib/pinterest_sdk/models/non_nullable_catalogs_currency.rb +198 -0
  296. data/lib/pinterest_sdk/models/nullable_currency.rb +199 -0
  297. data/lib/pinterest_sdk/models/oauth_access_token_request_code.rb +272 -0
  298. data/lib/pinterest_sdk/models/oauth_access_token_request_code_all_of.rb +237 -0
  299. data/lib/pinterest_sdk/models/oauth_access_token_request_refresh.rb +267 -0
  300. data/lib/pinterest_sdk/models/oauth_access_token_request_refresh_all_of.rb +232 -0
  301. data/lib/pinterest_sdk/models/oauth_access_token_response.rb +316 -0
  302. data/lib/pinterest_sdk/models/oauth_access_token_response_code.rb +272 -0
  303. data/lib/pinterest_sdk/models/oauth_access_token_response_code_all_of.rb +237 -0
  304. data/lib/pinterest_sdk/models/oauth_access_token_response_refresh.rb +243 -0
  305. data/lib/pinterest_sdk/models/objective_type.rb +43 -0
  306. data/lib/pinterest_sdk/models/pacing_delivery_type.rb +37 -0
  307. data/lib/pinterest_sdk/models/paginated.rb +235 -0
  308. data/lib/pinterest_sdk/models/pin.rb +359 -0
  309. data/lib/pinterest_sdk/models/pin_media.rb +224 -0
  310. data/lib/pinterest_sdk/models/pin_media_source.rb +58 -0
  311. data/lib/pinterest_sdk/models/pin_media_source_image_base64.rb +319 -0
  312. data/lib/pinterest_sdk/models/pin_media_source_image_url.rb +272 -0
  313. data/lib/pinterest_sdk/models/pin_media_source_video_id.rb +307 -0
  314. data/lib/pinterest_sdk/models/pin_media_with_image.rb +233 -0
  315. data/lib/pinterest_sdk/models/pin_media_with_image_all_of.rb +220 -0
  316. data/lib/pinterest_sdk/models/pin_promotion_summary_status.rb +41 -0
  317. data/lib/pinterest_sdk/models/placement_group_type.rb +39 -0
  318. data/lib/pinterest_sdk/models/product_availability_type.rb +39 -0
  319. data/lib/pinterest_sdk/models/product_group_summary_status.rb +39 -0
  320. data/lib/pinterest_sdk/models/product_type0_filter.rb +223 -0
  321. data/lib/pinterest_sdk/models/product_type1_filter.rb +223 -0
  322. data/lib/pinterest_sdk/models/product_type2_filter.rb +223 -0
  323. data/lib/pinterest_sdk/models/product_type3_filter.rb +223 -0
  324. data/lib/pinterest_sdk/models/product_type4_filter.rb +223 -0
  325. data/lib/pinterest_sdk/models/reporting_column_async.rb +549 -0
  326. data/lib/pinterest_sdk/models/targeting_type_filter.rb +245 -0
  327. data/lib/pinterest_sdk/models/tracking_urls.rb +340 -0
  328. data/lib/pinterest_sdk/version.rb +15 -0
  329. data/lib/pinterest_sdk.rb +192 -0
  330. data/pinterest_sdk.gemspec +38 -0
  331. data/spec/api/ad_accounts_api_spec.rb +234 -0
  332. data/spec/api/boards_api_spec.rb +181 -0
  333. data/spec/api/catalogs_api_spec.rb +200 -0
  334. data/spec/api/media_api_spec.rb +72 -0
  335. data/spec/api/oauth_api_spec.rb +47 -0
  336. data/spec/api/pins_api_spec.rb +90 -0
  337. data/spec/api/user_account_api_spec.rb +66 -0
  338. data/spec/api_client_spec.rb +226 -0
  339. data/spec/configuration_spec.rb +42 -0
  340. data/spec/models/account_spec.rb +56 -0
  341. data/spec/models/action_type_spec.rb +28 -0
  342. data/spec/models/ad_account_owner_spec.rb +34 -0
  343. data/spec/models/ad_account_spec.rb +58 -0
  344. data/spec/models/ad_group_response_all_of1_spec.rb +70 -0
  345. data/spec/models/ad_group_response_all_of_spec.rb +132 -0
  346. data/spec/models/ad_group_response_spec.rb +174 -0
  347. data/spec/models/ad_group_summary_status_spec.rb +28 -0
  348. data/spec/models/ad_response_all_of1_spec.rb +102 -0
  349. data/spec/models/ad_response_all_of_spec.rb +128 -0
  350. data/spec/models/ad_response_spec.rb +202 -0
  351. data/spec/models/ads_analytics_create_async_request_all_of1_spec.rb +46 -0
  352. data/spec/models/ads_analytics_create_async_request_all_of_spec.rb +76 -0
  353. data/spec/models/ads_analytics_create_async_request_spec.rb +166 -0
  354. data/spec/models/ads_analytics_create_async_response_spec.rb +46 -0
  355. data/spec/models/ads_analytics_filter_column_spec.rb +28 -0
  356. data/spec/models/ads_analytics_filter_operator_spec.rb +28 -0
  357. data/spec/models/ads_analytics_get_async_response_spec.rb +46 -0
  358. data/spec/models/ads_analytics_metrics_filter_spec.rb +46 -0
  359. data/spec/models/ads_analytics_targeting_type_spec.rb +28 -0
  360. data/spec/models/analytics_metrics_response_daily_metrics_spec.rb +50 -0
  361. data/spec/models/analytics_metrics_response_spec.rb +40 -0
  362. data/spec/models/availability_filter_spec.rb +34 -0
  363. data/spec/models/batch_operation_spec.rb +28 -0
  364. data/spec/models/batch_operation_status_spec.rb +28 -0
  365. data/spec/models/board_owner_spec.rb +34 -0
  366. data/spec/models/board_section_spec.rb +40 -0
  367. data/spec/models/board_spec.rb +62 -0
  368. data/spec/models/board_update_spec.rb +50 -0
  369. data/spec/models/brand_filter_spec.rb +34 -0
  370. data/spec/models/campaign_common_spec.rb +82 -0
  371. data/spec/models/campaign_response_all_of1_spec.rb +52 -0
  372. data/spec/models/campaign_response_all_of_spec.rb +34 -0
  373. data/spec/models/campaign_response_spec.rb +112 -0
  374. data/spec/models/campaign_summary_status_spec.rb +28 -0
  375. data/spec/models/catalogs_db_item_spec.rb +46 -0
  376. data/spec/models/catalogs_feed_credentials_spec.rb +40 -0
  377. data/spec/models/catalogs_feed_ingestion_details_spec.rb +40 -0
  378. data/spec/models/catalogs_feed_ingestion_errors_spec.rb +62 -0
  379. data/spec/models/catalogs_feed_ingestion_info_spec.rb +46 -0
  380. data/spec/models/catalogs_feed_processing_result_fields_spec.rb +52 -0
  381. data/spec/models/catalogs_feed_processing_result_spec.rb +70 -0
  382. data/spec/models/catalogs_feed_processing_schedule_spec.rb +44 -0
  383. data/spec/models/catalogs_feed_processing_status_spec.rb +28 -0
  384. data/spec/models/catalogs_feed_product_counts_spec.rb +34 -0
  385. data/spec/models/catalogs_feed_spec.rb +106 -0
  386. data/spec/models/catalogs_feed_validation_details_spec.rb +40 -0
  387. data/spec/models/catalogs_feed_validation_errors_spec.rb +232 -0
  388. data/spec/models/catalogs_feed_validation_warnings_spec.rb +298 -0
  389. data/spec/models/catalogs_feeds_create_request_spec.rb +82 -0
  390. data/spec/models/catalogs_feeds_update_request_spec.rb +76 -0
  391. data/spec/models/catalogs_format_spec.rb +28 -0
  392. data/spec/models/catalogs_items_batch_request_spec.rb +52 -0
  393. data/spec/models/catalogs_items_batch_spec.rb +58 -0
  394. data/spec/models/catalogs_items_spec.rb +34 -0
  395. data/spec/models/catalogs_product_group_create_request_spec.rb +52 -0
  396. data/spec/models/catalogs_product_group_currency_criteria_spec.rb +40 -0
  397. data/spec/models/catalogs_product_group_filter_keys_spec.rb +184 -0
  398. data/spec/models/catalogs_product_group_filters_all_of_spec.rb +34 -0
  399. data/spec/models/catalogs_product_group_filters_any_of_spec.rb +34 -0
  400. data/spec/models/catalogs_product_group_filters_spec.rb +40 -0
  401. data/spec/models/catalogs_product_group_multiple_string_criteria_spec.rb +40 -0
  402. data/spec/models/catalogs_product_group_multiple_string_list_criteria_spec.rb +40 -0
  403. data/spec/models/catalogs_product_group_pricing_criteria_spec.rb +46 -0
  404. data/spec/models/catalogs_product_group_spec.rb +82 -0
  405. data/spec/models/catalogs_product_group_status_spec.rb +28 -0
  406. data/spec/models/catalogs_product_group_type_spec.rb +28 -0
  407. data/spec/models/catalogs_product_group_update_request_spec.rb +52 -0
  408. data/spec/models/catalogs_status_spec.rb +28 -0
  409. data/spec/models/condition_filter_spec.rb +34 -0
  410. data/spec/models/conversion_attribution_window_days_spec.rb +28 -0
  411. data/spec/models/conversion_report_attribution_type_spec.rb +28 -0
  412. data/spec/models/conversion_report_time_type_spec.rb +28 -0
  413. data/spec/models/country_spec.rb +28 -0
  414. data/spec/models/currency_filter_spec.rb +34 -0
  415. data/spec/models/currency_spec.rb +28 -0
  416. data/spec/models/custom_label0_filter_spec.rb +34 -0
  417. data/spec/models/custom_label1_filter_spec.rb +34 -0
  418. data/spec/models/custom_label2_filter_spec.rb +34 -0
  419. data/spec/models/custom_label3_filter_spec.rb +34 -0
  420. data/spec/models/custom_label4_filter_spec.rb +34 -0
  421. data/spec/models/data_output_format_spec.rb +28 -0
  422. data/spec/models/entity_status_spec.rb +28 -0
  423. data/spec/models/error_spec.rb +40 -0
  424. data/spec/models/feed_fields_spec.rb +88 -0
  425. data/spec/models/gender_filter_spec.rb +34 -0
  426. data/spec/models/google_product_category0_filter_spec.rb +34 -0
  427. data/spec/models/google_product_category1_filter_spec.rb +34 -0
  428. data/spec/models/google_product_category2_filter_spec.rb +34 -0
  429. data/spec/models/google_product_category3_filter_spec.rb +34 -0
  430. data/spec/models/google_product_category4_filter_spec.rb +34 -0
  431. data/spec/models/google_product_category5_filter_spec.rb +34 -0
  432. data/spec/models/google_product_category6_filter_spec.rb +34 -0
  433. data/spec/models/granularity_spec.rb +28 -0
  434. data/spec/models/image_details_spec.rb +46 -0
  435. data/spec/models/item_attributes_spec.rb +292 -0
  436. data/spec/models/item_batch_record_spec.rb +40 -0
  437. data/spec/models/item_group_id_filter_spec.rb +34 -0
  438. data/spec/models/item_id_filter_spec.rb +34 -0
  439. data/spec/models/item_processing_record_spec.rb +52 -0
  440. data/spec/models/item_processing_status_spec.rb +28 -0
  441. data/spec/models/item_validation_event_spec.rb +46 -0
  442. data/spec/models/language_spec.rb +28 -0
  443. data/spec/models/max_price_filter_spec.rb +34 -0
  444. data/spec/models/media_upload_all_of_spec.rb +52 -0
  445. data/spec/models/media_upload_all_of_upload_parameters_spec.rb +76 -0
  446. data/spec/models/media_upload_details_spec.rb +46 -0
  447. data/spec/models/media_upload_request_spec.rb +34 -0
  448. data/spec/models/media_upload_spec.rb +52 -0
  449. data/spec/models/media_upload_status_spec.rb +28 -0
  450. data/spec/models/media_upload_type_spec.rb +28 -0
  451. data/spec/models/metrics_reporting_level_spec.rb +28 -0
  452. data/spec/models/min_price_filter_spec.rb +34 -0
  453. data/spec/models/non_nullable_catalogs_currency_spec.rb +28 -0
  454. data/spec/models/nullable_currency_spec.rb +28 -0
  455. data/spec/models/oauth_access_token_request_code_all_of_spec.rb +40 -0
  456. data/spec/models/oauth_access_token_request_code_spec.rb +40 -0
  457. data/spec/models/oauth_access_token_request_refresh_all_of_spec.rb +40 -0
  458. data/spec/models/oauth_access_token_request_refresh_spec.rb +40 -0
  459. data/spec/models/oauth_access_token_request_spec.rb +38 -0
  460. data/spec/models/oauth_access_token_response_code_all_of_spec.rb +40 -0
  461. data/spec/models/oauth_access_token_response_code_spec.rb +40 -0
  462. data/spec/models/oauth_access_token_response_refresh_spec.rb +28 -0
  463. data/spec/models/oauth_access_token_response_spec.rb +62 -0
  464. data/spec/models/objective_type_spec.rb +28 -0
  465. data/spec/models/pacing_delivery_type_spec.rb +28 -0
  466. data/spec/models/paginated_spec.rb +40 -0
  467. data/spec/models/pin_media_source_image_base64_spec.rb +54 -0
  468. data/spec/models/pin_media_source_image_url_spec.rb +44 -0
  469. data/spec/models/pin_media_source_spec.rb +43 -0
  470. data/spec/models/pin_media_source_video_id_spec.rb +50 -0
  471. data/spec/models/pin_media_spec.rb +34 -0
  472. data/spec/models/pin_media_with_image_all_of_spec.rb +34 -0
  473. data/spec/models/pin_media_with_image_spec.rb +34 -0
  474. data/spec/models/pin_promotion_summary_status_spec.rb +28 -0
  475. data/spec/models/pin_spec.rb +94 -0
  476. data/spec/models/placement_group_type_spec.rb +28 -0
  477. data/spec/models/product_availability_type_spec.rb +28 -0
  478. data/spec/models/product_group_summary_status_spec.rb +28 -0
  479. data/spec/models/product_type0_filter_spec.rb +34 -0
  480. data/spec/models/product_type1_filter_spec.rb +34 -0
  481. data/spec/models/product_type2_filter_spec.rb +34 -0
  482. data/spec/models/product_type3_filter_spec.rb +34 -0
  483. data/spec/models/product_type4_filter_spec.rb +34 -0
  484. data/spec/models/reporting_column_async_spec.rb +28 -0
  485. data/spec/models/targeting_type_filter_spec.rb +34 -0
  486. data/spec/models/tracking_urls_spec.rb +58 -0
  487. data/spec/spec_helper.rb +111 -0
  488. metadata +726 -0
@@ -0,0 +1,831 @@
1
+ =begin
2
+ #Pinterest REST API
3
+
4
+ #Pinterest's REST API
5
+
6
+ The version of the OpenAPI document: 5.3.0
7
+ Contact: pinterest-api@pinterest.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.4.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module PinterestSdkClient
17
+ class AdsAnalyticsCreateAsyncRequest
18
+ # Metric report start date (UTC). Format: YYYY-MM-DD
19
+ attr_accessor :start_date
20
+
21
+ # Metric report end date (UTC). Format: YYYY-MM-DD
22
+ attr_accessor :end_date
23
+
24
+ # TOTAL - metrics are aggregated over the specified date range.<br> DAY - metrics are broken down daily.<br> HOUR - metrics are broken down hourly.<br>WEEKLY - metrics are broken down weekly.<br>MONTHLY - metrics are broken down monthly
25
+ attr_accessor :granularity
26
+
27
+ # Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days.
28
+ attr_accessor :click_window_days
29
+
30
+ # Number of days to use as the conversion attribution window for an engagement action. Engagements include saves, closeups, link clicks, and carousel card swipes. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days.
31
+ attr_accessor :engagement_window_days
32
+
33
+ # Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day.
34
+ attr_accessor :view_window_days
35
+
36
+ # The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event.
37
+ attr_accessor :conversion_report_time
38
+
39
+ # List of types of attribution for the conversion report
40
+ attr_accessor :attribution_types
41
+
42
+ # Metric and entity columns
43
+ attr_accessor :columns
44
+
45
+ # Level of the report
46
+ attr_accessor :level
47
+
48
+ # Specification for formatting report data
49
+ attr_accessor :report_format
50
+
51
+ # List of campaign ids
52
+ attr_accessor :campaign_ids
53
+
54
+ # List of status values for filtering
55
+ attr_accessor :campaign_statuses
56
+
57
+ # List of values for filtering
58
+ attr_accessor :campaign_objective_types
59
+
60
+ # List of ad group ids
61
+ attr_accessor :ad_group_ids
62
+
63
+ # List of values for filtering
64
+ attr_accessor :ad_group_statuses
65
+
66
+ # List of ad ids
67
+ attr_accessor :ad_ids
68
+
69
+ # List of values for filtering
70
+ attr_accessor :ad_statuses
71
+
72
+ # List of product group ids
73
+ attr_accessor :product_group_ids
74
+
75
+ # List of values for filtering
76
+ attr_accessor :product_group_statuses
77
+
78
+ # List of product item ids
79
+ attr_accessor :product_item_ids
80
+
81
+ # List of targeting types
82
+ attr_accessor :targeting_types
83
+
84
+ # List of metrics filters
85
+ attr_accessor :metrics_filters
86
+
87
+ # Attribute mapping from ruby-style variable name to JSON key.
88
+ def self.attribute_map
89
+ {
90
+ :'start_date' => :'start_date',
91
+ :'end_date' => :'end_date',
92
+ :'granularity' => :'granularity',
93
+ :'click_window_days' => :'click_window_days',
94
+ :'engagement_window_days' => :'engagement_window_days',
95
+ :'view_window_days' => :'view_window_days',
96
+ :'conversion_report_time' => :'conversion_report_time',
97
+ :'attribution_types' => :'attribution_types',
98
+ :'columns' => :'columns',
99
+ :'level' => :'level',
100
+ :'report_format' => :'report_format',
101
+ :'campaign_ids' => :'campaign_ids',
102
+ :'campaign_statuses' => :'campaign_statuses',
103
+ :'campaign_objective_types' => :'campaign_objective_types',
104
+ :'ad_group_ids' => :'ad_group_ids',
105
+ :'ad_group_statuses' => :'ad_group_statuses',
106
+ :'ad_ids' => :'ad_ids',
107
+ :'ad_statuses' => :'ad_statuses',
108
+ :'product_group_ids' => :'product_group_ids',
109
+ :'product_group_statuses' => :'product_group_statuses',
110
+ :'product_item_ids' => :'product_item_ids',
111
+ :'targeting_types' => :'targeting_types',
112
+ :'metrics_filters' => :'metrics_filters'
113
+ }
114
+ end
115
+
116
+ # Returns all the JSON keys this model knows about
117
+ def self.acceptable_attributes
118
+ attribute_map.values
119
+ end
120
+
121
+ # Attribute type mapping.
122
+ def self.openapi_types
123
+ {
124
+ :'start_date' => :'String',
125
+ :'end_date' => :'String',
126
+ :'granularity' => :'Granularity',
127
+ :'click_window_days' => :'ConversionAttributionWindowDays',
128
+ :'engagement_window_days' => :'ConversionAttributionWindowDays',
129
+ :'view_window_days' => :'ConversionAttributionWindowDays',
130
+ :'conversion_report_time' => :'ConversionReportTimeType',
131
+ :'attribution_types' => :'Array<ConversionReportAttributionType>',
132
+ :'columns' => :'Array<ReportingColumnAsync>',
133
+ :'level' => :'MetricsReportingLevel',
134
+ :'report_format' => :'DataOutputFormat',
135
+ :'campaign_ids' => :'Array<String>',
136
+ :'campaign_statuses' => :'Array<CampaignSummaryStatus>',
137
+ :'campaign_objective_types' => :'Array<ObjectiveType>',
138
+ :'ad_group_ids' => :'Array<String>',
139
+ :'ad_group_statuses' => :'Array<AdGroupSummaryStatus>',
140
+ :'ad_ids' => :'Array<String>',
141
+ :'ad_statuses' => :'Array<PinPromotionSummaryStatus>',
142
+ :'product_group_ids' => :'Array<String>',
143
+ :'product_group_statuses' => :'Array<ProductGroupSummaryStatus>',
144
+ :'product_item_ids' => :'Array<String>',
145
+ :'targeting_types' => :'Array<AdsAnalyticsTargetingType>',
146
+ :'metrics_filters' => :'Array<AdsAnalyticsMetricsFilter>'
147
+ }
148
+ end
149
+
150
+ # List of attributes with nullable: true
151
+ def self.openapi_nullable
152
+ Set.new([
153
+ ])
154
+ end
155
+
156
+ # List of class defined in allOf (OpenAPI v3)
157
+ def self.openapi_all_of
158
+ [
159
+ :'AdsAnalyticsCreateAsyncRequestAllOf',
160
+ :'AdsAnalyticsCreateAsyncRequestAllOf1'
161
+ ]
162
+ end
163
+
164
+ # Initializes the object
165
+ # @param [Hash] attributes Model attributes in the form of hash
166
+ def initialize(attributes = {})
167
+ if (!attributes.is_a?(Hash))
168
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PinterestSdkClient::AdsAnalyticsCreateAsyncRequest` initialize method"
169
+ end
170
+
171
+ # check to see if the attribute exists and convert string to symbol for hash key
172
+ attributes = attributes.each_with_object({}) { |(k, v), h|
173
+ if (!self.class.attribute_map.key?(k.to_sym))
174
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PinterestSdkClient::AdsAnalyticsCreateAsyncRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
175
+ end
176
+ h[k.to_sym] = v
177
+ }
178
+
179
+ if attributes.key?(:'start_date')
180
+ self.start_date = attributes[:'start_date']
181
+ end
182
+
183
+ if attributes.key?(:'end_date')
184
+ self.end_date = attributes[:'end_date']
185
+ end
186
+
187
+ if attributes.key?(:'granularity')
188
+ self.granularity = attributes[:'granularity']
189
+ end
190
+
191
+ if attributes.key?(:'click_window_days')
192
+ self.click_window_days = attributes[:'click_window_days']
193
+ else
194
+ self.click_window_days = 30
195
+ end
196
+
197
+ if attributes.key?(:'engagement_window_days')
198
+ self.engagement_window_days = attributes[:'engagement_window_days']
199
+ else
200
+ self.engagement_window_days = 30
201
+ end
202
+
203
+ if attributes.key?(:'view_window_days')
204
+ self.view_window_days = attributes[:'view_window_days']
205
+ else
206
+ self.view_window_days = 1
207
+ end
208
+
209
+ if attributes.key?(:'conversion_report_time')
210
+ self.conversion_report_time = attributes[:'conversion_report_time']
211
+ else
212
+ self.conversion_report_time = 'TIME_OF_AD_ACTION'
213
+ end
214
+
215
+ if attributes.key?(:'attribution_types')
216
+ if (value = attributes[:'attribution_types']).is_a?(Array)
217
+ self.attribution_types = value
218
+ end
219
+ end
220
+
221
+ if attributes.key?(:'columns')
222
+ if (value = attributes[:'columns']).is_a?(Array)
223
+ self.columns = value
224
+ end
225
+ end
226
+
227
+ if attributes.key?(:'level')
228
+ self.level = attributes[:'level']
229
+ end
230
+
231
+ if attributes.key?(:'report_format')
232
+ self.report_format = attributes[:'report_format']
233
+ else
234
+ self.report_format = 'JSON'
235
+ end
236
+
237
+ if attributes.key?(:'campaign_ids')
238
+ if (value = attributes[:'campaign_ids']).is_a?(Array)
239
+ self.campaign_ids = value
240
+ end
241
+ end
242
+
243
+ if attributes.key?(:'campaign_statuses')
244
+ if (value = attributes[:'campaign_statuses']).is_a?(Array)
245
+ self.campaign_statuses = value
246
+ end
247
+ end
248
+
249
+ if attributes.key?(:'campaign_objective_types')
250
+ if (value = attributes[:'campaign_objective_types']).is_a?(Array)
251
+ self.campaign_objective_types = value
252
+ end
253
+ end
254
+
255
+ if attributes.key?(:'ad_group_ids')
256
+ if (value = attributes[:'ad_group_ids']).is_a?(Array)
257
+ self.ad_group_ids = value
258
+ end
259
+ end
260
+
261
+ if attributes.key?(:'ad_group_statuses')
262
+ if (value = attributes[:'ad_group_statuses']).is_a?(Array)
263
+ self.ad_group_statuses = value
264
+ end
265
+ end
266
+
267
+ if attributes.key?(:'ad_ids')
268
+ if (value = attributes[:'ad_ids']).is_a?(Array)
269
+ self.ad_ids = value
270
+ end
271
+ end
272
+
273
+ if attributes.key?(:'ad_statuses')
274
+ if (value = attributes[:'ad_statuses']).is_a?(Array)
275
+ self.ad_statuses = value
276
+ end
277
+ end
278
+
279
+ if attributes.key?(:'product_group_ids')
280
+ if (value = attributes[:'product_group_ids']).is_a?(Array)
281
+ self.product_group_ids = value
282
+ end
283
+ end
284
+
285
+ if attributes.key?(:'product_group_statuses')
286
+ if (value = attributes[:'product_group_statuses']).is_a?(Array)
287
+ self.product_group_statuses = value
288
+ end
289
+ end
290
+
291
+ if attributes.key?(:'product_item_ids')
292
+ if (value = attributes[:'product_item_ids']).is_a?(Array)
293
+ self.product_item_ids = value
294
+ end
295
+ end
296
+
297
+ if attributes.key?(:'targeting_types')
298
+ if (value = attributes[:'targeting_types']).is_a?(Array)
299
+ self.targeting_types = value
300
+ end
301
+ end
302
+
303
+ if attributes.key?(:'metrics_filters')
304
+ if (value = attributes[:'metrics_filters']).is_a?(Array)
305
+ self.metrics_filters = value
306
+ end
307
+ end
308
+ end
309
+
310
+ # Show invalid properties with the reasons. Usually used together with valid?
311
+ # @return Array for valid properties with the reasons
312
+ def list_invalid_properties
313
+ invalid_properties = Array.new
314
+ if @start_date.nil?
315
+ invalid_properties.push('invalid value for "start_date", start_date cannot be nil.')
316
+ end
317
+
318
+ pattern = Regexp.new(/^(\d{4})-(\d{2})-(\d{2})$/)
319
+ if @start_date !~ pattern
320
+ invalid_properties.push("invalid value for \"start_date\", must conform to the pattern #{pattern}.")
321
+ end
322
+
323
+ if @end_date.nil?
324
+ invalid_properties.push('invalid value for "end_date", end_date cannot be nil.')
325
+ end
326
+
327
+ pattern = Regexp.new(/^(\d{4})-(\d{2})-(\d{2})$/)
328
+ if @end_date !~ pattern
329
+ invalid_properties.push("invalid value for \"end_date\", must conform to the pattern #{pattern}.")
330
+ end
331
+
332
+ if @granularity.nil?
333
+ invalid_properties.push('invalid value for "granularity", granularity cannot be nil.')
334
+ end
335
+
336
+ if @columns.nil?
337
+ invalid_properties.push('invalid value for "columns", columns cannot be nil.')
338
+ end
339
+
340
+ if @level.nil?
341
+ invalid_properties.push('invalid value for "level", level cannot be nil.')
342
+ end
343
+
344
+ if !@campaign_ids.nil? && @campaign_ids.length > 500
345
+ invalid_properties.push('invalid value for "campaign_ids", number of items must be less than or equal to 500.')
346
+ end
347
+
348
+ if !@campaign_ids.nil? && @campaign_ids.length < 1
349
+ invalid_properties.push('invalid value for "campaign_ids", number of items must be greater than or equal to 1.')
350
+ end
351
+
352
+ if !@campaign_statuses.nil? && @campaign_statuses.length > 6
353
+ invalid_properties.push('invalid value for "campaign_statuses", number of items must be less than or equal to 6.')
354
+ end
355
+
356
+ if !@campaign_statuses.nil? && @campaign_statuses.length < 1
357
+ invalid_properties.push('invalid value for "campaign_statuses", number of items must be greater than or equal to 1.')
358
+ end
359
+
360
+ if !@campaign_objective_types.nil? && @campaign_objective_types.length > 6
361
+ invalid_properties.push('invalid value for "campaign_objective_types", number of items must be less than or equal to 6.')
362
+ end
363
+
364
+ if !@campaign_objective_types.nil? && @campaign_objective_types.length < 1
365
+ invalid_properties.push('invalid value for "campaign_objective_types", number of items must be greater than or equal to 1.')
366
+ end
367
+
368
+ if !@ad_group_ids.nil? && @ad_group_ids.length > 500
369
+ invalid_properties.push('invalid value for "ad_group_ids", number of items must be less than or equal to 500.')
370
+ end
371
+
372
+ if !@ad_group_ids.nil? && @ad_group_ids.length < 1
373
+ invalid_properties.push('invalid value for "ad_group_ids", number of items must be greater than or equal to 1.')
374
+ end
375
+
376
+ if !@ad_group_statuses.nil? && @ad_group_statuses.length > 6
377
+ invalid_properties.push('invalid value for "ad_group_statuses", number of items must be less than or equal to 6.')
378
+ end
379
+
380
+ if !@ad_group_statuses.nil? && @ad_group_statuses.length < 1
381
+ invalid_properties.push('invalid value for "ad_group_statuses", number of items must be greater than or equal to 1.')
382
+ end
383
+
384
+ if !@ad_ids.nil? && @ad_ids.length > 500
385
+ invalid_properties.push('invalid value for "ad_ids", number of items must be less than or equal to 500.')
386
+ end
387
+
388
+ if !@ad_ids.nil? && @ad_ids.length < 1
389
+ invalid_properties.push('invalid value for "ad_ids", number of items must be greater than or equal to 1.')
390
+ end
391
+
392
+ if !@ad_statuses.nil? && @ad_statuses.length > 6
393
+ invalid_properties.push('invalid value for "ad_statuses", number of items must be less than or equal to 6.')
394
+ end
395
+
396
+ if !@ad_statuses.nil? && @ad_statuses.length < 1
397
+ invalid_properties.push('invalid value for "ad_statuses", number of items must be greater than or equal to 1.')
398
+ end
399
+
400
+ if !@product_group_ids.nil? && @product_group_ids.length > 500
401
+ invalid_properties.push('invalid value for "product_group_ids", number of items must be less than or equal to 500.')
402
+ end
403
+
404
+ if !@product_group_ids.nil? && @product_group_ids.length < 1
405
+ invalid_properties.push('invalid value for "product_group_ids", number of items must be greater than or equal to 1.')
406
+ end
407
+
408
+ if !@product_group_statuses.nil? && @product_group_statuses.length > 6
409
+ invalid_properties.push('invalid value for "product_group_statuses", number of items must be less than or equal to 6.')
410
+ end
411
+
412
+ if !@product_group_statuses.nil? && @product_group_statuses.length < 1
413
+ invalid_properties.push('invalid value for "product_group_statuses", number of items must be greater than or equal to 1.')
414
+ end
415
+
416
+ if !@product_item_ids.nil? && @product_item_ids.length > 500
417
+ invalid_properties.push('invalid value for "product_item_ids", number of items must be less than or equal to 500.')
418
+ end
419
+
420
+ if !@product_item_ids.nil? && @product_item_ids.length < 1
421
+ invalid_properties.push('invalid value for "product_item_ids", number of items must be greater than or equal to 1.')
422
+ end
423
+
424
+ if !@targeting_types.nil? && @targeting_types.length > 5
425
+ invalid_properties.push('invalid value for "targeting_types", number of items must be less than or equal to 5.')
426
+ end
427
+
428
+ if !@targeting_types.nil? && @targeting_types.length < 1
429
+ invalid_properties.push('invalid value for "targeting_types", number of items must be greater than or equal to 1.')
430
+ end
431
+
432
+ if !@metrics_filters.nil? && @metrics_filters.length < 1
433
+ invalid_properties.push('invalid value for "metrics_filters", number of items must be greater than or equal to 1.')
434
+ end
435
+
436
+ invalid_properties
437
+ end
438
+
439
+ # Check to see if the all the properties in the model are valid
440
+ # @return true if the model is valid
441
+ def valid?
442
+ return false if @start_date.nil?
443
+ return false if @start_date !~ Regexp.new(/^(\d{4})-(\d{2})-(\d{2})$/)
444
+ return false if @end_date.nil?
445
+ return false if @end_date !~ Regexp.new(/^(\d{4})-(\d{2})-(\d{2})$/)
446
+ return false if @granularity.nil?
447
+ return false if @columns.nil?
448
+ return false if @level.nil?
449
+ return false if !@campaign_ids.nil? && @campaign_ids.length > 500
450
+ return false if !@campaign_ids.nil? && @campaign_ids.length < 1
451
+ return false if !@campaign_statuses.nil? && @campaign_statuses.length > 6
452
+ return false if !@campaign_statuses.nil? && @campaign_statuses.length < 1
453
+ return false if !@campaign_objective_types.nil? && @campaign_objective_types.length > 6
454
+ return false if !@campaign_objective_types.nil? && @campaign_objective_types.length < 1
455
+ return false if !@ad_group_ids.nil? && @ad_group_ids.length > 500
456
+ return false if !@ad_group_ids.nil? && @ad_group_ids.length < 1
457
+ return false if !@ad_group_statuses.nil? && @ad_group_statuses.length > 6
458
+ return false if !@ad_group_statuses.nil? && @ad_group_statuses.length < 1
459
+ return false if !@ad_ids.nil? && @ad_ids.length > 500
460
+ return false if !@ad_ids.nil? && @ad_ids.length < 1
461
+ return false if !@ad_statuses.nil? && @ad_statuses.length > 6
462
+ return false if !@ad_statuses.nil? && @ad_statuses.length < 1
463
+ return false if !@product_group_ids.nil? && @product_group_ids.length > 500
464
+ return false if !@product_group_ids.nil? && @product_group_ids.length < 1
465
+ return false if !@product_group_statuses.nil? && @product_group_statuses.length > 6
466
+ return false if !@product_group_statuses.nil? && @product_group_statuses.length < 1
467
+ return false if !@product_item_ids.nil? && @product_item_ids.length > 500
468
+ return false if !@product_item_ids.nil? && @product_item_ids.length < 1
469
+ return false if !@targeting_types.nil? && @targeting_types.length > 5
470
+ return false if !@targeting_types.nil? && @targeting_types.length < 1
471
+ return false if !@metrics_filters.nil? && @metrics_filters.length < 1
472
+ true
473
+ end
474
+
475
+ # Custom attribute writer method with validation
476
+ # @param [Object] start_date Value to be assigned
477
+ def start_date=(start_date)
478
+ if start_date.nil?
479
+ fail ArgumentError, 'start_date cannot be nil'
480
+ end
481
+
482
+ pattern = Regexp.new(/^(\d{4})-(\d{2})-(\d{2})$/)
483
+ if start_date !~ pattern
484
+ fail ArgumentError, "invalid value for \"start_date\", must conform to the pattern #{pattern}."
485
+ end
486
+
487
+ @start_date = start_date
488
+ end
489
+
490
+ # Custom attribute writer method with validation
491
+ # @param [Object] end_date Value to be assigned
492
+ def end_date=(end_date)
493
+ if end_date.nil?
494
+ fail ArgumentError, 'end_date cannot be nil'
495
+ end
496
+
497
+ pattern = Regexp.new(/^(\d{4})-(\d{2})-(\d{2})$/)
498
+ if end_date !~ pattern
499
+ fail ArgumentError, "invalid value for \"end_date\", must conform to the pattern #{pattern}."
500
+ end
501
+
502
+ @end_date = end_date
503
+ end
504
+
505
+ # Custom attribute writer method with validation
506
+ # @param [Object] campaign_ids Value to be assigned
507
+ def campaign_ids=(campaign_ids)
508
+ if !campaign_ids.nil? && campaign_ids.length > 500
509
+ fail ArgumentError, 'invalid value for "campaign_ids", number of items must be less than or equal to 500.'
510
+ end
511
+
512
+ if !campaign_ids.nil? && campaign_ids.length < 1
513
+ fail ArgumentError, 'invalid value for "campaign_ids", number of items must be greater than or equal to 1.'
514
+ end
515
+
516
+ @campaign_ids = campaign_ids
517
+ end
518
+
519
+ # Custom attribute writer method with validation
520
+ # @param [Object] campaign_statuses Value to be assigned
521
+ def campaign_statuses=(campaign_statuses)
522
+ if !campaign_statuses.nil? && campaign_statuses.length > 6
523
+ fail ArgumentError, 'invalid value for "campaign_statuses", number of items must be less than or equal to 6.'
524
+ end
525
+
526
+ if !campaign_statuses.nil? && campaign_statuses.length < 1
527
+ fail ArgumentError, 'invalid value for "campaign_statuses", number of items must be greater than or equal to 1.'
528
+ end
529
+
530
+ @campaign_statuses = campaign_statuses
531
+ end
532
+
533
+ # Custom attribute writer method with validation
534
+ # @param [Object] campaign_objective_types Value to be assigned
535
+ def campaign_objective_types=(campaign_objective_types)
536
+ if !campaign_objective_types.nil? && campaign_objective_types.length > 6
537
+ fail ArgumentError, 'invalid value for "campaign_objective_types", number of items must be less than or equal to 6.'
538
+ end
539
+
540
+ if !campaign_objective_types.nil? && campaign_objective_types.length < 1
541
+ fail ArgumentError, 'invalid value for "campaign_objective_types", number of items must be greater than or equal to 1.'
542
+ end
543
+
544
+ @campaign_objective_types = campaign_objective_types
545
+ end
546
+
547
+ # Custom attribute writer method with validation
548
+ # @param [Object] ad_group_ids Value to be assigned
549
+ def ad_group_ids=(ad_group_ids)
550
+ if !ad_group_ids.nil? && ad_group_ids.length > 500
551
+ fail ArgumentError, 'invalid value for "ad_group_ids", number of items must be less than or equal to 500.'
552
+ end
553
+
554
+ if !ad_group_ids.nil? && ad_group_ids.length < 1
555
+ fail ArgumentError, 'invalid value for "ad_group_ids", number of items must be greater than or equal to 1.'
556
+ end
557
+
558
+ @ad_group_ids = ad_group_ids
559
+ end
560
+
561
+ # Custom attribute writer method with validation
562
+ # @param [Object] ad_group_statuses Value to be assigned
563
+ def ad_group_statuses=(ad_group_statuses)
564
+ if !ad_group_statuses.nil? && ad_group_statuses.length > 6
565
+ fail ArgumentError, 'invalid value for "ad_group_statuses", number of items must be less than or equal to 6.'
566
+ end
567
+
568
+ if !ad_group_statuses.nil? && ad_group_statuses.length < 1
569
+ fail ArgumentError, 'invalid value for "ad_group_statuses", number of items must be greater than or equal to 1.'
570
+ end
571
+
572
+ @ad_group_statuses = ad_group_statuses
573
+ end
574
+
575
+ # Custom attribute writer method with validation
576
+ # @param [Object] ad_ids Value to be assigned
577
+ def ad_ids=(ad_ids)
578
+ if !ad_ids.nil? && ad_ids.length > 500
579
+ fail ArgumentError, 'invalid value for "ad_ids", number of items must be less than or equal to 500.'
580
+ end
581
+
582
+ if !ad_ids.nil? && ad_ids.length < 1
583
+ fail ArgumentError, 'invalid value for "ad_ids", number of items must be greater than or equal to 1.'
584
+ end
585
+
586
+ @ad_ids = ad_ids
587
+ end
588
+
589
+ # Custom attribute writer method with validation
590
+ # @param [Object] ad_statuses Value to be assigned
591
+ def ad_statuses=(ad_statuses)
592
+ if !ad_statuses.nil? && ad_statuses.length > 6
593
+ fail ArgumentError, 'invalid value for "ad_statuses", number of items must be less than or equal to 6.'
594
+ end
595
+
596
+ if !ad_statuses.nil? && ad_statuses.length < 1
597
+ fail ArgumentError, 'invalid value for "ad_statuses", number of items must be greater than or equal to 1.'
598
+ end
599
+
600
+ @ad_statuses = ad_statuses
601
+ end
602
+
603
+ # Custom attribute writer method with validation
604
+ # @param [Object] product_group_ids Value to be assigned
605
+ def product_group_ids=(product_group_ids)
606
+ if !product_group_ids.nil? && product_group_ids.length > 500
607
+ fail ArgumentError, 'invalid value for "product_group_ids", number of items must be less than or equal to 500.'
608
+ end
609
+
610
+ if !product_group_ids.nil? && product_group_ids.length < 1
611
+ fail ArgumentError, 'invalid value for "product_group_ids", number of items must be greater than or equal to 1.'
612
+ end
613
+
614
+ @product_group_ids = product_group_ids
615
+ end
616
+
617
+ # Custom attribute writer method with validation
618
+ # @param [Object] product_group_statuses Value to be assigned
619
+ def product_group_statuses=(product_group_statuses)
620
+ if !product_group_statuses.nil? && product_group_statuses.length > 6
621
+ fail ArgumentError, 'invalid value for "product_group_statuses", number of items must be less than or equal to 6.'
622
+ end
623
+
624
+ if !product_group_statuses.nil? && product_group_statuses.length < 1
625
+ fail ArgumentError, 'invalid value for "product_group_statuses", number of items must be greater than or equal to 1.'
626
+ end
627
+
628
+ @product_group_statuses = product_group_statuses
629
+ end
630
+
631
+ # Custom attribute writer method with validation
632
+ # @param [Object] product_item_ids Value to be assigned
633
+ def product_item_ids=(product_item_ids)
634
+ if !product_item_ids.nil? && product_item_ids.length > 500
635
+ fail ArgumentError, 'invalid value for "product_item_ids", number of items must be less than or equal to 500.'
636
+ end
637
+
638
+ if !product_item_ids.nil? && product_item_ids.length < 1
639
+ fail ArgumentError, 'invalid value for "product_item_ids", number of items must be greater than or equal to 1.'
640
+ end
641
+
642
+ @product_item_ids = product_item_ids
643
+ end
644
+
645
+ # Custom attribute writer method with validation
646
+ # @param [Object] targeting_types Value to be assigned
647
+ def targeting_types=(targeting_types)
648
+ if !targeting_types.nil? && targeting_types.length > 5
649
+ fail ArgumentError, 'invalid value for "targeting_types", number of items must be less than or equal to 5.'
650
+ end
651
+
652
+ if !targeting_types.nil? && targeting_types.length < 1
653
+ fail ArgumentError, 'invalid value for "targeting_types", number of items must be greater than or equal to 1.'
654
+ end
655
+
656
+ @targeting_types = targeting_types
657
+ end
658
+
659
+ # Custom attribute writer method with validation
660
+ # @param [Object] metrics_filters Value to be assigned
661
+ def metrics_filters=(metrics_filters)
662
+ if !metrics_filters.nil? && metrics_filters.length < 1
663
+ fail ArgumentError, 'invalid value for "metrics_filters", number of items must be greater than or equal to 1.'
664
+ end
665
+
666
+ @metrics_filters = metrics_filters
667
+ end
668
+
669
+ # Checks equality by comparing each attribute.
670
+ # @param [Object] Object to be compared
671
+ def ==(o)
672
+ return true if self.equal?(o)
673
+ self.class == o.class &&
674
+ start_date == o.start_date &&
675
+ end_date == o.end_date &&
676
+ granularity == o.granularity &&
677
+ click_window_days == o.click_window_days &&
678
+ engagement_window_days == o.engagement_window_days &&
679
+ view_window_days == o.view_window_days &&
680
+ conversion_report_time == o.conversion_report_time &&
681
+ attribution_types == o.attribution_types &&
682
+ columns == o.columns &&
683
+ level == o.level &&
684
+ report_format == o.report_format &&
685
+ campaign_ids == o.campaign_ids &&
686
+ campaign_statuses == o.campaign_statuses &&
687
+ campaign_objective_types == o.campaign_objective_types &&
688
+ ad_group_ids == o.ad_group_ids &&
689
+ ad_group_statuses == o.ad_group_statuses &&
690
+ ad_ids == o.ad_ids &&
691
+ ad_statuses == o.ad_statuses &&
692
+ product_group_ids == o.product_group_ids &&
693
+ product_group_statuses == o.product_group_statuses &&
694
+ product_item_ids == o.product_item_ids &&
695
+ targeting_types == o.targeting_types &&
696
+ metrics_filters == o.metrics_filters
697
+ end
698
+
699
+ # @see the `==` method
700
+ # @param [Object] Object to be compared
701
+ def eql?(o)
702
+ self == o
703
+ end
704
+
705
+ # Calculates hash code according to all attributes.
706
+ # @return [Integer] Hash code
707
+ def hash
708
+ [start_date, end_date, granularity, click_window_days, engagement_window_days, view_window_days, conversion_report_time, attribution_types, columns, level, report_format, campaign_ids, campaign_statuses, campaign_objective_types, ad_group_ids, ad_group_statuses, ad_ids, ad_statuses, product_group_ids, product_group_statuses, product_item_ids, targeting_types, metrics_filters].hash
709
+ end
710
+
711
+ # Builds the object from hash
712
+ # @param [Hash] attributes Model attributes in the form of hash
713
+ # @return [Object] Returns the model itself
714
+ def self.build_from_hash(attributes)
715
+ new.build_from_hash(attributes)
716
+ end
717
+
718
+ # Builds the object from hash
719
+ # @param [Hash] attributes Model attributes in the form of hash
720
+ # @return [Object] Returns the model itself
721
+ def build_from_hash(attributes)
722
+ return nil unless attributes.is_a?(Hash)
723
+ self.class.openapi_types.each_pair do |key, type|
724
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
725
+ self.send("#{key}=", nil)
726
+ elsif type =~ /\AArray<(.*)>/i
727
+ # check to ensure the input is an array given that the attribute
728
+ # is documented as an array but the input is not
729
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
730
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
731
+ end
732
+ elsif !attributes[self.class.attribute_map[key]].nil?
733
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
734
+ end
735
+ end
736
+
737
+ self
738
+ end
739
+
740
+ # Deserializes the data based on type
741
+ # @param string type Data type
742
+ # @param string value Value to be deserialized
743
+ # @return [Object] Deserialized data
744
+ def _deserialize(type, value)
745
+ case type.to_sym
746
+ when :Time
747
+ Time.parse(value)
748
+ when :Date
749
+ Date.parse(value)
750
+ when :String
751
+ value.to_s
752
+ when :Integer
753
+ value.to_i
754
+ when :Float
755
+ value.to_f
756
+ when :Boolean
757
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
758
+ true
759
+ else
760
+ false
761
+ end
762
+ when :Object
763
+ # generic object (usually a Hash), return directly
764
+ value
765
+ when /\AArray<(?<inner_type>.+)>\z/
766
+ inner_type = Regexp.last_match[:inner_type]
767
+ value.map { |v| _deserialize(inner_type, v) }
768
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
769
+ k_type = Regexp.last_match[:k_type]
770
+ v_type = Regexp.last_match[:v_type]
771
+ {}.tap do |hash|
772
+ value.each do |k, v|
773
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
774
+ end
775
+ end
776
+ else # model
777
+ # models (e.g. Pet) or oneOf
778
+ klass = PinterestSdkClient.const_get(type)
779
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
780
+ end
781
+ end
782
+
783
+ # Returns the string representation of the object
784
+ # @return [String] String presentation of the object
785
+ def to_s
786
+ to_hash.to_s
787
+ end
788
+
789
+ # to_body is an alias to to_hash (backward compatibility)
790
+ # @return [Hash] Returns the object in the form of hash
791
+ def to_body
792
+ to_hash
793
+ end
794
+
795
+ # Returns the object in the form of hash
796
+ # @return [Hash] Returns the object in the form of hash
797
+ def to_hash
798
+ hash = {}
799
+ self.class.attribute_map.each_pair do |attr, param|
800
+ value = self.send(attr)
801
+ if value.nil?
802
+ is_nullable = self.class.openapi_nullable.include?(attr)
803
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
804
+ end
805
+
806
+ hash[param] = _to_hash(value)
807
+ end
808
+ hash
809
+ end
810
+
811
+ # Outputs non-array value in the form of hash
812
+ # For object, use to_hash. Otherwise, just return the value
813
+ # @param [Object] value Any valid value
814
+ # @return [Hash] Returns the value in the form of hash
815
+ def _to_hash(value)
816
+ if value.is_a?(Array)
817
+ value.compact.map { |v| _to_hash(v) }
818
+ elsif value.is_a?(Hash)
819
+ {}.tap do |hash|
820
+ value.each { |k, v| hash[k] = _to_hash(v) }
821
+ end
822
+ elsif value.respond_to? :to_hash
823
+ value.to_hash
824
+ else
825
+ value
826
+ end
827
+ end
828
+
829
+ end
830
+
831
+ end