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,617 @@
|
|
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 CatalogsProductGroupFilterKeys
|
18
|
+
attr_accessor :min_price
|
19
|
+
|
20
|
+
attr_accessor :max_price
|
21
|
+
|
22
|
+
attr_accessor :currency
|
23
|
+
|
24
|
+
attr_accessor :item_id
|
25
|
+
|
26
|
+
attr_accessor :availability
|
27
|
+
|
28
|
+
attr_accessor :brand
|
29
|
+
|
30
|
+
attr_accessor :condition
|
31
|
+
|
32
|
+
attr_accessor :custom_label_0
|
33
|
+
|
34
|
+
attr_accessor :custom_label_1
|
35
|
+
|
36
|
+
attr_accessor :custom_label_2
|
37
|
+
|
38
|
+
attr_accessor :custom_label_3
|
39
|
+
|
40
|
+
attr_accessor :custom_label_4
|
41
|
+
|
42
|
+
attr_accessor :item_group_id
|
43
|
+
|
44
|
+
attr_accessor :gender
|
45
|
+
|
46
|
+
attr_accessor :product_type_4
|
47
|
+
|
48
|
+
attr_accessor :product_type_3
|
49
|
+
|
50
|
+
attr_accessor :product_type_2
|
51
|
+
|
52
|
+
attr_accessor :product_type_1
|
53
|
+
|
54
|
+
attr_accessor :product_type_0
|
55
|
+
|
56
|
+
attr_accessor :google_product_category_6
|
57
|
+
|
58
|
+
attr_accessor :google_product_category_5
|
59
|
+
|
60
|
+
attr_accessor :google_product_category_4
|
61
|
+
|
62
|
+
attr_accessor :google_product_category_3
|
63
|
+
|
64
|
+
attr_accessor :google_product_category_2
|
65
|
+
|
66
|
+
attr_accessor :google_product_category_1
|
67
|
+
|
68
|
+
attr_accessor :google_product_category_0
|
69
|
+
|
70
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
71
|
+
def self.attribute_map
|
72
|
+
{
|
73
|
+
:'min_price' => :'MIN_PRICE',
|
74
|
+
:'max_price' => :'MAX_PRICE',
|
75
|
+
:'currency' => :'CURRENCY',
|
76
|
+
:'item_id' => :'ITEM_ID',
|
77
|
+
:'availability' => :'AVAILABILITY',
|
78
|
+
:'brand' => :'BRAND',
|
79
|
+
:'condition' => :'CONDITION',
|
80
|
+
:'custom_label_0' => :'CUSTOM_LABEL_0',
|
81
|
+
:'custom_label_1' => :'CUSTOM_LABEL_1',
|
82
|
+
:'custom_label_2' => :'CUSTOM_LABEL_2',
|
83
|
+
:'custom_label_3' => :'CUSTOM_LABEL_3',
|
84
|
+
:'custom_label_4' => :'CUSTOM_LABEL_4',
|
85
|
+
:'item_group_id' => :'ITEM_GROUP_ID',
|
86
|
+
:'gender' => :'GENDER',
|
87
|
+
:'product_type_4' => :'PRODUCT_TYPE_4',
|
88
|
+
:'product_type_3' => :'PRODUCT_TYPE_3',
|
89
|
+
:'product_type_2' => :'PRODUCT_TYPE_2',
|
90
|
+
:'product_type_1' => :'PRODUCT_TYPE_1',
|
91
|
+
:'product_type_0' => :'PRODUCT_TYPE_0',
|
92
|
+
:'google_product_category_6' => :'GOOGLE_PRODUCT_CATEGORY_6',
|
93
|
+
:'google_product_category_5' => :'GOOGLE_PRODUCT_CATEGORY_5',
|
94
|
+
:'google_product_category_4' => :'GOOGLE_PRODUCT_CATEGORY_4',
|
95
|
+
:'google_product_category_3' => :'GOOGLE_PRODUCT_CATEGORY_3',
|
96
|
+
:'google_product_category_2' => :'GOOGLE_PRODUCT_CATEGORY_2',
|
97
|
+
:'google_product_category_1' => :'GOOGLE_PRODUCT_CATEGORY_1',
|
98
|
+
:'google_product_category_0' => :'GOOGLE_PRODUCT_CATEGORY_0'
|
99
|
+
}
|
100
|
+
end
|
101
|
+
|
102
|
+
# Returns all the JSON keys this model knows about
|
103
|
+
def self.acceptable_attributes
|
104
|
+
attribute_map.values
|
105
|
+
end
|
106
|
+
|
107
|
+
# Attribute type mapping.
|
108
|
+
def self.openapi_types
|
109
|
+
{
|
110
|
+
:'min_price' => :'CatalogsProductGroupPricingCriteria',
|
111
|
+
:'max_price' => :'CatalogsProductGroupPricingCriteria',
|
112
|
+
:'currency' => :'CatalogsProductGroupCurrencyCriteria',
|
113
|
+
:'item_id' => :'CatalogsProductGroupCurrencyCriteria',
|
114
|
+
:'availability' => :'CatalogsProductGroupMultipleStringCriteria',
|
115
|
+
:'brand' => :'CatalogsProductGroupMultipleStringCriteria',
|
116
|
+
:'condition' => :'CatalogsProductGroupMultipleStringCriteria',
|
117
|
+
:'custom_label_0' => :'CatalogsProductGroupMultipleStringCriteria',
|
118
|
+
:'custom_label_1' => :'CatalogsProductGroupMultipleStringCriteria',
|
119
|
+
:'custom_label_2' => :'CatalogsProductGroupMultipleStringCriteria',
|
120
|
+
:'custom_label_3' => :'CatalogsProductGroupMultipleStringCriteria',
|
121
|
+
:'custom_label_4' => :'CatalogsProductGroupMultipleStringCriteria',
|
122
|
+
:'item_group_id' => :'CatalogsProductGroupMultipleStringCriteria',
|
123
|
+
:'gender' => :'CatalogsProductGroupMultipleStringCriteria',
|
124
|
+
:'product_type_4' => :'CatalogsProductGroupMultipleStringListCriteria',
|
125
|
+
:'product_type_3' => :'CatalogsProductGroupMultipleStringListCriteria',
|
126
|
+
:'product_type_2' => :'CatalogsProductGroupMultipleStringListCriteria',
|
127
|
+
:'product_type_1' => :'CatalogsProductGroupMultipleStringListCriteria',
|
128
|
+
:'product_type_0' => :'CatalogsProductGroupMultipleStringListCriteria',
|
129
|
+
:'google_product_category_6' => :'CatalogsProductGroupMultipleStringListCriteria',
|
130
|
+
:'google_product_category_5' => :'CatalogsProductGroupMultipleStringListCriteria',
|
131
|
+
:'google_product_category_4' => :'CatalogsProductGroupMultipleStringListCriteria',
|
132
|
+
:'google_product_category_3' => :'CatalogsProductGroupMultipleStringListCriteria',
|
133
|
+
:'google_product_category_2' => :'CatalogsProductGroupMultipleStringListCriteria',
|
134
|
+
:'google_product_category_1' => :'CatalogsProductGroupMultipleStringListCriteria',
|
135
|
+
:'google_product_category_0' => :'CatalogsProductGroupMultipleStringListCriteria'
|
136
|
+
}
|
137
|
+
end
|
138
|
+
|
139
|
+
# List of attributes with nullable: true
|
140
|
+
def self.openapi_nullable
|
141
|
+
Set.new([
|
142
|
+
])
|
143
|
+
end
|
144
|
+
|
145
|
+
# List of class defined in anyOf (OpenAPI v3)
|
146
|
+
def self.openapi_any_of
|
147
|
+
[
|
148
|
+
:'AvailabilityFilter',
|
149
|
+
:'BrandFilter',
|
150
|
+
:'ConditionFilter',
|
151
|
+
:'CurrencyFilter',
|
152
|
+
:'CustomLabel0Filter',
|
153
|
+
:'CustomLabel1Filter',
|
154
|
+
:'CustomLabel2Filter',
|
155
|
+
:'CustomLabel3Filter',
|
156
|
+
:'CustomLabel4Filter',
|
157
|
+
:'GenderFilter',
|
158
|
+
:'GoogleProductCategory0Filter',
|
159
|
+
:'GoogleProductCategory1Filter',
|
160
|
+
:'GoogleProductCategory2Filter',
|
161
|
+
:'GoogleProductCategory3Filter',
|
162
|
+
:'GoogleProductCategory4Filter',
|
163
|
+
:'GoogleProductCategory5Filter',
|
164
|
+
:'GoogleProductCategory6Filter',
|
165
|
+
:'ItemGroupIdFilter',
|
166
|
+
:'ItemIdFilter',
|
167
|
+
:'MaxPriceFilter',
|
168
|
+
:'MinPriceFilter',
|
169
|
+
:'ProductType0Filter',
|
170
|
+
:'ProductType1Filter',
|
171
|
+
:'ProductType2Filter',
|
172
|
+
:'ProductType3Filter',
|
173
|
+
:'ProductType4Filter'
|
174
|
+
]
|
175
|
+
end
|
176
|
+
|
177
|
+
# Initializes the object
|
178
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
179
|
+
def initialize(attributes = {})
|
180
|
+
if (!attributes.is_a?(Hash))
|
181
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PinterestSdkClient::CatalogsProductGroupFilterKeys` initialize method"
|
182
|
+
end
|
183
|
+
|
184
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
185
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
186
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
187
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PinterestSdkClient::CatalogsProductGroupFilterKeys`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
188
|
+
end
|
189
|
+
h[k.to_sym] = v
|
190
|
+
}
|
191
|
+
|
192
|
+
if attributes.key?(:'min_price')
|
193
|
+
self.min_price = attributes[:'min_price']
|
194
|
+
end
|
195
|
+
|
196
|
+
if attributes.key?(:'max_price')
|
197
|
+
self.max_price = attributes[:'max_price']
|
198
|
+
end
|
199
|
+
|
200
|
+
if attributes.key?(:'currency')
|
201
|
+
self.currency = attributes[:'currency']
|
202
|
+
end
|
203
|
+
|
204
|
+
if attributes.key?(:'item_id')
|
205
|
+
self.item_id = attributes[:'item_id']
|
206
|
+
end
|
207
|
+
|
208
|
+
if attributes.key?(:'availability')
|
209
|
+
self.availability = attributes[:'availability']
|
210
|
+
end
|
211
|
+
|
212
|
+
if attributes.key?(:'brand')
|
213
|
+
self.brand = attributes[:'brand']
|
214
|
+
end
|
215
|
+
|
216
|
+
if attributes.key?(:'condition')
|
217
|
+
self.condition = attributes[:'condition']
|
218
|
+
end
|
219
|
+
|
220
|
+
if attributes.key?(:'custom_label_0')
|
221
|
+
self.custom_label_0 = attributes[:'custom_label_0']
|
222
|
+
end
|
223
|
+
|
224
|
+
if attributes.key?(:'custom_label_1')
|
225
|
+
self.custom_label_1 = attributes[:'custom_label_1']
|
226
|
+
end
|
227
|
+
|
228
|
+
if attributes.key?(:'custom_label_2')
|
229
|
+
self.custom_label_2 = attributes[:'custom_label_2']
|
230
|
+
end
|
231
|
+
|
232
|
+
if attributes.key?(:'custom_label_3')
|
233
|
+
self.custom_label_3 = attributes[:'custom_label_3']
|
234
|
+
end
|
235
|
+
|
236
|
+
if attributes.key?(:'custom_label_4')
|
237
|
+
self.custom_label_4 = attributes[:'custom_label_4']
|
238
|
+
end
|
239
|
+
|
240
|
+
if attributes.key?(:'item_group_id')
|
241
|
+
self.item_group_id = attributes[:'item_group_id']
|
242
|
+
end
|
243
|
+
|
244
|
+
if attributes.key?(:'gender')
|
245
|
+
self.gender = attributes[:'gender']
|
246
|
+
end
|
247
|
+
|
248
|
+
if attributes.key?(:'product_type_4')
|
249
|
+
self.product_type_4 = attributes[:'product_type_4']
|
250
|
+
end
|
251
|
+
|
252
|
+
if attributes.key?(:'product_type_3')
|
253
|
+
self.product_type_3 = attributes[:'product_type_3']
|
254
|
+
end
|
255
|
+
|
256
|
+
if attributes.key?(:'product_type_2')
|
257
|
+
self.product_type_2 = attributes[:'product_type_2']
|
258
|
+
end
|
259
|
+
|
260
|
+
if attributes.key?(:'product_type_1')
|
261
|
+
self.product_type_1 = attributes[:'product_type_1']
|
262
|
+
end
|
263
|
+
|
264
|
+
if attributes.key?(:'product_type_0')
|
265
|
+
self.product_type_0 = attributes[:'product_type_0']
|
266
|
+
end
|
267
|
+
|
268
|
+
if attributes.key?(:'google_product_category_6')
|
269
|
+
self.google_product_category_6 = attributes[:'google_product_category_6']
|
270
|
+
end
|
271
|
+
|
272
|
+
if attributes.key?(:'google_product_category_5')
|
273
|
+
self.google_product_category_5 = attributes[:'google_product_category_5']
|
274
|
+
end
|
275
|
+
|
276
|
+
if attributes.key?(:'google_product_category_4')
|
277
|
+
self.google_product_category_4 = attributes[:'google_product_category_4']
|
278
|
+
end
|
279
|
+
|
280
|
+
if attributes.key?(:'google_product_category_3')
|
281
|
+
self.google_product_category_3 = attributes[:'google_product_category_3']
|
282
|
+
end
|
283
|
+
|
284
|
+
if attributes.key?(:'google_product_category_2')
|
285
|
+
self.google_product_category_2 = attributes[:'google_product_category_2']
|
286
|
+
end
|
287
|
+
|
288
|
+
if attributes.key?(:'google_product_category_1')
|
289
|
+
self.google_product_category_1 = attributes[:'google_product_category_1']
|
290
|
+
end
|
291
|
+
|
292
|
+
if attributes.key?(:'google_product_category_0')
|
293
|
+
self.google_product_category_0 = attributes[:'google_product_category_0']
|
294
|
+
end
|
295
|
+
end
|
296
|
+
|
297
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
298
|
+
# @return Array for valid properties with the reasons
|
299
|
+
def list_invalid_properties
|
300
|
+
invalid_properties = Array.new
|
301
|
+
if @min_price.nil?
|
302
|
+
invalid_properties.push('invalid value for "min_price", min_price cannot be nil.')
|
303
|
+
end
|
304
|
+
|
305
|
+
if @max_price.nil?
|
306
|
+
invalid_properties.push('invalid value for "max_price", max_price cannot be nil.')
|
307
|
+
end
|
308
|
+
|
309
|
+
if @currency.nil?
|
310
|
+
invalid_properties.push('invalid value for "currency", currency cannot be nil.')
|
311
|
+
end
|
312
|
+
|
313
|
+
if @item_id.nil?
|
314
|
+
invalid_properties.push('invalid value for "item_id", item_id cannot be nil.')
|
315
|
+
end
|
316
|
+
|
317
|
+
if @availability.nil?
|
318
|
+
invalid_properties.push('invalid value for "availability", availability cannot be nil.')
|
319
|
+
end
|
320
|
+
|
321
|
+
if @brand.nil?
|
322
|
+
invalid_properties.push('invalid value for "brand", brand cannot be nil.')
|
323
|
+
end
|
324
|
+
|
325
|
+
if @condition.nil?
|
326
|
+
invalid_properties.push('invalid value for "condition", condition cannot be nil.')
|
327
|
+
end
|
328
|
+
|
329
|
+
if @custom_label_0.nil?
|
330
|
+
invalid_properties.push('invalid value for "custom_label_0", custom_label_0 cannot be nil.')
|
331
|
+
end
|
332
|
+
|
333
|
+
if @custom_label_1.nil?
|
334
|
+
invalid_properties.push('invalid value for "custom_label_1", custom_label_1 cannot be nil.')
|
335
|
+
end
|
336
|
+
|
337
|
+
if @custom_label_2.nil?
|
338
|
+
invalid_properties.push('invalid value for "custom_label_2", custom_label_2 cannot be nil.')
|
339
|
+
end
|
340
|
+
|
341
|
+
if @custom_label_3.nil?
|
342
|
+
invalid_properties.push('invalid value for "custom_label_3", custom_label_3 cannot be nil.')
|
343
|
+
end
|
344
|
+
|
345
|
+
if @custom_label_4.nil?
|
346
|
+
invalid_properties.push('invalid value for "custom_label_4", custom_label_4 cannot be nil.')
|
347
|
+
end
|
348
|
+
|
349
|
+
if @item_group_id.nil?
|
350
|
+
invalid_properties.push('invalid value for "item_group_id", item_group_id cannot be nil.')
|
351
|
+
end
|
352
|
+
|
353
|
+
if @gender.nil?
|
354
|
+
invalid_properties.push('invalid value for "gender", gender cannot be nil.')
|
355
|
+
end
|
356
|
+
|
357
|
+
if @product_type_4.nil?
|
358
|
+
invalid_properties.push('invalid value for "product_type_4", product_type_4 cannot be nil.')
|
359
|
+
end
|
360
|
+
|
361
|
+
if @product_type_3.nil?
|
362
|
+
invalid_properties.push('invalid value for "product_type_3", product_type_3 cannot be nil.')
|
363
|
+
end
|
364
|
+
|
365
|
+
if @product_type_2.nil?
|
366
|
+
invalid_properties.push('invalid value for "product_type_2", product_type_2 cannot be nil.')
|
367
|
+
end
|
368
|
+
|
369
|
+
if @product_type_1.nil?
|
370
|
+
invalid_properties.push('invalid value for "product_type_1", product_type_1 cannot be nil.')
|
371
|
+
end
|
372
|
+
|
373
|
+
if @product_type_0.nil?
|
374
|
+
invalid_properties.push('invalid value for "product_type_0", product_type_0 cannot be nil.')
|
375
|
+
end
|
376
|
+
|
377
|
+
if @google_product_category_6.nil?
|
378
|
+
invalid_properties.push('invalid value for "google_product_category_6", google_product_category_6 cannot be nil.')
|
379
|
+
end
|
380
|
+
|
381
|
+
if @google_product_category_5.nil?
|
382
|
+
invalid_properties.push('invalid value for "google_product_category_5", google_product_category_5 cannot be nil.')
|
383
|
+
end
|
384
|
+
|
385
|
+
if @google_product_category_4.nil?
|
386
|
+
invalid_properties.push('invalid value for "google_product_category_4", google_product_category_4 cannot be nil.')
|
387
|
+
end
|
388
|
+
|
389
|
+
if @google_product_category_3.nil?
|
390
|
+
invalid_properties.push('invalid value for "google_product_category_3", google_product_category_3 cannot be nil.')
|
391
|
+
end
|
392
|
+
|
393
|
+
if @google_product_category_2.nil?
|
394
|
+
invalid_properties.push('invalid value for "google_product_category_2", google_product_category_2 cannot be nil.')
|
395
|
+
end
|
396
|
+
|
397
|
+
if @google_product_category_1.nil?
|
398
|
+
invalid_properties.push('invalid value for "google_product_category_1", google_product_category_1 cannot be nil.')
|
399
|
+
end
|
400
|
+
|
401
|
+
if @google_product_category_0.nil?
|
402
|
+
invalid_properties.push('invalid value for "google_product_category_0", google_product_category_0 cannot be nil.')
|
403
|
+
end
|
404
|
+
|
405
|
+
invalid_properties
|
406
|
+
end
|
407
|
+
|
408
|
+
# Check to see if the all the properties in the model are valid
|
409
|
+
# @return true if the model is valid
|
410
|
+
def valid?
|
411
|
+
return false if @min_price.nil?
|
412
|
+
return false if @max_price.nil?
|
413
|
+
return false if @currency.nil?
|
414
|
+
return false if @item_id.nil?
|
415
|
+
return false if @availability.nil?
|
416
|
+
return false if @brand.nil?
|
417
|
+
return false if @condition.nil?
|
418
|
+
return false if @custom_label_0.nil?
|
419
|
+
return false if @custom_label_1.nil?
|
420
|
+
return false if @custom_label_2.nil?
|
421
|
+
return false if @custom_label_3.nil?
|
422
|
+
return false if @custom_label_4.nil?
|
423
|
+
return false if @item_group_id.nil?
|
424
|
+
return false if @gender.nil?
|
425
|
+
return false if @product_type_4.nil?
|
426
|
+
return false if @product_type_3.nil?
|
427
|
+
return false if @product_type_2.nil?
|
428
|
+
return false if @product_type_1.nil?
|
429
|
+
return false if @product_type_0.nil?
|
430
|
+
return false if @google_product_category_6.nil?
|
431
|
+
return false if @google_product_category_5.nil?
|
432
|
+
return false if @google_product_category_4.nil?
|
433
|
+
return false if @google_product_category_3.nil?
|
434
|
+
return false if @google_product_category_2.nil?
|
435
|
+
return false if @google_product_category_1.nil?
|
436
|
+
return false if @google_product_category_0.nil?
|
437
|
+
_any_of_found = false
|
438
|
+
self.class.openapi_any_of.each do |_class|
|
439
|
+
_any_of = PinterestSdkClient.const_get(_class).build_from_hash(self.to_hash)
|
440
|
+
if _any_of.valid?
|
441
|
+
_any_of_found = true
|
442
|
+
end
|
443
|
+
end
|
444
|
+
|
445
|
+
if !_any_of_found
|
446
|
+
return false
|
447
|
+
end
|
448
|
+
|
449
|
+
true
|
450
|
+
end
|
451
|
+
|
452
|
+
# Checks equality by comparing each attribute.
|
453
|
+
# @param [Object] Object to be compared
|
454
|
+
def ==(o)
|
455
|
+
return true if self.equal?(o)
|
456
|
+
self.class == o.class &&
|
457
|
+
min_price == o.min_price &&
|
458
|
+
max_price == o.max_price &&
|
459
|
+
currency == o.currency &&
|
460
|
+
item_id == o.item_id &&
|
461
|
+
availability == o.availability &&
|
462
|
+
brand == o.brand &&
|
463
|
+
condition == o.condition &&
|
464
|
+
custom_label_0 == o.custom_label_0 &&
|
465
|
+
custom_label_1 == o.custom_label_1 &&
|
466
|
+
custom_label_2 == o.custom_label_2 &&
|
467
|
+
custom_label_3 == o.custom_label_3 &&
|
468
|
+
custom_label_4 == o.custom_label_4 &&
|
469
|
+
item_group_id == o.item_group_id &&
|
470
|
+
gender == o.gender &&
|
471
|
+
product_type_4 == o.product_type_4 &&
|
472
|
+
product_type_3 == o.product_type_3 &&
|
473
|
+
product_type_2 == o.product_type_2 &&
|
474
|
+
product_type_1 == o.product_type_1 &&
|
475
|
+
product_type_0 == o.product_type_0 &&
|
476
|
+
google_product_category_6 == o.google_product_category_6 &&
|
477
|
+
google_product_category_5 == o.google_product_category_5 &&
|
478
|
+
google_product_category_4 == o.google_product_category_4 &&
|
479
|
+
google_product_category_3 == o.google_product_category_3 &&
|
480
|
+
google_product_category_2 == o.google_product_category_2 &&
|
481
|
+
google_product_category_1 == o.google_product_category_1 &&
|
482
|
+
google_product_category_0 == o.google_product_category_0
|
483
|
+
end
|
484
|
+
|
485
|
+
# @see the `==` method
|
486
|
+
# @param [Object] Object to be compared
|
487
|
+
def eql?(o)
|
488
|
+
self == o
|
489
|
+
end
|
490
|
+
|
491
|
+
# Calculates hash code according to all attributes.
|
492
|
+
# @return [Integer] Hash code
|
493
|
+
def hash
|
494
|
+
[min_price, max_price, currency, item_id, availability, brand, condition, custom_label_0, custom_label_1, custom_label_2, custom_label_3, custom_label_4, item_group_id, gender, product_type_4, product_type_3, product_type_2, product_type_1, product_type_0, google_product_category_6, google_product_category_5, google_product_category_4, google_product_category_3, google_product_category_2, google_product_category_1, google_product_category_0].hash
|
495
|
+
end
|
496
|
+
|
497
|
+
# Builds the object from hash
|
498
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
499
|
+
# @return [Object] Returns the model itself
|
500
|
+
def self.build_from_hash(attributes)
|
501
|
+
new.build_from_hash(attributes)
|
502
|
+
end
|
503
|
+
|
504
|
+
# Builds the object from hash
|
505
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
506
|
+
# @return [Object] Returns the model itself
|
507
|
+
def build_from_hash(attributes)
|
508
|
+
return nil unless attributes.is_a?(Hash)
|
509
|
+
self.class.openapi_types.each_pair do |key, type|
|
510
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
511
|
+
self.send("#{key}=", nil)
|
512
|
+
elsif type =~ /\AArray<(.*)>/i
|
513
|
+
# check to ensure the input is an array given that the attribute
|
514
|
+
# is documented as an array but the input is not
|
515
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
516
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
517
|
+
end
|
518
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
519
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
520
|
+
end
|
521
|
+
end
|
522
|
+
|
523
|
+
self
|
524
|
+
end
|
525
|
+
|
526
|
+
# Deserializes the data based on type
|
527
|
+
# @param string type Data type
|
528
|
+
# @param string value Value to be deserialized
|
529
|
+
# @return [Object] Deserialized data
|
530
|
+
def _deserialize(type, value)
|
531
|
+
case type.to_sym
|
532
|
+
when :Time
|
533
|
+
Time.parse(value)
|
534
|
+
when :Date
|
535
|
+
Date.parse(value)
|
536
|
+
when :String
|
537
|
+
value.to_s
|
538
|
+
when :Integer
|
539
|
+
value.to_i
|
540
|
+
when :Float
|
541
|
+
value.to_f
|
542
|
+
when :Boolean
|
543
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
544
|
+
true
|
545
|
+
else
|
546
|
+
false
|
547
|
+
end
|
548
|
+
when :Object
|
549
|
+
# generic object (usually a Hash), return directly
|
550
|
+
value
|
551
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
552
|
+
inner_type = Regexp.last_match[:inner_type]
|
553
|
+
value.map { |v| _deserialize(inner_type, v) }
|
554
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
555
|
+
k_type = Regexp.last_match[:k_type]
|
556
|
+
v_type = Regexp.last_match[:v_type]
|
557
|
+
{}.tap do |hash|
|
558
|
+
value.each do |k, v|
|
559
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
560
|
+
end
|
561
|
+
end
|
562
|
+
else # model
|
563
|
+
# models (e.g. Pet) or oneOf
|
564
|
+
klass = PinterestSdkClient.const_get(type)
|
565
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
566
|
+
end
|
567
|
+
end
|
568
|
+
|
569
|
+
# Returns the string representation of the object
|
570
|
+
# @return [String] String presentation of the object
|
571
|
+
def to_s
|
572
|
+
to_hash.to_s
|
573
|
+
end
|
574
|
+
|
575
|
+
# to_body is an alias to to_hash (backward compatibility)
|
576
|
+
# @return [Hash] Returns the object in the form of hash
|
577
|
+
def to_body
|
578
|
+
to_hash
|
579
|
+
end
|
580
|
+
|
581
|
+
# Returns the object in the form of hash
|
582
|
+
# @return [Hash] Returns the object in the form of hash
|
583
|
+
def to_hash
|
584
|
+
hash = {}
|
585
|
+
self.class.attribute_map.each_pair do |attr, param|
|
586
|
+
value = self.send(attr)
|
587
|
+
if value.nil?
|
588
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
589
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
590
|
+
end
|
591
|
+
|
592
|
+
hash[param] = _to_hash(value)
|
593
|
+
end
|
594
|
+
hash
|
595
|
+
end
|
596
|
+
|
597
|
+
# Outputs non-array value in the form of hash
|
598
|
+
# For object, use to_hash. Otherwise, just return the value
|
599
|
+
# @param [Object] value Any valid value
|
600
|
+
# @return [Hash] Returns the value in the form of hash
|
601
|
+
def _to_hash(value)
|
602
|
+
if value.is_a?(Array)
|
603
|
+
value.compact.map { |v| _to_hash(v) }
|
604
|
+
elsif value.is_a?(Hash)
|
605
|
+
{}.tap do |hash|
|
606
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
607
|
+
end
|
608
|
+
elsif value.respond_to? :to_hash
|
609
|
+
value.to_hash
|
610
|
+
else
|
611
|
+
value
|
612
|
+
end
|
613
|
+
end
|
614
|
+
|
615
|
+
end
|
616
|
+
|
617
|
+
end
|