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,427 @@
|
|
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 AdGroupResponseAllOf
|
18
|
+
# Ad group name.
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
# Ad group/entity status.
|
22
|
+
attr_accessor :status
|
23
|
+
|
24
|
+
# Budget in micro currency. This field is **REQUIRED** for non-CBO (campaign budget optimization) campaigns. A CBO campaign automatically generates ad group budgets from its campaign budget to maximize campaign outcome. A CBO campaign is limited to 70 or less ad groups.
|
25
|
+
attr_accessor :budget_in_micro_currency
|
26
|
+
|
27
|
+
# Bid price in micro currency. This field is **REQUIRED** for the following campaign objective_type/billable_event combinations: AWARENESS/IMPRESSION, CONSIDERATION/CLICKTHROUGH, CATALOG_SALES/CLICKTHROUGH, VIDEO_VIEW/VIDEO_V_50_MRC.
|
28
|
+
attr_accessor :bid_in_micro_currency
|
29
|
+
|
30
|
+
# Budget type. If DAILY, an ad group's daily spend will not exceed the budget parameter value. If LIFETIME, the end_time parameter is **REQUIRED**, and the ad group spend is spread evenly between the ad group `start_time` and `end_time` range. A CBO campaign automatically generates ad group budgets from its campaign budget to maximize campaign outcome.
|
31
|
+
attr_accessor :budget_type
|
32
|
+
|
33
|
+
# Ad group start time. Unix timestamp in seconds. Defaults to current time.
|
34
|
+
attr_accessor :start_time
|
35
|
+
|
36
|
+
# Ad group end time. Unix timestamp in seconds.
|
37
|
+
attr_accessor :end_time
|
38
|
+
|
39
|
+
# Ad group targeting specification defining the ad group target audience. For example, '{\"APPTYPE\":[\"iphone\"], \"GENDER\":[\"male\"], \"LOCALE\":[\"en-US\"], \"LOCATION\":[\"501\"], \"AGE_BUCKET\":[\"25-34\"]}'
|
40
|
+
attr_accessor :targeting_spec
|
41
|
+
|
42
|
+
# Set a limit to the number of times a promoted pin from this campaign can be impressed by a pinner within the past rolling 30 days. Only available for CPM (cost per mille (1000 impressions)) ad groups. A CPM ad group has an IMPRESSION <a href=\\\"/docs/redoc/#section/Billable-event\\\">billable_event</a> value. This field **REQUIRES** the `end_time` field.
|
43
|
+
attr_accessor :lifetime_frequency_cap
|
44
|
+
|
45
|
+
# Third-party tracking URLs.<br> JSON object with the format: {\"<a href=\"https://developers.pinterest.com/docs/redoc/#section/Tracking-URL-event\">Tracking event enum</a>\":[URL string array],...}<br> For example: {\"impression\": [\"URL1\", \"URL2\"], \"click\": [\"URL1\", \"URL2\", \"URL3\"]}.<br>Up to three tracking URLs are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. May be null. Pass in an empty object - {} - to remove tracking URLs.<br><br> For more information, see <a href=\"https://help.pinterest.com/en/business/article/third-party-and-dynamic-tracking\" target=\"_blank\">Third-party and dynamic tracking</a>.
|
46
|
+
attr_accessor :tracking_urls
|
47
|
+
|
48
|
+
# Enable auto-targeting for ad group. Also known as <a href=\"https://help.pinterest.com/en/business/article/expanded-targeting\" target=\"_blank\">\"expanded targeting\"</a>.
|
49
|
+
attr_accessor :auto_targeting_enabled
|
50
|
+
|
51
|
+
# <a href=\\\"/docs/redoc/#section/Placement-group\\\">Placement group</a>.
|
52
|
+
attr_accessor :placement_group
|
53
|
+
|
54
|
+
# Pacing delivery type. With ACCELERATED, an ad group budget is spent as fast as possible. With STANDARD, an ad group budget is spent smoothly over a day.
|
55
|
+
attr_accessor :pacing_delivery_type
|
56
|
+
|
57
|
+
# oCPM learn mode
|
58
|
+
attr_accessor :conversion_learning_mode_type
|
59
|
+
|
60
|
+
# Ad group summary status.
|
61
|
+
attr_accessor :summary_status
|
62
|
+
|
63
|
+
# Feed Profile ID associated to the adgroup.
|
64
|
+
attr_accessor :feed_profile_id
|
65
|
+
|
66
|
+
class EnumAttributeValidator
|
67
|
+
attr_reader :datatype
|
68
|
+
attr_reader :allowable_values
|
69
|
+
|
70
|
+
def initialize(datatype, allowable_values)
|
71
|
+
@allowable_values = allowable_values.map do |value|
|
72
|
+
case datatype.to_s
|
73
|
+
when /Integer/i
|
74
|
+
value.to_i
|
75
|
+
when /Float/i
|
76
|
+
value.to_f
|
77
|
+
else
|
78
|
+
value
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def valid?(value)
|
84
|
+
!value || allowable_values.include?(value)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
89
|
+
def self.attribute_map
|
90
|
+
{
|
91
|
+
:'name' => :'name',
|
92
|
+
:'status' => :'status',
|
93
|
+
:'budget_in_micro_currency' => :'budget_in_micro_currency',
|
94
|
+
:'bid_in_micro_currency' => :'bid_in_micro_currency',
|
95
|
+
:'budget_type' => :'budget_type',
|
96
|
+
:'start_time' => :'start_time',
|
97
|
+
:'end_time' => :'end_time',
|
98
|
+
:'targeting_spec' => :'targeting_spec',
|
99
|
+
:'lifetime_frequency_cap' => :'lifetime_frequency_cap',
|
100
|
+
:'tracking_urls' => :'tracking_urls',
|
101
|
+
:'auto_targeting_enabled' => :'auto_targeting_enabled',
|
102
|
+
:'placement_group' => :'placement_group',
|
103
|
+
:'pacing_delivery_type' => :'pacing_delivery_type',
|
104
|
+
:'conversion_learning_mode_type' => :'conversion_learning_mode_type',
|
105
|
+
:'summary_status' => :'summary_status',
|
106
|
+
:'feed_profile_id' => :'feed_profile_id'
|
107
|
+
}
|
108
|
+
end
|
109
|
+
|
110
|
+
# Returns all the JSON keys this model knows about
|
111
|
+
def self.acceptable_attributes
|
112
|
+
attribute_map.values
|
113
|
+
end
|
114
|
+
|
115
|
+
# Attribute type mapping.
|
116
|
+
def self.openapi_types
|
117
|
+
{
|
118
|
+
:'name' => :'String',
|
119
|
+
:'status' => :'EntityStatus',
|
120
|
+
:'budget_in_micro_currency' => :'Integer',
|
121
|
+
:'bid_in_micro_currency' => :'Integer',
|
122
|
+
:'budget_type' => :'String',
|
123
|
+
:'start_time' => :'Integer',
|
124
|
+
:'end_time' => :'Integer',
|
125
|
+
:'targeting_spec' => :'Hash<String, Array<String>>',
|
126
|
+
:'lifetime_frequency_cap' => :'Integer',
|
127
|
+
:'tracking_urls' => :'TrackingUrls',
|
128
|
+
:'auto_targeting_enabled' => :'Boolean',
|
129
|
+
:'placement_group' => :'PlacementGroupType',
|
130
|
+
:'pacing_delivery_type' => :'PacingDeliveryType',
|
131
|
+
:'conversion_learning_mode_type' => :'String',
|
132
|
+
:'summary_status' => :'AdGroupSummaryStatus',
|
133
|
+
:'feed_profile_id' => :'String'
|
134
|
+
}
|
135
|
+
end
|
136
|
+
|
137
|
+
# List of attributes with nullable: true
|
138
|
+
def self.openapi_nullable
|
139
|
+
Set.new([
|
140
|
+
:'budget_in_micro_currency',
|
141
|
+
:'bid_in_micro_currency',
|
142
|
+
:'start_time',
|
143
|
+
:'end_time',
|
144
|
+
:'tracking_urls',
|
145
|
+
:'auto_targeting_enabled',
|
146
|
+
:'conversion_learning_mode_type',
|
147
|
+
])
|
148
|
+
end
|
149
|
+
|
150
|
+
# Initializes the object
|
151
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
152
|
+
def initialize(attributes = {})
|
153
|
+
if (!attributes.is_a?(Hash))
|
154
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PinterestSdkClient::AdGroupResponseAllOf` initialize method"
|
155
|
+
end
|
156
|
+
|
157
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
158
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
159
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
160
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PinterestSdkClient::AdGroupResponseAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
161
|
+
end
|
162
|
+
h[k.to_sym] = v
|
163
|
+
}
|
164
|
+
|
165
|
+
if attributes.key?(:'name')
|
166
|
+
self.name = attributes[:'name']
|
167
|
+
end
|
168
|
+
|
169
|
+
if attributes.key?(:'status')
|
170
|
+
self.status = attributes[:'status']
|
171
|
+
end
|
172
|
+
|
173
|
+
if attributes.key?(:'budget_in_micro_currency')
|
174
|
+
self.budget_in_micro_currency = attributes[:'budget_in_micro_currency']
|
175
|
+
end
|
176
|
+
|
177
|
+
if attributes.key?(:'bid_in_micro_currency')
|
178
|
+
self.bid_in_micro_currency = attributes[:'bid_in_micro_currency']
|
179
|
+
end
|
180
|
+
|
181
|
+
if attributes.key?(:'budget_type')
|
182
|
+
self.budget_type = attributes[:'budget_type']
|
183
|
+
end
|
184
|
+
|
185
|
+
if attributes.key?(:'start_time')
|
186
|
+
self.start_time = attributes[:'start_time']
|
187
|
+
end
|
188
|
+
|
189
|
+
if attributes.key?(:'end_time')
|
190
|
+
self.end_time = attributes[:'end_time']
|
191
|
+
end
|
192
|
+
|
193
|
+
if attributes.key?(:'targeting_spec')
|
194
|
+
if (value = attributes[:'targeting_spec']).is_a?(Hash)
|
195
|
+
self.targeting_spec = value
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
if attributes.key?(:'lifetime_frequency_cap')
|
200
|
+
self.lifetime_frequency_cap = attributes[:'lifetime_frequency_cap']
|
201
|
+
end
|
202
|
+
|
203
|
+
if attributes.key?(:'tracking_urls')
|
204
|
+
if (value = attributes[:'tracking_urls']).is_a?(Hash)
|
205
|
+
self.tracking_urls = value
|
206
|
+
end
|
207
|
+
self.tracking_urls = attributes[:'tracking_urls']
|
208
|
+
end
|
209
|
+
|
210
|
+
if attributes.key?(:'auto_targeting_enabled')
|
211
|
+
self.auto_targeting_enabled = attributes[:'auto_targeting_enabled']
|
212
|
+
end
|
213
|
+
|
214
|
+
if attributes.key?(:'placement_group')
|
215
|
+
self.placement_group = attributes[:'placement_group']
|
216
|
+
end
|
217
|
+
|
218
|
+
if attributes.key?(:'pacing_delivery_type')
|
219
|
+
self.pacing_delivery_type = attributes[:'pacing_delivery_type']
|
220
|
+
end
|
221
|
+
|
222
|
+
if attributes.key?(:'conversion_learning_mode_type')
|
223
|
+
self.conversion_learning_mode_type = attributes[:'conversion_learning_mode_type']
|
224
|
+
end
|
225
|
+
|
226
|
+
if attributes.key?(:'summary_status')
|
227
|
+
self.summary_status = attributes[:'summary_status']
|
228
|
+
end
|
229
|
+
|
230
|
+
if attributes.key?(:'feed_profile_id')
|
231
|
+
self.feed_profile_id = attributes[:'feed_profile_id']
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
236
|
+
# @return Array for valid properties with the reasons
|
237
|
+
def list_invalid_properties
|
238
|
+
invalid_properties = Array.new
|
239
|
+
invalid_properties
|
240
|
+
end
|
241
|
+
|
242
|
+
# Check to see if the all the properties in the model are valid
|
243
|
+
# @return true if the model is valid
|
244
|
+
def valid?
|
245
|
+
budget_type_validator = EnumAttributeValidator.new('String', ["DAILY", "LIFETIME", "CBO_ADGROUP"])
|
246
|
+
return false unless budget_type_validator.valid?(@budget_type)
|
247
|
+
conversion_learning_mode_type_validator = EnumAttributeValidator.new('String', ["NOT_ACTIVE", "ACTIVE", "null"])
|
248
|
+
return false unless conversion_learning_mode_type_validator.valid?(@conversion_learning_mode_type)
|
249
|
+
true
|
250
|
+
end
|
251
|
+
|
252
|
+
# Custom attribute writer method checking allowed values (enum).
|
253
|
+
# @param [Object] budget_type Object to be assigned
|
254
|
+
def budget_type=(budget_type)
|
255
|
+
validator = EnumAttributeValidator.new('String', ["DAILY", "LIFETIME", "CBO_ADGROUP"])
|
256
|
+
unless validator.valid?(budget_type)
|
257
|
+
fail ArgumentError, "invalid value for \"budget_type\", must be one of #{validator.allowable_values}."
|
258
|
+
end
|
259
|
+
@budget_type = budget_type
|
260
|
+
end
|
261
|
+
|
262
|
+
# Custom attribute writer method checking allowed values (enum).
|
263
|
+
# @param [Object] conversion_learning_mode_type Object to be assigned
|
264
|
+
def conversion_learning_mode_type=(conversion_learning_mode_type)
|
265
|
+
validator = EnumAttributeValidator.new('String', ["NOT_ACTIVE", "ACTIVE", "null"])
|
266
|
+
unless validator.valid?(conversion_learning_mode_type)
|
267
|
+
fail ArgumentError, "invalid value for \"conversion_learning_mode_type\", must be one of #{validator.allowable_values}."
|
268
|
+
end
|
269
|
+
@conversion_learning_mode_type = conversion_learning_mode_type
|
270
|
+
end
|
271
|
+
|
272
|
+
# Checks equality by comparing each attribute.
|
273
|
+
# @param [Object] Object to be compared
|
274
|
+
def ==(o)
|
275
|
+
return true if self.equal?(o)
|
276
|
+
self.class == o.class &&
|
277
|
+
name == o.name &&
|
278
|
+
status == o.status &&
|
279
|
+
budget_in_micro_currency == o.budget_in_micro_currency &&
|
280
|
+
bid_in_micro_currency == o.bid_in_micro_currency &&
|
281
|
+
budget_type == o.budget_type &&
|
282
|
+
start_time == o.start_time &&
|
283
|
+
end_time == o.end_time &&
|
284
|
+
targeting_spec == o.targeting_spec &&
|
285
|
+
lifetime_frequency_cap == o.lifetime_frequency_cap &&
|
286
|
+
tracking_urls == o.tracking_urls &&
|
287
|
+
auto_targeting_enabled == o.auto_targeting_enabled &&
|
288
|
+
placement_group == o.placement_group &&
|
289
|
+
pacing_delivery_type == o.pacing_delivery_type &&
|
290
|
+
conversion_learning_mode_type == o.conversion_learning_mode_type &&
|
291
|
+
summary_status == o.summary_status &&
|
292
|
+
feed_profile_id == o.feed_profile_id
|
293
|
+
end
|
294
|
+
|
295
|
+
# @see the `==` method
|
296
|
+
# @param [Object] Object to be compared
|
297
|
+
def eql?(o)
|
298
|
+
self == o
|
299
|
+
end
|
300
|
+
|
301
|
+
# Calculates hash code according to all attributes.
|
302
|
+
# @return [Integer] Hash code
|
303
|
+
def hash
|
304
|
+
[name, status, budget_in_micro_currency, bid_in_micro_currency, budget_type, start_time, end_time, targeting_spec, lifetime_frequency_cap, tracking_urls, auto_targeting_enabled, placement_group, pacing_delivery_type, conversion_learning_mode_type, summary_status, feed_profile_id].hash
|
305
|
+
end
|
306
|
+
|
307
|
+
# Builds the object from hash
|
308
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
309
|
+
# @return [Object] Returns the model itself
|
310
|
+
def self.build_from_hash(attributes)
|
311
|
+
new.build_from_hash(attributes)
|
312
|
+
end
|
313
|
+
|
314
|
+
# Builds the object from hash
|
315
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
316
|
+
# @return [Object] Returns the model itself
|
317
|
+
def build_from_hash(attributes)
|
318
|
+
return nil unless attributes.is_a?(Hash)
|
319
|
+
self.class.openapi_types.each_pair do |key, type|
|
320
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
321
|
+
self.send("#{key}=", nil)
|
322
|
+
elsif type =~ /\AArray<(.*)>/i
|
323
|
+
# check to ensure the input is an array given that the attribute
|
324
|
+
# is documented as an array but the input is not
|
325
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
326
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
327
|
+
end
|
328
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
329
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
330
|
+
end
|
331
|
+
end
|
332
|
+
|
333
|
+
self
|
334
|
+
end
|
335
|
+
|
336
|
+
# Deserializes the data based on type
|
337
|
+
# @param string type Data type
|
338
|
+
# @param string value Value to be deserialized
|
339
|
+
# @return [Object] Deserialized data
|
340
|
+
def _deserialize(type, value)
|
341
|
+
case type.to_sym
|
342
|
+
when :Time
|
343
|
+
Time.parse(value)
|
344
|
+
when :Date
|
345
|
+
Date.parse(value)
|
346
|
+
when :String
|
347
|
+
value.to_s
|
348
|
+
when :Integer
|
349
|
+
value.to_i
|
350
|
+
when :Float
|
351
|
+
value.to_f
|
352
|
+
when :Boolean
|
353
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
354
|
+
true
|
355
|
+
else
|
356
|
+
false
|
357
|
+
end
|
358
|
+
when :Object
|
359
|
+
# generic object (usually a Hash), return directly
|
360
|
+
value
|
361
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
362
|
+
inner_type = Regexp.last_match[:inner_type]
|
363
|
+
value.map { |v| _deserialize(inner_type, v) }
|
364
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
365
|
+
k_type = Regexp.last_match[:k_type]
|
366
|
+
v_type = Regexp.last_match[:v_type]
|
367
|
+
{}.tap do |hash|
|
368
|
+
value.each do |k, v|
|
369
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
370
|
+
end
|
371
|
+
end
|
372
|
+
else # model
|
373
|
+
# models (e.g. Pet) or oneOf
|
374
|
+
klass = PinterestSdkClient.const_get(type)
|
375
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
376
|
+
end
|
377
|
+
end
|
378
|
+
|
379
|
+
# Returns the string representation of the object
|
380
|
+
# @return [String] String presentation of the object
|
381
|
+
def to_s
|
382
|
+
to_hash.to_s
|
383
|
+
end
|
384
|
+
|
385
|
+
# to_body is an alias to to_hash (backward compatibility)
|
386
|
+
# @return [Hash] Returns the object in the form of hash
|
387
|
+
def to_body
|
388
|
+
to_hash
|
389
|
+
end
|
390
|
+
|
391
|
+
# Returns the object in the form of hash
|
392
|
+
# @return [Hash] Returns the object in the form of hash
|
393
|
+
def to_hash
|
394
|
+
hash = {}
|
395
|
+
self.class.attribute_map.each_pair do |attr, param|
|
396
|
+
value = self.send(attr)
|
397
|
+
if value.nil?
|
398
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
399
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
400
|
+
end
|
401
|
+
|
402
|
+
hash[param] = _to_hash(value)
|
403
|
+
end
|
404
|
+
hash
|
405
|
+
end
|
406
|
+
|
407
|
+
# Outputs non-array value in the form of hash
|
408
|
+
# For object, use to_hash. Otherwise, just return the value
|
409
|
+
# @param [Object] value Any valid value
|
410
|
+
# @return [Hash] Returns the value in the form of hash
|
411
|
+
def _to_hash(value)
|
412
|
+
if value.is_a?(Array)
|
413
|
+
value.compact.map { |v| _to_hash(v) }
|
414
|
+
elsif value.is_a?(Hash)
|
415
|
+
{}.tap do |hash|
|
416
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
417
|
+
end
|
418
|
+
elsif value.respond_to? :to_hash
|
419
|
+
value.to_hash
|
420
|
+
else
|
421
|
+
value
|
422
|
+
end
|
423
|
+
end
|
424
|
+
|
425
|
+
end
|
426
|
+
|
427
|
+
end
|