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,173 @@
|
|
|
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 CountSavedFilterMedias200Response < ApiModelBase
|
|
18
|
+
attr_accessor :count
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'count' => :'count'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns attribute mapping this model knows about
|
|
28
|
+
def self.acceptable_attribute_map
|
|
29
|
+
attribute_map
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
acceptable_attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'count' => :'Integer'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# List of attributes with nullable: true
|
|
45
|
+
def self.openapi_nullable
|
|
46
|
+
Set.new([
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
if (!attributes.is_a?(Hash))
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Growwer::CountSavedFilterMedias200Response` initialize method"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Growwer::CountSavedFilterMedias200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'count')
|
|
67
|
+
self.count = attributes[:'count']
|
|
68
|
+
else
|
|
69
|
+
self.count = nil
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
74
|
+
# @return Array for valid properties with the reasons
|
|
75
|
+
def list_invalid_properties
|
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
77
|
+
invalid_properties = Array.new
|
|
78
|
+
if @count.nil?
|
|
79
|
+
invalid_properties.push('invalid value for "count", count cannot be nil.')
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if @count < 0
|
|
83
|
+
invalid_properties.push('invalid value for "count", must be greater than or equal to 0.')
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
invalid_properties
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Check to see if the all the properties in the model are valid
|
|
90
|
+
# @return true if the model is valid
|
|
91
|
+
def valid?
|
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
93
|
+
return false if @count.nil?
|
|
94
|
+
return false if @count < 0
|
|
95
|
+
true
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Custom attribute writer method with validation
|
|
99
|
+
# @param [Object] count Value to be assigned
|
|
100
|
+
def count=(count)
|
|
101
|
+
if count.nil?
|
|
102
|
+
fail ArgumentError, 'count cannot be nil'
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if count < 0
|
|
106
|
+
fail ArgumentError, 'invalid value for "count", must be greater than or equal to 0.'
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
@count = count
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Checks equality by comparing each attribute.
|
|
113
|
+
# @param [Object] Object to be compared
|
|
114
|
+
def ==(o)
|
|
115
|
+
return true if self.equal?(o)
|
|
116
|
+
self.class == o.class &&
|
|
117
|
+
count == o.count
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# @see the `==` method
|
|
121
|
+
# @param [Object] Object to be compared
|
|
122
|
+
def eql?(o)
|
|
123
|
+
self == o
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Calculates hash code according to all attributes.
|
|
127
|
+
# @return [Integer] Hash code
|
|
128
|
+
def hash
|
|
129
|
+
[count].hash
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Builds the object from hash
|
|
133
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
134
|
+
# @return [Object] Returns the model itself
|
|
135
|
+
def self.build_from_hash(attributes)
|
|
136
|
+
return nil unless attributes.is_a?(Hash)
|
|
137
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
138
|
+
transformed_hash = {}
|
|
139
|
+
openapi_types.each_pair do |key, type|
|
|
140
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
141
|
+
transformed_hash["#{key}"] = nil
|
|
142
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
143
|
+
# check to ensure the input is an array given that the attribute
|
|
144
|
+
# is documented as an array but the input is not
|
|
145
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
146
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
147
|
+
end
|
|
148
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
149
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
150
|
+
end
|
|
151
|
+
end
|
|
152
|
+
new(transformed_hash)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Returns the object in the form of hash
|
|
156
|
+
# @return [Hash] Returns the object in the form of hash
|
|
157
|
+
def to_hash
|
|
158
|
+
hash = {}
|
|
159
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
160
|
+
value = self.send(attr)
|
|
161
|
+
if value.nil?
|
|
162
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
163
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
hash[param] = _to_hash(value)
|
|
167
|
+
end
|
|
168
|
+
hash
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
end
|
|
@@ -0,0 +1,402 @@
|
|
|
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 CreateProjectRequest < ApiModelBase
|
|
18
|
+
attr_accessor :name
|
|
19
|
+
|
|
20
|
+
attr_accessor :root_url
|
|
21
|
+
|
|
22
|
+
attr_accessor :website_type
|
|
23
|
+
|
|
24
|
+
# Exactly one topic id from GET /vocabulary.
|
|
25
|
+
attr_accessor :topics
|
|
26
|
+
|
|
27
|
+
# A language code from GET /vocabulary.
|
|
28
|
+
attr_accessor :language
|
|
29
|
+
|
|
30
|
+
# A country code from GET /vocabulary; omit it or send null for worldwide.
|
|
31
|
+
attr_accessor :country
|
|
32
|
+
|
|
33
|
+
# 5 to 10 products or services the campaign promotes.
|
|
34
|
+
attr_accessor :promoted_products
|
|
35
|
+
|
|
36
|
+
# At most 100 keywords, none with a line break.
|
|
37
|
+
attr_accessor :user_keywords
|
|
38
|
+
|
|
39
|
+
class EnumAttributeValidator
|
|
40
|
+
attr_reader :datatype
|
|
41
|
+
attr_reader :allowable_values
|
|
42
|
+
|
|
43
|
+
def initialize(datatype, allowable_values)
|
|
44
|
+
@allowable_values = allowable_values.map do |value|
|
|
45
|
+
case datatype.to_s
|
|
46
|
+
when /Integer/i
|
|
47
|
+
value.to_i
|
|
48
|
+
when /Float/i
|
|
49
|
+
value.to_f
|
|
50
|
+
else
|
|
51
|
+
value
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def valid?(value)
|
|
57
|
+
!value || allowable_values.include?(value)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
62
|
+
def self.attribute_map
|
|
63
|
+
{
|
|
64
|
+
:'name' => :'name',
|
|
65
|
+
:'root_url' => :'rootUrl',
|
|
66
|
+
:'website_type' => :'websiteType',
|
|
67
|
+
:'topics' => :'topics',
|
|
68
|
+
:'language' => :'language',
|
|
69
|
+
:'country' => :'country',
|
|
70
|
+
:'promoted_products' => :'promotedProducts',
|
|
71
|
+
:'user_keywords' => :'userKeywords'
|
|
72
|
+
}
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Returns attribute mapping this model knows about
|
|
76
|
+
def self.acceptable_attribute_map
|
|
77
|
+
attribute_map
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Returns all the JSON keys this model knows about
|
|
81
|
+
def self.acceptable_attributes
|
|
82
|
+
acceptable_attribute_map.values
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Attribute type mapping.
|
|
86
|
+
def self.openapi_types
|
|
87
|
+
{
|
|
88
|
+
:'name' => :'String',
|
|
89
|
+
:'root_url' => :'String',
|
|
90
|
+
:'website_type' => :'String',
|
|
91
|
+
:'topics' => :'Array<Integer>',
|
|
92
|
+
:'language' => :'String',
|
|
93
|
+
:'country' => :'String',
|
|
94
|
+
:'promoted_products' => :'Array<String>',
|
|
95
|
+
:'user_keywords' => :'Array<String>'
|
|
96
|
+
}
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# List of attributes with nullable: true
|
|
100
|
+
def self.openapi_nullable
|
|
101
|
+
Set.new([
|
|
102
|
+
:'name',
|
|
103
|
+
:'country',
|
|
104
|
+
])
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Initializes the object
|
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
109
|
+
def initialize(attributes = {})
|
|
110
|
+
if (!attributes.is_a?(Hash))
|
|
111
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Growwer::CreateProjectRequest` initialize method"
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
115
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
116
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
117
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
118
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Growwer::CreateProjectRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
119
|
+
end
|
|
120
|
+
h[k.to_sym] = v
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'name')
|
|
124
|
+
self.name = attributes[:'name']
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'root_url')
|
|
128
|
+
self.root_url = attributes[:'root_url']
|
|
129
|
+
else
|
|
130
|
+
self.root_url = nil
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'website_type')
|
|
134
|
+
self.website_type = attributes[:'website_type']
|
|
135
|
+
else
|
|
136
|
+
self.website_type = nil
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'topics')
|
|
140
|
+
if (value = attributes[:'topics']).is_a?(Array)
|
|
141
|
+
self.topics = value
|
|
142
|
+
end
|
|
143
|
+
else
|
|
144
|
+
self.topics = nil
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'language')
|
|
148
|
+
self.language = attributes[:'language']
|
|
149
|
+
else
|
|
150
|
+
self.language = nil
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if attributes.key?(:'country')
|
|
154
|
+
self.country = attributes[:'country']
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if attributes.key?(:'promoted_products')
|
|
158
|
+
if (value = attributes[:'promoted_products']).is_a?(Array)
|
|
159
|
+
self.promoted_products = value
|
|
160
|
+
end
|
|
161
|
+
else
|
|
162
|
+
self.promoted_products = nil
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if attributes.key?(:'user_keywords')
|
|
166
|
+
if (value = attributes[:'user_keywords']).is_a?(Array)
|
|
167
|
+
self.user_keywords = value
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
173
|
+
# @return Array for valid properties with the reasons
|
|
174
|
+
def list_invalid_properties
|
|
175
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
176
|
+
invalid_properties = Array.new
|
|
177
|
+
if !@name.nil? && @name.to_s.length > 255
|
|
178
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 255.')
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
if @root_url.nil?
|
|
182
|
+
invalid_properties.push('invalid value for "root_url", root_url cannot be nil.')
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
if @website_type.nil?
|
|
186
|
+
invalid_properties.push('invalid value for "website_type", website_type cannot be nil.')
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
if @topics.nil?
|
|
190
|
+
invalid_properties.push('invalid value for "topics", topics cannot be nil.')
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
if @topics.length > 1
|
|
194
|
+
invalid_properties.push('invalid value for "topics", number of items must be less than or equal to 1.')
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
if @topics.length < 1
|
|
198
|
+
invalid_properties.push('invalid value for "topics", number of items must be greater than or equal to 1.')
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
if @language.nil?
|
|
202
|
+
invalid_properties.push('invalid value for "language", language cannot be nil.')
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
if @promoted_products.nil?
|
|
206
|
+
invalid_properties.push('invalid value for "promoted_products", promoted_products cannot be nil.')
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
if @promoted_products.length > 10
|
|
210
|
+
invalid_properties.push('invalid value for "promoted_products", number of items must be less than or equal to 10.')
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
if @promoted_products.length < 5
|
|
214
|
+
invalid_properties.push('invalid value for "promoted_products", number of items must be greater than or equal to 5.')
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
if !@user_keywords.nil? && @user_keywords.length > 100
|
|
218
|
+
invalid_properties.push('invalid value for "user_keywords", number of items must be less than or equal to 100.')
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
invalid_properties
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Check to see if the all the properties in the model are valid
|
|
225
|
+
# @return true if the model is valid
|
|
226
|
+
def valid?
|
|
227
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
228
|
+
return false if !@name.nil? && @name.to_s.length > 255
|
|
229
|
+
return false if @root_url.nil?
|
|
230
|
+
return false if @website_type.nil?
|
|
231
|
+
website_type_validator = EnumAttributeValidator.new('String', ["ecommerce", "services", "other"])
|
|
232
|
+
return false unless website_type_validator.valid?(@website_type)
|
|
233
|
+
return false if @topics.nil?
|
|
234
|
+
return false if @topics.length > 1
|
|
235
|
+
return false if @topics.length < 1
|
|
236
|
+
return false if @language.nil?
|
|
237
|
+
return false if @promoted_products.nil?
|
|
238
|
+
return false if @promoted_products.length > 10
|
|
239
|
+
return false if @promoted_products.length < 5
|
|
240
|
+
return false if !@user_keywords.nil? && @user_keywords.length > 100
|
|
241
|
+
true
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Custom attribute writer method with validation
|
|
245
|
+
# @param [Object] name Value to be assigned
|
|
246
|
+
def name=(name)
|
|
247
|
+
if !name.nil? && name.to_s.length > 255
|
|
248
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 255.'
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
@name = name
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# Custom attribute writer method with validation
|
|
255
|
+
# @param [Object] root_url Value to be assigned
|
|
256
|
+
def root_url=(root_url)
|
|
257
|
+
if root_url.nil?
|
|
258
|
+
fail ArgumentError, 'root_url cannot be nil'
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
@root_url = root_url
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
265
|
+
# @param [Object] website_type Object to be assigned
|
|
266
|
+
def website_type=(website_type)
|
|
267
|
+
validator = EnumAttributeValidator.new('String', ["ecommerce", "services", "other"])
|
|
268
|
+
unless validator.valid?(website_type)
|
|
269
|
+
fail ArgumentError, "invalid value for \"website_type\", must be one of #{validator.allowable_values}."
|
|
270
|
+
end
|
|
271
|
+
@website_type = website_type
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
# Custom attribute writer method with validation
|
|
275
|
+
# @param [Object] topics Value to be assigned
|
|
276
|
+
def topics=(topics)
|
|
277
|
+
if topics.nil?
|
|
278
|
+
fail ArgumentError, 'topics cannot be nil'
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
if topics.length > 1
|
|
282
|
+
fail ArgumentError, 'invalid value for "topics", number of items must be less than or equal to 1.'
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
if topics.length < 1
|
|
286
|
+
fail ArgumentError, 'invalid value for "topics", number of items must be greater than or equal to 1.'
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
@topics = topics
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
# Custom attribute writer method with validation
|
|
293
|
+
# @param [Object] language Value to be assigned
|
|
294
|
+
def language=(language)
|
|
295
|
+
if language.nil?
|
|
296
|
+
fail ArgumentError, 'language cannot be nil'
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
@language = language
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# Custom attribute writer method with validation
|
|
303
|
+
# @param [Object] promoted_products Value to be assigned
|
|
304
|
+
def promoted_products=(promoted_products)
|
|
305
|
+
if promoted_products.nil?
|
|
306
|
+
fail ArgumentError, 'promoted_products cannot be nil'
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
if promoted_products.length > 10
|
|
310
|
+
fail ArgumentError, 'invalid value for "promoted_products", number of items must be less than or equal to 10.'
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
if promoted_products.length < 5
|
|
314
|
+
fail ArgumentError, 'invalid value for "promoted_products", number of items must be greater than or equal to 5.'
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
@promoted_products = promoted_products
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
# Custom attribute writer method with validation
|
|
321
|
+
# @param [Object] user_keywords Value to be assigned
|
|
322
|
+
def user_keywords=(user_keywords)
|
|
323
|
+
if user_keywords.nil?
|
|
324
|
+
fail ArgumentError, 'user_keywords cannot be nil'
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
if user_keywords.length > 100
|
|
328
|
+
fail ArgumentError, 'invalid value for "user_keywords", number of items must be less than or equal to 100.'
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
@user_keywords = user_keywords
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
# Checks equality by comparing each attribute.
|
|
335
|
+
# @param [Object] Object to be compared
|
|
336
|
+
def ==(o)
|
|
337
|
+
return true if self.equal?(o)
|
|
338
|
+
self.class == o.class &&
|
|
339
|
+
name == o.name &&
|
|
340
|
+
root_url == o.root_url &&
|
|
341
|
+
website_type == o.website_type &&
|
|
342
|
+
topics == o.topics &&
|
|
343
|
+
language == o.language &&
|
|
344
|
+
country == o.country &&
|
|
345
|
+
promoted_products == o.promoted_products &&
|
|
346
|
+
user_keywords == o.user_keywords
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
# @see the `==` method
|
|
350
|
+
# @param [Object] Object to be compared
|
|
351
|
+
def eql?(o)
|
|
352
|
+
self == o
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
# Calculates hash code according to all attributes.
|
|
356
|
+
# @return [Integer] Hash code
|
|
357
|
+
def hash
|
|
358
|
+
[name, root_url, website_type, topics, language, country, promoted_products, user_keywords].hash
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
# Builds the object from hash
|
|
362
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
363
|
+
# @return [Object] Returns the model itself
|
|
364
|
+
def self.build_from_hash(attributes)
|
|
365
|
+
return nil unless attributes.is_a?(Hash)
|
|
366
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
367
|
+
transformed_hash = {}
|
|
368
|
+
openapi_types.each_pair do |key, type|
|
|
369
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
370
|
+
transformed_hash["#{key}"] = nil
|
|
371
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
372
|
+
# check to ensure the input is an array given that the attribute
|
|
373
|
+
# is documented as an array but the input is not
|
|
374
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
375
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
376
|
+
end
|
|
377
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
378
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
379
|
+
end
|
|
380
|
+
end
|
|
381
|
+
new(transformed_hash)
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
# Returns the object in the form of hash
|
|
385
|
+
# @return [Hash] Returns the object in the form of hash
|
|
386
|
+
def to_hash
|
|
387
|
+
hash = {}
|
|
388
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
389
|
+
value = self.send(attr)
|
|
390
|
+
if value.nil?
|
|
391
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
392
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
hash[param] = _to_hash(value)
|
|
396
|
+
end
|
|
397
|
+
hash
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
end
|