pinterest_sdk 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +70 -0
- data/README.md +319 -0
- data/Rakefile +10 -0
- data/bin/bundle +114 -0
- data/bin/byebug +27 -0
- data/bin/coderay +27 -0
- data/bin/htmldiff +27 -0
- data/bin/ldiff +27 -0
- data/bin/pry +27 -0
- data/bin/rake +27 -0
- data/bin/rspec +27 -0
- data/bin/rubocop +27 -0
- data/bin/ruby-parse +27 -0
- data/bin/ruby-rewrite +27 -0
- data/docs/Account.md +24 -0
- data/docs/ActionType.md +15 -0
- data/docs/AdAccount.md +26 -0
- data/docs/AdAccountOwner.md +18 -0
- data/docs/AdAccountsApi.md +929 -0
- data/docs/AdGroupResponse.md +62 -0
- data/docs/AdGroupResponseAllOf.md +48 -0
- data/docs/AdGroupResponseAllOf1.md +30 -0
- data/docs/AdGroupSummaryStatus.md +15 -0
- data/docs/AdResponse.md +70 -0
- data/docs/AdResponseAllOf.md +48 -0
- data/docs/AdResponseAllOf1.md +38 -0
- data/docs/AdsAnalyticsCreateAsyncRequest.md +62 -0
- data/docs/AdsAnalyticsCreateAsyncRequestAllOf.md +32 -0
- data/docs/AdsAnalyticsCreateAsyncRequestAllOf1.md +22 -0
- data/docs/AdsAnalyticsCreateAsyncResponse.md +22 -0
- data/docs/AdsAnalyticsFilterColumn.md +15 -0
- data/docs/AdsAnalyticsFilterOperator.md +15 -0
- data/docs/AdsAnalyticsGetAsyncResponse.md +22 -0
- data/docs/AdsAnalyticsMetricsFilter.md +22 -0
- data/docs/AdsAnalyticsTargetingType.md +15 -0
- data/docs/AnalyticsMetricsResponse.md +20 -0
- data/docs/AnalyticsMetricsResponseDailyMetrics.md +22 -0
- data/docs/AvailabilityFilter.md +18 -0
- data/docs/BatchOperation.md +15 -0
- data/docs/BatchOperationStatus.md +15 -0
- data/docs/Board.md +26 -0
- data/docs/BoardOwner.md +18 -0
- data/docs/BoardSection.md +20 -0
- data/docs/BoardUpdate.md +22 -0
- data/docs/BoardsApi.md +811 -0
- data/docs/BrandFilter.md +18 -0
- data/docs/CampaignCommon.md +34 -0
- data/docs/CampaignResponse.md +44 -0
- data/docs/CampaignResponseAllOf.md +18 -0
- data/docs/CampaignResponseAllOf1.md +24 -0
- data/docs/CampaignSummaryStatus.md +15 -0
- data/docs/CatalogsApi.md +939 -0
- data/docs/CatalogsDbItem.md +22 -0
- data/docs/CatalogsFeed.md +42 -0
- data/docs/CatalogsFeedCredentials.md +20 -0
- data/docs/CatalogsFeedIngestionDetails.md +20 -0
- data/docs/CatalogsFeedIngestionErrors.md +26 -0
- data/docs/CatalogsFeedIngestionInfo.md +22 -0
- data/docs/CatalogsFeedProcessingResult.md +30 -0
- data/docs/CatalogsFeedProcessingResultFields.md +24 -0
- data/docs/CatalogsFeedProcessingSchedule.md +20 -0
- data/docs/CatalogsFeedProcessingStatus.md +15 -0
- data/docs/CatalogsFeedProductCounts.md +18 -0
- data/docs/CatalogsFeedValidationDetails.md +20 -0
- data/docs/CatalogsFeedValidationErrors.md +84 -0
- data/docs/CatalogsFeedValidationWarnings.md +106 -0
- data/docs/CatalogsFeedsCreateRequest.md +34 -0
- data/docs/CatalogsFeedsUpdateRequest.md +32 -0
- data/docs/CatalogsFormat.md +15 -0
- data/docs/CatalogsItems.md +18 -0
- data/docs/CatalogsItemsBatch.md +26 -0
- data/docs/CatalogsItemsBatchRequest.md +24 -0
- data/docs/CatalogsProductGroup.md +34 -0
- data/docs/CatalogsProductGroupCreateRequest.md +24 -0
- data/docs/CatalogsProductGroupCurrencyCriteria.md +20 -0
- data/docs/CatalogsProductGroupFilterKeys.md +68 -0
- data/docs/CatalogsProductGroupFilters.md +20 -0
- data/docs/CatalogsProductGroupFiltersAllOf.md +18 -0
- data/docs/CatalogsProductGroupFiltersAnyOf.md +18 -0
- data/docs/CatalogsProductGroupMultipleStringCriteria.md +20 -0
- data/docs/CatalogsProductGroupMultipleStringListCriteria.md +20 -0
- data/docs/CatalogsProductGroupPricingCriteria.md +22 -0
- data/docs/CatalogsProductGroupStatus.md +15 -0
- data/docs/CatalogsProductGroupType.md +15 -0
- data/docs/CatalogsProductGroupUpdateRequest.md +24 -0
- data/docs/CatalogsStatus.md +15 -0
- data/docs/ConditionFilter.md +18 -0
- data/docs/ConversionAttributionWindowDays.md +15 -0
- data/docs/ConversionReportAttributionType.md +15 -0
- data/docs/ConversionReportTimeType.md +15 -0
- data/docs/Country.md +15 -0
- data/docs/Currency.md +15 -0
- data/docs/CurrencyFilter.md +18 -0
- data/docs/CustomLabel0Filter.md +18 -0
- data/docs/CustomLabel1Filter.md +18 -0
- data/docs/CustomLabel2Filter.md +18 -0
- data/docs/CustomLabel3Filter.md +18 -0
- data/docs/CustomLabel4Filter.md +18 -0
- data/docs/DataOutputFormat.md +15 -0
- data/docs/EntityStatus.md +15 -0
- data/docs/Error.md +20 -0
- data/docs/FeedFields.md +36 -0
- data/docs/GenderFilter.md +18 -0
- data/docs/GoogleProductCategory0Filter.md +18 -0
- data/docs/GoogleProductCategory1Filter.md +18 -0
- data/docs/GoogleProductCategory2Filter.md +18 -0
- data/docs/GoogleProductCategory3Filter.md +18 -0
- data/docs/GoogleProductCategory4Filter.md +18 -0
- data/docs/GoogleProductCategory5Filter.md +18 -0
- data/docs/GoogleProductCategory6Filter.md +18 -0
- data/docs/Granularity.md +15 -0
- data/docs/ImageDetails.md +22 -0
- data/docs/ItemAttributes.md +104 -0
- data/docs/ItemBatchRecord.md +20 -0
- data/docs/ItemGroupIdFilter.md +18 -0
- data/docs/ItemIdFilter.md +18 -0
- data/docs/ItemProcessingRecord.md +24 -0
- data/docs/ItemProcessingStatus.md +15 -0
- data/docs/ItemValidationEvent.md +22 -0
- data/docs/Language.md +15 -0
- data/docs/MaxPriceFilter.md +18 -0
- data/docs/MediaApi.md +221 -0
- data/docs/MediaUpload.md +24 -0
- data/docs/MediaUploadAllOf.md +24 -0
- data/docs/MediaUploadAllOfUploadParameters.md +32 -0
- data/docs/MediaUploadDetails.md +22 -0
- data/docs/MediaUploadRequest.md +18 -0
- data/docs/MediaUploadStatus.md +15 -0
- data/docs/MediaUploadType.md +15 -0
- data/docs/MetricsReportingLevel.md +15 -0
- data/docs/MinPriceFilter.md +18 -0
- data/docs/NonNullableCatalogsCurrency.md +15 -0
- data/docs/NullableCurrency.md +15 -0
- data/docs/OauthAccessTokenRequest.md +18 -0
- data/docs/OauthAccessTokenRequestCode.md +20 -0
- data/docs/OauthAccessTokenRequestCodeAllOf.md +20 -0
- data/docs/OauthAccessTokenRequestRefresh.md +20 -0
- data/docs/OauthAccessTokenRequestRefreshAllOf.md +20 -0
- data/docs/OauthAccessTokenResponse.md +26 -0
- data/docs/OauthAccessTokenResponseCode.md +20 -0
- data/docs/OauthAccessTokenResponseCodeAllOf.md +20 -0
- data/docs/OauthAccessTokenResponseRefresh.md +15 -0
- data/docs/OauthApi.md +72 -0
- data/docs/ObjectiveType.md +15 -0
- data/docs/PacingDeliveryType.md +15 -0
- data/docs/Paginated.md +20 -0
- data/docs/Pin.md +38 -0
- data/docs/PinMedia.md +18 -0
- data/docs/PinMediaSource.md +81 -0
- data/docs/PinMediaSourceImageBase64.md +22 -0
- data/docs/PinMediaSourceImageURL.md +20 -0
- data/docs/PinMediaSourceVideoID.md +22 -0
- data/docs/PinMediaWithImage.md +18 -0
- data/docs/PinMediaWithImageAllOf.md +18 -0
- data/docs/PinPromotionSummaryStatus.md +15 -0
- data/docs/PinsApi.md +304 -0
- data/docs/PlacementGroupType.md +15 -0
- data/docs/ProductAvailabilityType.md +15 -0
- data/docs/ProductGroupSummaryStatus.md +15 -0
- data/docs/ProductType0Filter.md +18 -0
- data/docs/ProductType1Filter.md +18 -0
- data/docs/ProductType2Filter.md +18 -0
- data/docs/ProductType3Filter.md +18 -0
- data/docs/ProductType4Filter.md +18 -0
- data/docs/ReportingColumnAsync.md +15 -0
- data/docs/TargetingTypeFilter.md +18 -0
- data/docs/TrackingUrls.md +26 -0
- data/docs/UserAccountApi.md +165 -0
- data/git_push.sh +57 -0
- data/lib/pinterest_sdk/api/ad_accounts_api.rb +1287 -0
- data/lib/pinterest_sdk/api/boards_api.rb +888 -0
- data/lib/pinterest_sdk/api/catalogs_api.rb +965 -0
- data/lib/pinterest_sdk/api/media_api.rb +229 -0
- data/lib/pinterest_sdk/api/oauth_api.rb +96 -0
- data/lib/pinterest_sdk/api/pins_api.rb +330 -0
- data/lib/pinterest_sdk/api/user_account_api.rb +201 -0
- data/lib/pinterest_sdk/api_client.rb +390 -0
- data/lib/pinterest_sdk/api_error.rb +57 -0
- data/lib/pinterest_sdk/configuration.rb +285 -0
- data/lib/pinterest_sdk/models/account.rb +280 -0
- data/lib/pinterest_sdk/models/action_type.rb +39 -0
- data/lib/pinterest_sdk/models/ad_account.rb +254 -0
- data/lib/pinterest_sdk/models/ad_account_owner.rb +219 -0
- data/lib/pinterest_sdk/models/ad_group_response.rb +555 -0
- data/lib/pinterest_sdk/models/ad_group_response_all_of.rb +427 -0
- data/lib/pinterest_sdk/models/ad_group_response_all_of1.rb +329 -0
- data/lib/pinterest_sdk/models/ad_group_summary_status.rb +41 -0
- data/lib/pinterest_sdk/models/ad_response.rb +640 -0
- data/lib/pinterest_sdk/models/ad_response_all_of.rb +455 -0
- data/lib/pinterest_sdk/models/ad_response_all_of1.rb +409 -0
- data/lib/pinterest_sdk/models/ads_analytics_create_async_request.rb +831 -0
- data/lib/pinterest_sdk/models/ads_analytics_create_async_request_all_of.rb +356 -0
- data/lib/pinterest_sdk/models/ads_analytics_create_async_request_all_of1.rb +253 -0
- data/lib/pinterest_sdk/models/ads_analytics_create_async_response.rb +237 -0
- data/lib/pinterest_sdk/models/ads_analytics_filter_column.rb +37 -0
- data/lib/pinterest_sdk/models/ads_analytics_filter_operator.rb +37 -0
- data/lib/pinterest_sdk/models/ads_analytics_get_async_response.rb +238 -0
- data/lib/pinterest_sdk/models/ads_analytics_metrics_filter.rb +254 -0
- data/lib/pinterest_sdk/models/ads_analytics_targeting_type.rb +48 -0
- data/lib/pinterest_sdk/models/analytics_metrics_response.rb +233 -0
- data/lib/pinterest_sdk/models/analytics_metrics_response_daily_metrics.rb +275 -0
- data/lib/pinterest_sdk/models/availability_filter.rb +223 -0
- data/lib/pinterest_sdk/models/batch_operation.rb +38 -0
- data/lib/pinterest_sdk/models/batch_operation_status.rb +37 -0
- data/lib/pinterest_sdk/models/board.rb +301 -0
- data/lib/pinterest_sdk/models/board_owner.rb +218 -0
- data/lib/pinterest_sdk/models/board_section.rb +252 -0
- data/lib/pinterest_sdk/models/board_update.rb +272 -0
- data/lib/pinterest_sdk/models/brand_filter.rb +223 -0
- data/lib/pinterest_sdk/models/campaign_common.rb +352 -0
- data/lib/pinterest_sdk/models/campaign_response.rb +435 -0
- data/lib/pinterest_sdk/models/campaign_response_all_of.rb +245 -0
- data/lib/pinterest_sdk/models/campaign_response_all_of1.rb +248 -0
- data/lib/pinterest_sdk/models/campaign_summary_status.rb +41 -0
- data/lib/pinterest_sdk/models/catalogs_db_item.rb +236 -0
- data/lib/pinterest_sdk/models/catalogs_feed.rb +368 -0
- data/lib/pinterest_sdk/models/catalogs_feed_credentials.rb +240 -0
- data/lib/pinterest_sdk/models/catalogs_feed_ingestion_details.rb +237 -0
- data/lib/pinterest_sdk/models/catalogs_feed_ingestion_errors.rb +288 -0
- data/lib/pinterest_sdk/models/catalogs_feed_ingestion_info.rb +236 -0
- data/lib/pinterest_sdk/models/catalogs_feed_processing_result.rb +296 -0
- data/lib/pinterest_sdk/models/catalogs_feed_processing_result_fields.rb +261 -0
- data/lib/pinterest_sdk/models/catalogs_feed_processing_schedule.rb +291 -0
- data/lib/pinterest_sdk/models/catalogs_feed_processing_status.rb +43 -0
- data/lib/pinterest_sdk/models/catalogs_feed_product_counts.rb +220 -0
- data/lib/pinterest_sdk/models/catalogs_feed_validation_details.rb +237 -0
- data/lib/pinterest_sdk/models/catalogs_feed_validation_errors.rb +515 -0
- data/lib/pinterest_sdk/models/catalogs_feed_validation_warnings.rb +614 -0
- data/lib/pinterest_sdk/models/catalogs_feeds_create_request.rb +313 -0
- data/lib/pinterest_sdk/models/catalogs_feeds_update_request.rb +288 -0
- data/lib/pinterest_sdk/models/catalogs_format.rb +38 -0
- data/lib/pinterest_sdk/models/catalogs_items.rb +222 -0
- data/lib/pinterest_sdk/models/catalogs_items_batch.rb +262 -0
- data/lib/pinterest_sdk/models/catalogs_items_batch_request.rb +249 -0
- data/lib/pinterest_sdk/models/catalogs_product_group.rb +345 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_create_request.rb +284 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_currency_criteria.rb +237 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_filter_keys.rb +617 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_filters.rb +252 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_filters_all_of.rb +220 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_filters_any_of.rb +220 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_multiple_string_criteria.rb +239 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_multiple_string_list_criteria.rb +239 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_pricing_criteria.rb +251 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_status.rb +37 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_type.rb +42 -0
- data/lib/pinterest_sdk/models/catalogs_product_group_update_request.rb +284 -0
- data/lib/pinterest_sdk/models/catalogs_status.rb +37 -0
- data/lib/pinterest_sdk/models/condition_filter.rb +223 -0
- data/lib/pinterest_sdk/models/conversion_attribution_window_days.rb +39 -0
- data/lib/pinterest_sdk/models/conversion_report_attribution_type.rb +37 -0
- data/lib/pinterest_sdk/models/conversion_report_time_type.rb +37 -0
- data/lib/pinterest_sdk/models/country.rb +282 -0
- data/lib/pinterest_sdk/models/currency.rb +60 -0
- data/lib/pinterest_sdk/models/currency_filter.rb +223 -0
- data/lib/pinterest_sdk/models/custom_label0_filter.rb +223 -0
- data/lib/pinterest_sdk/models/custom_label1_filter.rb +223 -0
- data/lib/pinterest_sdk/models/custom_label2_filter.rb +223 -0
- data/lib/pinterest_sdk/models/custom_label3_filter.rb +223 -0
- data/lib/pinterest_sdk/models/custom_label4_filter.rb +223 -0
- data/lib/pinterest_sdk/models/data_output_format.rb +37 -0
- data/lib/pinterest_sdk/models/entity_status.rb +38 -0
- data/lib/pinterest_sdk/models/error.rb +237 -0
- data/lib/pinterest_sdk/models/feed_fields.rb +332 -0
- data/lib/pinterest_sdk/models/gender_filter.rb +223 -0
- data/lib/pinterest_sdk/models/google_product_category0_filter.rb +223 -0
- data/lib/pinterest_sdk/models/google_product_category1_filter.rb +223 -0
- data/lib/pinterest_sdk/models/google_product_category2_filter.rb +223 -0
- data/lib/pinterest_sdk/models/google_product_category3_filter.rb +223 -0
- data/lib/pinterest_sdk/models/google_product_category4_filter.rb +223 -0
- data/lib/pinterest_sdk/models/google_product_category5_filter.rb +223 -0
- data/lib/pinterest_sdk/models/google_product_category6_filter.rb +223 -0
- data/lib/pinterest_sdk/models/granularity.rb +40 -0
- data/lib/pinterest_sdk/models/image_details.rb +281 -0
- data/lib/pinterest_sdk/models/item_attributes.rb +833 -0
- data/lib/pinterest_sdk/models/item_batch_record.rb +229 -0
- data/lib/pinterest_sdk/models/item_group_id_filter.rb +223 -0
- data/lib/pinterest_sdk/models/item_id_filter.rb +223 -0
- data/lib/pinterest_sdk/models/item_processing_record.rb +253 -0
- data/lib/pinterest_sdk/models/item_processing_status.rb +38 -0
- data/lib/pinterest_sdk/models/item_validation_event.rb +240 -0
- data/lib/pinterest_sdk/models/language.rb +96 -0
- data/lib/pinterest_sdk/models/max_price_filter.rb +223 -0
- data/lib/pinterest_sdk/models/media_upload.rb +255 -0
- data/lib/pinterest_sdk/models/media_upload_all_of.rb +247 -0
- data/lib/pinterest_sdk/models/media_upload_all_of_upload_parameters.rb +282 -0
- data/lib/pinterest_sdk/models/media_upload_details.rb +254 -0
- data/lib/pinterest_sdk/models/media_upload_request.rb +224 -0
- data/lib/pinterest_sdk/models/media_upload_status.rb +39 -0
- data/lib/pinterest_sdk/models/media_upload_type.rb +36 -0
- data/lib/pinterest_sdk/models/metrics_reporting_level.rb +47 -0
- data/lib/pinterest_sdk/models/min_price_filter.rb +223 -0
- data/lib/pinterest_sdk/models/non_nullable_catalogs_currency.rb +198 -0
- data/lib/pinterest_sdk/models/nullable_currency.rb +199 -0
- data/lib/pinterest_sdk/models/oauth_access_token_request_code.rb +272 -0
- data/lib/pinterest_sdk/models/oauth_access_token_request_code_all_of.rb +237 -0
- data/lib/pinterest_sdk/models/oauth_access_token_request_refresh.rb +267 -0
- data/lib/pinterest_sdk/models/oauth_access_token_request_refresh_all_of.rb +232 -0
- data/lib/pinterest_sdk/models/oauth_access_token_response.rb +316 -0
- data/lib/pinterest_sdk/models/oauth_access_token_response_code.rb +272 -0
- data/lib/pinterest_sdk/models/oauth_access_token_response_code_all_of.rb +237 -0
- data/lib/pinterest_sdk/models/oauth_access_token_response_refresh.rb +243 -0
- data/lib/pinterest_sdk/models/objective_type.rb +43 -0
- data/lib/pinterest_sdk/models/pacing_delivery_type.rb +37 -0
- data/lib/pinterest_sdk/models/paginated.rb +235 -0
- data/lib/pinterest_sdk/models/pin.rb +359 -0
- data/lib/pinterest_sdk/models/pin_media.rb +224 -0
- data/lib/pinterest_sdk/models/pin_media_source.rb +58 -0
- data/lib/pinterest_sdk/models/pin_media_source_image_base64.rb +319 -0
- data/lib/pinterest_sdk/models/pin_media_source_image_url.rb +272 -0
- data/lib/pinterest_sdk/models/pin_media_source_video_id.rb +307 -0
- data/lib/pinterest_sdk/models/pin_media_with_image.rb +233 -0
- data/lib/pinterest_sdk/models/pin_media_with_image_all_of.rb +220 -0
- data/lib/pinterest_sdk/models/pin_promotion_summary_status.rb +41 -0
- data/lib/pinterest_sdk/models/placement_group_type.rb +39 -0
- data/lib/pinterest_sdk/models/product_availability_type.rb +39 -0
- data/lib/pinterest_sdk/models/product_group_summary_status.rb +39 -0
- data/lib/pinterest_sdk/models/product_type0_filter.rb +223 -0
- data/lib/pinterest_sdk/models/product_type1_filter.rb +223 -0
- data/lib/pinterest_sdk/models/product_type2_filter.rb +223 -0
- data/lib/pinterest_sdk/models/product_type3_filter.rb +223 -0
- data/lib/pinterest_sdk/models/product_type4_filter.rb +223 -0
- data/lib/pinterest_sdk/models/reporting_column_async.rb +549 -0
- data/lib/pinterest_sdk/models/targeting_type_filter.rb +245 -0
- data/lib/pinterest_sdk/models/tracking_urls.rb +340 -0
- data/lib/pinterest_sdk/version.rb +15 -0
- data/lib/pinterest_sdk.rb +192 -0
- data/pinterest_sdk.gemspec +38 -0
- data/spec/api/ad_accounts_api_spec.rb +234 -0
- data/spec/api/boards_api_spec.rb +181 -0
- data/spec/api/catalogs_api_spec.rb +200 -0
- data/spec/api/media_api_spec.rb +72 -0
- data/spec/api/oauth_api_spec.rb +47 -0
- data/spec/api/pins_api_spec.rb +90 -0
- data/spec/api/user_account_api_spec.rb +66 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/account_spec.rb +56 -0
- data/spec/models/action_type_spec.rb +28 -0
- data/spec/models/ad_account_owner_spec.rb +34 -0
- data/spec/models/ad_account_spec.rb +58 -0
- data/spec/models/ad_group_response_all_of1_spec.rb +70 -0
- data/spec/models/ad_group_response_all_of_spec.rb +132 -0
- data/spec/models/ad_group_response_spec.rb +174 -0
- data/spec/models/ad_group_summary_status_spec.rb +28 -0
- data/spec/models/ad_response_all_of1_spec.rb +102 -0
- data/spec/models/ad_response_all_of_spec.rb +128 -0
- data/spec/models/ad_response_spec.rb +202 -0
- data/spec/models/ads_analytics_create_async_request_all_of1_spec.rb +46 -0
- data/spec/models/ads_analytics_create_async_request_all_of_spec.rb +76 -0
- data/spec/models/ads_analytics_create_async_request_spec.rb +166 -0
- data/spec/models/ads_analytics_create_async_response_spec.rb +46 -0
- data/spec/models/ads_analytics_filter_column_spec.rb +28 -0
- data/spec/models/ads_analytics_filter_operator_spec.rb +28 -0
- data/spec/models/ads_analytics_get_async_response_spec.rb +46 -0
- data/spec/models/ads_analytics_metrics_filter_spec.rb +46 -0
- data/spec/models/ads_analytics_targeting_type_spec.rb +28 -0
- data/spec/models/analytics_metrics_response_daily_metrics_spec.rb +50 -0
- data/spec/models/analytics_metrics_response_spec.rb +40 -0
- data/spec/models/availability_filter_spec.rb +34 -0
- data/spec/models/batch_operation_spec.rb +28 -0
- data/spec/models/batch_operation_status_spec.rb +28 -0
- data/spec/models/board_owner_spec.rb +34 -0
- data/spec/models/board_section_spec.rb +40 -0
- data/spec/models/board_spec.rb +62 -0
- data/spec/models/board_update_spec.rb +50 -0
- data/spec/models/brand_filter_spec.rb +34 -0
- data/spec/models/campaign_common_spec.rb +82 -0
- data/spec/models/campaign_response_all_of1_spec.rb +52 -0
- data/spec/models/campaign_response_all_of_spec.rb +34 -0
- data/spec/models/campaign_response_spec.rb +112 -0
- data/spec/models/campaign_summary_status_spec.rb +28 -0
- data/spec/models/catalogs_db_item_spec.rb +46 -0
- data/spec/models/catalogs_feed_credentials_spec.rb +40 -0
- data/spec/models/catalogs_feed_ingestion_details_spec.rb +40 -0
- data/spec/models/catalogs_feed_ingestion_errors_spec.rb +62 -0
- data/spec/models/catalogs_feed_ingestion_info_spec.rb +46 -0
- data/spec/models/catalogs_feed_processing_result_fields_spec.rb +52 -0
- data/spec/models/catalogs_feed_processing_result_spec.rb +70 -0
- data/spec/models/catalogs_feed_processing_schedule_spec.rb +44 -0
- data/spec/models/catalogs_feed_processing_status_spec.rb +28 -0
- data/spec/models/catalogs_feed_product_counts_spec.rb +34 -0
- data/spec/models/catalogs_feed_spec.rb +106 -0
- data/spec/models/catalogs_feed_validation_details_spec.rb +40 -0
- data/spec/models/catalogs_feed_validation_errors_spec.rb +232 -0
- data/spec/models/catalogs_feed_validation_warnings_spec.rb +298 -0
- data/spec/models/catalogs_feeds_create_request_spec.rb +82 -0
- data/spec/models/catalogs_feeds_update_request_spec.rb +76 -0
- data/spec/models/catalogs_format_spec.rb +28 -0
- data/spec/models/catalogs_items_batch_request_spec.rb +52 -0
- data/spec/models/catalogs_items_batch_spec.rb +58 -0
- data/spec/models/catalogs_items_spec.rb +34 -0
- data/spec/models/catalogs_product_group_create_request_spec.rb +52 -0
- data/spec/models/catalogs_product_group_currency_criteria_spec.rb +40 -0
- data/spec/models/catalogs_product_group_filter_keys_spec.rb +184 -0
- data/spec/models/catalogs_product_group_filters_all_of_spec.rb +34 -0
- data/spec/models/catalogs_product_group_filters_any_of_spec.rb +34 -0
- data/spec/models/catalogs_product_group_filters_spec.rb +40 -0
- data/spec/models/catalogs_product_group_multiple_string_criteria_spec.rb +40 -0
- data/spec/models/catalogs_product_group_multiple_string_list_criteria_spec.rb +40 -0
- data/spec/models/catalogs_product_group_pricing_criteria_spec.rb +46 -0
- data/spec/models/catalogs_product_group_spec.rb +82 -0
- data/spec/models/catalogs_product_group_status_spec.rb +28 -0
- data/spec/models/catalogs_product_group_type_spec.rb +28 -0
- data/spec/models/catalogs_product_group_update_request_spec.rb +52 -0
- data/spec/models/catalogs_status_spec.rb +28 -0
- data/spec/models/condition_filter_spec.rb +34 -0
- data/spec/models/conversion_attribution_window_days_spec.rb +28 -0
- data/spec/models/conversion_report_attribution_type_spec.rb +28 -0
- data/spec/models/conversion_report_time_type_spec.rb +28 -0
- data/spec/models/country_spec.rb +28 -0
- data/spec/models/currency_filter_spec.rb +34 -0
- data/spec/models/currency_spec.rb +28 -0
- data/spec/models/custom_label0_filter_spec.rb +34 -0
- data/spec/models/custom_label1_filter_spec.rb +34 -0
- data/spec/models/custom_label2_filter_spec.rb +34 -0
- data/spec/models/custom_label3_filter_spec.rb +34 -0
- data/spec/models/custom_label4_filter_spec.rb +34 -0
- data/spec/models/data_output_format_spec.rb +28 -0
- data/spec/models/entity_status_spec.rb +28 -0
- data/spec/models/error_spec.rb +40 -0
- data/spec/models/feed_fields_spec.rb +88 -0
- data/spec/models/gender_filter_spec.rb +34 -0
- data/spec/models/google_product_category0_filter_spec.rb +34 -0
- data/spec/models/google_product_category1_filter_spec.rb +34 -0
- data/spec/models/google_product_category2_filter_spec.rb +34 -0
- data/spec/models/google_product_category3_filter_spec.rb +34 -0
- data/spec/models/google_product_category4_filter_spec.rb +34 -0
- data/spec/models/google_product_category5_filter_spec.rb +34 -0
- data/spec/models/google_product_category6_filter_spec.rb +34 -0
- data/spec/models/granularity_spec.rb +28 -0
- data/spec/models/image_details_spec.rb +46 -0
- data/spec/models/item_attributes_spec.rb +292 -0
- data/spec/models/item_batch_record_spec.rb +40 -0
- data/spec/models/item_group_id_filter_spec.rb +34 -0
- data/spec/models/item_id_filter_spec.rb +34 -0
- data/spec/models/item_processing_record_spec.rb +52 -0
- data/spec/models/item_processing_status_spec.rb +28 -0
- data/spec/models/item_validation_event_spec.rb +46 -0
- data/spec/models/language_spec.rb +28 -0
- data/spec/models/max_price_filter_spec.rb +34 -0
- data/spec/models/media_upload_all_of_spec.rb +52 -0
- data/spec/models/media_upload_all_of_upload_parameters_spec.rb +76 -0
- data/spec/models/media_upload_details_spec.rb +46 -0
- data/spec/models/media_upload_request_spec.rb +34 -0
- data/spec/models/media_upload_spec.rb +52 -0
- data/spec/models/media_upload_status_spec.rb +28 -0
- data/spec/models/media_upload_type_spec.rb +28 -0
- data/spec/models/metrics_reporting_level_spec.rb +28 -0
- data/spec/models/min_price_filter_spec.rb +34 -0
- data/spec/models/non_nullable_catalogs_currency_spec.rb +28 -0
- data/spec/models/nullable_currency_spec.rb +28 -0
- data/spec/models/oauth_access_token_request_code_all_of_spec.rb +40 -0
- data/spec/models/oauth_access_token_request_code_spec.rb +40 -0
- data/spec/models/oauth_access_token_request_refresh_all_of_spec.rb +40 -0
- data/spec/models/oauth_access_token_request_refresh_spec.rb +40 -0
- data/spec/models/oauth_access_token_request_spec.rb +38 -0
- data/spec/models/oauth_access_token_response_code_all_of_spec.rb +40 -0
- data/spec/models/oauth_access_token_response_code_spec.rb +40 -0
- data/spec/models/oauth_access_token_response_refresh_spec.rb +28 -0
- data/spec/models/oauth_access_token_response_spec.rb +62 -0
- data/spec/models/objective_type_spec.rb +28 -0
- data/spec/models/pacing_delivery_type_spec.rb +28 -0
- data/spec/models/paginated_spec.rb +40 -0
- data/spec/models/pin_media_source_image_base64_spec.rb +54 -0
- data/spec/models/pin_media_source_image_url_spec.rb +44 -0
- data/spec/models/pin_media_source_spec.rb +43 -0
- data/spec/models/pin_media_source_video_id_spec.rb +50 -0
- data/spec/models/pin_media_spec.rb +34 -0
- data/spec/models/pin_media_with_image_all_of_spec.rb +34 -0
- data/spec/models/pin_media_with_image_spec.rb +34 -0
- data/spec/models/pin_promotion_summary_status_spec.rb +28 -0
- data/spec/models/pin_spec.rb +94 -0
- data/spec/models/placement_group_type_spec.rb +28 -0
- data/spec/models/product_availability_type_spec.rb +28 -0
- data/spec/models/product_group_summary_status_spec.rb +28 -0
- data/spec/models/product_type0_filter_spec.rb +34 -0
- data/spec/models/product_type1_filter_spec.rb +34 -0
- data/spec/models/product_type2_filter_spec.rb +34 -0
- data/spec/models/product_type3_filter_spec.rb +34 -0
- data/spec/models/product_type4_filter_spec.rb +34 -0
- data/spec/models/reporting_column_async_spec.rb +28 -0
- data/spec/models/targeting_type_filter_spec.rb +34 -0
- data/spec/models/tracking_urls_spec.rb +58 -0
- data/spec/spec_helper.rb +111 -0
- metadata +726 -0
@@ -0,0 +1,965 @@
|
|
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 'cgi'
|
14
|
+
|
15
|
+
module PinterestSdkClient
|
16
|
+
class CatalogsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create product group
|
23
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Create product group to use in Catalogs.
|
24
|
+
# @param catalogs_product_group_create_request [CatalogsProductGroupCreateRequest] Request object used to created a catalogs product group.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [Object]
|
27
|
+
def catalogs_product_groups_create(catalogs_product_group_create_request, opts = {})
|
28
|
+
data, _status_code, _headers = catalogs_product_groups_create_with_http_info(catalogs_product_group_create_request, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Create product group
|
33
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Create product group to use in Catalogs.
|
34
|
+
# @param catalogs_product_group_create_request [CatalogsProductGroupCreateRequest] Request object used to created a catalogs product group.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
37
|
+
def catalogs_product_groups_create_with_http_info(catalogs_product_group_create_request, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: CatalogsApi.catalogs_product_groups_create ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'catalogs_product_group_create_request' is set
|
42
|
+
if @api_client.config.client_side_validation && catalogs_product_group_create_request.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'catalogs_product_group_create_request' when calling CatalogsApi.catalogs_product_groups_create"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/catalogs/product_groups'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
57
|
+
if !content_type.nil?
|
58
|
+
header_params['Content-Type'] = content_type
|
59
|
+
end
|
60
|
+
|
61
|
+
# form parameters
|
62
|
+
form_params = opts[:form_params] || {}
|
63
|
+
|
64
|
+
# http body (model)
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(catalogs_product_group_create_request)
|
66
|
+
|
67
|
+
# return_type
|
68
|
+
return_type = opts[:debug_return_type] || 'Object'
|
69
|
+
|
70
|
+
# auth_names
|
71
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
72
|
+
|
73
|
+
new_options = opts.merge(
|
74
|
+
:operation => :"CatalogsApi.catalogs_product_groups_create",
|
75
|
+
:header_params => header_params,
|
76
|
+
:query_params => query_params,
|
77
|
+
:form_params => form_params,
|
78
|
+
:body => post_body,
|
79
|
+
:auth_names => auth_names,
|
80
|
+
:return_type => return_type
|
81
|
+
)
|
82
|
+
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
84
|
+
if @api_client.config.debugging
|
85
|
+
@api_client.config.logger.debug "API called: CatalogsApi#catalogs_product_groups_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
86
|
+
end
|
87
|
+
return data, status_code, headers
|
88
|
+
end
|
89
|
+
|
90
|
+
# Delete product group
|
91
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Delete a product group from being in use in Catalogs.
|
92
|
+
# @param product_group_id [String] Unique identifier of a product group
|
93
|
+
# @param [Hash] opts the optional parameters
|
94
|
+
# @return [nil]
|
95
|
+
def catalogs_product_groups_delete(product_group_id, opts = {})
|
96
|
+
catalogs_product_groups_delete_with_http_info(product_group_id, opts)
|
97
|
+
nil
|
98
|
+
end
|
99
|
+
|
100
|
+
# Delete product group
|
101
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Delete a product group from being in use in Catalogs.
|
102
|
+
# @param product_group_id [String] Unique identifier of a product group
|
103
|
+
# @param [Hash] opts the optional parameters
|
104
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
105
|
+
def catalogs_product_groups_delete_with_http_info(product_group_id, opts = {})
|
106
|
+
if @api_client.config.debugging
|
107
|
+
@api_client.config.logger.debug 'Calling API: CatalogsApi.catalogs_product_groups_delete ...'
|
108
|
+
end
|
109
|
+
# verify the required parameter 'product_group_id' is set
|
110
|
+
if @api_client.config.client_side_validation && product_group_id.nil?
|
111
|
+
fail ArgumentError, "Missing the required parameter 'product_group_id' when calling CatalogsApi.catalogs_product_groups_delete"
|
112
|
+
end
|
113
|
+
pattern = Regexp.new(/^\d+$/)
|
114
|
+
if @api_client.config.client_side_validation && product_group_id !~ pattern
|
115
|
+
fail ArgumentError, "invalid value for 'product_group_id' when calling CatalogsApi.catalogs_product_groups_delete, must conform to the pattern #{pattern}."
|
116
|
+
end
|
117
|
+
|
118
|
+
# resource path
|
119
|
+
local_var_path = '/catalogs/product_groups/{product_group_id}'.sub('{' + 'product_group_id' + '}', CGI.escape(product_group_id.to_s))
|
120
|
+
|
121
|
+
# query parameters
|
122
|
+
query_params = opts[:query_params] || {}
|
123
|
+
|
124
|
+
# header parameters
|
125
|
+
header_params = opts[:header_params] || {}
|
126
|
+
# HTTP header 'Accept' (if needed)
|
127
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
128
|
+
|
129
|
+
# form parameters
|
130
|
+
form_params = opts[:form_params] || {}
|
131
|
+
|
132
|
+
# http body (model)
|
133
|
+
post_body = opts[:debug_body]
|
134
|
+
|
135
|
+
# return_type
|
136
|
+
return_type = opts[:debug_return_type]
|
137
|
+
|
138
|
+
# auth_names
|
139
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
140
|
+
|
141
|
+
new_options = opts.merge(
|
142
|
+
:operation => :"CatalogsApi.catalogs_product_groups_delete",
|
143
|
+
:header_params => header_params,
|
144
|
+
:query_params => query_params,
|
145
|
+
:form_params => form_params,
|
146
|
+
:body => post_body,
|
147
|
+
:auth_names => auth_names,
|
148
|
+
:return_type => return_type
|
149
|
+
)
|
150
|
+
|
151
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
152
|
+
if @api_client.config.debugging
|
153
|
+
@api_client.config.logger.debug "API called: CatalogsApi#catalogs_product_groups_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
154
|
+
end
|
155
|
+
return data, status_code, headers
|
156
|
+
end
|
157
|
+
|
158
|
+
# Get product groups list
|
159
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Get a list of product groups for a given Catalogs Feed Id.
|
160
|
+
# @param feed_id [String] Unique identifier of a feed
|
161
|
+
# @param [Hash] opts the optional parameters
|
162
|
+
# @option opts [String] :bookmark Cursor used to fetch the next page of items
|
163
|
+
# @option opts [Integer] :page_size Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/api/v5/#tag/Pagination'>Pagination</a> for more information. (default to 25)
|
164
|
+
# @return [Paginated]
|
165
|
+
def catalogs_product_groups_list(feed_id, opts = {})
|
166
|
+
data, _status_code, _headers = catalogs_product_groups_list_with_http_info(feed_id, opts)
|
167
|
+
data
|
168
|
+
end
|
169
|
+
|
170
|
+
# Get product groups list
|
171
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Get a list of product groups for a given Catalogs Feed Id.
|
172
|
+
# @param feed_id [String] Unique identifier of a feed
|
173
|
+
# @param [Hash] opts the optional parameters
|
174
|
+
# @option opts [String] :bookmark Cursor used to fetch the next page of items
|
175
|
+
# @option opts [Integer] :page_size Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/api/v5/#tag/Pagination'>Pagination</a> for more information.
|
176
|
+
# @return [Array<(Paginated, Integer, Hash)>] Paginated data, response status code and response headers
|
177
|
+
def catalogs_product_groups_list_with_http_info(feed_id, opts = {})
|
178
|
+
if @api_client.config.debugging
|
179
|
+
@api_client.config.logger.debug 'Calling API: CatalogsApi.catalogs_product_groups_list ...'
|
180
|
+
end
|
181
|
+
# verify the required parameter 'feed_id' is set
|
182
|
+
if @api_client.config.client_side_validation && feed_id.nil?
|
183
|
+
fail ArgumentError, "Missing the required parameter 'feed_id' when calling CatalogsApi.catalogs_product_groups_list"
|
184
|
+
end
|
185
|
+
pattern = Regexp.new(/^\d+$/)
|
186
|
+
if @api_client.config.client_side_validation && feed_id !~ pattern
|
187
|
+
fail ArgumentError, "invalid value for 'feed_id' when calling CatalogsApi.catalogs_product_groups_list, must conform to the pattern #{pattern}."
|
188
|
+
end
|
189
|
+
|
190
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
|
191
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CatalogsApi.catalogs_product_groups_list, must be smaller than or equal to 100.'
|
192
|
+
end
|
193
|
+
|
194
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
195
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CatalogsApi.catalogs_product_groups_list, must be greater than or equal to 1.'
|
196
|
+
end
|
197
|
+
|
198
|
+
# resource path
|
199
|
+
local_var_path = '/catalogs/product_groups'
|
200
|
+
|
201
|
+
# query parameters
|
202
|
+
query_params = opts[:query_params] || {}
|
203
|
+
query_params[:'feed_id'] = feed_id
|
204
|
+
query_params[:'bookmark'] = opts[:'bookmark'] if !opts[:'bookmark'].nil?
|
205
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
206
|
+
|
207
|
+
# header parameters
|
208
|
+
header_params = opts[:header_params] || {}
|
209
|
+
# HTTP header 'Accept' (if needed)
|
210
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
211
|
+
|
212
|
+
# form parameters
|
213
|
+
form_params = opts[:form_params] || {}
|
214
|
+
|
215
|
+
# http body (model)
|
216
|
+
post_body = opts[:debug_body]
|
217
|
+
|
218
|
+
# return_type
|
219
|
+
return_type = opts[:debug_return_type] || 'Paginated'
|
220
|
+
|
221
|
+
# auth_names
|
222
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
223
|
+
|
224
|
+
new_options = opts.merge(
|
225
|
+
:operation => :"CatalogsApi.catalogs_product_groups_list",
|
226
|
+
:header_params => header_params,
|
227
|
+
:query_params => query_params,
|
228
|
+
:form_params => form_params,
|
229
|
+
:body => post_body,
|
230
|
+
:auth_names => auth_names,
|
231
|
+
:return_type => return_type
|
232
|
+
)
|
233
|
+
|
234
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
235
|
+
if @api_client.config.debugging
|
236
|
+
@api_client.config.logger.debug "API called: CatalogsApi#catalogs_product_groups_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
237
|
+
end
|
238
|
+
return data, status_code, headers
|
239
|
+
end
|
240
|
+
|
241
|
+
# Update product group
|
242
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Update product group to use in Catalogs.
|
243
|
+
# @param product_group_id [String] Unique identifier of a product group
|
244
|
+
# @param catalogs_product_group_update_request [CatalogsProductGroupUpdateRequest] Request object used to Update a catalogs product group.
|
245
|
+
# @param [Hash] opts the optional parameters
|
246
|
+
# @return [CatalogsProductGroup]
|
247
|
+
def catalogs_product_groups_update(product_group_id, catalogs_product_group_update_request, opts = {})
|
248
|
+
data, _status_code, _headers = catalogs_product_groups_update_with_http_info(product_group_id, catalogs_product_group_update_request, opts)
|
249
|
+
data
|
250
|
+
end
|
251
|
+
|
252
|
+
# Update product group
|
253
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Update product group to use in Catalogs.
|
254
|
+
# @param product_group_id [String] Unique identifier of a product group
|
255
|
+
# @param catalogs_product_group_update_request [CatalogsProductGroupUpdateRequest] Request object used to Update a catalogs product group.
|
256
|
+
# @param [Hash] opts the optional parameters
|
257
|
+
# @return [Array<(CatalogsProductGroup, Integer, Hash)>] CatalogsProductGroup data, response status code and response headers
|
258
|
+
def catalogs_product_groups_update_with_http_info(product_group_id, catalogs_product_group_update_request, opts = {})
|
259
|
+
if @api_client.config.debugging
|
260
|
+
@api_client.config.logger.debug 'Calling API: CatalogsApi.catalogs_product_groups_update ...'
|
261
|
+
end
|
262
|
+
# verify the required parameter 'product_group_id' is set
|
263
|
+
if @api_client.config.client_side_validation && product_group_id.nil?
|
264
|
+
fail ArgumentError, "Missing the required parameter 'product_group_id' when calling CatalogsApi.catalogs_product_groups_update"
|
265
|
+
end
|
266
|
+
pattern = Regexp.new(/^\d+$/)
|
267
|
+
if @api_client.config.client_side_validation && product_group_id !~ pattern
|
268
|
+
fail ArgumentError, "invalid value for 'product_group_id' when calling CatalogsApi.catalogs_product_groups_update, must conform to the pattern #{pattern}."
|
269
|
+
end
|
270
|
+
|
271
|
+
# verify the required parameter 'catalogs_product_group_update_request' is set
|
272
|
+
if @api_client.config.client_side_validation && catalogs_product_group_update_request.nil?
|
273
|
+
fail ArgumentError, "Missing the required parameter 'catalogs_product_group_update_request' when calling CatalogsApi.catalogs_product_groups_update"
|
274
|
+
end
|
275
|
+
# resource path
|
276
|
+
local_var_path = '/catalogs/product_groups/{product_group_id}'.sub('{' + 'product_group_id' + '}', CGI.escape(product_group_id.to_s))
|
277
|
+
|
278
|
+
# query parameters
|
279
|
+
query_params = opts[:query_params] || {}
|
280
|
+
|
281
|
+
# header parameters
|
282
|
+
header_params = opts[:header_params] || {}
|
283
|
+
# HTTP header 'Accept' (if needed)
|
284
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
285
|
+
# HTTP header 'Content-Type'
|
286
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
287
|
+
if !content_type.nil?
|
288
|
+
header_params['Content-Type'] = content_type
|
289
|
+
end
|
290
|
+
|
291
|
+
# form parameters
|
292
|
+
form_params = opts[:form_params] || {}
|
293
|
+
|
294
|
+
# http body (model)
|
295
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(catalogs_product_group_update_request)
|
296
|
+
|
297
|
+
# return_type
|
298
|
+
return_type = opts[:debug_return_type] || 'CatalogsProductGroup'
|
299
|
+
|
300
|
+
# auth_names
|
301
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
302
|
+
|
303
|
+
new_options = opts.merge(
|
304
|
+
:operation => :"CatalogsApi.catalogs_product_groups_update",
|
305
|
+
:header_params => header_params,
|
306
|
+
:query_params => query_params,
|
307
|
+
:form_params => form_params,
|
308
|
+
:body => post_body,
|
309
|
+
:auth_names => auth_names,
|
310
|
+
:return_type => return_type
|
311
|
+
)
|
312
|
+
|
313
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
314
|
+
if @api_client.config.debugging
|
315
|
+
@api_client.config.logger.debug "API called: CatalogsApi#catalogs_product_groups_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
316
|
+
end
|
317
|
+
return data, status_code, headers
|
318
|
+
end
|
319
|
+
|
320
|
+
# List processing results for a given feed
|
321
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Fetch a feed processing results owned by the owner user account.
|
322
|
+
# @param feed_id [String] Unique identifier of a feed
|
323
|
+
# @param [Hash] opts the optional parameters
|
324
|
+
# @option opts [String] :bookmark Cursor used to fetch the next page of items
|
325
|
+
# @option opts [Integer] :page_size Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/api/v5/#tag/Pagination'>Pagination</a> for more information. (default to 25)
|
326
|
+
# @return [Paginated]
|
327
|
+
def feed_processing_results_list(feed_id, opts = {})
|
328
|
+
data, _status_code, _headers = feed_processing_results_list_with_http_info(feed_id, opts)
|
329
|
+
data
|
330
|
+
end
|
331
|
+
|
332
|
+
# List processing results for a given feed
|
333
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Fetch a feed processing results owned by the owner user account.
|
334
|
+
# @param feed_id [String] Unique identifier of a feed
|
335
|
+
# @param [Hash] opts the optional parameters
|
336
|
+
# @option opts [String] :bookmark Cursor used to fetch the next page of items
|
337
|
+
# @option opts [Integer] :page_size Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/api/v5/#tag/Pagination'>Pagination</a> for more information.
|
338
|
+
# @return [Array<(Paginated, Integer, Hash)>] Paginated data, response status code and response headers
|
339
|
+
def feed_processing_results_list_with_http_info(feed_id, opts = {})
|
340
|
+
if @api_client.config.debugging
|
341
|
+
@api_client.config.logger.debug 'Calling API: CatalogsApi.feed_processing_results_list ...'
|
342
|
+
end
|
343
|
+
# verify the required parameter 'feed_id' is set
|
344
|
+
if @api_client.config.client_side_validation && feed_id.nil?
|
345
|
+
fail ArgumentError, "Missing the required parameter 'feed_id' when calling CatalogsApi.feed_processing_results_list"
|
346
|
+
end
|
347
|
+
pattern = Regexp.new(/^\d+$/)
|
348
|
+
if @api_client.config.client_side_validation && feed_id !~ pattern
|
349
|
+
fail ArgumentError, "invalid value for 'feed_id' when calling CatalogsApi.feed_processing_results_list, must conform to the pattern #{pattern}."
|
350
|
+
end
|
351
|
+
|
352
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
|
353
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CatalogsApi.feed_processing_results_list, must be smaller than or equal to 100.'
|
354
|
+
end
|
355
|
+
|
356
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
357
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CatalogsApi.feed_processing_results_list, must be greater than or equal to 1.'
|
358
|
+
end
|
359
|
+
|
360
|
+
# resource path
|
361
|
+
local_var_path = '/catalogs/feeds/{feed_id}/processing_results'.sub('{' + 'feed_id' + '}', CGI.escape(feed_id.to_s))
|
362
|
+
|
363
|
+
# query parameters
|
364
|
+
query_params = opts[:query_params] || {}
|
365
|
+
query_params[:'bookmark'] = opts[:'bookmark'] if !opts[:'bookmark'].nil?
|
366
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
367
|
+
|
368
|
+
# header parameters
|
369
|
+
header_params = opts[:header_params] || {}
|
370
|
+
# HTTP header 'Accept' (if needed)
|
371
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
372
|
+
|
373
|
+
# form parameters
|
374
|
+
form_params = opts[:form_params] || {}
|
375
|
+
|
376
|
+
# http body (model)
|
377
|
+
post_body = opts[:debug_body]
|
378
|
+
|
379
|
+
# return_type
|
380
|
+
return_type = opts[:debug_return_type] || 'Paginated'
|
381
|
+
|
382
|
+
# auth_names
|
383
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
384
|
+
|
385
|
+
new_options = opts.merge(
|
386
|
+
:operation => :"CatalogsApi.feed_processing_results_list",
|
387
|
+
:header_params => header_params,
|
388
|
+
:query_params => query_params,
|
389
|
+
:form_params => form_params,
|
390
|
+
:body => post_body,
|
391
|
+
:auth_names => auth_names,
|
392
|
+
:return_type => return_type
|
393
|
+
)
|
394
|
+
|
395
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
396
|
+
if @api_client.config.debugging
|
397
|
+
@api_client.config.logger.debug "API called: CatalogsApi#feed_processing_results_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
398
|
+
end
|
399
|
+
return data, status_code, headers
|
400
|
+
end
|
401
|
+
|
402
|
+
# Create feed
|
403
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Create a new feed owned by the \"operating user_account\".
|
404
|
+
# @param catalogs_feeds_create_request [CatalogsFeedsCreateRequest] Request object used to created a feed.
|
405
|
+
# @param [Hash] opts the optional parameters
|
406
|
+
# @return [CatalogsFeed]
|
407
|
+
def feeds_create(catalogs_feeds_create_request, opts = {})
|
408
|
+
data, _status_code, _headers = feeds_create_with_http_info(catalogs_feeds_create_request, opts)
|
409
|
+
data
|
410
|
+
end
|
411
|
+
|
412
|
+
# Create feed
|
413
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Create a new feed owned by the \"operating user_account\".
|
414
|
+
# @param catalogs_feeds_create_request [CatalogsFeedsCreateRequest] Request object used to created a feed.
|
415
|
+
# @param [Hash] opts the optional parameters
|
416
|
+
# @return [Array<(CatalogsFeed, Integer, Hash)>] CatalogsFeed data, response status code and response headers
|
417
|
+
def feeds_create_with_http_info(catalogs_feeds_create_request, opts = {})
|
418
|
+
if @api_client.config.debugging
|
419
|
+
@api_client.config.logger.debug 'Calling API: CatalogsApi.feeds_create ...'
|
420
|
+
end
|
421
|
+
# verify the required parameter 'catalogs_feeds_create_request' is set
|
422
|
+
if @api_client.config.client_side_validation && catalogs_feeds_create_request.nil?
|
423
|
+
fail ArgumentError, "Missing the required parameter 'catalogs_feeds_create_request' when calling CatalogsApi.feeds_create"
|
424
|
+
end
|
425
|
+
# resource path
|
426
|
+
local_var_path = '/catalogs/feeds'
|
427
|
+
|
428
|
+
# query parameters
|
429
|
+
query_params = opts[:query_params] || {}
|
430
|
+
|
431
|
+
# header parameters
|
432
|
+
header_params = opts[:header_params] || {}
|
433
|
+
# HTTP header 'Accept' (if needed)
|
434
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
435
|
+
# HTTP header 'Content-Type'
|
436
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
437
|
+
if !content_type.nil?
|
438
|
+
header_params['Content-Type'] = content_type
|
439
|
+
end
|
440
|
+
|
441
|
+
# form parameters
|
442
|
+
form_params = opts[:form_params] || {}
|
443
|
+
|
444
|
+
# http body (model)
|
445
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(catalogs_feeds_create_request)
|
446
|
+
|
447
|
+
# return_type
|
448
|
+
return_type = opts[:debug_return_type] || 'CatalogsFeed'
|
449
|
+
|
450
|
+
# auth_names
|
451
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
452
|
+
|
453
|
+
new_options = opts.merge(
|
454
|
+
:operation => :"CatalogsApi.feeds_create",
|
455
|
+
:header_params => header_params,
|
456
|
+
:query_params => query_params,
|
457
|
+
:form_params => form_params,
|
458
|
+
:body => post_body,
|
459
|
+
:auth_names => auth_names,
|
460
|
+
:return_type => return_type
|
461
|
+
)
|
462
|
+
|
463
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
464
|
+
if @api_client.config.debugging
|
465
|
+
@api_client.config.logger.debug "API called: CatalogsApi#feeds_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
466
|
+
end
|
467
|
+
return data, status_code, headers
|
468
|
+
end
|
469
|
+
|
470
|
+
# Delete feed
|
471
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Delete a feed owned by the \"operating user_account\".
|
472
|
+
# @param feed_id [String] Unique identifier of a feed
|
473
|
+
# @param [Hash] opts the optional parameters
|
474
|
+
# @return [nil]
|
475
|
+
def feeds_delete(feed_id, opts = {})
|
476
|
+
feeds_delete_with_http_info(feed_id, opts)
|
477
|
+
nil
|
478
|
+
end
|
479
|
+
|
480
|
+
# Delete feed
|
481
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Delete a feed owned by the \"operating user_account\".
|
482
|
+
# @param feed_id [String] Unique identifier of a feed
|
483
|
+
# @param [Hash] opts the optional parameters
|
484
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
485
|
+
def feeds_delete_with_http_info(feed_id, opts = {})
|
486
|
+
if @api_client.config.debugging
|
487
|
+
@api_client.config.logger.debug 'Calling API: CatalogsApi.feeds_delete ...'
|
488
|
+
end
|
489
|
+
# verify the required parameter 'feed_id' is set
|
490
|
+
if @api_client.config.client_side_validation && feed_id.nil?
|
491
|
+
fail ArgumentError, "Missing the required parameter 'feed_id' when calling CatalogsApi.feeds_delete"
|
492
|
+
end
|
493
|
+
pattern = Regexp.new(/^\d+$/)
|
494
|
+
if @api_client.config.client_side_validation && feed_id !~ pattern
|
495
|
+
fail ArgumentError, "invalid value for 'feed_id' when calling CatalogsApi.feeds_delete, must conform to the pattern #{pattern}."
|
496
|
+
end
|
497
|
+
|
498
|
+
# resource path
|
499
|
+
local_var_path = '/catalogs/feeds/{feed_id}'.sub('{' + 'feed_id' + '}', CGI.escape(feed_id.to_s))
|
500
|
+
|
501
|
+
# query parameters
|
502
|
+
query_params = opts[:query_params] || {}
|
503
|
+
|
504
|
+
# header parameters
|
505
|
+
header_params = opts[:header_params] || {}
|
506
|
+
# HTTP header 'Accept' (if needed)
|
507
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
508
|
+
|
509
|
+
# form parameters
|
510
|
+
form_params = opts[:form_params] || {}
|
511
|
+
|
512
|
+
# http body (model)
|
513
|
+
post_body = opts[:debug_body]
|
514
|
+
|
515
|
+
# return_type
|
516
|
+
return_type = opts[:debug_return_type]
|
517
|
+
|
518
|
+
# auth_names
|
519
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
520
|
+
|
521
|
+
new_options = opts.merge(
|
522
|
+
:operation => :"CatalogsApi.feeds_delete",
|
523
|
+
:header_params => header_params,
|
524
|
+
:query_params => query_params,
|
525
|
+
:form_params => form_params,
|
526
|
+
:body => post_body,
|
527
|
+
:auth_names => auth_names,
|
528
|
+
:return_type => return_type
|
529
|
+
)
|
530
|
+
|
531
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
532
|
+
if @api_client.config.debugging
|
533
|
+
@api_client.config.logger.debug "API called: CatalogsApi#feeds_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
534
|
+
end
|
535
|
+
return data, status_code, headers
|
536
|
+
end
|
537
|
+
|
538
|
+
# Get feed
|
539
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Get a single feed owned by the \"operating user_account\".
|
540
|
+
# @param feed_id [String] Unique identifier of a feed
|
541
|
+
# @param [Hash] opts the optional parameters
|
542
|
+
# @return [CatalogsFeed]
|
543
|
+
def feeds_get(feed_id, opts = {})
|
544
|
+
data, _status_code, _headers = feeds_get_with_http_info(feed_id, opts)
|
545
|
+
data
|
546
|
+
end
|
547
|
+
|
548
|
+
# Get feed
|
549
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Get a single feed owned by the \"operating user_account\".
|
550
|
+
# @param feed_id [String] Unique identifier of a feed
|
551
|
+
# @param [Hash] opts the optional parameters
|
552
|
+
# @return [Array<(CatalogsFeed, Integer, Hash)>] CatalogsFeed data, response status code and response headers
|
553
|
+
def feeds_get_with_http_info(feed_id, opts = {})
|
554
|
+
if @api_client.config.debugging
|
555
|
+
@api_client.config.logger.debug 'Calling API: CatalogsApi.feeds_get ...'
|
556
|
+
end
|
557
|
+
# verify the required parameter 'feed_id' is set
|
558
|
+
if @api_client.config.client_side_validation && feed_id.nil?
|
559
|
+
fail ArgumentError, "Missing the required parameter 'feed_id' when calling CatalogsApi.feeds_get"
|
560
|
+
end
|
561
|
+
pattern = Regexp.new(/^\d+$/)
|
562
|
+
if @api_client.config.client_side_validation && feed_id !~ pattern
|
563
|
+
fail ArgumentError, "invalid value for 'feed_id' when calling CatalogsApi.feeds_get, must conform to the pattern #{pattern}."
|
564
|
+
end
|
565
|
+
|
566
|
+
# resource path
|
567
|
+
local_var_path = '/catalogs/feeds/{feed_id}'.sub('{' + 'feed_id' + '}', CGI.escape(feed_id.to_s))
|
568
|
+
|
569
|
+
# query parameters
|
570
|
+
query_params = opts[:query_params] || {}
|
571
|
+
|
572
|
+
# header parameters
|
573
|
+
header_params = opts[:header_params] || {}
|
574
|
+
# HTTP header 'Accept' (if needed)
|
575
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
576
|
+
|
577
|
+
# form parameters
|
578
|
+
form_params = opts[:form_params] || {}
|
579
|
+
|
580
|
+
# http body (model)
|
581
|
+
post_body = opts[:debug_body]
|
582
|
+
|
583
|
+
# return_type
|
584
|
+
return_type = opts[:debug_return_type] || 'CatalogsFeed'
|
585
|
+
|
586
|
+
# auth_names
|
587
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
588
|
+
|
589
|
+
new_options = opts.merge(
|
590
|
+
:operation => :"CatalogsApi.feeds_get",
|
591
|
+
:header_params => header_params,
|
592
|
+
:query_params => query_params,
|
593
|
+
:form_params => form_params,
|
594
|
+
:body => post_body,
|
595
|
+
:auth_names => auth_names,
|
596
|
+
:return_type => return_type
|
597
|
+
)
|
598
|
+
|
599
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
600
|
+
if @api_client.config.debugging
|
601
|
+
@api_client.config.logger.debug "API called: CatalogsApi#feeds_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
602
|
+
end
|
603
|
+
return data, status_code, headers
|
604
|
+
end
|
605
|
+
|
606
|
+
# List feeds
|
607
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Fetch feeds owned by the \"operating user_account\".
|
608
|
+
# @param [Hash] opts the optional parameters
|
609
|
+
# @option opts [String] :bookmark Cursor used to fetch the next page of items
|
610
|
+
# @option opts [Integer] :page_size Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/api/v5/#tag/Pagination'>Pagination</a> for more information. (default to 25)
|
611
|
+
# @return [Paginated]
|
612
|
+
def feeds_list(opts = {})
|
613
|
+
data, _status_code, _headers = feeds_list_with_http_info(opts)
|
614
|
+
data
|
615
|
+
end
|
616
|
+
|
617
|
+
# List feeds
|
618
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Fetch feeds owned by the \"operating user_account\".
|
619
|
+
# @param [Hash] opts the optional parameters
|
620
|
+
# @option opts [String] :bookmark Cursor used to fetch the next page of items
|
621
|
+
# @option opts [Integer] :page_size Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/api/v5/#tag/Pagination'>Pagination</a> for more information.
|
622
|
+
# @return [Array<(Paginated, Integer, Hash)>] Paginated data, response status code and response headers
|
623
|
+
def feeds_list_with_http_info(opts = {})
|
624
|
+
if @api_client.config.debugging
|
625
|
+
@api_client.config.logger.debug 'Calling API: CatalogsApi.feeds_list ...'
|
626
|
+
end
|
627
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
|
628
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CatalogsApi.feeds_list, must be smaller than or equal to 100.'
|
629
|
+
end
|
630
|
+
|
631
|
+
if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
|
632
|
+
fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling CatalogsApi.feeds_list, must be greater than or equal to 1.'
|
633
|
+
end
|
634
|
+
|
635
|
+
# resource path
|
636
|
+
local_var_path = '/catalogs/feeds'
|
637
|
+
|
638
|
+
# query parameters
|
639
|
+
query_params = opts[:query_params] || {}
|
640
|
+
query_params[:'bookmark'] = opts[:'bookmark'] if !opts[:'bookmark'].nil?
|
641
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
642
|
+
|
643
|
+
# header parameters
|
644
|
+
header_params = opts[:header_params] || {}
|
645
|
+
# HTTP header 'Accept' (if needed)
|
646
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
647
|
+
|
648
|
+
# form parameters
|
649
|
+
form_params = opts[:form_params] || {}
|
650
|
+
|
651
|
+
# http body (model)
|
652
|
+
post_body = opts[:debug_body]
|
653
|
+
|
654
|
+
# return_type
|
655
|
+
return_type = opts[:debug_return_type] || 'Paginated'
|
656
|
+
|
657
|
+
# auth_names
|
658
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
659
|
+
|
660
|
+
new_options = opts.merge(
|
661
|
+
:operation => :"CatalogsApi.feeds_list",
|
662
|
+
:header_params => header_params,
|
663
|
+
:query_params => query_params,
|
664
|
+
:form_params => form_params,
|
665
|
+
:body => post_body,
|
666
|
+
:auth_names => auth_names,
|
667
|
+
:return_type => return_type
|
668
|
+
)
|
669
|
+
|
670
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
671
|
+
if @api_client.config.debugging
|
672
|
+
@api_client.config.logger.debug "API called: CatalogsApi#feeds_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
673
|
+
end
|
674
|
+
return data, status_code, headers
|
675
|
+
end
|
676
|
+
|
677
|
+
# Update feed
|
678
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Update a feed owned by the \"operating user_account\".
|
679
|
+
# @param feed_id [String] Unique identifier of a feed
|
680
|
+
# @param catalogs_feeds_update_request [CatalogsFeedsUpdateRequest] Request object used to update a feed.
|
681
|
+
# @param [Hash] opts the optional parameters
|
682
|
+
# @return [CatalogsFeed]
|
683
|
+
def feeds_update(feed_id, catalogs_feeds_update_request, opts = {})
|
684
|
+
data, _status_code, _headers = feeds_update_with_http_info(feed_id, catalogs_feeds_update_request, opts)
|
685
|
+
data
|
686
|
+
end
|
687
|
+
|
688
|
+
# Update feed
|
689
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Update a feed owned by the \"operating user_account\".
|
690
|
+
# @param feed_id [String] Unique identifier of a feed
|
691
|
+
# @param catalogs_feeds_update_request [CatalogsFeedsUpdateRequest] Request object used to update a feed.
|
692
|
+
# @param [Hash] opts the optional parameters
|
693
|
+
# @return [Array<(CatalogsFeed, Integer, Hash)>] CatalogsFeed data, response status code and response headers
|
694
|
+
def feeds_update_with_http_info(feed_id, catalogs_feeds_update_request, opts = {})
|
695
|
+
if @api_client.config.debugging
|
696
|
+
@api_client.config.logger.debug 'Calling API: CatalogsApi.feeds_update ...'
|
697
|
+
end
|
698
|
+
# verify the required parameter 'feed_id' is set
|
699
|
+
if @api_client.config.client_side_validation && feed_id.nil?
|
700
|
+
fail ArgumentError, "Missing the required parameter 'feed_id' when calling CatalogsApi.feeds_update"
|
701
|
+
end
|
702
|
+
pattern = Regexp.new(/^\d+$/)
|
703
|
+
if @api_client.config.client_side_validation && feed_id !~ pattern
|
704
|
+
fail ArgumentError, "invalid value for 'feed_id' when calling CatalogsApi.feeds_update, must conform to the pattern #{pattern}."
|
705
|
+
end
|
706
|
+
|
707
|
+
# verify the required parameter 'catalogs_feeds_update_request' is set
|
708
|
+
if @api_client.config.client_side_validation && catalogs_feeds_update_request.nil?
|
709
|
+
fail ArgumentError, "Missing the required parameter 'catalogs_feeds_update_request' when calling CatalogsApi.feeds_update"
|
710
|
+
end
|
711
|
+
# resource path
|
712
|
+
local_var_path = '/catalogs/feeds/{feed_id}'.sub('{' + 'feed_id' + '}', CGI.escape(feed_id.to_s))
|
713
|
+
|
714
|
+
# query parameters
|
715
|
+
query_params = opts[:query_params] || {}
|
716
|
+
|
717
|
+
# header parameters
|
718
|
+
header_params = opts[:header_params] || {}
|
719
|
+
# HTTP header 'Accept' (if needed)
|
720
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
721
|
+
# HTTP header 'Content-Type'
|
722
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
723
|
+
if !content_type.nil?
|
724
|
+
header_params['Content-Type'] = content_type
|
725
|
+
end
|
726
|
+
|
727
|
+
# form parameters
|
728
|
+
form_params = opts[:form_params] || {}
|
729
|
+
|
730
|
+
# http body (model)
|
731
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(catalogs_feeds_update_request)
|
732
|
+
|
733
|
+
# return_type
|
734
|
+
return_type = opts[:debug_return_type] || 'CatalogsFeed'
|
735
|
+
|
736
|
+
# auth_names
|
737
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
738
|
+
|
739
|
+
new_options = opts.merge(
|
740
|
+
:operation => :"CatalogsApi.feeds_update",
|
741
|
+
:header_params => header_params,
|
742
|
+
:query_params => query_params,
|
743
|
+
:form_params => form_params,
|
744
|
+
:body => post_body,
|
745
|
+
:auth_names => auth_names,
|
746
|
+
:return_type => return_type
|
747
|
+
)
|
748
|
+
|
749
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
750
|
+
if @api_client.config.debugging
|
751
|
+
@api_client.config.logger.debug "API called: CatalogsApi#feeds_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
752
|
+
end
|
753
|
+
return data, status_code, headers
|
754
|
+
end
|
755
|
+
|
756
|
+
# Get catalogs items batch
|
757
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Get a single catalogs items batch created by the \"operating user_account\".
|
758
|
+
# @param batch_id [String] Id of a catalogs items batch to fetch
|
759
|
+
# @param [Hash] opts the optional parameters
|
760
|
+
# @return [CatalogsItemsBatch]
|
761
|
+
def items_batch_get(batch_id, opts = {})
|
762
|
+
data, _status_code, _headers = items_batch_get_with_http_info(batch_id, opts)
|
763
|
+
data
|
764
|
+
end
|
765
|
+
|
766
|
+
# Get catalogs items batch
|
767
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> Get a single catalogs items batch created by the \"operating user_account\".
|
768
|
+
# @param batch_id [String] Id of a catalogs items batch to fetch
|
769
|
+
# @param [Hash] opts the optional parameters
|
770
|
+
# @return [Array<(CatalogsItemsBatch, Integer, Hash)>] CatalogsItemsBatch data, response status code and response headers
|
771
|
+
def items_batch_get_with_http_info(batch_id, opts = {})
|
772
|
+
if @api_client.config.debugging
|
773
|
+
@api_client.config.logger.debug 'Calling API: CatalogsApi.items_batch_get ...'
|
774
|
+
end
|
775
|
+
# verify the required parameter 'batch_id' is set
|
776
|
+
if @api_client.config.client_side_validation && batch_id.nil?
|
777
|
+
fail ArgumentError, "Missing the required parameter 'batch_id' when calling CatalogsApi.items_batch_get"
|
778
|
+
end
|
779
|
+
# resource path
|
780
|
+
local_var_path = '/catalogs/items/batch/{batch_id}'.sub('{' + 'batch_id' + '}', CGI.escape(batch_id.to_s))
|
781
|
+
|
782
|
+
# query parameters
|
783
|
+
query_params = opts[:query_params] || {}
|
784
|
+
|
785
|
+
# header parameters
|
786
|
+
header_params = opts[:header_params] || {}
|
787
|
+
# HTTP header 'Accept' (if needed)
|
788
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
789
|
+
|
790
|
+
# form parameters
|
791
|
+
form_params = opts[:form_params] || {}
|
792
|
+
|
793
|
+
# http body (model)
|
794
|
+
post_body = opts[:debug_body]
|
795
|
+
|
796
|
+
# return_type
|
797
|
+
return_type = opts[:debug_return_type] || 'CatalogsItemsBatch'
|
798
|
+
|
799
|
+
# auth_names
|
800
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
801
|
+
|
802
|
+
new_options = opts.merge(
|
803
|
+
:operation => :"CatalogsApi.items_batch_get",
|
804
|
+
:header_params => header_params,
|
805
|
+
:query_params => query_params,
|
806
|
+
:form_params => form_params,
|
807
|
+
:body => post_body,
|
808
|
+
:auth_names => auth_names,
|
809
|
+
:return_type => return_type
|
810
|
+
)
|
811
|
+
|
812
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
813
|
+
if @api_client.config.debugging
|
814
|
+
@api_client.config.logger.debug "API called: CatalogsApi#items_batch_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
815
|
+
end
|
816
|
+
return data, status_code, headers
|
817
|
+
end
|
818
|
+
|
819
|
+
# Perform an operation on an item batch
|
820
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> This endpoint supports multiple operations on a set of one or more catalog items.
|
821
|
+
# @param catalogs_items_batch_request [CatalogsItemsBatchRequest] Request object used to create catalogs items in a batch
|
822
|
+
# @param [Hash] opts the optional parameters
|
823
|
+
# @return [CatalogsItemsBatch]
|
824
|
+
def items_batch_post(catalogs_items_batch_request, opts = {})
|
825
|
+
data, _status_code, _headers = items_batch_post_with_http_info(catalogs_items_batch_request, opts)
|
826
|
+
data
|
827
|
+
end
|
828
|
+
|
829
|
+
# Perform an operation on an item batch
|
830
|
+
# <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/api/v5/#tag/Understanding-catalog-management'>Learn more</a>.</strong> This endpoint supports multiple operations on a set of one or more catalog items.
|
831
|
+
# @param catalogs_items_batch_request [CatalogsItemsBatchRequest] Request object used to create catalogs items in a batch
|
832
|
+
# @param [Hash] opts the optional parameters
|
833
|
+
# @return [Array<(CatalogsItemsBatch, Integer, Hash)>] CatalogsItemsBatch data, response status code and response headers
|
834
|
+
def items_batch_post_with_http_info(catalogs_items_batch_request, opts = {})
|
835
|
+
if @api_client.config.debugging
|
836
|
+
@api_client.config.logger.debug 'Calling API: CatalogsApi.items_batch_post ...'
|
837
|
+
end
|
838
|
+
# verify the required parameter 'catalogs_items_batch_request' is set
|
839
|
+
if @api_client.config.client_side_validation && catalogs_items_batch_request.nil?
|
840
|
+
fail ArgumentError, "Missing the required parameter 'catalogs_items_batch_request' when calling CatalogsApi.items_batch_post"
|
841
|
+
end
|
842
|
+
# resource path
|
843
|
+
local_var_path = '/catalogs/items/batch'
|
844
|
+
|
845
|
+
# query parameters
|
846
|
+
query_params = opts[:query_params] || {}
|
847
|
+
|
848
|
+
# header parameters
|
849
|
+
header_params = opts[:header_params] || {}
|
850
|
+
# HTTP header 'Accept' (if needed)
|
851
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
852
|
+
# HTTP header 'Content-Type'
|
853
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
854
|
+
if !content_type.nil?
|
855
|
+
header_params['Content-Type'] = content_type
|
856
|
+
end
|
857
|
+
|
858
|
+
# form parameters
|
859
|
+
form_params = opts[:form_params] || {}
|
860
|
+
|
861
|
+
# http body (model)
|
862
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(catalogs_items_batch_request)
|
863
|
+
|
864
|
+
# return_type
|
865
|
+
return_type = opts[:debug_return_type] || 'CatalogsItemsBatch'
|
866
|
+
|
867
|
+
# auth_names
|
868
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
869
|
+
|
870
|
+
new_options = opts.merge(
|
871
|
+
:operation => :"CatalogsApi.items_batch_post",
|
872
|
+
:header_params => header_params,
|
873
|
+
:query_params => query_params,
|
874
|
+
:form_params => form_params,
|
875
|
+
:body => post_body,
|
876
|
+
:auth_names => auth_names,
|
877
|
+
:return_type => return_type
|
878
|
+
)
|
879
|
+
|
880
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
881
|
+
if @api_client.config.debugging
|
882
|
+
@api_client.config.logger.debug "API called: CatalogsApi#items_batch_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
883
|
+
end
|
884
|
+
return data, status_code, headers
|
885
|
+
end
|
886
|
+
|
887
|
+
# Get catalogs items
|
888
|
+
# Get the items of the catalog created by the \"operating user_account\"
|
889
|
+
# @param country [String] Country for the Catalogs Items
|
890
|
+
# @param item_ids [Array<String>] Catalos Item ids
|
891
|
+
# @param language [String] Language for the Catalogs Items
|
892
|
+
# @param [Hash] opts the optional parameters
|
893
|
+
# @return [CatalogsItems]
|
894
|
+
def items_get(country, item_ids, language, opts = {})
|
895
|
+
data, _status_code, _headers = items_get_with_http_info(country, item_ids, language, opts)
|
896
|
+
data
|
897
|
+
end
|
898
|
+
|
899
|
+
# Get catalogs items
|
900
|
+
# Get the items of the catalog created by the \"operating user_account\"
|
901
|
+
# @param country [String] Country for the Catalogs Items
|
902
|
+
# @param item_ids [Array<String>] Catalos Item ids
|
903
|
+
# @param language [String] Language for the Catalogs Items
|
904
|
+
# @param [Hash] opts the optional parameters
|
905
|
+
# @return [Array<(CatalogsItems, Integer, Hash)>] CatalogsItems data, response status code and response headers
|
906
|
+
def items_get_with_http_info(country, item_ids, language, opts = {})
|
907
|
+
if @api_client.config.debugging
|
908
|
+
@api_client.config.logger.debug 'Calling API: CatalogsApi.items_get ...'
|
909
|
+
end
|
910
|
+
# verify the required parameter 'country' is set
|
911
|
+
if @api_client.config.client_side_validation && country.nil?
|
912
|
+
fail ArgumentError, "Missing the required parameter 'country' when calling CatalogsApi.items_get"
|
913
|
+
end
|
914
|
+
# verify the required parameter 'item_ids' is set
|
915
|
+
if @api_client.config.client_side_validation && item_ids.nil?
|
916
|
+
fail ArgumentError, "Missing the required parameter 'item_ids' when calling CatalogsApi.items_get"
|
917
|
+
end
|
918
|
+
# verify the required parameter 'language' is set
|
919
|
+
if @api_client.config.client_side_validation && language.nil?
|
920
|
+
fail ArgumentError, "Missing the required parameter 'language' when calling CatalogsApi.items_get"
|
921
|
+
end
|
922
|
+
# resource path
|
923
|
+
local_var_path = '/catalogs/items'
|
924
|
+
|
925
|
+
# query parameters
|
926
|
+
query_params = opts[:query_params] || {}
|
927
|
+
query_params[:'country'] = country
|
928
|
+
query_params[:'item_ids'] = @api_client.build_collection_param(item_ids, :multi)
|
929
|
+
query_params[:'language'] = language
|
930
|
+
|
931
|
+
# header parameters
|
932
|
+
header_params = opts[:header_params] || {}
|
933
|
+
# HTTP header 'Accept' (if needed)
|
934
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
935
|
+
|
936
|
+
# form parameters
|
937
|
+
form_params = opts[:form_params] || {}
|
938
|
+
|
939
|
+
# http body (model)
|
940
|
+
post_body = opts[:debug_body]
|
941
|
+
|
942
|
+
# return_type
|
943
|
+
return_type = opts[:debug_return_type] || 'CatalogsItems'
|
944
|
+
|
945
|
+
# auth_names
|
946
|
+
auth_names = opts[:debug_auth_names] || ['pinterest_oauth2']
|
947
|
+
|
948
|
+
new_options = opts.merge(
|
949
|
+
:operation => :"CatalogsApi.items_get",
|
950
|
+
:header_params => header_params,
|
951
|
+
:query_params => query_params,
|
952
|
+
:form_params => form_params,
|
953
|
+
:body => post_body,
|
954
|
+
:auth_names => auth_names,
|
955
|
+
:return_type => return_type
|
956
|
+
)
|
957
|
+
|
958
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
959
|
+
if @api_client.config.debugging
|
960
|
+
@api_client.config.logger.debug "API called: CatalogsApi#items_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
961
|
+
end
|
962
|
+
return data, status_code, headers
|
963
|
+
end
|
964
|
+
end
|
965
|
+
end
|