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,833 @@
|
|
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 ItemAttributes
|
18
|
+
# Allows advertisers to specify a separate URL that can be used to track traffic coming from Pinterest shopping ads. Must send full URL including tracking—do not send tracking parameters only. At this time we do not support impression tracking. Must begin with http:// or https://.
|
19
|
+
attr_accessor :ad_link
|
20
|
+
|
21
|
+
# The links to additional images for your product. Up to five additional images can be used to show a product from different angles or to show different stages. Separate each additional image with a comma. We recommend enclosing the whole string with quotes. Must begin with http:// or https://
|
22
|
+
attr_accessor :additional_image_link
|
23
|
+
|
24
|
+
# Set this attribute to TRUE if you're submitting items that are considered “adult”. These will not be shown on Pinterest.
|
25
|
+
attr_accessor :adult
|
26
|
+
|
27
|
+
# The age group to apply a demographic range to the product. Must be one of the following values: ‘newborn’, ‘infant’, ‘toddler’, ‘kids’, ‘adult’.
|
28
|
+
attr_accessor :age_group
|
29
|
+
|
30
|
+
# The availability of the product. Must be one of the following values: ‘in stock’, ‘out of stock’, ‘preorder’.
|
31
|
+
attr_accessor :availability
|
32
|
+
|
33
|
+
# Average reviews for the item. Can be a number from 1-5.
|
34
|
+
attr_accessor :average_review_rating
|
35
|
+
|
36
|
+
# The brand of the product.
|
37
|
+
attr_accessor :brand
|
38
|
+
|
39
|
+
# The primary color of the product.
|
40
|
+
attr_accessor :color
|
41
|
+
|
42
|
+
# The condition of the product. Must be one of the following values: ‘new’, ‘used’, ‘refurbished’.
|
43
|
+
attr_accessor :condition
|
44
|
+
|
45
|
+
# Custom grouping of products.
|
46
|
+
attr_accessor :custom_label_0
|
47
|
+
|
48
|
+
# Custom grouping of products.
|
49
|
+
attr_accessor :custom_label_1
|
50
|
+
|
51
|
+
# Custom grouping of products.
|
52
|
+
attr_accessor :custom_label_2
|
53
|
+
|
54
|
+
# Custom grouping of products.
|
55
|
+
attr_accessor :custom_label_3
|
56
|
+
|
57
|
+
# Custom grouping of products.
|
58
|
+
attr_accessor :custom_label_4
|
59
|
+
|
60
|
+
# The description of the product.
|
61
|
+
attr_accessor :description
|
62
|
+
|
63
|
+
# The item is free to ship.
|
64
|
+
attr_accessor :free_shipping_label
|
65
|
+
|
66
|
+
# The minimum order purchase necessary for the customer to get free shipping. Only relevant if free shipping is offered.
|
67
|
+
attr_accessor :free_shipping_limit
|
68
|
+
|
69
|
+
# The gender associated with the product. Must be one of the following values: ‘male’, ‘female’, ‘unisex’.
|
70
|
+
attr_accessor :gender
|
71
|
+
|
72
|
+
# The categorization of the product based on the standardized Google Product Taxonomy. This is a set taxonomy. Both the text values and numeric codes are accepted.
|
73
|
+
attr_accessor :google_product_category
|
74
|
+
|
75
|
+
# The unique universal product identifier.
|
76
|
+
attr_accessor :gtin
|
77
|
+
|
78
|
+
# The user-created unique ID that represents the product. Only Unicode characters are accepted.
|
79
|
+
attr_accessor :id
|
80
|
+
|
81
|
+
# The link to the main product images. Images should be at least 75x75 pixels to avoid errors. Use the additional_image_link field to add more images of your product. The URL of your image_link must be accessible by the Pinterest user-agent, and send the accurate images. Please make sure there are no template or placeholder images at the link. Must start with http:// or https://
|
82
|
+
attr_accessor :image_link
|
83
|
+
|
84
|
+
# The parent ID of the product.
|
85
|
+
attr_accessor :item_group_id
|
86
|
+
|
87
|
+
# The millisecond timestamp when the item was lastly modified by the merchant.
|
88
|
+
attr_accessor :last_updated_time
|
89
|
+
|
90
|
+
# The landing page for the product.
|
91
|
+
attr_accessor :link
|
92
|
+
|
93
|
+
# The material used to make the product.
|
94
|
+
attr_accessor :material
|
95
|
+
|
96
|
+
# The minimum advertised price of the product. It supports the following formats, \"19.99 USD\", \"19.99USD\" and \"19.99\". If the currency is not included, we default to US dollars.
|
97
|
+
attr_accessor :min_ad_price
|
98
|
+
|
99
|
+
# The mobile-optimized version of your landing page. Must begin with http:// or https://.
|
100
|
+
attr_accessor :mobile_link
|
101
|
+
|
102
|
+
# Manufacturer Part Number are alpha-numeric codes created by the manufacturer of a product to uniquely identify it among all products from the same manufacturer.
|
103
|
+
attr_accessor :mpn
|
104
|
+
|
105
|
+
# The number of ratings for the item.
|
106
|
+
attr_accessor :number_of_ratings
|
107
|
+
|
108
|
+
# The number of reviews available for the item.
|
109
|
+
attr_accessor :number_of_reviews
|
110
|
+
|
111
|
+
# The description of the pattern used for the product.
|
112
|
+
attr_accessor :pattern
|
113
|
+
|
114
|
+
# The price of the product. It supports the following formats, \"24.99 USD\", \"24.99USD\" and \"24.99\". If the currency is not included, we default to US dollars.
|
115
|
+
attr_accessor :price
|
116
|
+
|
117
|
+
# The categorization of your product based on your custom product taxonomy. Subcategories must be sent separated by “ > “. The > must be wrapped by spaces. We do not recognize any other delimiters such as comma or pipe.
|
118
|
+
attr_accessor :product_type
|
119
|
+
|
120
|
+
# The discounted price of the product. The sale_price must be lower than the price. It supports the following formats, \"14.99 USD\", \"14.99USD\" and \"14.99\". If the currency is not included, we default to US dollars.
|
121
|
+
attr_accessor :sale_price
|
122
|
+
|
123
|
+
# Shipping consists of one group of up to four elements, country, region, service (all optional) and price (required). All colons, even for blank values, are required.
|
124
|
+
attr_accessor :shipping
|
125
|
+
|
126
|
+
# The height of the package needed to ship the product. Ensure there is a space between the numeric string and the metric.
|
127
|
+
attr_accessor :shipping_height
|
128
|
+
|
129
|
+
# The weight of the product. Ensure there is a space between the numeric string and the metric.
|
130
|
+
attr_accessor :shipping_weight
|
131
|
+
|
132
|
+
# The width of the package needed to ship the product. Ensure there is a space between the numeric string and the metric.
|
133
|
+
attr_accessor :shipping_width
|
134
|
+
|
135
|
+
# The size of the product.
|
136
|
+
attr_accessor :size
|
137
|
+
|
138
|
+
# Indicates the country’s sizing system in which you are submitting your product.
|
139
|
+
attr_accessor :size_system
|
140
|
+
|
141
|
+
# Additional description for the size. Must be one of the following values: ‘regular’, ‘petite’, ‘plus’, ‘big_and_tall’, ‘maternity’.
|
142
|
+
attr_accessor :size_type
|
143
|
+
|
144
|
+
# Tax consists of one group of up to four elements, country, region, rate (all required) and tax_ship (optional). All colons, even for blank values, are required.
|
145
|
+
attr_accessor :tax
|
146
|
+
|
147
|
+
# The name of the product.
|
148
|
+
attr_accessor :title
|
149
|
+
|
150
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
151
|
+
def self.attribute_map
|
152
|
+
{
|
153
|
+
:'ad_link' => :'ad_link',
|
154
|
+
:'additional_image_link' => :'additional_image_link',
|
155
|
+
:'adult' => :'adult',
|
156
|
+
:'age_group' => :'age_group',
|
157
|
+
:'availability' => :'availability',
|
158
|
+
:'average_review_rating' => :'average_review_rating',
|
159
|
+
:'brand' => :'brand',
|
160
|
+
:'color' => :'color',
|
161
|
+
:'condition' => :'condition',
|
162
|
+
:'custom_label_0' => :'custom_label_0',
|
163
|
+
:'custom_label_1' => :'custom_label_1',
|
164
|
+
:'custom_label_2' => :'custom_label_2',
|
165
|
+
:'custom_label_3' => :'custom_label_3',
|
166
|
+
:'custom_label_4' => :'custom_label_4',
|
167
|
+
:'description' => :'description',
|
168
|
+
:'free_shipping_label' => :'free_shipping_label',
|
169
|
+
:'free_shipping_limit' => :'free_shipping_limit',
|
170
|
+
:'gender' => :'gender',
|
171
|
+
:'google_product_category' => :'google_product_category',
|
172
|
+
:'gtin' => :'gtin',
|
173
|
+
:'id' => :'id',
|
174
|
+
:'image_link' => :'image_link',
|
175
|
+
:'item_group_id' => :'item_group_id',
|
176
|
+
:'last_updated_time' => :'last_updated_time',
|
177
|
+
:'link' => :'link',
|
178
|
+
:'material' => :'material',
|
179
|
+
:'min_ad_price' => :'min_ad_price',
|
180
|
+
:'mobile_link' => :'mobile_link',
|
181
|
+
:'mpn' => :'mpn',
|
182
|
+
:'number_of_ratings' => :'number_of_ratings',
|
183
|
+
:'number_of_reviews' => :'number_of_reviews',
|
184
|
+
:'pattern' => :'pattern',
|
185
|
+
:'price' => :'price',
|
186
|
+
:'product_type' => :'product_type',
|
187
|
+
:'sale_price' => :'sale_price',
|
188
|
+
:'shipping' => :'shipping',
|
189
|
+
:'shipping_height' => :'shipping_height',
|
190
|
+
:'shipping_weight' => :'shipping_weight',
|
191
|
+
:'shipping_width' => :'shipping_width',
|
192
|
+
:'size' => :'size',
|
193
|
+
:'size_system' => :'size_system',
|
194
|
+
:'size_type' => :'size_type',
|
195
|
+
:'tax' => :'tax',
|
196
|
+
:'title' => :'title'
|
197
|
+
}
|
198
|
+
end
|
199
|
+
|
200
|
+
# Returns all the JSON keys this model knows about
|
201
|
+
def self.acceptable_attributes
|
202
|
+
attribute_map.values
|
203
|
+
end
|
204
|
+
|
205
|
+
# Attribute type mapping.
|
206
|
+
def self.openapi_types
|
207
|
+
{
|
208
|
+
:'ad_link' => :'String',
|
209
|
+
:'additional_image_link' => :'Array<String>',
|
210
|
+
:'adult' => :'Boolean',
|
211
|
+
:'age_group' => :'String',
|
212
|
+
:'availability' => :'String',
|
213
|
+
:'average_review_rating' => :'Float',
|
214
|
+
:'brand' => :'String',
|
215
|
+
:'color' => :'String',
|
216
|
+
:'condition' => :'String',
|
217
|
+
:'custom_label_0' => :'String',
|
218
|
+
:'custom_label_1' => :'String',
|
219
|
+
:'custom_label_2' => :'String',
|
220
|
+
:'custom_label_3' => :'String',
|
221
|
+
:'custom_label_4' => :'String',
|
222
|
+
:'description' => :'String',
|
223
|
+
:'free_shipping_label' => :'Boolean',
|
224
|
+
:'free_shipping_limit' => :'String',
|
225
|
+
:'gender' => :'String',
|
226
|
+
:'google_product_category' => :'String',
|
227
|
+
:'gtin' => :'Integer',
|
228
|
+
:'id' => :'String',
|
229
|
+
:'image_link' => :'Array<String>',
|
230
|
+
:'item_group_id' => :'String',
|
231
|
+
:'last_updated_time' => :'Integer',
|
232
|
+
:'link' => :'String',
|
233
|
+
:'material' => :'String',
|
234
|
+
:'min_ad_price' => :'String',
|
235
|
+
:'mobile_link' => :'String',
|
236
|
+
:'mpn' => :'String',
|
237
|
+
:'number_of_ratings' => :'Integer',
|
238
|
+
:'number_of_reviews' => :'Integer',
|
239
|
+
:'pattern' => :'String',
|
240
|
+
:'price' => :'String',
|
241
|
+
:'product_type' => :'String',
|
242
|
+
:'sale_price' => :'String',
|
243
|
+
:'shipping' => :'String',
|
244
|
+
:'shipping_height' => :'String',
|
245
|
+
:'shipping_weight' => :'String',
|
246
|
+
:'shipping_width' => :'String',
|
247
|
+
:'size' => :'String',
|
248
|
+
:'size_system' => :'String',
|
249
|
+
:'size_type' => :'String',
|
250
|
+
:'tax' => :'String',
|
251
|
+
:'title' => :'String'
|
252
|
+
}
|
253
|
+
end
|
254
|
+
|
255
|
+
# List of attributes with nullable: true
|
256
|
+
def self.openapi_nullable
|
257
|
+
Set.new([
|
258
|
+
])
|
259
|
+
end
|
260
|
+
|
261
|
+
# Initializes the object
|
262
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
263
|
+
def initialize(attributes = {})
|
264
|
+
if (!attributes.is_a?(Hash))
|
265
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PinterestSdkClient::ItemAttributes` initialize method"
|
266
|
+
end
|
267
|
+
|
268
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
269
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
270
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
271
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PinterestSdkClient::ItemAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
272
|
+
end
|
273
|
+
h[k.to_sym] = v
|
274
|
+
}
|
275
|
+
|
276
|
+
if attributes.key?(:'ad_link')
|
277
|
+
self.ad_link = attributes[:'ad_link']
|
278
|
+
end
|
279
|
+
|
280
|
+
if attributes.key?(:'additional_image_link')
|
281
|
+
if (value = attributes[:'additional_image_link']).is_a?(Array)
|
282
|
+
self.additional_image_link = value
|
283
|
+
end
|
284
|
+
end
|
285
|
+
|
286
|
+
if attributes.key?(:'adult')
|
287
|
+
self.adult = attributes[:'adult']
|
288
|
+
end
|
289
|
+
|
290
|
+
if attributes.key?(:'age_group')
|
291
|
+
self.age_group = attributes[:'age_group']
|
292
|
+
end
|
293
|
+
|
294
|
+
if attributes.key?(:'availability')
|
295
|
+
self.availability = attributes[:'availability']
|
296
|
+
end
|
297
|
+
|
298
|
+
if attributes.key?(:'average_review_rating')
|
299
|
+
self.average_review_rating = attributes[:'average_review_rating']
|
300
|
+
end
|
301
|
+
|
302
|
+
if attributes.key?(:'brand')
|
303
|
+
self.brand = attributes[:'brand']
|
304
|
+
end
|
305
|
+
|
306
|
+
if attributes.key?(:'color')
|
307
|
+
self.color = attributes[:'color']
|
308
|
+
end
|
309
|
+
|
310
|
+
if attributes.key?(:'condition')
|
311
|
+
self.condition = attributes[:'condition']
|
312
|
+
end
|
313
|
+
|
314
|
+
if attributes.key?(:'custom_label_0')
|
315
|
+
self.custom_label_0 = attributes[:'custom_label_0']
|
316
|
+
end
|
317
|
+
|
318
|
+
if attributes.key?(:'custom_label_1')
|
319
|
+
self.custom_label_1 = attributes[:'custom_label_1']
|
320
|
+
end
|
321
|
+
|
322
|
+
if attributes.key?(:'custom_label_2')
|
323
|
+
self.custom_label_2 = attributes[:'custom_label_2']
|
324
|
+
end
|
325
|
+
|
326
|
+
if attributes.key?(:'custom_label_3')
|
327
|
+
self.custom_label_3 = attributes[:'custom_label_3']
|
328
|
+
end
|
329
|
+
|
330
|
+
if attributes.key?(:'custom_label_4')
|
331
|
+
self.custom_label_4 = attributes[:'custom_label_4']
|
332
|
+
end
|
333
|
+
|
334
|
+
if attributes.key?(:'description')
|
335
|
+
self.description = attributes[:'description']
|
336
|
+
end
|
337
|
+
|
338
|
+
if attributes.key?(:'free_shipping_label')
|
339
|
+
self.free_shipping_label = attributes[:'free_shipping_label']
|
340
|
+
end
|
341
|
+
|
342
|
+
if attributes.key?(:'free_shipping_limit')
|
343
|
+
self.free_shipping_limit = attributes[:'free_shipping_limit']
|
344
|
+
end
|
345
|
+
|
346
|
+
if attributes.key?(:'gender')
|
347
|
+
self.gender = attributes[:'gender']
|
348
|
+
end
|
349
|
+
|
350
|
+
if attributes.key?(:'google_product_category')
|
351
|
+
self.google_product_category = attributes[:'google_product_category']
|
352
|
+
end
|
353
|
+
|
354
|
+
if attributes.key?(:'gtin')
|
355
|
+
self.gtin = attributes[:'gtin']
|
356
|
+
end
|
357
|
+
|
358
|
+
if attributes.key?(:'id')
|
359
|
+
self.id = attributes[:'id']
|
360
|
+
end
|
361
|
+
|
362
|
+
if attributes.key?(:'image_link')
|
363
|
+
if (value = attributes[:'image_link']).is_a?(Array)
|
364
|
+
self.image_link = value
|
365
|
+
end
|
366
|
+
end
|
367
|
+
|
368
|
+
if attributes.key?(:'item_group_id')
|
369
|
+
self.item_group_id = attributes[:'item_group_id']
|
370
|
+
end
|
371
|
+
|
372
|
+
if attributes.key?(:'last_updated_time')
|
373
|
+
self.last_updated_time = attributes[:'last_updated_time']
|
374
|
+
end
|
375
|
+
|
376
|
+
if attributes.key?(:'link')
|
377
|
+
self.link = attributes[:'link']
|
378
|
+
end
|
379
|
+
|
380
|
+
if attributes.key?(:'material')
|
381
|
+
self.material = attributes[:'material']
|
382
|
+
end
|
383
|
+
|
384
|
+
if attributes.key?(:'min_ad_price')
|
385
|
+
self.min_ad_price = attributes[:'min_ad_price']
|
386
|
+
end
|
387
|
+
|
388
|
+
if attributes.key?(:'mobile_link')
|
389
|
+
self.mobile_link = attributes[:'mobile_link']
|
390
|
+
end
|
391
|
+
|
392
|
+
if attributes.key?(:'mpn')
|
393
|
+
self.mpn = attributes[:'mpn']
|
394
|
+
end
|
395
|
+
|
396
|
+
if attributes.key?(:'number_of_ratings')
|
397
|
+
self.number_of_ratings = attributes[:'number_of_ratings']
|
398
|
+
end
|
399
|
+
|
400
|
+
if attributes.key?(:'number_of_reviews')
|
401
|
+
self.number_of_reviews = attributes[:'number_of_reviews']
|
402
|
+
end
|
403
|
+
|
404
|
+
if attributes.key?(:'pattern')
|
405
|
+
self.pattern = attributes[:'pattern']
|
406
|
+
end
|
407
|
+
|
408
|
+
if attributes.key?(:'price')
|
409
|
+
self.price = attributes[:'price']
|
410
|
+
end
|
411
|
+
|
412
|
+
if attributes.key?(:'product_type')
|
413
|
+
self.product_type = attributes[:'product_type']
|
414
|
+
end
|
415
|
+
|
416
|
+
if attributes.key?(:'sale_price')
|
417
|
+
self.sale_price = attributes[:'sale_price']
|
418
|
+
end
|
419
|
+
|
420
|
+
if attributes.key?(:'shipping')
|
421
|
+
self.shipping = attributes[:'shipping']
|
422
|
+
end
|
423
|
+
|
424
|
+
if attributes.key?(:'shipping_height')
|
425
|
+
self.shipping_height = attributes[:'shipping_height']
|
426
|
+
end
|
427
|
+
|
428
|
+
if attributes.key?(:'shipping_weight')
|
429
|
+
self.shipping_weight = attributes[:'shipping_weight']
|
430
|
+
end
|
431
|
+
|
432
|
+
if attributes.key?(:'shipping_width')
|
433
|
+
self.shipping_width = attributes[:'shipping_width']
|
434
|
+
end
|
435
|
+
|
436
|
+
if attributes.key?(:'size')
|
437
|
+
self.size = attributes[:'size']
|
438
|
+
end
|
439
|
+
|
440
|
+
if attributes.key?(:'size_system')
|
441
|
+
self.size_system = attributes[:'size_system']
|
442
|
+
end
|
443
|
+
|
444
|
+
if attributes.key?(:'size_type')
|
445
|
+
self.size_type = attributes[:'size_type']
|
446
|
+
end
|
447
|
+
|
448
|
+
if attributes.key?(:'tax')
|
449
|
+
self.tax = attributes[:'tax']
|
450
|
+
end
|
451
|
+
|
452
|
+
if attributes.key?(:'title')
|
453
|
+
self.title = attributes[:'title']
|
454
|
+
end
|
455
|
+
end
|
456
|
+
|
457
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
458
|
+
# @return Array for valid properties with the reasons
|
459
|
+
def list_invalid_properties
|
460
|
+
invalid_properties = Array.new
|
461
|
+
if !@custom_label_0.nil? && @custom_label_0.to_s.length > 1000
|
462
|
+
invalid_properties.push('invalid value for "custom_label_0", the character length must be smaller than or equal to 1000.')
|
463
|
+
end
|
464
|
+
|
465
|
+
if !@custom_label_1.nil? && @custom_label_1.to_s.length > 1000
|
466
|
+
invalid_properties.push('invalid value for "custom_label_1", the character length must be smaller than or equal to 1000.')
|
467
|
+
end
|
468
|
+
|
469
|
+
if !@custom_label_2.nil? && @custom_label_2.to_s.length > 1000
|
470
|
+
invalid_properties.push('invalid value for "custom_label_2", the character length must be smaller than or equal to 1000.')
|
471
|
+
end
|
472
|
+
|
473
|
+
if !@custom_label_3.nil? && @custom_label_3.to_s.length > 1000
|
474
|
+
invalid_properties.push('invalid value for "custom_label_3", the character length must be smaller than or equal to 1000.')
|
475
|
+
end
|
476
|
+
|
477
|
+
if !@custom_label_4.nil? && @custom_label_4.to_s.length > 1000
|
478
|
+
invalid_properties.push('invalid value for "custom_label_4", the character length must be smaller than or equal to 1000.')
|
479
|
+
end
|
480
|
+
|
481
|
+
if !@description.nil? && @description.to_s.length > 10000
|
482
|
+
invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 10000.')
|
483
|
+
end
|
484
|
+
|
485
|
+
if !@id.nil? && @id.to_s.length > 127
|
486
|
+
invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 127.')
|
487
|
+
end
|
488
|
+
|
489
|
+
if !@image_link.nil? && @image_link.length < 1
|
490
|
+
invalid_properties.push('invalid value for "image_link", number of items must be greater than or equal to 1.')
|
491
|
+
end
|
492
|
+
|
493
|
+
if !@item_group_id.nil? && @item_group_id.to_s.length > 127
|
494
|
+
invalid_properties.push('invalid value for "item_group_id", the character length must be smaller than or equal to 127.')
|
495
|
+
end
|
496
|
+
|
497
|
+
if !@link.nil? && @link.to_s.length > 511
|
498
|
+
invalid_properties.push('invalid value for "link", the character length must be smaller than or equal to 511.')
|
499
|
+
end
|
500
|
+
|
501
|
+
if !@product_type.nil? && @product_type.to_s.length > 1000
|
502
|
+
invalid_properties.push('invalid value for "product_type", the character length must be smaller than or equal to 1000.')
|
503
|
+
end
|
504
|
+
|
505
|
+
if !@title.nil? && @title.to_s.length > 500
|
506
|
+
invalid_properties.push('invalid value for "title", the character length must be smaller than or equal to 500.')
|
507
|
+
end
|
508
|
+
|
509
|
+
invalid_properties
|
510
|
+
end
|
511
|
+
|
512
|
+
# Check to see if the all the properties in the model are valid
|
513
|
+
# @return true if the model is valid
|
514
|
+
def valid?
|
515
|
+
return false if !@custom_label_0.nil? && @custom_label_0.to_s.length > 1000
|
516
|
+
return false if !@custom_label_1.nil? && @custom_label_1.to_s.length > 1000
|
517
|
+
return false if !@custom_label_2.nil? && @custom_label_2.to_s.length > 1000
|
518
|
+
return false if !@custom_label_3.nil? && @custom_label_3.to_s.length > 1000
|
519
|
+
return false if !@custom_label_4.nil? && @custom_label_4.to_s.length > 1000
|
520
|
+
return false if !@description.nil? && @description.to_s.length > 10000
|
521
|
+
return false if !@id.nil? && @id.to_s.length > 127
|
522
|
+
return false if !@image_link.nil? && @image_link.length < 1
|
523
|
+
return false if !@item_group_id.nil? && @item_group_id.to_s.length > 127
|
524
|
+
return false if !@link.nil? && @link.to_s.length > 511
|
525
|
+
return false if !@product_type.nil? && @product_type.to_s.length > 1000
|
526
|
+
return false if !@title.nil? && @title.to_s.length > 500
|
527
|
+
true
|
528
|
+
end
|
529
|
+
|
530
|
+
# Custom attribute writer method with validation
|
531
|
+
# @param [Object] custom_label_0 Value to be assigned
|
532
|
+
def custom_label_0=(custom_label_0)
|
533
|
+
if !custom_label_0.nil? && custom_label_0.to_s.length > 1000
|
534
|
+
fail ArgumentError, 'invalid value for "custom_label_0", the character length must be smaller than or equal to 1000.'
|
535
|
+
end
|
536
|
+
|
537
|
+
@custom_label_0 = custom_label_0
|
538
|
+
end
|
539
|
+
|
540
|
+
# Custom attribute writer method with validation
|
541
|
+
# @param [Object] custom_label_1 Value to be assigned
|
542
|
+
def custom_label_1=(custom_label_1)
|
543
|
+
if !custom_label_1.nil? && custom_label_1.to_s.length > 1000
|
544
|
+
fail ArgumentError, 'invalid value for "custom_label_1", the character length must be smaller than or equal to 1000.'
|
545
|
+
end
|
546
|
+
|
547
|
+
@custom_label_1 = custom_label_1
|
548
|
+
end
|
549
|
+
|
550
|
+
# Custom attribute writer method with validation
|
551
|
+
# @param [Object] custom_label_2 Value to be assigned
|
552
|
+
def custom_label_2=(custom_label_2)
|
553
|
+
if !custom_label_2.nil? && custom_label_2.to_s.length > 1000
|
554
|
+
fail ArgumentError, 'invalid value for "custom_label_2", the character length must be smaller than or equal to 1000.'
|
555
|
+
end
|
556
|
+
|
557
|
+
@custom_label_2 = custom_label_2
|
558
|
+
end
|
559
|
+
|
560
|
+
# Custom attribute writer method with validation
|
561
|
+
# @param [Object] custom_label_3 Value to be assigned
|
562
|
+
def custom_label_3=(custom_label_3)
|
563
|
+
if !custom_label_3.nil? && custom_label_3.to_s.length > 1000
|
564
|
+
fail ArgumentError, 'invalid value for "custom_label_3", the character length must be smaller than or equal to 1000.'
|
565
|
+
end
|
566
|
+
|
567
|
+
@custom_label_3 = custom_label_3
|
568
|
+
end
|
569
|
+
|
570
|
+
# Custom attribute writer method with validation
|
571
|
+
# @param [Object] custom_label_4 Value to be assigned
|
572
|
+
def custom_label_4=(custom_label_4)
|
573
|
+
if !custom_label_4.nil? && custom_label_4.to_s.length > 1000
|
574
|
+
fail ArgumentError, 'invalid value for "custom_label_4", the character length must be smaller than or equal to 1000.'
|
575
|
+
end
|
576
|
+
|
577
|
+
@custom_label_4 = custom_label_4
|
578
|
+
end
|
579
|
+
|
580
|
+
# Custom attribute writer method with validation
|
581
|
+
# @param [Object] description Value to be assigned
|
582
|
+
def description=(description)
|
583
|
+
if !description.nil? && description.to_s.length > 10000
|
584
|
+
fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 10000.'
|
585
|
+
end
|
586
|
+
|
587
|
+
@description = description
|
588
|
+
end
|
589
|
+
|
590
|
+
# Custom attribute writer method with validation
|
591
|
+
# @param [Object] id Value to be assigned
|
592
|
+
def id=(id)
|
593
|
+
if !id.nil? && id.to_s.length > 127
|
594
|
+
fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 127.'
|
595
|
+
end
|
596
|
+
|
597
|
+
@id = id
|
598
|
+
end
|
599
|
+
|
600
|
+
# Custom attribute writer method with validation
|
601
|
+
# @param [Object] image_link Value to be assigned
|
602
|
+
def image_link=(image_link)
|
603
|
+
if !image_link.nil? && image_link.length < 1
|
604
|
+
fail ArgumentError, 'invalid value for "image_link", number of items must be greater than or equal to 1.'
|
605
|
+
end
|
606
|
+
|
607
|
+
@image_link = image_link
|
608
|
+
end
|
609
|
+
|
610
|
+
# Custom attribute writer method with validation
|
611
|
+
# @param [Object] item_group_id Value to be assigned
|
612
|
+
def item_group_id=(item_group_id)
|
613
|
+
if !item_group_id.nil? && item_group_id.to_s.length > 127
|
614
|
+
fail ArgumentError, 'invalid value for "item_group_id", the character length must be smaller than or equal to 127.'
|
615
|
+
end
|
616
|
+
|
617
|
+
@item_group_id = item_group_id
|
618
|
+
end
|
619
|
+
|
620
|
+
# Custom attribute writer method with validation
|
621
|
+
# @param [Object] link Value to be assigned
|
622
|
+
def link=(link)
|
623
|
+
if !link.nil? && link.to_s.length > 511
|
624
|
+
fail ArgumentError, 'invalid value for "link", the character length must be smaller than or equal to 511.'
|
625
|
+
end
|
626
|
+
|
627
|
+
@link = link
|
628
|
+
end
|
629
|
+
|
630
|
+
# Custom attribute writer method with validation
|
631
|
+
# @param [Object] product_type Value to be assigned
|
632
|
+
def product_type=(product_type)
|
633
|
+
if !product_type.nil? && product_type.to_s.length > 1000
|
634
|
+
fail ArgumentError, 'invalid value for "product_type", the character length must be smaller than or equal to 1000.'
|
635
|
+
end
|
636
|
+
|
637
|
+
@product_type = product_type
|
638
|
+
end
|
639
|
+
|
640
|
+
# Custom attribute writer method with validation
|
641
|
+
# @param [Object] title Value to be assigned
|
642
|
+
def title=(title)
|
643
|
+
if !title.nil? && title.to_s.length > 500
|
644
|
+
fail ArgumentError, 'invalid value for "title", the character length must be smaller than or equal to 500.'
|
645
|
+
end
|
646
|
+
|
647
|
+
@title = title
|
648
|
+
end
|
649
|
+
|
650
|
+
# Checks equality by comparing each attribute.
|
651
|
+
# @param [Object] Object to be compared
|
652
|
+
def ==(o)
|
653
|
+
return true if self.equal?(o)
|
654
|
+
self.class == o.class &&
|
655
|
+
ad_link == o.ad_link &&
|
656
|
+
additional_image_link == o.additional_image_link &&
|
657
|
+
adult == o.adult &&
|
658
|
+
age_group == o.age_group &&
|
659
|
+
availability == o.availability &&
|
660
|
+
average_review_rating == o.average_review_rating &&
|
661
|
+
brand == o.brand &&
|
662
|
+
color == o.color &&
|
663
|
+
condition == o.condition &&
|
664
|
+
custom_label_0 == o.custom_label_0 &&
|
665
|
+
custom_label_1 == o.custom_label_1 &&
|
666
|
+
custom_label_2 == o.custom_label_2 &&
|
667
|
+
custom_label_3 == o.custom_label_3 &&
|
668
|
+
custom_label_4 == o.custom_label_4 &&
|
669
|
+
description == o.description &&
|
670
|
+
free_shipping_label == o.free_shipping_label &&
|
671
|
+
free_shipping_limit == o.free_shipping_limit &&
|
672
|
+
gender == o.gender &&
|
673
|
+
google_product_category == o.google_product_category &&
|
674
|
+
gtin == o.gtin &&
|
675
|
+
id == o.id &&
|
676
|
+
image_link == o.image_link &&
|
677
|
+
item_group_id == o.item_group_id &&
|
678
|
+
last_updated_time == o.last_updated_time &&
|
679
|
+
link == o.link &&
|
680
|
+
material == o.material &&
|
681
|
+
min_ad_price == o.min_ad_price &&
|
682
|
+
mobile_link == o.mobile_link &&
|
683
|
+
mpn == o.mpn &&
|
684
|
+
number_of_ratings == o.number_of_ratings &&
|
685
|
+
number_of_reviews == o.number_of_reviews &&
|
686
|
+
pattern == o.pattern &&
|
687
|
+
price == o.price &&
|
688
|
+
product_type == o.product_type &&
|
689
|
+
sale_price == o.sale_price &&
|
690
|
+
shipping == o.shipping &&
|
691
|
+
shipping_height == o.shipping_height &&
|
692
|
+
shipping_weight == o.shipping_weight &&
|
693
|
+
shipping_width == o.shipping_width &&
|
694
|
+
size == o.size &&
|
695
|
+
size_system == o.size_system &&
|
696
|
+
size_type == o.size_type &&
|
697
|
+
tax == o.tax &&
|
698
|
+
title == o.title
|
699
|
+
end
|
700
|
+
|
701
|
+
# @see the `==` method
|
702
|
+
# @param [Object] Object to be compared
|
703
|
+
def eql?(o)
|
704
|
+
self == o
|
705
|
+
end
|
706
|
+
|
707
|
+
# Calculates hash code according to all attributes.
|
708
|
+
# @return [Integer] Hash code
|
709
|
+
def hash
|
710
|
+
[ad_link, additional_image_link, adult, age_group, availability, average_review_rating, brand, color, condition, custom_label_0, custom_label_1, custom_label_2, custom_label_3, custom_label_4, description, free_shipping_label, free_shipping_limit, gender, google_product_category, gtin, id, image_link, item_group_id, last_updated_time, link, material, min_ad_price, mobile_link, mpn, number_of_ratings, number_of_reviews, pattern, price, product_type, sale_price, shipping, shipping_height, shipping_weight, shipping_width, size, size_system, size_type, tax, title].hash
|
711
|
+
end
|
712
|
+
|
713
|
+
# Builds the object from hash
|
714
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
715
|
+
# @return [Object] Returns the model itself
|
716
|
+
def self.build_from_hash(attributes)
|
717
|
+
new.build_from_hash(attributes)
|
718
|
+
end
|
719
|
+
|
720
|
+
# Builds the object from hash
|
721
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
722
|
+
# @return [Object] Returns the model itself
|
723
|
+
def build_from_hash(attributes)
|
724
|
+
return nil unless attributes.is_a?(Hash)
|
725
|
+
self.class.openapi_types.each_pair do |key, type|
|
726
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
727
|
+
self.send("#{key}=", nil)
|
728
|
+
elsif type =~ /\AArray<(.*)>/i
|
729
|
+
# check to ensure the input is an array given that the attribute
|
730
|
+
# is documented as an array but the input is not
|
731
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
732
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
733
|
+
end
|
734
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
735
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
736
|
+
end
|
737
|
+
end
|
738
|
+
|
739
|
+
self
|
740
|
+
end
|
741
|
+
|
742
|
+
# Deserializes the data based on type
|
743
|
+
# @param string type Data type
|
744
|
+
# @param string value Value to be deserialized
|
745
|
+
# @return [Object] Deserialized data
|
746
|
+
def _deserialize(type, value)
|
747
|
+
case type.to_sym
|
748
|
+
when :Time
|
749
|
+
Time.parse(value)
|
750
|
+
when :Date
|
751
|
+
Date.parse(value)
|
752
|
+
when :String
|
753
|
+
value.to_s
|
754
|
+
when :Integer
|
755
|
+
value.to_i
|
756
|
+
when :Float
|
757
|
+
value.to_f
|
758
|
+
when :Boolean
|
759
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
760
|
+
true
|
761
|
+
else
|
762
|
+
false
|
763
|
+
end
|
764
|
+
when :Object
|
765
|
+
# generic object (usually a Hash), return directly
|
766
|
+
value
|
767
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
768
|
+
inner_type = Regexp.last_match[:inner_type]
|
769
|
+
value.map { |v| _deserialize(inner_type, v) }
|
770
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
771
|
+
k_type = Regexp.last_match[:k_type]
|
772
|
+
v_type = Regexp.last_match[:v_type]
|
773
|
+
{}.tap do |hash|
|
774
|
+
value.each do |k, v|
|
775
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
776
|
+
end
|
777
|
+
end
|
778
|
+
else # model
|
779
|
+
# models (e.g. Pet) or oneOf
|
780
|
+
klass = PinterestSdkClient.const_get(type)
|
781
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
782
|
+
end
|
783
|
+
end
|
784
|
+
|
785
|
+
# Returns the string representation of the object
|
786
|
+
# @return [String] String presentation of the object
|
787
|
+
def to_s
|
788
|
+
to_hash.to_s
|
789
|
+
end
|
790
|
+
|
791
|
+
# to_body is an alias to to_hash (backward compatibility)
|
792
|
+
# @return [Hash] Returns the object in the form of hash
|
793
|
+
def to_body
|
794
|
+
to_hash
|
795
|
+
end
|
796
|
+
|
797
|
+
# Returns the object in the form of hash
|
798
|
+
# @return [Hash] Returns the object in the form of hash
|
799
|
+
def to_hash
|
800
|
+
hash = {}
|
801
|
+
self.class.attribute_map.each_pair do |attr, param|
|
802
|
+
value = self.send(attr)
|
803
|
+
if value.nil?
|
804
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
805
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
806
|
+
end
|
807
|
+
|
808
|
+
hash[param] = _to_hash(value)
|
809
|
+
end
|
810
|
+
hash
|
811
|
+
end
|
812
|
+
|
813
|
+
# Outputs non-array value in the form of hash
|
814
|
+
# For object, use to_hash. Otherwise, just return the value
|
815
|
+
# @param [Object] value Any valid value
|
816
|
+
# @return [Hash] Returns the value in the form of hash
|
817
|
+
def _to_hash(value)
|
818
|
+
if value.is_a?(Array)
|
819
|
+
value.compact.map { |v| _to_hash(v) }
|
820
|
+
elsif value.is_a?(Hash)
|
821
|
+
{}.tap do |hash|
|
822
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
823
|
+
end
|
824
|
+
elsif value.respond_to? :to_hash
|
825
|
+
value.to_hash
|
826
|
+
else
|
827
|
+
value
|
828
|
+
end
|
829
|
+
end
|
830
|
+
|
831
|
+
end
|
832
|
+
|
833
|
+
end
|