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,640 @@
|
|
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 AdResponse
|
18
|
+
# ID of the ad group that contains the ad.
|
19
|
+
attr_accessor :ad_group_id
|
20
|
+
|
21
|
+
# Deep link URL for Android devices. Not currently available. Using this field will generate an error.
|
22
|
+
attr_accessor :android_deep_link
|
23
|
+
|
24
|
+
# Comma-separated deep links for the carousel pin on Android.
|
25
|
+
attr_accessor :carousel_android_deep_links
|
26
|
+
|
27
|
+
# Comma-separated destination URLs for the carousel pin to promote.
|
28
|
+
attr_accessor :carousel_destination_urls
|
29
|
+
|
30
|
+
# Comma-separated deep links for the carousel pin on iOS.
|
31
|
+
attr_accessor :carousel_ios_deep_links
|
32
|
+
|
33
|
+
# Tracking url for the ad clicks.
|
34
|
+
attr_accessor :click_tracking_url
|
35
|
+
|
36
|
+
# Ad creative type enum
|
37
|
+
attr_accessor :creative_type
|
38
|
+
|
39
|
+
# Destination URL.
|
40
|
+
attr_accessor :destination_url
|
41
|
+
|
42
|
+
# Deep link URL for iOS devices. Not currently available. Using this field will generate an error.
|
43
|
+
attr_accessor :ios_deep_link
|
44
|
+
|
45
|
+
# Is original pin deleted?
|
46
|
+
attr_accessor :is_pin_deleted
|
47
|
+
|
48
|
+
# Is pin repinnable?
|
49
|
+
attr_accessor :is_removable
|
50
|
+
|
51
|
+
# Name of the ad - 255 chars max.
|
52
|
+
attr_accessor :name
|
53
|
+
|
54
|
+
# Pin ID.
|
55
|
+
attr_accessor :pin_id
|
56
|
+
|
57
|
+
attr_accessor :status
|
58
|
+
|
59
|
+
attr_accessor :tracking_urls
|
60
|
+
|
61
|
+
# Tracking URL for ad impressions.
|
62
|
+
attr_accessor :view_tracking_url
|
63
|
+
|
64
|
+
# The ID of the advertiser that this ad belongs to.
|
65
|
+
attr_accessor :ad_account_id
|
66
|
+
|
67
|
+
# ID of the ad campaign that contains this ad.
|
68
|
+
attr_accessor :campaign_id
|
69
|
+
|
70
|
+
# Destination URL template for all items within a collections drawer.
|
71
|
+
attr_accessor :collection_items_destination_url_template
|
72
|
+
|
73
|
+
# Pin creation time. Unix timestamp in seconds.
|
74
|
+
attr_accessor :created_time
|
75
|
+
|
76
|
+
# The ID of this ad.
|
77
|
+
attr_accessor :id
|
78
|
+
|
79
|
+
# Enum reason why the pin was rejected. Returned if <code>review_status</code> is \"REJECTED\".
|
80
|
+
attr_accessor :rejected_reasons
|
81
|
+
|
82
|
+
# Text reason why the pin was rejected. Returned if <code>review_status</code> is \"REJECTED\".
|
83
|
+
attr_accessor :rejection_labels
|
84
|
+
|
85
|
+
# Ad review status
|
86
|
+
attr_accessor :review_status
|
87
|
+
|
88
|
+
# Always \"ad\".
|
89
|
+
attr_accessor :type
|
90
|
+
|
91
|
+
# Last update time. Unix timestamp in seconds.
|
92
|
+
attr_accessor :updated_time
|
93
|
+
|
94
|
+
# Ad summary status
|
95
|
+
attr_accessor :summary_status
|
96
|
+
|
97
|
+
class EnumAttributeValidator
|
98
|
+
attr_reader :datatype
|
99
|
+
attr_reader :allowable_values
|
100
|
+
|
101
|
+
def initialize(datatype, allowable_values)
|
102
|
+
@allowable_values = allowable_values.map do |value|
|
103
|
+
case datatype.to_s
|
104
|
+
when /Integer/i
|
105
|
+
value.to_i
|
106
|
+
when /Float/i
|
107
|
+
value.to_f
|
108
|
+
else
|
109
|
+
value
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
def valid?(value)
|
115
|
+
!value || allowable_values.include?(value)
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
120
|
+
def self.attribute_map
|
121
|
+
{
|
122
|
+
:'ad_group_id' => :'ad_group_id',
|
123
|
+
:'android_deep_link' => :'android_deep_link',
|
124
|
+
:'carousel_android_deep_links' => :'carousel_android_deep_links',
|
125
|
+
:'carousel_destination_urls' => :'carousel_destination_urls',
|
126
|
+
:'carousel_ios_deep_links' => :'carousel_ios_deep_links',
|
127
|
+
:'click_tracking_url' => :'click_tracking_url',
|
128
|
+
:'creative_type' => :'creative_type',
|
129
|
+
:'destination_url' => :'destination_url',
|
130
|
+
:'ios_deep_link' => :'ios_deep_link',
|
131
|
+
:'is_pin_deleted' => :'is_pin_deleted',
|
132
|
+
:'is_removable' => :'is_removable',
|
133
|
+
:'name' => :'name',
|
134
|
+
:'pin_id' => :'pin_id',
|
135
|
+
:'status' => :'status',
|
136
|
+
:'tracking_urls' => :'tracking_urls',
|
137
|
+
:'view_tracking_url' => :'view_tracking_url',
|
138
|
+
:'ad_account_id' => :'ad_account_id',
|
139
|
+
:'campaign_id' => :'campaign_id',
|
140
|
+
:'collection_items_destination_url_template' => :'collection_items_destination_url_template',
|
141
|
+
:'created_time' => :'created_time',
|
142
|
+
:'id' => :'id',
|
143
|
+
:'rejected_reasons' => :'rejected_reasons',
|
144
|
+
:'rejection_labels' => :'rejection_labels',
|
145
|
+
:'review_status' => :'review_status',
|
146
|
+
:'type' => :'type',
|
147
|
+
:'updated_time' => :'updated_time',
|
148
|
+
:'summary_status' => :'summary_status'
|
149
|
+
}
|
150
|
+
end
|
151
|
+
|
152
|
+
# Returns all the JSON keys this model knows about
|
153
|
+
def self.acceptable_attributes
|
154
|
+
attribute_map.values
|
155
|
+
end
|
156
|
+
|
157
|
+
# Attribute type mapping.
|
158
|
+
def self.openapi_types
|
159
|
+
{
|
160
|
+
:'ad_group_id' => :'String',
|
161
|
+
:'android_deep_link' => :'String',
|
162
|
+
:'carousel_android_deep_links' => :'Array<String>',
|
163
|
+
:'carousel_destination_urls' => :'Array<String>',
|
164
|
+
:'carousel_ios_deep_links' => :'Array<String>',
|
165
|
+
:'click_tracking_url' => :'String',
|
166
|
+
:'creative_type' => :'String',
|
167
|
+
:'destination_url' => :'String',
|
168
|
+
:'ios_deep_link' => :'String',
|
169
|
+
:'is_pin_deleted' => :'Boolean',
|
170
|
+
:'is_removable' => :'Boolean',
|
171
|
+
:'name' => :'String',
|
172
|
+
:'pin_id' => :'String',
|
173
|
+
:'status' => :'EntityStatus',
|
174
|
+
:'tracking_urls' => :'TrackingUrls',
|
175
|
+
:'view_tracking_url' => :'String',
|
176
|
+
:'ad_account_id' => :'String',
|
177
|
+
:'campaign_id' => :'String',
|
178
|
+
:'collection_items_destination_url_template' => :'String',
|
179
|
+
:'created_time' => :'Integer',
|
180
|
+
:'id' => :'String',
|
181
|
+
:'rejected_reasons' => :'Array<String>',
|
182
|
+
:'rejection_labels' => :'Array<String>',
|
183
|
+
:'review_status' => :'String',
|
184
|
+
:'type' => :'String',
|
185
|
+
:'updated_time' => :'Integer',
|
186
|
+
:'summary_status' => :'PinPromotionSummaryStatus'
|
187
|
+
}
|
188
|
+
end
|
189
|
+
|
190
|
+
# List of attributes with nullable: true
|
191
|
+
def self.openapi_nullable
|
192
|
+
Set.new([
|
193
|
+
:'android_deep_link',
|
194
|
+
:'carousel_android_deep_links',
|
195
|
+
:'carousel_destination_urls',
|
196
|
+
:'carousel_ios_deep_links',
|
197
|
+
:'click_tracking_url',
|
198
|
+
:'destination_url',
|
199
|
+
:'ios_deep_link',
|
200
|
+
:'name',
|
201
|
+
:'tracking_urls',
|
202
|
+
:'view_tracking_url',
|
203
|
+
:'collection_items_destination_url_template',
|
204
|
+
])
|
205
|
+
end
|
206
|
+
|
207
|
+
# List of class defined in allOf (OpenAPI v3)
|
208
|
+
def self.openapi_all_of
|
209
|
+
[
|
210
|
+
:'AdResponseAllOf',
|
211
|
+
:'AdResponseAllOf1'
|
212
|
+
]
|
213
|
+
end
|
214
|
+
|
215
|
+
# Initializes the object
|
216
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
217
|
+
def initialize(attributes = {})
|
218
|
+
if (!attributes.is_a?(Hash))
|
219
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PinterestSdkClient::AdResponse` initialize method"
|
220
|
+
end
|
221
|
+
|
222
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
223
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
224
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
225
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PinterestSdkClient::AdResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
226
|
+
end
|
227
|
+
h[k.to_sym] = v
|
228
|
+
}
|
229
|
+
|
230
|
+
if attributes.key?(:'ad_group_id')
|
231
|
+
self.ad_group_id = attributes[:'ad_group_id']
|
232
|
+
end
|
233
|
+
|
234
|
+
if attributes.key?(:'android_deep_link')
|
235
|
+
self.android_deep_link = attributes[:'android_deep_link']
|
236
|
+
end
|
237
|
+
|
238
|
+
if attributes.key?(:'carousel_android_deep_links')
|
239
|
+
if (value = attributes[:'carousel_android_deep_links']).is_a?(Array)
|
240
|
+
self.carousel_android_deep_links = value
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
244
|
+
if attributes.key?(:'carousel_destination_urls')
|
245
|
+
if (value = attributes[:'carousel_destination_urls']).is_a?(Array)
|
246
|
+
self.carousel_destination_urls = value
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
250
|
+
if attributes.key?(:'carousel_ios_deep_links')
|
251
|
+
if (value = attributes[:'carousel_ios_deep_links']).is_a?(Array)
|
252
|
+
self.carousel_ios_deep_links = value
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
256
|
+
if attributes.key?(:'click_tracking_url')
|
257
|
+
self.click_tracking_url = attributes[:'click_tracking_url']
|
258
|
+
end
|
259
|
+
|
260
|
+
if attributes.key?(:'creative_type')
|
261
|
+
self.creative_type = attributes[:'creative_type']
|
262
|
+
end
|
263
|
+
|
264
|
+
if attributes.key?(:'destination_url')
|
265
|
+
self.destination_url = attributes[:'destination_url']
|
266
|
+
end
|
267
|
+
|
268
|
+
if attributes.key?(:'ios_deep_link')
|
269
|
+
self.ios_deep_link = attributes[:'ios_deep_link']
|
270
|
+
end
|
271
|
+
|
272
|
+
if attributes.key?(:'is_pin_deleted')
|
273
|
+
self.is_pin_deleted = attributes[:'is_pin_deleted']
|
274
|
+
end
|
275
|
+
|
276
|
+
if attributes.key?(:'is_removable')
|
277
|
+
self.is_removable = attributes[:'is_removable']
|
278
|
+
end
|
279
|
+
|
280
|
+
if attributes.key?(:'name')
|
281
|
+
self.name = attributes[:'name']
|
282
|
+
end
|
283
|
+
|
284
|
+
if attributes.key?(:'pin_id')
|
285
|
+
self.pin_id = attributes[:'pin_id']
|
286
|
+
end
|
287
|
+
|
288
|
+
if attributes.key?(:'status')
|
289
|
+
self.status = attributes[:'status']
|
290
|
+
end
|
291
|
+
|
292
|
+
if attributes.key?(:'tracking_urls')
|
293
|
+
if (value = attributes[:'tracking_urls']).is_a?(Hash)
|
294
|
+
self.tracking_urls = value
|
295
|
+
end
|
296
|
+
self.tracking_urls = attributes[:'tracking_urls']
|
297
|
+
end
|
298
|
+
|
299
|
+
if attributes.key?(:'view_tracking_url')
|
300
|
+
self.view_tracking_url = attributes[:'view_tracking_url']
|
301
|
+
end
|
302
|
+
|
303
|
+
if attributes.key?(:'ad_account_id')
|
304
|
+
self.ad_account_id = attributes[:'ad_account_id']
|
305
|
+
end
|
306
|
+
|
307
|
+
if attributes.key?(:'campaign_id')
|
308
|
+
self.campaign_id = attributes[:'campaign_id']
|
309
|
+
end
|
310
|
+
|
311
|
+
if attributes.key?(:'collection_items_destination_url_template')
|
312
|
+
self.collection_items_destination_url_template = attributes[:'collection_items_destination_url_template']
|
313
|
+
end
|
314
|
+
|
315
|
+
if attributes.key?(:'created_time')
|
316
|
+
self.created_time = attributes[:'created_time']
|
317
|
+
end
|
318
|
+
|
319
|
+
if attributes.key?(:'id')
|
320
|
+
self.id = attributes[:'id']
|
321
|
+
end
|
322
|
+
|
323
|
+
if attributes.key?(:'rejected_reasons')
|
324
|
+
if (value = attributes[:'rejected_reasons']).is_a?(Array)
|
325
|
+
self.rejected_reasons = value
|
326
|
+
end
|
327
|
+
end
|
328
|
+
|
329
|
+
if attributes.key?(:'rejection_labels')
|
330
|
+
if (value = attributes[:'rejection_labels']).is_a?(Array)
|
331
|
+
self.rejection_labels = value
|
332
|
+
end
|
333
|
+
end
|
334
|
+
|
335
|
+
if attributes.key?(:'review_status')
|
336
|
+
self.review_status = attributes[:'review_status']
|
337
|
+
end
|
338
|
+
|
339
|
+
if attributes.key?(:'type')
|
340
|
+
self.type = attributes[:'type']
|
341
|
+
end
|
342
|
+
|
343
|
+
if attributes.key?(:'updated_time')
|
344
|
+
self.updated_time = attributes[:'updated_time']
|
345
|
+
end
|
346
|
+
|
347
|
+
if attributes.key?(:'summary_status')
|
348
|
+
self.summary_status = attributes[:'summary_status']
|
349
|
+
end
|
350
|
+
end
|
351
|
+
|
352
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
353
|
+
# @return Array for valid properties with the reasons
|
354
|
+
def list_invalid_properties
|
355
|
+
invalid_properties = Array.new
|
356
|
+
pattern = Regexp.new(/^\d+$/)
|
357
|
+
if !@ad_group_id.nil? && @ad_group_id !~ pattern
|
358
|
+
invalid_properties.push("invalid value for \"ad_group_id\", must conform to the pattern #{pattern}.")
|
359
|
+
end
|
360
|
+
|
361
|
+
pattern = Regexp.new(/^\d+$/)
|
362
|
+
if !@pin_id.nil? && @pin_id !~ pattern
|
363
|
+
invalid_properties.push("invalid value for \"pin_id\", must conform to the pattern #{pattern}.")
|
364
|
+
end
|
365
|
+
|
366
|
+
pattern = Regexp.new(/^\d+$/)
|
367
|
+
if !@ad_account_id.nil? && @ad_account_id !~ pattern
|
368
|
+
invalid_properties.push("invalid value for \"ad_account_id\", must conform to the pattern #{pattern}.")
|
369
|
+
end
|
370
|
+
|
371
|
+
pattern = Regexp.new(/^\d+$/)
|
372
|
+
if !@campaign_id.nil? && @campaign_id !~ pattern
|
373
|
+
invalid_properties.push("invalid value for \"campaign_id\", must conform to the pattern #{pattern}.")
|
374
|
+
end
|
375
|
+
|
376
|
+
pattern = Regexp.new(/^\d+$/)
|
377
|
+
if !@id.nil? && @id !~ pattern
|
378
|
+
invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.")
|
379
|
+
end
|
380
|
+
|
381
|
+
invalid_properties
|
382
|
+
end
|
383
|
+
|
384
|
+
# Check to see if the all the properties in the model are valid
|
385
|
+
# @return true if the model is valid
|
386
|
+
def valid?
|
387
|
+
return false if !@ad_group_id.nil? && @ad_group_id !~ Regexp.new(/^\d+$/)
|
388
|
+
creative_type_validator = EnumAttributeValidator.new('String', ["REGULAR", "VIDEO", "SHOPPING", "CAROUSEL", "MAX_VIDEO", "SHOP_THE_PIN", "STORY"])
|
389
|
+
return false unless creative_type_validator.valid?(@creative_type)
|
390
|
+
return false if !@pin_id.nil? && @pin_id !~ Regexp.new(/^\d+$/)
|
391
|
+
return false if !@ad_account_id.nil? && @ad_account_id !~ Regexp.new(/^\d+$/)
|
392
|
+
return false if !@campaign_id.nil? && @campaign_id !~ Regexp.new(/^\d+$/)
|
393
|
+
return false if !@id.nil? && @id !~ Regexp.new(/^\d+$/)
|
394
|
+
review_status_validator = EnumAttributeValidator.new('String', ["OTHER", "PENDING", "REJECTED", "APPROVED"])
|
395
|
+
return false unless review_status_validator.valid?(@review_status)
|
396
|
+
true
|
397
|
+
end
|
398
|
+
|
399
|
+
# Custom attribute writer method with validation
|
400
|
+
# @param [Object] ad_group_id Value to be assigned
|
401
|
+
def ad_group_id=(ad_group_id)
|
402
|
+
pattern = Regexp.new(/^\d+$/)
|
403
|
+
if !ad_group_id.nil? && ad_group_id !~ pattern
|
404
|
+
fail ArgumentError, "invalid value for \"ad_group_id\", must conform to the pattern #{pattern}."
|
405
|
+
end
|
406
|
+
|
407
|
+
@ad_group_id = ad_group_id
|
408
|
+
end
|
409
|
+
|
410
|
+
# Custom attribute writer method checking allowed values (enum).
|
411
|
+
# @param [Object] creative_type Object to be assigned
|
412
|
+
def creative_type=(creative_type)
|
413
|
+
validator = EnumAttributeValidator.new('String', ["REGULAR", "VIDEO", "SHOPPING", "CAROUSEL", "MAX_VIDEO", "SHOP_THE_PIN", "STORY"])
|
414
|
+
unless validator.valid?(creative_type)
|
415
|
+
fail ArgumentError, "invalid value for \"creative_type\", must be one of #{validator.allowable_values}."
|
416
|
+
end
|
417
|
+
@creative_type = creative_type
|
418
|
+
end
|
419
|
+
|
420
|
+
# Custom attribute writer method with validation
|
421
|
+
# @param [Object] pin_id Value to be assigned
|
422
|
+
def pin_id=(pin_id)
|
423
|
+
pattern = Regexp.new(/^\d+$/)
|
424
|
+
if !pin_id.nil? && pin_id !~ pattern
|
425
|
+
fail ArgumentError, "invalid value for \"pin_id\", must conform to the pattern #{pattern}."
|
426
|
+
end
|
427
|
+
|
428
|
+
@pin_id = pin_id
|
429
|
+
end
|
430
|
+
|
431
|
+
# Custom attribute writer method with validation
|
432
|
+
# @param [Object] ad_account_id Value to be assigned
|
433
|
+
def ad_account_id=(ad_account_id)
|
434
|
+
pattern = Regexp.new(/^\d+$/)
|
435
|
+
if !ad_account_id.nil? && ad_account_id !~ pattern
|
436
|
+
fail ArgumentError, "invalid value for \"ad_account_id\", must conform to the pattern #{pattern}."
|
437
|
+
end
|
438
|
+
|
439
|
+
@ad_account_id = ad_account_id
|
440
|
+
end
|
441
|
+
|
442
|
+
# Custom attribute writer method with validation
|
443
|
+
# @param [Object] campaign_id Value to be assigned
|
444
|
+
def campaign_id=(campaign_id)
|
445
|
+
pattern = Regexp.new(/^\d+$/)
|
446
|
+
if !campaign_id.nil? && campaign_id !~ pattern
|
447
|
+
fail ArgumentError, "invalid value for \"campaign_id\", must conform to the pattern #{pattern}."
|
448
|
+
end
|
449
|
+
|
450
|
+
@campaign_id = campaign_id
|
451
|
+
end
|
452
|
+
|
453
|
+
# Custom attribute writer method with validation
|
454
|
+
# @param [Object] id Value to be assigned
|
455
|
+
def id=(id)
|
456
|
+
pattern = Regexp.new(/^\d+$/)
|
457
|
+
if !id.nil? && id !~ pattern
|
458
|
+
fail ArgumentError, "invalid value for \"id\", must conform to the pattern #{pattern}."
|
459
|
+
end
|
460
|
+
|
461
|
+
@id = id
|
462
|
+
end
|
463
|
+
|
464
|
+
# Custom attribute writer method checking allowed values (enum).
|
465
|
+
# @param [Object] review_status Object to be assigned
|
466
|
+
def review_status=(review_status)
|
467
|
+
validator = EnumAttributeValidator.new('String', ["OTHER", "PENDING", "REJECTED", "APPROVED"])
|
468
|
+
unless validator.valid?(review_status)
|
469
|
+
fail ArgumentError, "invalid value for \"review_status\", must be one of #{validator.allowable_values}."
|
470
|
+
end
|
471
|
+
@review_status = review_status
|
472
|
+
end
|
473
|
+
|
474
|
+
# Checks equality by comparing each attribute.
|
475
|
+
# @param [Object] Object to be compared
|
476
|
+
def ==(o)
|
477
|
+
return true if self.equal?(o)
|
478
|
+
self.class == o.class &&
|
479
|
+
ad_group_id == o.ad_group_id &&
|
480
|
+
android_deep_link == o.android_deep_link &&
|
481
|
+
carousel_android_deep_links == o.carousel_android_deep_links &&
|
482
|
+
carousel_destination_urls == o.carousel_destination_urls &&
|
483
|
+
carousel_ios_deep_links == o.carousel_ios_deep_links &&
|
484
|
+
click_tracking_url == o.click_tracking_url &&
|
485
|
+
creative_type == o.creative_type &&
|
486
|
+
destination_url == o.destination_url &&
|
487
|
+
ios_deep_link == o.ios_deep_link &&
|
488
|
+
is_pin_deleted == o.is_pin_deleted &&
|
489
|
+
is_removable == o.is_removable &&
|
490
|
+
name == o.name &&
|
491
|
+
pin_id == o.pin_id &&
|
492
|
+
status == o.status &&
|
493
|
+
tracking_urls == o.tracking_urls &&
|
494
|
+
view_tracking_url == o.view_tracking_url &&
|
495
|
+
ad_account_id == o.ad_account_id &&
|
496
|
+
campaign_id == o.campaign_id &&
|
497
|
+
collection_items_destination_url_template == o.collection_items_destination_url_template &&
|
498
|
+
created_time == o.created_time &&
|
499
|
+
id == o.id &&
|
500
|
+
rejected_reasons == o.rejected_reasons &&
|
501
|
+
rejection_labels == o.rejection_labels &&
|
502
|
+
review_status == o.review_status &&
|
503
|
+
type == o.type &&
|
504
|
+
updated_time == o.updated_time &&
|
505
|
+
summary_status == o.summary_status
|
506
|
+
end
|
507
|
+
|
508
|
+
# @see the `==` method
|
509
|
+
# @param [Object] Object to be compared
|
510
|
+
def eql?(o)
|
511
|
+
self == o
|
512
|
+
end
|
513
|
+
|
514
|
+
# Calculates hash code according to all attributes.
|
515
|
+
# @return [Integer] Hash code
|
516
|
+
def hash
|
517
|
+
[ad_group_id, android_deep_link, carousel_android_deep_links, carousel_destination_urls, carousel_ios_deep_links, click_tracking_url, creative_type, destination_url, ios_deep_link, is_pin_deleted, is_removable, name, pin_id, status, tracking_urls, view_tracking_url, ad_account_id, campaign_id, collection_items_destination_url_template, created_time, id, rejected_reasons, rejection_labels, review_status, type, updated_time, summary_status].hash
|
518
|
+
end
|
519
|
+
|
520
|
+
# Builds the object from hash
|
521
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
522
|
+
# @return [Object] Returns the model itself
|
523
|
+
def self.build_from_hash(attributes)
|
524
|
+
new.build_from_hash(attributes)
|
525
|
+
end
|
526
|
+
|
527
|
+
# Builds the object from hash
|
528
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
529
|
+
# @return [Object] Returns the model itself
|
530
|
+
def build_from_hash(attributes)
|
531
|
+
return nil unless attributes.is_a?(Hash)
|
532
|
+
self.class.openapi_types.each_pair do |key, type|
|
533
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
534
|
+
self.send("#{key}=", nil)
|
535
|
+
elsif type =~ /\AArray<(.*)>/i
|
536
|
+
# check to ensure the input is an array given that the attribute
|
537
|
+
# is documented as an array but the input is not
|
538
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
539
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
540
|
+
end
|
541
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
542
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
543
|
+
end
|
544
|
+
end
|
545
|
+
|
546
|
+
self
|
547
|
+
end
|
548
|
+
|
549
|
+
# Deserializes the data based on type
|
550
|
+
# @param string type Data type
|
551
|
+
# @param string value Value to be deserialized
|
552
|
+
# @return [Object] Deserialized data
|
553
|
+
def _deserialize(type, value)
|
554
|
+
case type.to_sym
|
555
|
+
when :Time
|
556
|
+
Time.parse(value)
|
557
|
+
when :Date
|
558
|
+
Date.parse(value)
|
559
|
+
when :String
|
560
|
+
value.to_s
|
561
|
+
when :Integer
|
562
|
+
value.to_i
|
563
|
+
when :Float
|
564
|
+
value.to_f
|
565
|
+
when :Boolean
|
566
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
567
|
+
true
|
568
|
+
else
|
569
|
+
false
|
570
|
+
end
|
571
|
+
when :Object
|
572
|
+
# generic object (usually a Hash), return directly
|
573
|
+
value
|
574
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
575
|
+
inner_type = Regexp.last_match[:inner_type]
|
576
|
+
value.map { |v| _deserialize(inner_type, v) }
|
577
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
578
|
+
k_type = Regexp.last_match[:k_type]
|
579
|
+
v_type = Regexp.last_match[:v_type]
|
580
|
+
{}.tap do |hash|
|
581
|
+
value.each do |k, v|
|
582
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
583
|
+
end
|
584
|
+
end
|
585
|
+
else # model
|
586
|
+
# models (e.g. Pet) or oneOf
|
587
|
+
klass = PinterestSdkClient.const_get(type)
|
588
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
589
|
+
end
|
590
|
+
end
|
591
|
+
|
592
|
+
# Returns the string representation of the object
|
593
|
+
# @return [String] String presentation of the object
|
594
|
+
def to_s
|
595
|
+
to_hash.to_s
|
596
|
+
end
|
597
|
+
|
598
|
+
# to_body is an alias to to_hash (backward compatibility)
|
599
|
+
# @return [Hash] Returns the object in the form of hash
|
600
|
+
def to_body
|
601
|
+
to_hash
|
602
|
+
end
|
603
|
+
|
604
|
+
# Returns the object in the form of hash
|
605
|
+
# @return [Hash] Returns the object in the form of hash
|
606
|
+
def to_hash
|
607
|
+
hash = {}
|
608
|
+
self.class.attribute_map.each_pair do |attr, param|
|
609
|
+
value = self.send(attr)
|
610
|
+
if value.nil?
|
611
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
612
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
613
|
+
end
|
614
|
+
|
615
|
+
hash[param] = _to_hash(value)
|
616
|
+
end
|
617
|
+
hash
|
618
|
+
end
|
619
|
+
|
620
|
+
# Outputs non-array value in the form of hash
|
621
|
+
# For object, use to_hash. Otherwise, just return the value
|
622
|
+
# @param [Object] value Any valid value
|
623
|
+
# @return [Hash] Returns the value in the form of hash
|
624
|
+
def _to_hash(value)
|
625
|
+
if value.is_a?(Array)
|
626
|
+
value.compact.map { |v| _to_hash(v) }
|
627
|
+
elsif value.is_a?(Hash)
|
628
|
+
{}.tap do |hash|
|
629
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
630
|
+
end
|
631
|
+
elsif value.respond_to? :to_hash
|
632
|
+
value.to_hash
|
633
|
+
else
|
634
|
+
value
|
635
|
+
end
|
636
|
+
end
|
637
|
+
|
638
|
+
end
|
639
|
+
|
640
|
+
end
|