growwer 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +306 -0
- data/Rakefile +10 -0
- data/docs/AccountApi.md +213 -0
- data/docs/Balance.md +20 -0
- data/docs/BuyerMoneyApi.md +362 -0
- data/docs/CatalogueApi.md +731 -0
- data/docs/CatalogueMedia.md +46 -0
- data/docs/CatalogueMediaFlashOffer.md +20 -0
- data/docs/CatalogueMediaMetrics.md +26 -0
- data/docs/CatalogueOffer.md +24 -0
- data/docs/CatalogueOfferOrNull.md +24 -0
- data/docs/CataloguePostOffer.md +30 -0
- data/docs/CataloguePostOfferAllOfExtras.md +20 -0
- data/docs/CataloguePostOfferAllOfExtrasSensitiveTopic.md +20 -0
- data/docs/CodeName.md +20 -0
- data/docs/CountSavedFilterMedias200Response.md +18 -0
- data/docs/CreateProjectRequest.md +32 -0
- data/docs/CreateSavedFilterRequest.md +22 -0
- data/docs/Error.md +24 -0
- data/docs/FilesApi.md +79 -0
- data/docs/GetBuyerWallet200Response.md +20 -0
- data/docs/GetMe200Response.md +34 -0
- data/docs/GetMe200ResponseBuyer.md +18 -0
- data/docs/GetMe200ResponseCatalogue.md +18 -0
- data/docs/GetMe200ResponseManagedService.md +18 -0
- data/docs/GetMe200ResponseSeller.md +24 -0
- data/docs/GetSellerWallet200Response.md +20 -0
- data/docs/GetVocabulary200Response.md +28 -0
- data/docs/GetVocabulary200ResponseTopicsInner.md +20 -0
- data/docs/Invoice.md +24 -0
- data/docs/LinkAdditionOrderBriefing.md +22 -0
- data/docs/LinkAdditionOrderBriefingRequest.md +22 -0
- data/docs/ListBuyerTransactions200Response.md +20 -0
- data/docs/ListFlashOffers200Response.md +20 -0
- data/docs/ListInvoices200Response.md +20 -0
- data/docs/ListManagedServiceCampaigns200Response.md +20 -0
- data/docs/ListManagedServiceProposals200Response.md +20 -0
- data/docs/ListOrders200Response.md +20 -0
- data/docs/ListProjects200Response.md +20 -0
- data/docs/ListSavedFilters200Response.md +20 -0
- data/docs/ListSellerMedias200Response.md +20 -0
- data/docs/ListSellerOrders200Response.md +20 -0
- data/docs/ListSellerTransactions200Response.md +20 -0
- data/docs/ListWithdrawals200Response.md +20 -0
- data/docs/ManagedServiceCampaign.md +40 -0
- data/docs/ManagedServiceCampaignProject.md +20 -0
- data/docs/ManagedServiceCampaignProposalCounts.md +26 -0
- data/docs/ManagedServiceCampaignStrategy.md +26 -0
- data/docs/ManagedServiceProposal.md +40 -0
- data/docs/ManagedServiceProposalBriefing.md +24 -0
- data/docs/ManagedServiceProposalBriefingLinksInner.md +22 -0
- data/docs/ManagedServiceProposalMedia.md +24 -0
- data/docs/ManagedServiceProposalReview.md +20 -0
- data/docs/ManagedServiceProposalReviewRequest.md +18 -0
- data/docs/ManagedServiceProposalReviewRequestReviewsInner.md +22 -0
- data/docs/ManagedServiceProposalsEstimate.md +28 -0
- data/docs/ManagedServiceProposalsEstimateRequest.md +18 -0
- data/docs/ManagedServiceRequest.md +28 -0
- data/docs/ManagedServiceRequestSent.md +18 -0
- data/docs/ManagedServicesApi.md +593 -0
- data/docs/Money.md +20 -0
- data/docs/MoneyOrNull.md +20 -0
- data/docs/Order.md +48 -0
- data/docs/OrderActionReason.md +18 -0
- data/docs/OrderBriefing.md +49 -0
- data/docs/OrderChannel.md +18 -0
- data/docs/OrderCreateRequest.md +32 -0
- data/docs/OrderDelivery.md +20 -0
- data/docs/OrderDraft.md +22 -0
- data/docs/OrderEstimate.md +24 -0
- data/docs/OrderEstimateRequest.md +30 -0
- data/docs/OrderEstimateRequestBriefing.md +49 -0
- data/docs/OrderLink.md +22 -0
- data/docs/OrderLinkRequest.md +22 -0
- data/docs/OrderMedia.md +20 -0
- data/docs/OrderProject.md +20 -0
- data/docs/OrderStateHistoryInner.md +22 -0
- data/docs/OrderStateHistoryInnerReason.md +20 -0
- data/docs/OrdersApi.md +809 -0
- data/docs/PostOrderBriefing.md +28 -0
- data/docs/PostOrderBriefingRequest.md +24 -0
- data/docs/Project.md +38 -0
- data/docs/ProjectCatalogueMedia.md +48 -0
- data/docs/ProjectCatalogueMediaAllOfProject.md +28 -0
- data/docs/ProjectsApi.md +368 -0
- data/docs/PutSellerHoliday200Response.md +20 -0
- data/docs/PutSellerHolidayRequest.md +20 -0
- data/docs/RequestMedias201Response.md +18 -0
- data/docs/RequestMediasRequest.md +18 -0
- data/docs/SavedFilter.md +26 -0
- data/docs/SavedFilterNotifications.md +20 -0
- data/docs/SavedFiltersApi.md +296 -0
- data/docs/SellerFees.md +20 -0
- data/docs/SellerFeesOrNull.md +20 -0
- data/docs/SellerMedia.md +54 -0
- data/docs/SellerMediaFlashOffer.md +20 -0
- data/docs/SellerMediaLinkAdditionOffer.md +18 -0
- data/docs/SellerMediaLinkAdditionOfferPricingOptionsInner.md +22 -0
- data/docs/SellerMediaPostOffer.md +20 -0
- data/docs/SellerMediaPostOfferPricingOptionsInner.md +24 -0
- data/docs/SellerMediasApi.md +301 -0
- data/docs/SellerMoneyApi.md +364 -0
- data/docs/SellerOrder.md +50 -0
- data/docs/SellerOrderBriefing.md +49 -0
- data/docs/SellerOrderChannel.md +20 -0
- data/docs/SellerOrderDraft.md +20 -0
- data/docs/SellerOrderDraftFile.md +18 -0
- data/docs/SellerOrderPostDelivery.md +20 -0
- data/docs/SellerOrderProject.md +18 -0
- data/docs/SellerOrderRefutation.md +18 -0
- data/docs/SellerOrderRejection.md +18 -0
- data/docs/SellerOrderRejectionReason.md +20 -0
- data/docs/SellerOrdersApi.md +893 -0
- data/docs/SellerPostOrderBriefing.md +30 -0
- data/docs/SellerTransaction.md +38 -0
- data/docs/Transaction.md +40 -0
- data/docs/UpdateProjectRequest.md +30 -0
- data/docs/UpdateSellerMediaRequest.md +22 -0
- data/docs/UpdateSellerMediaRequestExtraServicesInner.md +20 -0
- data/docs/UpdateSellerMediaRequestLinkAdditionOffer.md +18 -0
- data/docs/UpdateSellerMediaRequestLinkAdditionOfferPricingOptionsInner.md +20 -0
- data/docs/UpdateSellerMediaRequestPostOffer.md +18 -0
- data/docs/UpdateSellerMediaRequestPostOfferPricingOptionsInner.md +22 -0
- data/docs/UploadFile201Response.md +24 -0
- data/docs/Withdrawal.md +28 -0
- data/git_push.sh +57 -0
- data/growwer.gemspec +41 -0
- data/lib/growwer/api/account_api.rb +215 -0
- data/lib/growwer/api/buyer_money_api.rb +355 -0
- data/lib/growwer/api/catalogue_api.rb +881 -0
- data/lib/growwer/api/files_api.rb +102 -0
- data/lib/growwer/api/managed_services_api.rb +625 -0
- data/lib/growwer/api/orders_api.rb +855 -0
- data/lib/growwer/api/projects_api.rb +398 -0
- data/lib/growwer/api/saved_filters_api.rb +319 -0
- data/lib/growwer/api/seller_medias_api.rb +329 -0
- data/lib/growwer/api/seller_money_api.rb +358 -0
- data/lib/growwer/api/seller_orders_api.rb +963 -0
- data/lib/growwer/api_client.rb +441 -0
- data/lib/growwer/api_error.rb +58 -0
- data/lib/growwer/api_model_base.rb +88 -0
- data/lib/growwer/configuration.rb +392 -0
- data/lib/growwer/models/balance.rb +192 -0
- data/lib/growwer/models/catalogue_media.rb +491 -0
- data/lib/growwer/models/catalogue_media_flash_offer.rb +191 -0
- data/lib/growwer/models/catalogue_media_metrics.rb +200 -0
- data/lib/growwer/models/catalogue_offer.rb +254 -0
- data/lib/growwer/models/catalogue_offer_or_null.rb +254 -0
- data/lib/growwer/models/catalogue_post_offer.rb +333 -0
- data/lib/growwer/models/catalogue_post_offer_all_of_extras.rb +177 -0
- data/lib/growwer/models/catalogue_post_offer_all_of_extras_sensitive_topic.rb +178 -0
- data/lib/growwer/models/code_name.rb +190 -0
- data/lib/growwer/models/count_saved_filter_medias200_response.rb +173 -0
- data/lib/growwer/models/create_project_request.rb +402 -0
- data/lib/growwer/models/create_saved_filter_request.rb +247 -0
- data/lib/growwer/models/error.rb +231 -0
- data/lib/growwer/models/get_buyer_wallet200_response.rb +191 -0
- data/lib/growwer/models/get_me200_response.rb +373 -0
- data/lib/growwer/models/get_me200_response_buyer.rb +164 -0
- data/lib/growwer/models/get_me200_response_catalogue.rb +165 -0
- data/lib/growwer/models/get_me200_response_managed_service.rb +165 -0
- data/lib/growwer/models/get_me200_response_seller.rb +231 -0
- data/lib/growwer/models/get_seller_wallet200_response.rb +191 -0
- data/lib/growwer/models/get_vocabulary200_response.rb +311 -0
- data/lib/growwer/models/get_vocabulary200_response_topics_inner.rb +190 -0
- data/lib/growwer/models/invoice.rb +243 -0
- data/lib/growwer/models/link_addition_order_briefing.rb +204 -0
- data/lib/growwer/models/link_addition_order_briefing_request.rb +201 -0
- data/lib/growwer/models/list_buyer_transactions200_response.rb +192 -0
- data/lib/growwer/models/list_flash_offers200_response.rb +192 -0
- data/lib/growwer/models/list_invoices200_response.rb +192 -0
- data/lib/growwer/models/list_managed_service_campaigns200_response.rb +192 -0
- data/lib/growwer/models/list_managed_service_proposals200_response.rb +192 -0
- data/lib/growwer/models/list_orders200_response.rb +192 -0
- data/lib/growwer/models/list_projects200_response.rb +192 -0
- data/lib/growwer/models/list_saved_filters200_response.rb +192 -0
- data/lib/growwer/models/list_seller_medias200_response.rb +192 -0
- data/lib/growwer/models/list_seller_orders200_response.rb +192 -0
- data/lib/growwer/models/list_seller_transactions200_response.rb +192 -0
- data/lib/growwer/models/list_withdrawals200_response.rb +192 -0
- data/lib/growwer/models/managed_service_campaign.rb +451 -0
- data/lib/growwer/models/managed_service_campaign_project.rb +190 -0
- data/lib/growwer/models/managed_service_campaign_proposal_counts.rb +269 -0
- data/lib/growwer/models/managed_service_campaign_strategy.rb +300 -0
- data/lib/growwer/models/managed_service_proposal.rb +428 -0
- data/lib/growwer/models/managed_service_proposal_briefing.rb +244 -0
- data/lib/growwer/models/managed_service_proposal_briefing_links_inner.rb +226 -0
- data/lib/growwer/models/managed_service_proposal_media.rb +214 -0
- data/lib/growwer/models/managed_service_proposal_review.rb +193 -0
- data/lib/growwer/models/managed_service_proposal_review_request.rb +176 -0
- data/lib/growwer/models/managed_service_proposal_review_request_reviews_inner.rb +240 -0
- data/lib/growwer/models/managed_service_proposals_estimate.rb +300 -0
- data/lib/growwer/models/managed_service_proposals_estimate_request.rb +150 -0
- data/lib/growwer/models/managed_service_request.rb +331 -0
- data/lib/growwer/models/managed_service_request_sent.rb +188 -0
- data/lib/growwer/models/money.rb +192 -0
- data/lib/growwer/models/money_or_null.rb +192 -0
- data/lib/growwer/models/order.rb +541 -0
- data/lib/growwer/models/order_action_reason.rb +183 -0
- data/lib/growwer/models/order_briefing.rb +102 -0
- data/lib/growwer/models/order_channel.rb +189 -0
- data/lib/growwer/models/order_create_request.rb +333 -0
- data/lib/growwer/models/order_delivery.rb +179 -0
- data/lib/growwer/models/order_draft.rb +220 -0
- data/lib/growwer/models/order_estimate.rb +246 -0
- data/lib/growwer/models/order_estimate_request.rb +299 -0
- data/lib/growwer/models/order_estimate_request_briefing.rb +102 -0
- data/lib/growwer/models/order_link.rb +214 -0
- data/lib/growwer/models/order_link_request.rb +209 -0
- data/lib/growwer/models/order_media.rb +178 -0
- data/lib/growwer/models/order_project.rb +178 -0
- data/lib/growwer/models/order_state_history_inner.rb +202 -0
- data/lib/growwer/models/order_state_history_inner_reason.rb +200 -0
- data/lib/growwer/models/post_order_briefing.rb +285 -0
- data/lib/growwer/models/post_order_briefing_request.rb +220 -0
- data/lib/growwer/models/project.rb +437 -0
- data/lib/growwer/models/project_catalogue_media.rb +524 -0
- data/lib/growwer/models/project_catalogue_media_all_of_project.rb +298 -0
- data/lib/growwer/models/put_seller_holiday200_response.rb +177 -0
- data/lib/growwer/models/put_seller_holiday_request.rb +174 -0
- data/lib/growwer/models/request_medias201_response.rb +166 -0
- data/lib/growwer/models/request_medias_request.rb +167 -0
- data/lib/growwer/models/saved_filter.rb +269 -0
- data/lib/growwer/models/saved_filter_notifications.rb +211 -0
- data/lib/growwer/models/seller_fees.rb +164 -0
- data/lib/growwer/models/seller_fees_or_null.rb +164 -0
- data/lib/growwer/models/seller_media.rb +573 -0
- data/lib/growwer/models/seller_media_flash_offer.rb +191 -0
- data/lib/growwer/models/seller_media_link_addition_offer.rb +167 -0
- data/lib/growwer/models/seller_media_link_addition_offer_pricing_options_inner.rb +228 -0
- data/lib/growwer/models/seller_media_post_offer.rb +195 -0
- data/lib/growwer/models/seller_media_post_offer_pricing_options_inner.rb +234 -0
- data/lib/growwer/models/seller_order.rb +563 -0
- data/lib/growwer/models/seller_order_briefing.rb +102 -0
- data/lib/growwer/models/seller_order_channel.rb +214 -0
- data/lib/growwer/models/seller_order_draft.rb +193 -0
- data/lib/growwer/models/seller_order_draft_file.rb +165 -0
- data/lib/growwer/models/seller_order_post_delivery.rb +193 -0
- data/lib/growwer/models/seller_order_project.rb +165 -0
- data/lib/growwer/models/seller_order_refutation.rb +183 -0
- data/lib/growwer/models/seller_order_rejection.rb +164 -0
- data/lib/growwer/models/seller_order_rejection_reason.rb +224 -0
- data/lib/growwer/models/seller_post_order_briefing.rb +314 -0
- data/lib/growwer/models/seller_transaction.rb +415 -0
- data/lib/growwer/models/transaction.rb +427 -0
- data/lib/growwer/models/update_project_request.rb +339 -0
- data/lib/growwer/models/update_seller_media_request.rb +168 -0
- data/lib/growwer/models/update_seller_media_request_extra_services_inner.rb +215 -0
- data/lib/growwer/models/update_seller_media_request_link_addition_offer.rb +166 -0
- data/lib/growwer/models/update_seller_media_request_link_addition_offer_pricing_options_inner.rb +215 -0
- data/lib/growwer/models/update_seller_media_request_post_offer.rb +175 -0
- data/lib/growwer/models/update_seller_media_request_post_offer_pricing_options_inner.rb +210 -0
- data/lib/growwer/models/upload_file201_response.rb +244 -0
- data/lib/growwer/models/withdrawal.rb +322 -0
- data/lib/growwer/version.rb +15 -0
- data/lib/growwer.rb +163 -0
- data/spec/api/account_api_spec.rb +70 -0
- data/spec/api/buyer_money_api_spec.rb +96 -0
- data/spec/api/catalogue_api_spec.rb +213 -0
- data/spec/api/files_api_spec.rb +48 -0
- data/spec/api/managed_services_api_spec.rb +140 -0
- data/spec/api/orders_api_spec.rb +182 -0
- data/spec/api/projects_api_spec.rb +100 -0
- data/spec/api/saved_filters_api_spec.rb +88 -0
- data/spec/api/seller_medias_api_spec.rb +89 -0
- data/spec/api/seller_money_api_spec.rb +97 -0
- data/spec/api/seller_orders_api_spec.rb +199 -0
- data/spec/models/balance_spec.rb +42 -0
- data/spec/models/catalogue_media_flash_offer_spec.rb +42 -0
- data/spec/models/catalogue_media_metrics_spec.rb +60 -0
- data/spec/models/catalogue_media_spec.rb +124 -0
- data/spec/models/catalogue_offer_or_null_spec.rb +58 -0
- data/spec/models/catalogue_offer_spec.rb +58 -0
- data/spec/models/catalogue_post_offer_all_of_extras_sensitive_topic_spec.rb +42 -0
- data/spec/models/catalogue_post_offer_all_of_extras_spec.rb +42 -0
- data/spec/models/catalogue_post_offer_spec.rb +80 -0
- data/spec/models/code_name_spec.rb +42 -0
- data/spec/models/count_saved_filter_medias200_response_spec.rb +36 -0
- data/spec/models/create_project_request_spec.rb +82 -0
- data/spec/models/create_saved_filter_request_spec.rb +52 -0
- data/spec/models/error_spec.rb +54 -0
- data/spec/models/get_buyer_wallet200_response_spec.rb +42 -0
- data/spec/models/get_me200_response_buyer_spec.rb +36 -0
- data/spec/models/get_me200_response_catalogue_spec.rb +36 -0
- data/spec/models/get_me200_response_managed_service_spec.rb +36 -0
- data/spec/models/get_me200_response_seller_spec.rb +54 -0
- data/spec/models/get_me200_response_spec.rb +84 -0
- data/spec/models/get_seller_wallet200_response_spec.rb +42 -0
- data/spec/models/get_vocabulary200_response_spec.rb +74 -0
- data/spec/models/get_vocabulary200_response_topics_inner_spec.rb +42 -0
- data/spec/models/invoice_spec.rb +54 -0
- data/spec/models/link_addition_order_briefing_request_spec.rb +48 -0
- data/spec/models/link_addition_order_briefing_spec.rb +48 -0
- data/spec/models/list_buyer_transactions200_response_spec.rb +42 -0
- data/spec/models/list_flash_offers200_response_spec.rb +42 -0
- data/spec/models/list_invoices200_response_spec.rb +42 -0
- data/spec/models/list_managed_service_campaigns200_response_spec.rb +42 -0
- data/spec/models/list_managed_service_proposals200_response_spec.rb +42 -0
- data/spec/models/list_orders200_response_spec.rb +42 -0
- data/spec/models/list_projects200_response_spec.rb +42 -0
- data/spec/models/list_saved_filters200_response_spec.rb +42 -0
- data/spec/models/list_seller_medias200_response_spec.rb +42 -0
- data/spec/models/list_seller_orders200_response_spec.rb +42 -0
- data/spec/models/list_seller_transactions200_response_spec.rb +42 -0
- data/spec/models/list_withdrawals200_response_spec.rb +42 -0
- data/spec/models/managed_service_campaign_project_spec.rb +42 -0
- data/spec/models/managed_service_campaign_proposal_counts_spec.rb +60 -0
- data/spec/models/managed_service_campaign_spec.rb +106 -0
- data/spec/models/managed_service_campaign_strategy_spec.rb +64 -0
- data/spec/models/managed_service_proposal_briefing_links_inner_spec.rb +52 -0
- data/spec/models/managed_service_proposal_briefing_spec.rb +54 -0
- data/spec/models/managed_service_proposal_media_spec.rb +54 -0
- data/spec/models/managed_service_proposal_review_request_reviews_inner_spec.rb +52 -0
- data/spec/models/managed_service_proposal_review_request_spec.rb +36 -0
- data/spec/models/managed_service_proposal_review_spec.rb +42 -0
- data/spec/models/managed_service_proposal_spec.rb +110 -0
- data/spec/models/managed_service_proposals_estimate_request_spec.rb +36 -0
- data/spec/models/managed_service_proposals_estimate_spec.rb +66 -0
- data/spec/models/managed_service_request_sent_spec.rb +40 -0
- data/spec/models/managed_service_request_spec.rb +74 -0
- data/spec/models/money_or_null_spec.rb +42 -0
- data/spec/models/money_spec.rb +42 -0
- data/spec/models/order_action_reason_spec.rb +36 -0
- data/spec/models/order_briefing_spec.rb +32 -0
- data/spec/models/order_channel_spec.rb +40 -0
- data/spec/models/order_create_request_spec.rb +82 -0
- data/spec/models/order_delivery_spec.rb +42 -0
- data/spec/models/order_draft_spec.rb +48 -0
- data/spec/models/order_estimate_request_briefing_spec.rb +32 -0
- data/spec/models/order_estimate_request_spec.rb +76 -0
- data/spec/models/order_estimate_spec.rb +54 -0
- data/spec/models/order_link_request_spec.rb +52 -0
- data/spec/models/order_link_spec.rb +52 -0
- data/spec/models/order_media_spec.rb +42 -0
- data/spec/models/order_project_spec.rb +42 -0
- data/spec/models/order_spec.rb +134 -0
- data/spec/models/order_state_history_inner_reason_spec.rb +46 -0
- data/spec/models/order_state_history_inner_spec.rb +48 -0
- data/spec/models/post_order_briefing_request_spec.rb +58 -0
- data/spec/models/post_order_briefing_spec.rb +70 -0
- data/spec/models/project_catalogue_media_all_of_project_spec.rb +66 -0
- data/spec/models/project_catalogue_media_spec.rb +130 -0
- data/spec/models/project_spec.rb +104 -0
- data/spec/models/put_seller_holiday200_response_spec.rb +42 -0
- data/spec/models/put_seller_holiday_request_spec.rb +42 -0
- data/spec/models/request_medias201_response_spec.rb +36 -0
- data/spec/models/request_medias_request_spec.rb +36 -0
- data/spec/models/saved_filter_notifications_spec.rb +46 -0
- data/spec/models/saved_filter_spec.rb +60 -0
- data/spec/models/seller_fees_or_null_spec.rb +42 -0
- data/spec/models/seller_fees_spec.rb +42 -0
- data/spec/models/seller_media_flash_offer_spec.rb +42 -0
- data/spec/models/seller_media_link_addition_offer_pricing_options_inner_spec.rb +52 -0
- data/spec/models/seller_media_link_addition_offer_spec.rb +36 -0
- data/spec/models/seller_media_post_offer_pricing_options_inner_spec.rb +58 -0
- data/spec/models/seller_media_post_offer_spec.rb +42 -0
- data/spec/models/seller_media_spec.rb +148 -0
- data/spec/models/seller_order_briefing_spec.rb +32 -0
- data/spec/models/seller_order_channel_spec.rb +50 -0
- data/spec/models/seller_order_draft_file_spec.rb +36 -0
- data/spec/models/seller_order_draft_spec.rb +42 -0
- data/spec/models/seller_order_post_delivery_spec.rb +42 -0
- data/spec/models/seller_order_project_spec.rb +36 -0
- data/spec/models/seller_order_refutation_spec.rb +36 -0
- data/spec/models/seller_order_rejection_reason_spec.rb +46 -0
- data/spec/models/seller_order_rejection_spec.rb +36 -0
- data/spec/models/seller_order_spec.rb +140 -0
- data/spec/models/seller_post_order_briefing_spec.rb +80 -0
- data/spec/models/seller_transaction_spec.rb +104 -0
- data/spec/models/transaction_spec.rb +110 -0
- data/spec/models/update_project_request_spec.rb +76 -0
- data/spec/models/update_seller_media_request_extra_services_inner_spec.rb +46 -0
- data/spec/models/update_seller_media_request_link_addition_offer_pricing_options_inner_spec.rb +46 -0
- data/spec/models/update_seller_media_request_link_addition_offer_spec.rb +36 -0
- data/spec/models/update_seller_media_request_post_offer_pricing_options_inner_spec.rb +52 -0
- data/spec/models/update_seller_media_request_post_offer_spec.rb +36 -0
- data/spec/models/update_seller_media_request_spec.rb +48 -0
- data/spec/models/upload_file201_response_spec.rb +54 -0
- data/spec/models/withdrawal_spec.rb +74 -0
- data/spec/spec_helper.rb +111 -0
- metadata +618 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Growwer API
|
|
3
|
+
|
|
4
|
+
#The Growwer customer API. Authenticate every call with an API key created on your profile page, sent as `Authorization: Bearer <key>`. A read key can call every GET operation; writes need a read and write key and an `Idempotency-Key` header. Idempotency: use a new `Idempotency-Key` (1 to 255 printable ASCII characters without spaces) for each operation and reuse it only to retry that same operation. Keys belong to your account, not to one API key. - A successful write is stored for 30 days: a retry with the same key and the same request replays its response with `Idempotent-Replayed: true` and does nothing again. - A refused write (4xx) has no effect and releases its key: once you fix the cause, retry with the same key and the write runs. - A failed write (5xx) may have taken effect, so it is never run again under its key: a retry gets 409 `idempotency_outcome_unknown`. Check whether it took effect before retrying with a new key. - A retry while the first request is still running gets 409 `idempotency_request_in_progress`. A request still running after 5 minutes is treated as failed: a retry gets 409 `idempotency_outcome_unknown`. - The same key with a different request (method, path, query or body) gets 409 `idempotency_key_reused`. A write without the header gets 400 `idempotency_key_required`. Every response carries `X-Request-Id`. Errors share one shape, `{code, message, requestId, details?}`. Money is integer cents plus a currency code and dates are ISO-8601.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1
|
|
7
|
+
Contact: support@growwer.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Growwer
|
|
17
|
+
# The briefing of a post order (`type` `post`), checked against the media's post offer as the web checks it.
|
|
18
|
+
class PostOrderBriefingRequest < ApiModelBase
|
|
19
|
+
# No more links than the offer allows.
|
|
20
|
+
attr_accessor :links
|
|
21
|
+
|
|
22
|
+
# Extra services the offer has, added to the ones the web selects for your project by default. A project with a sensitive topic always carries `extra_charge_for_sensitive_topic` when the media charges it.
|
|
23
|
+
attr_accessor :extra_services
|
|
24
|
+
|
|
25
|
+
attr_accessor :title
|
|
26
|
+
|
|
27
|
+
attr_accessor :additional_info
|
|
28
|
+
|
|
29
|
+
class EnumAttributeValidator
|
|
30
|
+
attr_reader :datatype
|
|
31
|
+
attr_reader :allowable_values
|
|
32
|
+
|
|
33
|
+
def initialize(datatype, allowable_values)
|
|
34
|
+
@allowable_values = allowable_values.map do |value|
|
|
35
|
+
case datatype.to_s
|
|
36
|
+
when /Integer/i
|
|
37
|
+
value.to_i
|
|
38
|
+
when /Float/i
|
|
39
|
+
value.to_f
|
|
40
|
+
else
|
|
41
|
+
value
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def valid?(value)
|
|
47
|
+
!value || allowable_values.include?(value)
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
52
|
+
def self.attribute_map
|
|
53
|
+
{
|
|
54
|
+
:'links' => :'links',
|
|
55
|
+
:'extra_services' => :'extraServices',
|
|
56
|
+
:'title' => :'title',
|
|
57
|
+
:'additional_info' => :'additionalInfo'
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Returns attribute mapping this model knows about
|
|
62
|
+
def self.acceptable_attribute_map
|
|
63
|
+
attribute_map
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Returns all the JSON keys this model knows about
|
|
67
|
+
def self.acceptable_attributes
|
|
68
|
+
acceptable_attribute_map.values
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Attribute type mapping.
|
|
72
|
+
def self.openapi_types
|
|
73
|
+
{
|
|
74
|
+
:'links' => :'Array<OrderLinkRequest>',
|
|
75
|
+
:'extra_services' => :'Array<String>',
|
|
76
|
+
:'title' => :'String',
|
|
77
|
+
:'additional_info' => :'String'
|
|
78
|
+
}
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# List of attributes with nullable: true
|
|
82
|
+
def self.openapi_nullable
|
|
83
|
+
Set.new([
|
|
84
|
+
])
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Initializes the object
|
|
88
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
89
|
+
def initialize(attributes = {})
|
|
90
|
+
if (!attributes.is_a?(Hash))
|
|
91
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Growwer::PostOrderBriefingRequest` initialize method"
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
95
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
96
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
97
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
98
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Growwer::PostOrderBriefingRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
99
|
+
end
|
|
100
|
+
h[k.to_sym] = v
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'links')
|
|
104
|
+
if (value = attributes[:'links']).is_a?(Array)
|
|
105
|
+
self.links = value
|
|
106
|
+
end
|
|
107
|
+
else
|
|
108
|
+
self.links = nil
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
if attributes.key?(:'extra_services')
|
|
112
|
+
if (value = attributes[:'extra_services']).is_a?(Array)
|
|
113
|
+
self.extra_services = value
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.key?(:'title')
|
|
118
|
+
self.title = attributes[:'title']
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'additional_info')
|
|
122
|
+
self.additional_info = attributes[:'additional_info']
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
127
|
+
# @return Array for valid properties with the reasons
|
|
128
|
+
def list_invalid_properties
|
|
129
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
130
|
+
invalid_properties = Array.new
|
|
131
|
+
if @links.nil?
|
|
132
|
+
invalid_properties.push('invalid value for "links", links cannot be nil.')
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
invalid_properties
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Check to see if the all the properties in the model are valid
|
|
139
|
+
# @return true if the model is valid
|
|
140
|
+
def valid?
|
|
141
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
142
|
+
return false if @links.nil?
|
|
143
|
+
true
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Custom attribute writer method with validation
|
|
147
|
+
# @param [Object] links Value to be assigned
|
|
148
|
+
def links=(links)
|
|
149
|
+
if links.nil?
|
|
150
|
+
fail ArgumentError, 'links cannot be nil'
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
@links = links
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Checks equality by comparing each attribute.
|
|
157
|
+
# @param [Object] Object to be compared
|
|
158
|
+
def ==(o)
|
|
159
|
+
return true if self.equal?(o)
|
|
160
|
+
self.class == o.class &&
|
|
161
|
+
links == o.links &&
|
|
162
|
+
extra_services == o.extra_services &&
|
|
163
|
+
title == o.title &&
|
|
164
|
+
additional_info == o.additional_info
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# @see the `==` method
|
|
168
|
+
# @param [Object] Object to be compared
|
|
169
|
+
def eql?(o)
|
|
170
|
+
self == o
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Calculates hash code according to all attributes.
|
|
174
|
+
# @return [Integer] Hash code
|
|
175
|
+
def hash
|
|
176
|
+
[links, extra_services, title, additional_info].hash
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Builds the object from hash
|
|
180
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
181
|
+
# @return [Object] Returns the model itself
|
|
182
|
+
def self.build_from_hash(attributes)
|
|
183
|
+
return nil unless attributes.is_a?(Hash)
|
|
184
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
185
|
+
transformed_hash = {}
|
|
186
|
+
openapi_types.each_pair do |key, type|
|
|
187
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
188
|
+
transformed_hash["#{key}"] = nil
|
|
189
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
190
|
+
# check to ensure the input is an array given that the attribute
|
|
191
|
+
# is documented as an array but the input is not
|
|
192
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
193
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
194
|
+
end
|
|
195
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
196
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
new(transformed_hash)
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Returns the object in the form of hash
|
|
203
|
+
# @return [Hash] Returns the object in the form of hash
|
|
204
|
+
def to_hash
|
|
205
|
+
hash = {}
|
|
206
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
207
|
+
value = self.send(attr)
|
|
208
|
+
if value.nil?
|
|
209
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
210
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
hash[param] = _to_hash(value)
|
|
214
|
+
end
|
|
215
|
+
hash
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
end
|
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Growwer API
|
|
3
|
+
|
|
4
|
+
#The Growwer customer API. Authenticate every call with an API key created on your profile page, sent as `Authorization: Bearer <key>`. A read key can call every GET operation; writes need a read and write key and an `Idempotency-Key` header. Idempotency: use a new `Idempotency-Key` (1 to 255 printable ASCII characters without spaces) for each operation and reuse it only to retry that same operation. Keys belong to your account, not to one API key. - A successful write is stored for 30 days: a retry with the same key and the same request replays its response with `Idempotent-Replayed: true` and does nothing again. - A refused write (4xx) has no effect and releases its key: once you fix the cause, retry with the same key and the write runs. - A failed write (5xx) may have taken effect, so it is never run again under its key: a retry gets 409 `idempotency_outcome_unknown`. Check whether it took effect before retrying with a new key. - A retry while the first request is still running gets 409 `idempotency_request_in_progress`. A request still running after 5 minutes is treated as failed: a retry gets 409 `idempotency_outcome_unknown`. - The same key with a different request (method, path, query or body) gets 409 `idempotency_key_reused`. A write without the header gets 400 `idempotency_key_required`. Every response carries `X-Request-Id`. Errors share one shape, `{code, message, requestId, details?}`. Money is integer cents plus a currency code and dates are ISO-8601.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1
|
|
7
|
+
Contact: support@growwer.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.24.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Growwer
|
|
17
|
+
class Project < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
# Your name for the project, or null when it has none.
|
|
21
|
+
attr_accessor :name
|
|
22
|
+
|
|
23
|
+
# The website the project promotes. It cannot be changed once the project exists.
|
|
24
|
+
attr_accessor :root_url
|
|
25
|
+
|
|
26
|
+
# What the website is: an online shop (`ecommerce`), a services business (`services`) or anything else (`other`).
|
|
27
|
+
attr_accessor :website_type
|
|
28
|
+
|
|
29
|
+
# The website's topic, as a topic id from GET /vocabulary. Exactly one.
|
|
30
|
+
attr_accessor :topics
|
|
31
|
+
|
|
32
|
+
# The language of the campaign, as a language code from GET /vocabulary.
|
|
33
|
+
attr_accessor :language
|
|
34
|
+
|
|
35
|
+
# The country the campaign targets, as a country code from GET /vocabulary, or null for worldwide.
|
|
36
|
+
attr_accessor :country
|
|
37
|
+
|
|
38
|
+
# The products or services the campaign promotes, 5 to 10.
|
|
39
|
+
attr_accessor :promoted_products
|
|
40
|
+
|
|
41
|
+
# Keywords you want the campaign to target, at most 100.
|
|
42
|
+
attr_accessor :user_keywords
|
|
43
|
+
|
|
44
|
+
# `finished` once Growwer has recommended media for the project, `analyzing` until then. Analysis can take hours, and it never finishes when no medium matches the project. Poll with backoff, and use `createdAt` to decide how long to keep polling.
|
|
45
|
+
attr_accessor :state
|
|
46
|
+
|
|
47
|
+
attr_accessor :created_at
|
|
48
|
+
|
|
49
|
+
class EnumAttributeValidator
|
|
50
|
+
attr_reader :datatype
|
|
51
|
+
attr_reader :allowable_values
|
|
52
|
+
|
|
53
|
+
def initialize(datatype, allowable_values)
|
|
54
|
+
@allowable_values = allowable_values.map do |value|
|
|
55
|
+
case datatype.to_s
|
|
56
|
+
when /Integer/i
|
|
57
|
+
value.to_i
|
|
58
|
+
when /Float/i
|
|
59
|
+
value.to_f
|
|
60
|
+
else
|
|
61
|
+
value
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def valid?(value)
|
|
67
|
+
!value || allowable_values.include?(value)
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
72
|
+
def self.attribute_map
|
|
73
|
+
{
|
|
74
|
+
:'id' => :'id',
|
|
75
|
+
:'name' => :'name',
|
|
76
|
+
:'root_url' => :'rootUrl',
|
|
77
|
+
:'website_type' => :'websiteType',
|
|
78
|
+
:'topics' => :'topics',
|
|
79
|
+
:'language' => :'language',
|
|
80
|
+
:'country' => :'country',
|
|
81
|
+
:'promoted_products' => :'promotedProducts',
|
|
82
|
+
:'user_keywords' => :'userKeywords',
|
|
83
|
+
:'state' => :'state',
|
|
84
|
+
:'created_at' => :'createdAt'
|
|
85
|
+
}
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Returns attribute mapping this model knows about
|
|
89
|
+
def self.acceptable_attribute_map
|
|
90
|
+
attribute_map
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Returns all the JSON keys this model knows about
|
|
94
|
+
def self.acceptable_attributes
|
|
95
|
+
acceptable_attribute_map.values
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Attribute type mapping.
|
|
99
|
+
def self.openapi_types
|
|
100
|
+
{
|
|
101
|
+
:'id' => :'String',
|
|
102
|
+
:'name' => :'String',
|
|
103
|
+
:'root_url' => :'String',
|
|
104
|
+
:'website_type' => :'String',
|
|
105
|
+
:'topics' => :'Array<Integer>',
|
|
106
|
+
:'language' => :'String',
|
|
107
|
+
:'country' => :'String',
|
|
108
|
+
:'promoted_products' => :'Array<String>',
|
|
109
|
+
:'user_keywords' => :'Array<String>',
|
|
110
|
+
:'state' => :'String',
|
|
111
|
+
:'created_at' => :'Time'
|
|
112
|
+
}
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# List of attributes with nullable: true
|
|
116
|
+
def self.openapi_nullable
|
|
117
|
+
Set.new([
|
|
118
|
+
:'name',
|
|
119
|
+
:'country',
|
|
120
|
+
])
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Initializes the object
|
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
125
|
+
def initialize(attributes = {})
|
|
126
|
+
if (!attributes.is_a?(Hash))
|
|
127
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Growwer::Project` initialize method"
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
131
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
132
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
133
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
134
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Growwer::Project`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
135
|
+
end
|
|
136
|
+
h[k.to_sym] = v
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'id')
|
|
140
|
+
self.id = attributes[:'id']
|
|
141
|
+
else
|
|
142
|
+
self.id = nil
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'name')
|
|
146
|
+
self.name = attributes[:'name']
|
|
147
|
+
else
|
|
148
|
+
self.name = nil
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'root_url')
|
|
152
|
+
self.root_url = attributes[:'root_url']
|
|
153
|
+
else
|
|
154
|
+
self.root_url = nil
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if attributes.key?(:'website_type')
|
|
158
|
+
self.website_type = attributes[:'website_type']
|
|
159
|
+
else
|
|
160
|
+
self.website_type = nil
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if attributes.key?(:'topics')
|
|
164
|
+
if (value = attributes[:'topics']).is_a?(Array)
|
|
165
|
+
self.topics = value
|
|
166
|
+
end
|
|
167
|
+
else
|
|
168
|
+
self.topics = nil
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if attributes.key?(:'language')
|
|
172
|
+
self.language = attributes[:'language']
|
|
173
|
+
else
|
|
174
|
+
self.language = nil
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if attributes.key?(:'country')
|
|
178
|
+
self.country = attributes[:'country']
|
|
179
|
+
else
|
|
180
|
+
self.country = nil
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if attributes.key?(:'promoted_products')
|
|
184
|
+
if (value = attributes[:'promoted_products']).is_a?(Array)
|
|
185
|
+
self.promoted_products = value
|
|
186
|
+
end
|
|
187
|
+
else
|
|
188
|
+
self.promoted_products = nil
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
if attributes.key?(:'user_keywords')
|
|
192
|
+
if (value = attributes[:'user_keywords']).is_a?(Array)
|
|
193
|
+
self.user_keywords = value
|
|
194
|
+
end
|
|
195
|
+
else
|
|
196
|
+
self.user_keywords = nil
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
if attributes.key?(:'state')
|
|
200
|
+
self.state = attributes[:'state']
|
|
201
|
+
else
|
|
202
|
+
self.state = nil
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
if attributes.key?(:'created_at')
|
|
206
|
+
self.created_at = attributes[:'created_at']
|
|
207
|
+
else
|
|
208
|
+
self.created_at = nil
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
213
|
+
# @return Array for valid properties with the reasons
|
|
214
|
+
def list_invalid_properties
|
|
215
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
216
|
+
invalid_properties = Array.new
|
|
217
|
+
if @id.nil?
|
|
218
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
if @root_url.nil?
|
|
222
|
+
invalid_properties.push('invalid value for "root_url", root_url cannot be nil.')
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
if @website_type.nil?
|
|
226
|
+
invalid_properties.push('invalid value for "website_type", website_type cannot be nil.')
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
if @topics.nil?
|
|
230
|
+
invalid_properties.push('invalid value for "topics", topics cannot be nil.')
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
if @language.nil?
|
|
234
|
+
invalid_properties.push('invalid value for "language", language cannot be nil.')
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
if @promoted_products.nil?
|
|
238
|
+
invalid_properties.push('invalid value for "promoted_products", promoted_products cannot be nil.')
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
if @user_keywords.nil?
|
|
242
|
+
invalid_properties.push('invalid value for "user_keywords", user_keywords cannot be nil.')
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
if @state.nil?
|
|
246
|
+
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
if @created_at.nil?
|
|
250
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
invalid_properties
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Check to see if the all the properties in the model are valid
|
|
257
|
+
# @return true if the model is valid
|
|
258
|
+
def valid?
|
|
259
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
260
|
+
return false if @id.nil?
|
|
261
|
+
return false if @root_url.nil?
|
|
262
|
+
return false if @website_type.nil?
|
|
263
|
+
website_type_validator = EnumAttributeValidator.new('String', ["ecommerce", "services", "other"])
|
|
264
|
+
return false unless website_type_validator.valid?(@website_type)
|
|
265
|
+
return false if @topics.nil?
|
|
266
|
+
return false if @language.nil?
|
|
267
|
+
return false if @promoted_products.nil?
|
|
268
|
+
return false if @user_keywords.nil?
|
|
269
|
+
return false if @state.nil?
|
|
270
|
+
state_validator = EnumAttributeValidator.new('String', ["analyzing", "finished"])
|
|
271
|
+
return false unless state_validator.valid?(@state)
|
|
272
|
+
return false if @created_at.nil?
|
|
273
|
+
true
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# Custom attribute writer method with validation
|
|
277
|
+
# @param [Object] id Value to be assigned
|
|
278
|
+
def id=(id)
|
|
279
|
+
if id.nil?
|
|
280
|
+
fail ArgumentError, 'id cannot be nil'
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
@id = id
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# Custom attribute writer method with validation
|
|
287
|
+
# @param [Object] root_url Value to be assigned
|
|
288
|
+
def root_url=(root_url)
|
|
289
|
+
if root_url.nil?
|
|
290
|
+
fail ArgumentError, 'root_url cannot be nil'
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
@root_url = root_url
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
297
|
+
# @param [Object] website_type Object to be assigned
|
|
298
|
+
def website_type=(website_type)
|
|
299
|
+
validator = EnumAttributeValidator.new('String', ["ecommerce", "services", "other"])
|
|
300
|
+
unless validator.valid?(website_type)
|
|
301
|
+
fail ArgumentError, "invalid value for \"website_type\", must be one of #{validator.allowable_values}."
|
|
302
|
+
end
|
|
303
|
+
@website_type = website_type
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# Custom attribute writer method with validation
|
|
307
|
+
# @param [Object] topics Value to be assigned
|
|
308
|
+
def topics=(topics)
|
|
309
|
+
if topics.nil?
|
|
310
|
+
fail ArgumentError, 'topics cannot be nil'
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
@topics = topics
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# Custom attribute writer method with validation
|
|
317
|
+
# @param [Object] language Value to be assigned
|
|
318
|
+
def language=(language)
|
|
319
|
+
if language.nil?
|
|
320
|
+
fail ArgumentError, 'language cannot be nil'
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
@language = language
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
# Custom attribute writer method with validation
|
|
327
|
+
# @param [Object] promoted_products Value to be assigned
|
|
328
|
+
def promoted_products=(promoted_products)
|
|
329
|
+
if promoted_products.nil?
|
|
330
|
+
fail ArgumentError, 'promoted_products cannot be nil'
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
@promoted_products = promoted_products
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
# Custom attribute writer method with validation
|
|
337
|
+
# @param [Object] user_keywords Value to be assigned
|
|
338
|
+
def user_keywords=(user_keywords)
|
|
339
|
+
if user_keywords.nil?
|
|
340
|
+
fail ArgumentError, 'user_keywords cannot be nil'
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
@user_keywords = user_keywords
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
347
|
+
# @param [Object] state Object to be assigned
|
|
348
|
+
def state=(state)
|
|
349
|
+
validator = EnumAttributeValidator.new('String', ["analyzing", "finished"])
|
|
350
|
+
unless validator.valid?(state)
|
|
351
|
+
fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
|
|
352
|
+
end
|
|
353
|
+
@state = state
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
# Custom attribute writer method with validation
|
|
357
|
+
# @param [Object] created_at Value to be assigned
|
|
358
|
+
def created_at=(created_at)
|
|
359
|
+
if created_at.nil?
|
|
360
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
@created_at = created_at
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
# Checks equality by comparing each attribute.
|
|
367
|
+
# @param [Object] Object to be compared
|
|
368
|
+
def ==(o)
|
|
369
|
+
return true if self.equal?(o)
|
|
370
|
+
self.class == o.class &&
|
|
371
|
+
id == o.id &&
|
|
372
|
+
name == o.name &&
|
|
373
|
+
root_url == o.root_url &&
|
|
374
|
+
website_type == o.website_type &&
|
|
375
|
+
topics == o.topics &&
|
|
376
|
+
language == o.language &&
|
|
377
|
+
country == o.country &&
|
|
378
|
+
promoted_products == o.promoted_products &&
|
|
379
|
+
user_keywords == o.user_keywords &&
|
|
380
|
+
state == o.state &&
|
|
381
|
+
created_at == o.created_at
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
# @see the `==` method
|
|
385
|
+
# @param [Object] Object to be compared
|
|
386
|
+
def eql?(o)
|
|
387
|
+
self == o
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
# Calculates hash code according to all attributes.
|
|
391
|
+
# @return [Integer] Hash code
|
|
392
|
+
def hash
|
|
393
|
+
[id, name, root_url, website_type, topics, language, country, promoted_products, user_keywords, state, created_at].hash
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
# Builds the object from hash
|
|
397
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
398
|
+
# @return [Object] Returns the model itself
|
|
399
|
+
def self.build_from_hash(attributes)
|
|
400
|
+
return nil unless attributes.is_a?(Hash)
|
|
401
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
402
|
+
transformed_hash = {}
|
|
403
|
+
openapi_types.each_pair do |key, type|
|
|
404
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
405
|
+
transformed_hash["#{key}"] = nil
|
|
406
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
407
|
+
# check to ensure the input is an array given that the attribute
|
|
408
|
+
# is documented as an array but the input is not
|
|
409
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
410
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
411
|
+
end
|
|
412
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
413
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
414
|
+
end
|
|
415
|
+
end
|
|
416
|
+
new(transformed_hash)
|
|
417
|
+
end
|
|
418
|
+
|
|
419
|
+
# Returns the object in the form of hash
|
|
420
|
+
# @return [Hash] Returns the object in the form of hash
|
|
421
|
+
def to_hash
|
|
422
|
+
hash = {}
|
|
423
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
424
|
+
value = self.send(attr)
|
|
425
|
+
if value.nil?
|
|
426
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
427
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
hash[param] = _to_hash(value)
|
|
431
|
+
end
|
|
432
|
+
hash
|
|
433
|
+
end
|
|
434
|
+
|
|
435
|
+
end
|
|
436
|
+
|
|
437
|
+
end
|