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,491 @@
|
|
|
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 CatalogueMedia < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
attr_accessor :domain
|
|
21
|
+
|
|
22
|
+
attr_accessor :type
|
|
23
|
+
|
|
24
|
+
# A language code, as in GET /vocabulary.
|
|
25
|
+
attr_accessor :language
|
|
26
|
+
|
|
27
|
+
# A country code, as in GET /vocabulary, or null for none.
|
|
28
|
+
attr_accessor :country
|
|
29
|
+
|
|
30
|
+
# Topic ids, as in GET /vocabulary.
|
|
31
|
+
attr_accessor :topics
|
|
32
|
+
|
|
33
|
+
attr_accessor :metrics
|
|
34
|
+
|
|
35
|
+
attr_accessor :positive_traffic_trend
|
|
36
|
+
|
|
37
|
+
attr_accessor :best_seller
|
|
38
|
+
|
|
39
|
+
# The share of the media's orders that were published, in percent, or null without orders.
|
|
40
|
+
attr_accessor :publication_rate
|
|
41
|
+
|
|
42
|
+
# The average days from order to publication, or null without published orders.
|
|
43
|
+
attr_accessor :average_days_to_publication
|
|
44
|
+
|
|
45
|
+
# Whether the media is on holiday and will take longer to publish.
|
|
46
|
+
attr_accessor :on_holiday
|
|
47
|
+
|
|
48
|
+
attr_accessor :flash_offer
|
|
49
|
+
|
|
50
|
+
attr_accessor :post_offer
|
|
51
|
+
|
|
52
|
+
# Adding a link to an existing article, or null when the media does not offer it.
|
|
53
|
+
attr_accessor :link_addition_offer
|
|
54
|
+
|
|
55
|
+
class EnumAttributeValidator
|
|
56
|
+
attr_reader :datatype
|
|
57
|
+
attr_reader :allowable_values
|
|
58
|
+
|
|
59
|
+
def initialize(datatype, allowable_values)
|
|
60
|
+
@allowable_values = allowable_values.map do |value|
|
|
61
|
+
case datatype.to_s
|
|
62
|
+
when /Integer/i
|
|
63
|
+
value.to_i
|
|
64
|
+
when /Float/i
|
|
65
|
+
value.to_f
|
|
66
|
+
else
|
|
67
|
+
value
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def valid?(value)
|
|
73
|
+
!value || allowable_values.include?(value)
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
78
|
+
def self.attribute_map
|
|
79
|
+
{
|
|
80
|
+
:'id' => :'id',
|
|
81
|
+
:'domain' => :'domain',
|
|
82
|
+
:'type' => :'type',
|
|
83
|
+
:'language' => :'language',
|
|
84
|
+
:'country' => :'country',
|
|
85
|
+
:'topics' => :'topics',
|
|
86
|
+
:'metrics' => :'metrics',
|
|
87
|
+
:'positive_traffic_trend' => :'positiveTrafficTrend',
|
|
88
|
+
:'best_seller' => :'bestSeller',
|
|
89
|
+
:'publication_rate' => :'publicationRate',
|
|
90
|
+
:'average_days_to_publication' => :'averageDaysToPublication',
|
|
91
|
+
:'on_holiday' => :'onHoliday',
|
|
92
|
+
:'flash_offer' => :'flashOffer',
|
|
93
|
+
:'post_offer' => :'postOffer',
|
|
94
|
+
:'link_addition_offer' => :'linkAdditionOffer'
|
|
95
|
+
}
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Returns attribute mapping this model knows about
|
|
99
|
+
def self.acceptable_attribute_map
|
|
100
|
+
attribute_map
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Returns all the JSON keys this model knows about
|
|
104
|
+
def self.acceptable_attributes
|
|
105
|
+
acceptable_attribute_map.values
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Attribute type mapping.
|
|
109
|
+
def self.openapi_types
|
|
110
|
+
{
|
|
111
|
+
:'id' => :'String',
|
|
112
|
+
:'domain' => :'String',
|
|
113
|
+
:'type' => :'String',
|
|
114
|
+
:'language' => :'String',
|
|
115
|
+
:'country' => :'String',
|
|
116
|
+
:'topics' => :'Array<Integer>',
|
|
117
|
+
:'metrics' => :'CatalogueMediaMetrics',
|
|
118
|
+
:'positive_traffic_trend' => :'Boolean',
|
|
119
|
+
:'best_seller' => :'Boolean',
|
|
120
|
+
:'publication_rate' => :'Integer',
|
|
121
|
+
:'average_days_to_publication' => :'Integer',
|
|
122
|
+
:'on_holiday' => :'Boolean',
|
|
123
|
+
:'flash_offer' => :'CatalogueMediaFlashOffer',
|
|
124
|
+
:'post_offer' => :'CataloguePostOffer',
|
|
125
|
+
:'link_addition_offer' => :'CatalogueOfferOrNull'
|
|
126
|
+
}
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# List of attributes with nullable: true
|
|
130
|
+
def self.openapi_nullable
|
|
131
|
+
Set.new([
|
|
132
|
+
:'country',
|
|
133
|
+
:'publication_rate',
|
|
134
|
+
:'average_days_to_publication',
|
|
135
|
+
:'flash_offer',
|
|
136
|
+
:'link_addition_offer'
|
|
137
|
+
])
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Initializes the object
|
|
141
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
142
|
+
def initialize(attributes = {})
|
|
143
|
+
if (!attributes.is_a?(Hash))
|
|
144
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Growwer::CatalogueMedia` initialize method"
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
148
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
149
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
150
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
151
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Growwer::CatalogueMedia`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
152
|
+
end
|
|
153
|
+
h[k.to_sym] = v
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if attributes.key?(:'id')
|
|
157
|
+
self.id = attributes[:'id']
|
|
158
|
+
else
|
|
159
|
+
self.id = nil
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'domain')
|
|
163
|
+
self.domain = attributes[:'domain']
|
|
164
|
+
else
|
|
165
|
+
self.domain = nil
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
if attributes.key?(:'type')
|
|
169
|
+
self.type = attributes[:'type']
|
|
170
|
+
else
|
|
171
|
+
self.type = nil
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
if attributes.key?(:'language')
|
|
175
|
+
self.language = attributes[:'language']
|
|
176
|
+
else
|
|
177
|
+
self.language = nil
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if attributes.key?(:'country')
|
|
181
|
+
self.country = attributes[:'country']
|
|
182
|
+
else
|
|
183
|
+
self.country = nil
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
if attributes.key?(:'topics')
|
|
187
|
+
if (value = attributes[:'topics']).is_a?(Array)
|
|
188
|
+
self.topics = value
|
|
189
|
+
end
|
|
190
|
+
else
|
|
191
|
+
self.topics = nil
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
if attributes.key?(:'metrics')
|
|
195
|
+
self.metrics = attributes[:'metrics']
|
|
196
|
+
else
|
|
197
|
+
self.metrics = nil
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
if attributes.key?(:'positive_traffic_trend')
|
|
201
|
+
self.positive_traffic_trend = attributes[:'positive_traffic_trend']
|
|
202
|
+
else
|
|
203
|
+
self.positive_traffic_trend = nil
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
if attributes.key?(:'best_seller')
|
|
207
|
+
self.best_seller = attributes[:'best_seller']
|
|
208
|
+
else
|
|
209
|
+
self.best_seller = nil
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
if attributes.key?(:'publication_rate')
|
|
213
|
+
self.publication_rate = attributes[:'publication_rate']
|
|
214
|
+
else
|
|
215
|
+
self.publication_rate = nil
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
if attributes.key?(:'average_days_to_publication')
|
|
219
|
+
self.average_days_to_publication = attributes[:'average_days_to_publication']
|
|
220
|
+
else
|
|
221
|
+
self.average_days_to_publication = nil
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
if attributes.key?(:'on_holiday')
|
|
225
|
+
self.on_holiday = attributes[:'on_holiday']
|
|
226
|
+
else
|
|
227
|
+
self.on_holiday = nil
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
if attributes.key?(:'flash_offer')
|
|
231
|
+
self.flash_offer = attributes[:'flash_offer']
|
|
232
|
+
else
|
|
233
|
+
self.flash_offer = nil
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
if attributes.key?(:'post_offer')
|
|
237
|
+
self.post_offer = attributes[:'post_offer']
|
|
238
|
+
else
|
|
239
|
+
self.post_offer = nil
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
if attributes.key?(:'link_addition_offer')
|
|
243
|
+
self.link_addition_offer = attributes[:'link_addition_offer']
|
|
244
|
+
else
|
|
245
|
+
self.link_addition_offer = nil
|
|
246
|
+
end
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
250
|
+
# @return Array for valid properties with the reasons
|
|
251
|
+
def list_invalid_properties
|
|
252
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
253
|
+
invalid_properties = Array.new
|
|
254
|
+
if @id.nil?
|
|
255
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
if @domain.nil?
|
|
259
|
+
invalid_properties.push('invalid value for "domain", domain cannot be nil.')
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
if @type.nil?
|
|
263
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
if @language.nil?
|
|
267
|
+
invalid_properties.push('invalid value for "language", language cannot be nil.')
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
if @topics.nil?
|
|
271
|
+
invalid_properties.push('invalid value for "topics", topics cannot be nil.')
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
if @metrics.nil?
|
|
275
|
+
invalid_properties.push('invalid value for "metrics", metrics cannot be nil.')
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
if @positive_traffic_trend.nil?
|
|
279
|
+
invalid_properties.push('invalid value for "positive_traffic_trend", positive_traffic_trend cannot be nil.')
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
if @best_seller.nil?
|
|
283
|
+
invalid_properties.push('invalid value for "best_seller", best_seller cannot be nil.')
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
if @on_holiday.nil?
|
|
287
|
+
invalid_properties.push('invalid value for "on_holiday", on_holiday cannot be nil.')
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
if @post_offer.nil?
|
|
291
|
+
invalid_properties.push('invalid value for "post_offer", post_offer cannot be nil.')
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
invalid_properties
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
# Check to see if the all the properties in the model are valid
|
|
298
|
+
# @return true if the model is valid
|
|
299
|
+
def valid?
|
|
300
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
301
|
+
return false if @id.nil?
|
|
302
|
+
return false if @domain.nil?
|
|
303
|
+
return false if @type.nil?
|
|
304
|
+
type_validator = EnumAttributeValidator.new('String', ["blog", "press"])
|
|
305
|
+
return false unless type_validator.valid?(@type)
|
|
306
|
+
return false if @language.nil?
|
|
307
|
+
return false if @topics.nil?
|
|
308
|
+
return false if @metrics.nil?
|
|
309
|
+
return false if @positive_traffic_trend.nil?
|
|
310
|
+
return false if @best_seller.nil?
|
|
311
|
+
return false if @on_holiday.nil?
|
|
312
|
+
return false if @post_offer.nil?
|
|
313
|
+
true
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# Custom attribute writer method with validation
|
|
317
|
+
# @param [Object] id Value to be assigned
|
|
318
|
+
def id=(id)
|
|
319
|
+
if id.nil?
|
|
320
|
+
fail ArgumentError, 'id cannot be nil'
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
@id = id
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
# Custom attribute writer method with validation
|
|
327
|
+
# @param [Object] domain Value to be assigned
|
|
328
|
+
def domain=(domain)
|
|
329
|
+
if domain.nil?
|
|
330
|
+
fail ArgumentError, 'domain cannot be nil'
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
@domain = domain
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
337
|
+
# @param [Object] type Object to be assigned
|
|
338
|
+
def type=(type)
|
|
339
|
+
validator = EnumAttributeValidator.new('String', ["blog", "press"])
|
|
340
|
+
unless validator.valid?(type)
|
|
341
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
|
342
|
+
end
|
|
343
|
+
@type = type
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
# Custom attribute writer method with validation
|
|
347
|
+
# @param [Object] language Value to be assigned
|
|
348
|
+
def language=(language)
|
|
349
|
+
if language.nil?
|
|
350
|
+
fail ArgumentError, 'language cannot be nil'
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
@language = language
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
# Custom attribute writer method with validation
|
|
357
|
+
# @param [Object] topics Value to be assigned
|
|
358
|
+
def topics=(topics)
|
|
359
|
+
if topics.nil?
|
|
360
|
+
fail ArgumentError, 'topics cannot be nil'
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
@topics = topics
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
# Custom attribute writer method with validation
|
|
367
|
+
# @param [Object] metrics Value to be assigned
|
|
368
|
+
def metrics=(metrics)
|
|
369
|
+
if metrics.nil?
|
|
370
|
+
fail ArgumentError, 'metrics cannot be nil'
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
@metrics = metrics
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
# Custom attribute writer method with validation
|
|
377
|
+
# @param [Object] positive_traffic_trend Value to be assigned
|
|
378
|
+
def positive_traffic_trend=(positive_traffic_trend)
|
|
379
|
+
if positive_traffic_trend.nil?
|
|
380
|
+
fail ArgumentError, 'positive_traffic_trend cannot be nil'
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
@positive_traffic_trend = positive_traffic_trend
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
# Custom attribute writer method with validation
|
|
387
|
+
# @param [Object] best_seller Value to be assigned
|
|
388
|
+
def best_seller=(best_seller)
|
|
389
|
+
if best_seller.nil?
|
|
390
|
+
fail ArgumentError, 'best_seller cannot be nil'
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
@best_seller = best_seller
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
# Custom attribute writer method with validation
|
|
397
|
+
# @param [Object] on_holiday Value to be assigned
|
|
398
|
+
def on_holiday=(on_holiday)
|
|
399
|
+
if on_holiday.nil?
|
|
400
|
+
fail ArgumentError, 'on_holiday cannot be nil'
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
@on_holiday = on_holiday
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
# Custom attribute writer method with validation
|
|
407
|
+
# @param [Object] post_offer Value to be assigned
|
|
408
|
+
def post_offer=(post_offer)
|
|
409
|
+
if post_offer.nil?
|
|
410
|
+
fail ArgumentError, 'post_offer cannot be nil'
|
|
411
|
+
end
|
|
412
|
+
|
|
413
|
+
@post_offer = post_offer
|
|
414
|
+
end
|
|
415
|
+
|
|
416
|
+
# Checks equality by comparing each attribute.
|
|
417
|
+
# @param [Object] Object to be compared
|
|
418
|
+
def ==(o)
|
|
419
|
+
return true if self.equal?(o)
|
|
420
|
+
self.class == o.class &&
|
|
421
|
+
id == o.id &&
|
|
422
|
+
domain == o.domain &&
|
|
423
|
+
type == o.type &&
|
|
424
|
+
language == o.language &&
|
|
425
|
+
country == o.country &&
|
|
426
|
+
topics == o.topics &&
|
|
427
|
+
metrics == o.metrics &&
|
|
428
|
+
positive_traffic_trend == o.positive_traffic_trend &&
|
|
429
|
+
best_seller == o.best_seller &&
|
|
430
|
+
publication_rate == o.publication_rate &&
|
|
431
|
+
average_days_to_publication == o.average_days_to_publication &&
|
|
432
|
+
on_holiday == o.on_holiday &&
|
|
433
|
+
flash_offer == o.flash_offer &&
|
|
434
|
+
post_offer == o.post_offer &&
|
|
435
|
+
link_addition_offer == o.link_addition_offer
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
# @see the `==` method
|
|
439
|
+
# @param [Object] Object to be compared
|
|
440
|
+
def eql?(o)
|
|
441
|
+
self == o
|
|
442
|
+
end
|
|
443
|
+
|
|
444
|
+
# Calculates hash code according to all attributes.
|
|
445
|
+
# @return [Integer] Hash code
|
|
446
|
+
def hash
|
|
447
|
+
[id, domain, type, language, country, topics, metrics, positive_traffic_trend, best_seller, publication_rate, average_days_to_publication, on_holiday, flash_offer, post_offer, link_addition_offer].hash
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
# Builds the object from hash
|
|
451
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
452
|
+
# @return [Object] Returns the model itself
|
|
453
|
+
def self.build_from_hash(attributes)
|
|
454
|
+
return nil unless attributes.is_a?(Hash)
|
|
455
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
456
|
+
transformed_hash = {}
|
|
457
|
+
openapi_types.each_pair do |key, type|
|
|
458
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
459
|
+
transformed_hash["#{key}"] = nil
|
|
460
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
461
|
+
# check to ensure the input is an array given that the attribute
|
|
462
|
+
# is documented as an array but the input is not
|
|
463
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
464
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
465
|
+
end
|
|
466
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
467
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
468
|
+
end
|
|
469
|
+
end
|
|
470
|
+
new(transformed_hash)
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
# Returns the object in the form of hash
|
|
474
|
+
# @return [Hash] Returns the object in the form of hash
|
|
475
|
+
def to_hash
|
|
476
|
+
hash = {}
|
|
477
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
478
|
+
value = self.send(attr)
|
|
479
|
+
if value.nil?
|
|
480
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
481
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
482
|
+
end
|
|
483
|
+
|
|
484
|
+
hash[param] = _to_hash(value)
|
|
485
|
+
end
|
|
486
|
+
hash
|
|
487
|
+
end
|
|
488
|
+
|
|
489
|
+
end
|
|
490
|
+
|
|
491
|
+
end
|
|
@@ -0,0 +1,191 @@
|
|
|
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 flash offer running, or null. Its discount is already in the prices.
|
|
18
|
+
class CatalogueMediaFlashOffer < ApiModelBase
|
|
19
|
+
attr_accessor :discount_percent
|
|
20
|
+
|
|
21
|
+
attr_accessor :ends_at
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'discount_percent' => :'discountPercent',
|
|
27
|
+
:'ends_at' => :'endsAt'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns attribute mapping this model knows about
|
|
32
|
+
def self.acceptable_attribute_map
|
|
33
|
+
attribute_map
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
acceptable_attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'discount_percent' => :'Integer',
|
|
45
|
+
:'ends_at' => :'Time'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# List of attributes with nullable: true
|
|
50
|
+
def self.openapi_nullable
|
|
51
|
+
Set.new([
|
|
52
|
+
])
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Initializes the object
|
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
57
|
+
def initialize(attributes = {})
|
|
58
|
+
if (!attributes.is_a?(Hash))
|
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Growwer::CatalogueMediaFlashOffer` initialize method"
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
63
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
65
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Growwer::CatalogueMediaFlashOffer`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
67
|
+
end
|
|
68
|
+
h[k.to_sym] = v
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if attributes.key?(:'discount_percent')
|
|
72
|
+
self.discount_percent = attributes[:'discount_percent']
|
|
73
|
+
else
|
|
74
|
+
self.discount_percent = nil
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'ends_at')
|
|
78
|
+
self.ends_at = attributes[:'ends_at']
|
|
79
|
+
else
|
|
80
|
+
self.ends_at = nil
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
85
|
+
# @return Array for valid properties with the reasons
|
|
86
|
+
def list_invalid_properties
|
|
87
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
88
|
+
invalid_properties = Array.new
|
|
89
|
+
if @discount_percent.nil?
|
|
90
|
+
invalid_properties.push('invalid value for "discount_percent", discount_percent cannot be nil.')
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if @ends_at.nil?
|
|
94
|
+
invalid_properties.push('invalid value for "ends_at", ends_at cannot be nil.')
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
invalid_properties
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Check to see if the all the properties in the model are valid
|
|
101
|
+
# @return true if the model is valid
|
|
102
|
+
def valid?
|
|
103
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
104
|
+
return false if @discount_percent.nil?
|
|
105
|
+
return false if @ends_at.nil?
|
|
106
|
+
true
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Custom attribute writer method with validation
|
|
110
|
+
# @param [Object] discount_percent Value to be assigned
|
|
111
|
+
def discount_percent=(discount_percent)
|
|
112
|
+
if discount_percent.nil?
|
|
113
|
+
fail ArgumentError, 'discount_percent cannot be nil'
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
@discount_percent = discount_percent
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Custom attribute writer method with validation
|
|
120
|
+
# @param [Object] ends_at Value to be assigned
|
|
121
|
+
def ends_at=(ends_at)
|
|
122
|
+
if ends_at.nil?
|
|
123
|
+
fail ArgumentError, 'ends_at cannot be nil'
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
@ends_at = ends_at
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Checks equality by comparing each attribute.
|
|
130
|
+
# @param [Object] Object to be compared
|
|
131
|
+
def ==(o)
|
|
132
|
+
return true if self.equal?(o)
|
|
133
|
+
self.class == o.class &&
|
|
134
|
+
discount_percent == o.discount_percent &&
|
|
135
|
+
ends_at == o.ends_at
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# @see the `==` method
|
|
139
|
+
# @param [Object] Object to be compared
|
|
140
|
+
def eql?(o)
|
|
141
|
+
self == o
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Calculates hash code according to all attributes.
|
|
145
|
+
# @return [Integer] Hash code
|
|
146
|
+
def hash
|
|
147
|
+
[discount_percent, ends_at].hash
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Builds the object from hash
|
|
151
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
152
|
+
# @return [Object] Returns the model itself
|
|
153
|
+
def self.build_from_hash(attributes)
|
|
154
|
+
return nil unless attributes.is_a?(Hash)
|
|
155
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
156
|
+
transformed_hash = {}
|
|
157
|
+
openapi_types.each_pair do |key, type|
|
|
158
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
159
|
+
transformed_hash["#{key}"] = nil
|
|
160
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
161
|
+
# check to ensure the input is an array given that the attribute
|
|
162
|
+
# is documented as an array but the input is not
|
|
163
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
164
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
165
|
+
end
|
|
166
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
167
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
new(transformed_hash)
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Returns the object in the form of hash
|
|
174
|
+
# @return [Hash] Returns the object in the form of hash
|
|
175
|
+
def to_hash
|
|
176
|
+
hash = {}
|
|
177
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
178
|
+
value = self.send(attr)
|
|
179
|
+
if value.nil?
|
|
180
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
181
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
hash[param] = _to_hash(value)
|
|
185
|
+
end
|
|
186
|
+
hash
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
end
|