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,855 @@
|
|
|
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 'cgi'
|
|
14
|
+
|
|
15
|
+
module Growwer
|
|
16
|
+
class OrdersApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Approve an order's delivery
|
|
23
|
+
# Approves the delivery of an order whose `pendingAction` is yours to review the delivery, as the web does. The order finishes and the seller is paid. It takes no body.
|
|
24
|
+
# @param id [String]
|
|
25
|
+
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [Order]
|
|
28
|
+
def approve_order(id, idempotency_key, opts = {})
|
|
29
|
+
data, _status_code, _headers = approve_order_with_http_info(id, idempotency_key, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Approve an order's delivery
|
|
34
|
+
# Approves the delivery of an order whose `pendingAction` is yours to review the delivery, as the web does. The order finishes and the seller is paid. It takes no body.
|
|
35
|
+
# @param id [String]
|
|
36
|
+
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(Order, Integer, Hash)>] Order data, response status code and response headers
|
|
39
|
+
def approve_order_with_http_info(id, idempotency_key, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: OrdersApi.approve_order ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'id' is set
|
|
44
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling OrdersApi.approve_order"
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'idempotency_key' is set
|
|
48
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling OrdersApi.approve_order"
|
|
50
|
+
end
|
|
51
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
|
|
52
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling OrdersApi.approve_order, the character length must be smaller than or equal to 255.'
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# resource path
|
|
56
|
+
local_var_path = '/api/v1/orders/{id}/approve'.sub('{id}', CGI.escape(id.to_s))
|
|
57
|
+
|
|
58
|
+
# query parameters
|
|
59
|
+
query_params = opts[:query_params] || {}
|
|
60
|
+
|
|
61
|
+
# header parameters
|
|
62
|
+
header_params = opts[:header_params] || {}
|
|
63
|
+
# HTTP header 'Accept' (if needed)
|
|
64
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
65
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
66
|
+
|
|
67
|
+
# form parameters
|
|
68
|
+
form_params = opts[:form_params] || {}
|
|
69
|
+
|
|
70
|
+
# http body (model)
|
|
71
|
+
post_body = opts[:debug_body]
|
|
72
|
+
|
|
73
|
+
# return_type
|
|
74
|
+
return_type = opts[:debug_return_type] || 'Order'
|
|
75
|
+
|
|
76
|
+
# auth_names
|
|
77
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
|
78
|
+
|
|
79
|
+
new_options = opts.merge(
|
|
80
|
+
:operation => :"OrdersApi.approve_order",
|
|
81
|
+
:header_params => header_params,
|
|
82
|
+
:query_params => query_params,
|
|
83
|
+
:form_params => form_params,
|
|
84
|
+
:body => post_body,
|
|
85
|
+
:auth_names => auth_names,
|
|
86
|
+
:return_type => return_type
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
90
|
+
if @api_client.config.debugging
|
|
91
|
+
@api_client.config.logger.debug "API called: OrdersApi#approve_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
92
|
+
end
|
|
93
|
+
return data, status_code, headers
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Approve a draft
|
|
97
|
+
# Approves the draft of a post order whose `pendingAction` is yours to review the draft (GET /orders/{id}/draft downloads it), as the web does. The seller then publishes it. It takes no body.
|
|
98
|
+
# @param id [String]
|
|
99
|
+
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
100
|
+
# @param [Hash] opts the optional parameters
|
|
101
|
+
# @return [Order]
|
|
102
|
+
def approve_order_draft(id, idempotency_key, opts = {})
|
|
103
|
+
data, _status_code, _headers = approve_order_draft_with_http_info(id, idempotency_key, opts)
|
|
104
|
+
data
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Approve a draft
|
|
108
|
+
# Approves the draft of a post order whose `pendingAction` is yours to review the draft (GET /orders/{id}/draft downloads it), as the web does. The seller then publishes it. It takes no body.
|
|
109
|
+
# @param id [String]
|
|
110
|
+
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
111
|
+
# @param [Hash] opts the optional parameters
|
|
112
|
+
# @return [Array<(Order, Integer, Hash)>] Order data, response status code and response headers
|
|
113
|
+
def approve_order_draft_with_http_info(id, idempotency_key, opts = {})
|
|
114
|
+
if @api_client.config.debugging
|
|
115
|
+
@api_client.config.logger.debug 'Calling API: OrdersApi.approve_order_draft ...'
|
|
116
|
+
end
|
|
117
|
+
# verify the required parameter 'id' is set
|
|
118
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
119
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling OrdersApi.approve_order_draft"
|
|
120
|
+
end
|
|
121
|
+
# verify the required parameter 'idempotency_key' is set
|
|
122
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
123
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling OrdersApi.approve_order_draft"
|
|
124
|
+
end
|
|
125
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
|
|
126
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling OrdersApi.approve_order_draft, the character length must be smaller than or equal to 255.'
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# resource path
|
|
130
|
+
local_var_path = '/api/v1/orders/{id}/approve-draft'.sub('{id}', CGI.escape(id.to_s))
|
|
131
|
+
|
|
132
|
+
# query parameters
|
|
133
|
+
query_params = opts[:query_params] || {}
|
|
134
|
+
|
|
135
|
+
# header parameters
|
|
136
|
+
header_params = opts[:header_params] || {}
|
|
137
|
+
# HTTP header 'Accept' (if needed)
|
|
138
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
139
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
140
|
+
|
|
141
|
+
# form parameters
|
|
142
|
+
form_params = opts[:form_params] || {}
|
|
143
|
+
|
|
144
|
+
# http body (model)
|
|
145
|
+
post_body = opts[:debug_body]
|
|
146
|
+
|
|
147
|
+
# return_type
|
|
148
|
+
return_type = opts[:debug_return_type] || 'Order'
|
|
149
|
+
|
|
150
|
+
# auth_names
|
|
151
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
|
152
|
+
|
|
153
|
+
new_options = opts.merge(
|
|
154
|
+
:operation => :"OrdersApi.approve_order_draft",
|
|
155
|
+
:header_params => header_params,
|
|
156
|
+
:query_params => query_params,
|
|
157
|
+
:form_params => form_params,
|
|
158
|
+
:body => post_body,
|
|
159
|
+
:auth_names => auth_names,
|
|
160
|
+
:return_type => return_type
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
164
|
+
if @api_client.config.debugging
|
|
165
|
+
@api_client.config.logger.debug "API called: OrdersApi#approve_order_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
166
|
+
end
|
|
167
|
+
return data, status_code, headers
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Cancel an order
|
|
171
|
+
# Cancels an order the seller has not accepted yet (`state` `pending_acceptance`), as the web does. Its price returns to your wallet's available balance, and the seller is told your reason.
|
|
172
|
+
# @param id [String]
|
|
173
|
+
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
174
|
+
# @param order_action_reason [OrderActionReason]
|
|
175
|
+
# @param [Hash] opts the optional parameters
|
|
176
|
+
# @return [Order]
|
|
177
|
+
def cancel_order(id, idempotency_key, order_action_reason, opts = {})
|
|
178
|
+
data, _status_code, _headers = cancel_order_with_http_info(id, idempotency_key, order_action_reason, opts)
|
|
179
|
+
data
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Cancel an order
|
|
183
|
+
# Cancels an order the seller has not accepted yet (`state` `pending_acceptance`), as the web does. Its price returns to your wallet's available balance, and the seller is told your reason.
|
|
184
|
+
# @param id [String]
|
|
185
|
+
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
186
|
+
# @param order_action_reason [OrderActionReason]
|
|
187
|
+
# @param [Hash] opts the optional parameters
|
|
188
|
+
# @return [Array<(Order, Integer, Hash)>] Order data, response status code and response headers
|
|
189
|
+
def cancel_order_with_http_info(id, idempotency_key, order_action_reason, opts = {})
|
|
190
|
+
if @api_client.config.debugging
|
|
191
|
+
@api_client.config.logger.debug 'Calling API: OrdersApi.cancel_order ...'
|
|
192
|
+
end
|
|
193
|
+
# verify the required parameter 'id' is set
|
|
194
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
195
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling OrdersApi.cancel_order"
|
|
196
|
+
end
|
|
197
|
+
# verify the required parameter 'idempotency_key' is set
|
|
198
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
199
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling OrdersApi.cancel_order"
|
|
200
|
+
end
|
|
201
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
|
|
202
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling OrdersApi.cancel_order, the character length must be smaller than or equal to 255.'
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# verify the required parameter 'order_action_reason' is set
|
|
206
|
+
if @api_client.config.client_side_validation && order_action_reason.nil?
|
|
207
|
+
fail ArgumentError, "Missing the required parameter 'order_action_reason' when calling OrdersApi.cancel_order"
|
|
208
|
+
end
|
|
209
|
+
# resource path
|
|
210
|
+
local_var_path = '/api/v1/orders/{id}/cancel'.sub('{id}', CGI.escape(id.to_s))
|
|
211
|
+
|
|
212
|
+
# query parameters
|
|
213
|
+
query_params = opts[:query_params] || {}
|
|
214
|
+
|
|
215
|
+
# header parameters
|
|
216
|
+
header_params = opts[:header_params] || {}
|
|
217
|
+
# HTTP header 'Accept' (if needed)
|
|
218
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
219
|
+
# HTTP header 'Content-Type'
|
|
220
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
221
|
+
if !content_type.nil?
|
|
222
|
+
header_params['Content-Type'] = content_type
|
|
223
|
+
end
|
|
224
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
225
|
+
|
|
226
|
+
# form parameters
|
|
227
|
+
form_params = opts[:form_params] || {}
|
|
228
|
+
|
|
229
|
+
# http body (model)
|
|
230
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(order_action_reason)
|
|
231
|
+
|
|
232
|
+
# return_type
|
|
233
|
+
return_type = opts[:debug_return_type] || 'Order'
|
|
234
|
+
|
|
235
|
+
# auth_names
|
|
236
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
|
237
|
+
|
|
238
|
+
new_options = opts.merge(
|
|
239
|
+
:operation => :"OrdersApi.cancel_order",
|
|
240
|
+
:header_params => header_params,
|
|
241
|
+
:query_params => query_params,
|
|
242
|
+
:form_params => form_params,
|
|
243
|
+
:body => post_body,
|
|
244
|
+
:auth_names => auth_names,
|
|
245
|
+
:return_type => return_type
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
249
|
+
if @api_client.config.debugging
|
|
250
|
+
@api_client.config.logger.debug "API called: OrdersApi#cancel_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
251
|
+
end
|
|
252
|
+
return data, status_code, headers
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Place an order
|
|
256
|
+
# Places an order on a media for one of your projects and pays its price from your wallet's available balance, as ordering on the web does. Estimate the order first (POST /orders/estimate) and send the price it answers as `expectedPrice`: the order is placed only at that price. Placing the same order (same project, media, type and price) again within 5 seconds of one still in progress is refused with `duplicate_order`. Its `details.orderId` is the earlier order, or null when that order has finished or was deleted since. A proposed draft (`proposedDraftFileId`, from POST /files) is used up when the order is placed. If the order is then refused because another request changed your balance, the media or its price, or placed the same order, the file is used up all the same and the refusal's message says so: upload it again before retrying.
|
|
257
|
+
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
258
|
+
# @param order_create_request [OrderCreateRequest]
|
|
259
|
+
# @param [Hash] opts the optional parameters
|
|
260
|
+
# @return [Order]
|
|
261
|
+
def create_order(idempotency_key, order_create_request, opts = {})
|
|
262
|
+
data, _status_code, _headers = create_order_with_http_info(idempotency_key, order_create_request, opts)
|
|
263
|
+
data
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# Place an order
|
|
267
|
+
# Places an order on a media for one of your projects and pays its price from your wallet's available balance, as ordering on the web does. Estimate the order first (POST /orders/estimate) and send the price it answers as `expectedPrice`: the order is placed only at that price. Placing the same order (same project, media, type and price) again within 5 seconds of one still in progress is refused with `duplicate_order`. Its `details.orderId` is the earlier order, or null when that order has finished or was deleted since. A proposed draft (`proposedDraftFileId`, from POST /files) is used up when the order is placed. If the order is then refused because another request changed your balance, the media or its price, or placed the same order, the file is used up all the same and the refusal's message says so: upload it again before retrying.
|
|
268
|
+
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
269
|
+
# @param order_create_request [OrderCreateRequest]
|
|
270
|
+
# @param [Hash] opts the optional parameters
|
|
271
|
+
# @return [Array<(Order, Integer, Hash)>] Order data, response status code and response headers
|
|
272
|
+
def create_order_with_http_info(idempotency_key, order_create_request, opts = {})
|
|
273
|
+
if @api_client.config.debugging
|
|
274
|
+
@api_client.config.logger.debug 'Calling API: OrdersApi.create_order ...'
|
|
275
|
+
end
|
|
276
|
+
# verify the required parameter 'idempotency_key' is set
|
|
277
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
278
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling OrdersApi.create_order"
|
|
279
|
+
end
|
|
280
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
|
|
281
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling OrdersApi.create_order, the character length must be smaller than or equal to 255.'
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
# verify the required parameter 'order_create_request' is set
|
|
285
|
+
if @api_client.config.client_side_validation && order_create_request.nil?
|
|
286
|
+
fail ArgumentError, "Missing the required parameter 'order_create_request' when calling OrdersApi.create_order"
|
|
287
|
+
end
|
|
288
|
+
# resource path
|
|
289
|
+
local_var_path = '/api/v1/orders'
|
|
290
|
+
|
|
291
|
+
# query parameters
|
|
292
|
+
query_params = opts[:query_params] || {}
|
|
293
|
+
|
|
294
|
+
# header parameters
|
|
295
|
+
header_params = opts[:header_params] || {}
|
|
296
|
+
# HTTP header 'Accept' (if needed)
|
|
297
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
298
|
+
# HTTP header 'Content-Type'
|
|
299
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
300
|
+
if !content_type.nil?
|
|
301
|
+
header_params['Content-Type'] = content_type
|
|
302
|
+
end
|
|
303
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
304
|
+
|
|
305
|
+
# form parameters
|
|
306
|
+
form_params = opts[:form_params] || {}
|
|
307
|
+
|
|
308
|
+
# http body (model)
|
|
309
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(order_create_request)
|
|
310
|
+
|
|
311
|
+
# return_type
|
|
312
|
+
return_type = opts[:debug_return_type] || 'Order'
|
|
313
|
+
|
|
314
|
+
# auth_names
|
|
315
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
|
316
|
+
|
|
317
|
+
new_options = opts.merge(
|
|
318
|
+
:operation => :"OrdersApi.create_order",
|
|
319
|
+
:header_params => header_params,
|
|
320
|
+
:query_params => query_params,
|
|
321
|
+
:form_params => form_params,
|
|
322
|
+
:body => post_body,
|
|
323
|
+
:auth_names => auth_names,
|
|
324
|
+
:return_type => return_type
|
|
325
|
+
)
|
|
326
|
+
|
|
327
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
328
|
+
if @api_client.config.debugging
|
|
329
|
+
@api_client.config.logger.debug "API called: OrdersApi#create_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
330
|
+
end
|
|
331
|
+
return data, status_code, headers
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
# Download the draft you attached to an order
|
|
335
|
+
# The file you attached to the briefing of a post order. 404 when the order has none (`briefing.hasProposedDraft` is false) or the file cannot be read.
|
|
336
|
+
# @param id [String]
|
|
337
|
+
# @param [Hash] opts the optional parameters
|
|
338
|
+
# @return [File]
|
|
339
|
+
def download_order_briefing(id, opts = {})
|
|
340
|
+
data, _status_code, _headers = download_order_briefing_with_http_info(id, opts)
|
|
341
|
+
data
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# Download the draft you attached to an order
|
|
345
|
+
# The file you attached to the briefing of a post order. 404 when the order has none (`briefing.hasProposedDraft` is false) or the file cannot be read.
|
|
346
|
+
# @param id [String]
|
|
347
|
+
# @param [Hash] opts the optional parameters
|
|
348
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
|
349
|
+
def download_order_briefing_with_http_info(id, opts = {})
|
|
350
|
+
if @api_client.config.debugging
|
|
351
|
+
@api_client.config.logger.debug 'Calling API: OrdersApi.download_order_briefing ...'
|
|
352
|
+
end
|
|
353
|
+
# verify the required parameter 'id' is set
|
|
354
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
355
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling OrdersApi.download_order_briefing"
|
|
356
|
+
end
|
|
357
|
+
# resource path
|
|
358
|
+
local_var_path = '/api/v1/orders/{id}/briefing'.sub('{id}', CGI.escape(id.to_s))
|
|
359
|
+
|
|
360
|
+
# query parameters
|
|
361
|
+
query_params = opts[:query_params] || {}
|
|
362
|
+
|
|
363
|
+
# header parameters
|
|
364
|
+
header_params = opts[:header_params] || {}
|
|
365
|
+
# HTTP header 'Accept' (if needed)
|
|
366
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', 'application/json']) unless header_params['Accept']
|
|
367
|
+
|
|
368
|
+
# form parameters
|
|
369
|
+
form_params = opts[:form_params] || {}
|
|
370
|
+
|
|
371
|
+
# http body (model)
|
|
372
|
+
post_body = opts[:debug_body]
|
|
373
|
+
|
|
374
|
+
# return_type
|
|
375
|
+
return_type = opts[:debug_return_type] || 'File'
|
|
376
|
+
|
|
377
|
+
# auth_names
|
|
378
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
|
379
|
+
|
|
380
|
+
new_options = opts.merge(
|
|
381
|
+
:operation => :"OrdersApi.download_order_briefing",
|
|
382
|
+
:header_params => header_params,
|
|
383
|
+
:query_params => query_params,
|
|
384
|
+
:form_params => form_params,
|
|
385
|
+
:body => post_body,
|
|
386
|
+
:auth_names => auth_names,
|
|
387
|
+
:return_type => return_type
|
|
388
|
+
)
|
|
389
|
+
|
|
390
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
391
|
+
if @api_client.config.debugging
|
|
392
|
+
@api_client.config.logger.debug "API called: OrdersApi#download_order_briefing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
393
|
+
end
|
|
394
|
+
return data, status_code, headers
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
# Download the draft of an order
|
|
398
|
+
# The file of the current draft of a post order. 404 when the order has no draft file (`draft.hasFile` is false) or the file cannot be read.
|
|
399
|
+
# @param id [String]
|
|
400
|
+
# @param [Hash] opts the optional parameters
|
|
401
|
+
# @return [File]
|
|
402
|
+
def download_order_draft(id, opts = {})
|
|
403
|
+
data, _status_code, _headers = download_order_draft_with_http_info(id, opts)
|
|
404
|
+
data
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
# Download the draft of an order
|
|
408
|
+
# The file of the current draft of a post order. 404 when the order has no draft file (`draft.hasFile` is false) or the file cannot be read.
|
|
409
|
+
# @param id [String]
|
|
410
|
+
# @param [Hash] opts the optional parameters
|
|
411
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
|
412
|
+
def download_order_draft_with_http_info(id, opts = {})
|
|
413
|
+
if @api_client.config.debugging
|
|
414
|
+
@api_client.config.logger.debug 'Calling API: OrdersApi.download_order_draft ...'
|
|
415
|
+
end
|
|
416
|
+
# verify the required parameter 'id' is set
|
|
417
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
418
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling OrdersApi.download_order_draft"
|
|
419
|
+
end
|
|
420
|
+
# resource path
|
|
421
|
+
local_var_path = '/api/v1/orders/{id}/draft'.sub('{id}', CGI.escape(id.to_s))
|
|
422
|
+
|
|
423
|
+
# query parameters
|
|
424
|
+
query_params = opts[:query_params] || {}
|
|
425
|
+
|
|
426
|
+
# header parameters
|
|
427
|
+
header_params = opts[:header_params] || {}
|
|
428
|
+
# HTTP header 'Accept' (if needed)
|
|
429
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', 'application/json']) unless header_params['Accept']
|
|
430
|
+
|
|
431
|
+
# form parameters
|
|
432
|
+
form_params = opts[:form_params] || {}
|
|
433
|
+
|
|
434
|
+
# http body (model)
|
|
435
|
+
post_body = opts[:debug_body]
|
|
436
|
+
|
|
437
|
+
# return_type
|
|
438
|
+
return_type = opts[:debug_return_type] || 'File'
|
|
439
|
+
|
|
440
|
+
# auth_names
|
|
441
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
|
442
|
+
|
|
443
|
+
new_options = opts.merge(
|
|
444
|
+
:operation => :"OrdersApi.download_order_draft",
|
|
445
|
+
:header_params => header_params,
|
|
446
|
+
:query_params => query_params,
|
|
447
|
+
:form_params => form_params,
|
|
448
|
+
:body => post_body,
|
|
449
|
+
:auth_names => auth_names,
|
|
450
|
+
:return_type => return_type
|
|
451
|
+
)
|
|
452
|
+
|
|
453
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
454
|
+
if @api_client.config.debugging
|
|
455
|
+
@api_client.config.logger.debug "API called: OrdersApi#download_order_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
456
|
+
end
|
|
457
|
+
return data, status_code, headers
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
# Estimate an order
|
|
461
|
+
# Checks and prices the order POST /orders would place with the same body, without `expectedPrice`, and compares the price with your wallet's available balance. Nothing is placed, charged or used up, so a read-only key may call it and it takes no Idempotency-Key. Send the `price` it answers as `expectedPrice` when you place the order. The estimate is refused for the same reasons as the order itself, except a balance that does not cover the price: that is answered here with `sufficientBalance: false` and the `missing` amount.
|
|
462
|
+
# @param order_estimate_request [OrderEstimateRequest]
|
|
463
|
+
# @param [Hash] opts the optional parameters
|
|
464
|
+
# @return [OrderEstimate]
|
|
465
|
+
def estimate_order(order_estimate_request, opts = {})
|
|
466
|
+
data, _status_code, _headers = estimate_order_with_http_info(order_estimate_request, opts)
|
|
467
|
+
data
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
# Estimate an order
|
|
471
|
+
# Checks and prices the order POST /orders would place with the same body, without `expectedPrice`, and compares the price with your wallet's available balance. Nothing is placed, charged or used up, so a read-only key may call it and it takes no Idempotency-Key. Send the `price` it answers as `expectedPrice` when you place the order. The estimate is refused for the same reasons as the order itself, except a balance that does not cover the price: that is answered here with `sufficientBalance: false` and the `missing` amount.
|
|
472
|
+
# @param order_estimate_request [OrderEstimateRequest]
|
|
473
|
+
# @param [Hash] opts the optional parameters
|
|
474
|
+
# @return [Array<(OrderEstimate, Integer, Hash)>] OrderEstimate data, response status code and response headers
|
|
475
|
+
def estimate_order_with_http_info(order_estimate_request, opts = {})
|
|
476
|
+
if @api_client.config.debugging
|
|
477
|
+
@api_client.config.logger.debug 'Calling API: OrdersApi.estimate_order ...'
|
|
478
|
+
end
|
|
479
|
+
# verify the required parameter 'order_estimate_request' is set
|
|
480
|
+
if @api_client.config.client_side_validation && order_estimate_request.nil?
|
|
481
|
+
fail ArgumentError, "Missing the required parameter 'order_estimate_request' when calling OrdersApi.estimate_order"
|
|
482
|
+
end
|
|
483
|
+
# resource path
|
|
484
|
+
local_var_path = '/api/v1/orders/estimate'
|
|
485
|
+
|
|
486
|
+
# query parameters
|
|
487
|
+
query_params = opts[:query_params] || {}
|
|
488
|
+
|
|
489
|
+
# header parameters
|
|
490
|
+
header_params = opts[:header_params] || {}
|
|
491
|
+
# HTTP header 'Accept' (if needed)
|
|
492
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
493
|
+
# HTTP header 'Content-Type'
|
|
494
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
495
|
+
if !content_type.nil?
|
|
496
|
+
header_params['Content-Type'] = content_type
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
# form parameters
|
|
500
|
+
form_params = opts[:form_params] || {}
|
|
501
|
+
|
|
502
|
+
# http body (model)
|
|
503
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(order_estimate_request)
|
|
504
|
+
|
|
505
|
+
# return_type
|
|
506
|
+
return_type = opts[:debug_return_type] || 'OrderEstimate'
|
|
507
|
+
|
|
508
|
+
# auth_names
|
|
509
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
|
510
|
+
|
|
511
|
+
new_options = opts.merge(
|
|
512
|
+
:operation => :"OrdersApi.estimate_order",
|
|
513
|
+
:header_params => header_params,
|
|
514
|
+
:query_params => query_params,
|
|
515
|
+
:form_params => form_params,
|
|
516
|
+
:body => post_body,
|
|
517
|
+
:auth_names => auth_names,
|
|
518
|
+
:return_type => return_type
|
|
519
|
+
)
|
|
520
|
+
|
|
521
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
522
|
+
if @api_client.config.debugging
|
|
523
|
+
@api_client.config.logger.debug "API called: OrdersApi#estimate_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
524
|
+
end
|
|
525
|
+
return data, status_code, headers
|
|
526
|
+
end
|
|
527
|
+
|
|
528
|
+
# Get an order
|
|
529
|
+
# One order you bought, with its briefing, its draft and its state history.
|
|
530
|
+
# @param id [String]
|
|
531
|
+
# @param [Hash] opts the optional parameters
|
|
532
|
+
# @return [Order]
|
|
533
|
+
def get_order(id, opts = {})
|
|
534
|
+
data, _status_code, _headers = get_order_with_http_info(id, opts)
|
|
535
|
+
data
|
|
536
|
+
end
|
|
537
|
+
|
|
538
|
+
# Get an order
|
|
539
|
+
# One order you bought, with its briefing, its draft and its state history.
|
|
540
|
+
# @param id [String]
|
|
541
|
+
# @param [Hash] opts the optional parameters
|
|
542
|
+
# @return [Array<(Order, Integer, Hash)>] Order data, response status code and response headers
|
|
543
|
+
def get_order_with_http_info(id, opts = {})
|
|
544
|
+
if @api_client.config.debugging
|
|
545
|
+
@api_client.config.logger.debug 'Calling API: OrdersApi.get_order ...'
|
|
546
|
+
end
|
|
547
|
+
# verify the required parameter 'id' is set
|
|
548
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
549
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling OrdersApi.get_order"
|
|
550
|
+
end
|
|
551
|
+
# resource path
|
|
552
|
+
local_var_path = '/api/v1/orders/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
553
|
+
|
|
554
|
+
# query parameters
|
|
555
|
+
query_params = opts[:query_params] || {}
|
|
556
|
+
|
|
557
|
+
# header parameters
|
|
558
|
+
header_params = opts[:header_params] || {}
|
|
559
|
+
# HTTP header 'Accept' (if needed)
|
|
560
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
561
|
+
|
|
562
|
+
# form parameters
|
|
563
|
+
form_params = opts[:form_params] || {}
|
|
564
|
+
|
|
565
|
+
# http body (model)
|
|
566
|
+
post_body = opts[:debug_body]
|
|
567
|
+
|
|
568
|
+
# return_type
|
|
569
|
+
return_type = opts[:debug_return_type] || 'Order'
|
|
570
|
+
|
|
571
|
+
# auth_names
|
|
572
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
|
573
|
+
|
|
574
|
+
new_options = opts.merge(
|
|
575
|
+
:operation => :"OrdersApi.get_order",
|
|
576
|
+
:header_params => header_params,
|
|
577
|
+
:query_params => query_params,
|
|
578
|
+
:form_params => form_params,
|
|
579
|
+
:body => post_body,
|
|
580
|
+
:auth_names => auth_names,
|
|
581
|
+
:return_type => return_type
|
|
582
|
+
)
|
|
583
|
+
|
|
584
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
585
|
+
if @api_client.config.debugging
|
|
586
|
+
@api_client.config.logger.debug "API called: OrdersApi#get_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
587
|
+
end
|
|
588
|
+
return data, status_code, headers
|
|
589
|
+
end
|
|
590
|
+
|
|
591
|
+
# List your orders
|
|
592
|
+
# The orders you bought, newest first by default. To follow your orders, poll with `sort=updatedAt` and `updatedSince` set to the `updatedAt` of the last order you saw: an order moves to the end of that list each time it changes state.
|
|
593
|
+
# @param [Hash] opts the optional parameters
|
|
594
|
+
# @option opts [String] :project_id Only the orders of this project of yours.
|
|
595
|
+
# @option opts [String] :media_id Only the orders on this media.
|
|
596
|
+
# @option opts [String] :state Only the orders in one of these states, comma-separated. An unknown state is refused with 422 and the list of valid ones.
|
|
597
|
+
# @option opts [Time] :updated_since Only the orders whose `updatedAt` is at or after this instant, an ISO-8601 date-time with its offset (send `+` as `%2B`).
|
|
598
|
+
# @option opts [String] :sort `-createdAt`, newest first, or `updatedAt`, least recently changed first. Orders of the same instant come in id order. (default to '-createdAt')
|
|
599
|
+
# @option opts [Integer] :limit Orders per page, 1 to 100. (default to 20)
|
|
600
|
+
# @option opts [Integer] :offset Orders to skip. (default to 0)
|
|
601
|
+
# @return [ListOrders200Response]
|
|
602
|
+
def list_orders(opts = {})
|
|
603
|
+
data, _status_code, _headers = list_orders_with_http_info(opts)
|
|
604
|
+
data
|
|
605
|
+
end
|
|
606
|
+
|
|
607
|
+
# List your orders
|
|
608
|
+
# The orders you bought, newest first by default. To follow your orders, poll with `sort=updatedAt` and `updatedSince` set to the `updatedAt` of the last order you saw: an order moves to the end of that list each time it changes state.
|
|
609
|
+
# @param [Hash] opts the optional parameters
|
|
610
|
+
# @option opts [String] :project_id Only the orders of this project of yours.
|
|
611
|
+
# @option opts [String] :media_id Only the orders on this media.
|
|
612
|
+
# @option opts [String] :state Only the orders in one of these states, comma-separated. An unknown state is refused with 422 and the list of valid ones.
|
|
613
|
+
# @option opts [Time] :updated_since Only the orders whose `updatedAt` is at or after this instant, an ISO-8601 date-time with its offset (send `+` as `%2B`).
|
|
614
|
+
# @option opts [String] :sort `-createdAt`, newest first, or `updatedAt`, least recently changed first. Orders of the same instant come in id order. (default to '-createdAt')
|
|
615
|
+
# @option opts [Integer] :limit Orders per page, 1 to 100. (default to 20)
|
|
616
|
+
# @option opts [Integer] :offset Orders to skip. (default to 0)
|
|
617
|
+
# @return [Array<(ListOrders200Response, Integer, Hash)>] ListOrders200Response data, response status code and response headers
|
|
618
|
+
def list_orders_with_http_info(opts = {})
|
|
619
|
+
if @api_client.config.debugging
|
|
620
|
+
@api_client.config.logger.debug 'Calling API: OrdersApi.list_orders ...'
|
|
621
|
+
end
|
|
622
|
+
allowable_values = ["-createdAt", "updatedAt"]
|
|
623
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
|
624
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
625
|
+
end
|
|
626
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
627
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OrdersApi.list_orders, must be smaller than or equal to 100.'
|
|
628
|
+
end
|
|
629
|
+
|
|
630
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
631
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OrdersApi.list_orders, must be greater than or equal to 1.'
|
|
632
|
+
end
|
|
633
|
+
|
|
634
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
|
635
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling OrdersApi.list_orders, must be greater than or equal to 0.'
|
|
636
|
+
end
|
|
637
|
+
|
|
638
|
+
# resource path
|
|
639
|
+
local_var_path = '/api/v1/orders'
|
|
640
|
+
|
|
641
|
+
# query parameters
|
|
642
|
+
query_params = opts[:query_params] || {}
|
|
643
|
+
query_params[:'projectId'] = opts[:'project_id'] if !opts[:'project_id'].nil?
|
|
644
|
+
query_params[:'mediaId'] = opts[:'media_id'] if !opts[:'media_id'].nil?
|
|
645
|
+
query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
|
|
646
|
+
query_params[:'updatedSince'] = opts[:'updated_since'] if !opts[:'updated_since'].nil?
|
|
647
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
648
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
649
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
650
|
+
|
|
651
|
+
# header parameters
|
|
652
|
+
header_params = opts[:header_params] || {}
|
|
653
|
+
# HTTP header 'Accept' (if needed)
|
|
654
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
655
|
+
|
|
656
|
+
# form parameters
|
|
657
|
+
form_params = opts[:form_params] || {}
|
|
658
|
+
|
|
659
|
+
# http body (model)
|
|
660
|
+
post_body = opts[:debug_body]
|
|
661
|
+
|
|
662
|
+
# return_type
|
|
663
|
+
return_type = opts[:debug_return_type] || 'ListOrders200Response'
|
|
664
|
+
|
|
665
|
+
# auth_names
|
|
666
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
|
667
|
+
|
|
668
|
+
new_options = opts.merge(
|
|
669
|
+
:operation => :"OrdersApi.list_orders",
|
|
670
|
+
:header_params => header_params,
|
|
671
|
+
:query_params => query_params,
|
|
672
|
+
:form_params => form_params,
|
|
673
|
+
:body => post_body,
|
|
674
|
+
:auth_names => auth_names,
|
|
675
|
+
:return_type => return_type
|
|
676
|
+
)
|
|
677
|
+
|
|
678
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
679
|
+
if @api_client.config.debugging
|
|
680
|
+
@api_client.config.logger.debug "API called: OrdersApi#list_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
681
|
+
end
|
|
682
|
+
return data, status_code, headers
|
|
683
|
+
end
|
|
684
|
+
|
|
685
|
+
# Request changes to a draft
|
|
686
|
+
# Asks the seller to change the draft of a post order whose `pendingAction` is yours to review the draft, as the web does. The seller is told your reason.
|
|
687
|
+
# @param id [String]
|
|
688
|
+
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
689
|
+
# @param order_action_reason [OrderActionReason]
|
|
690
|
+
# @param [Hash] opts the optional parameters
|
|
691
|
+
# @return [Order]
|
|
692
|
+
def request_order_draft_update(id, idempotency_key, order_action_reason, opts = {})
|
|
693
|
+
data, _status_code, _headers = request_order_draft_update_with_http_info(id, idempotency_key, order_action_reason, opts)
|
|
694
|
+
data
|
|
695
|
+
end
|
|
696
|
+
|
|
697
|
+
# Request changes to a draft
|
|
698
|
+
# Asks the seller to change the draft of a post order whose `pendingAction` is yours to review the draft, as the web does. The seller is told your reason.
|
|
699
|
+
# @param id [String]
|
|
700
|
+
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
701
|
+
# @param order_action_reason [OrderActionReason]
|
|
702
|
+
# @param [Hash] opts the optional parameters
|
|
703
|
+
# @return [Array<(Order, Integer, Hash)>] Order data, response status code and response headers
|
|
704
|
+
def request_order_draft_update_with_http_info(id, idempotency_key, order_action_reason, opts = {})
|
|
705
|
+
if @api_client.config.debugging
|
|
706
|
+
@api_client.config.logger.debug 'Calling API: OrdersApi.request_order_draft_update ...'
|
|
707
|
+
end
|
|
708
|
+
# verify the required parameter 'id' is set
|
|
709
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
710
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling OrdersApi.request_order_draft_update"
|
|
711
|
+
end
|
|
712
|
+
# verify the required parameter 'idempotency_key' is set
|
|
713
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
714
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling OrdersApi.request_order_draft_update"
|
|
715
|
+
end
|
|
716
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
|
|
717
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling OrdersApi.request_order_draft_update, the character length must be smaller than or equal to 255.'
|
|
718
|
+
end
|
|
719
|
+
|
|
720
|
+
# verify the required parameter 'order_action_reason' is set
|
|
721
|
+
if @api_client.config.client_side_validation && order_action_reason.nil?
|
|
722
|
+
fail ArgumentError, "Missing the required parameter 'order_action_reason' when calling OrdersApi.request_order_draft_update"
|
|
723
|
+
end
|
|
724
|
+
# resource path
|
|
725
|
+
local_var_path = '/api/v1/orders/{id}/request-draft-update'.sub('{id}', CGI.escape(id.to_s))
|
|
726
|
+
|
|
727
|
+
# query parameters
|
|
728
|
+
query_params = opts[:query_params] || {}
|
|
729
|
+
|
|
730
|
+
# header parameters
|
|
731
|
+
header_params = opts[:header_params] || {}
|
|
732
|
+
# HTTP header 'Accept' (if needed)
|
|
733
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
734
|
+
# HTTP header 'Content-Type'
|
|
735
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
736
|
+
if !content_type.nil?
|
|
737
|
+
header_params['Content-Type'] = content_type
|
|
738
|
+
end
|
|
739
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
740
|
+
|
|
741
|
+
# form parameters
|
|
742
|
+
form_params = opts[:form_params] || {}
|
|
743
|
+
|
|
744
|
+
# http body (model)
|
|
745
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(order_action_reason)
|
|
746
|
+
|
|
747
|
+
# return_type
|
|
748
|
+
return_type = opts[:debug_return_type] || 'Order'
|
|
749
|
+
|
|
750
|
+
# auth_names
|
|
751
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
|
752
|
+
|
|
753
|
+
new_options = opts.merge(
|
|
754
|
+
:operation => :"OrdersApi.request_order_draft_update",
|
|
755
|
+
:header_params => header_params,
|
|
756
|
+
:query_params => query_params,
|
|
757
|
+
:form_params => form_params,
|
|
758
|
+
:body => post_body,
|
|
759
|
+
:auth_names => auth_names,
|
|
760
|
+
:return_type => return_type
|
|
761
|
+
)
|
|
762
|
+
|
|
763
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
764
|
+
if @api_client.config.debugging
|
|
765
|
+
@api_client.config.logger.debug "API called: OrdersApi#request_order_draft_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
766
|
+
end
|
|
767
|
+
return data, status_code, headers
|
|
768
|
+
end
|
|
769
|
+
|
|
770
|
+
# Request changes to a delivery
|
|
771
|
+
# Asks the seller to change the delivery of an order whose `pendingAction` is yours to review the delivery, as the web does. The seller is told your reason.
|
|
772
|
+
# @param id [String]
|
|
773
|
+
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
774
|
+
# @param order_action_reason [OrderActionReason]
|
|
775
|
+
# @param [Hash] opts the optional parameters
|
|
776
|
+
# @return [Order]
|
|
777
|
+
def request_order_update(id, idempotency_key, order_action_reason, opts = {})
|
|
778
|
+
data, _status_code, _headers = request_order_update_with_http_info(id, idempotency_key, order_action_reason, opts)
|
|
779
|
+
data
|
|
780
|
+
end
|
|
781
|
+
|
|
782
|
+
# Request changes to a delivery
|
|
783
|
+
# Asks the seller to change the delivery of an order whose `pendingAction` is yours to review the delivery, as the web does. The seller is told your reason.
|
|
784
|
+
# @param id [String]
|
|
785
|
+
# @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
786
|
+
# @param order_action_reason [OrderActionReason]
|
|
787
|
+
# @param [Hash] opts the optional parameters
|
|
788
|
+
# @return [Array<(Order, Integer, Hash)>] Order data, response status code and response headers
|
|
789
|
+
def request_order_update_with_http_info(id, idempotency_key, order_action_reason, opts = {})
|
|
790
|
+
if @api_client.config.debugging
|
|
791
|
+
@api_client.config.logger.debug 'Calling API: OrdersApi.request_order_update ...'
|
|
792
|
+
end
|
|
793
|
+
# verify the required parameter 'id' is set
|
|
794
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
795
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling OrdersApi.request_order_update"
|
|
796
|
+
end
|
|
797
|
+
# verify the required parameter 'idempotency_key' is set
|
|
798
|
+
if @api_client.config.client_side_validation && idempotency_key.nil?
|
|
799
|
+
fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling OrdersApi.request_order_update"
|
|
800
|
+
end
|
|
801
|
+
if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
|
|
802
|
+
fail ArgumentError, 'invalid value for "idempotency_key" when calling OrdersApi.request_order_update, the character length must be smaller than or equal to 255.'
|
|
803
|
+
end
|
|
804
|
+
|
|
805
|
+
# verify the required parameter 'order_action_reason' is set
|
|
806
|
+
if @api_client.config.client_side_validation && order_action_reason.nil?
|
|
807
|
+
fail ArgumentError, "Missing the required parameter 'order_action_reason' when calling OrdersApi.request_order_update"
|
|
808
|
+
end
|
|
809
|
+
# resource path
|
|
810
|
+
local_var_path = '/api/v1/orders/{id}/request-update'.sub('{id}', CGI.escape(id.to_s))
|
|
811
|
+
|
|
812
|
+
# query parameters
|
|
813
|
+
query_params = opts[:query_params] || {}
|
|
814
|
+
|
|
815
|
+
# header parameters
|
|
816
|
+
header_params = opts[:header_params] || {}
|
|
817
|
+
# HTTP header 'Accept' (if needed)
|
|
818
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
819
|
+
# HTTP header 'Content-Type'
|
|
820
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
821
|
+
if !content_type.nil?
|
|
822
|
+
header_params['Content-Type'] = content_type
|
|
823
|
+
end
|
|
824
|
+
header_params[:'Idempotency-Key'] = idempotency_key
|
|
825
|
+
|
|
826
|
+
# form parameters
|
|
827
|
+
form_params = opts[:form_params] || {}
|
|
828
|
+
|
|
829
|
+
# http body (model)
|
|
830
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(order_action_reason)
|
|
831
|
+
|
|
832
|
+
# return_type
|
|
833
|
+
return_type = opts[:debug_return_type] || 'Order'
|
|
834
|
+
|
|
835
|
+
# auth_names
|
|
836
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
|
837
|
+
|
|
838
|
+
new_options = opts.merge(
|
|
839
|
+
:operation => :"OrdersApi.request_order_update",
|
|
840
|
+
:header_params => header_params,
|
|
841
|
+
:query_params => query_params,
|
|
842
|
+
:form_params => form_params,
|
|
843
|
+
:body => post_body,
|
|
844
|
+
:auth_names => auth_names,
|
|
845
|
+
:return_type => return_type
|
|
846
|
+
)
|
|
847
|
+
|
|
848
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
849
|
+
if @api_client.config.debugging
|
|
850
|
+
@api_client.config.logger.debug "API called: OrdersApi#request_order_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
851
|
+
end
|
|
852
|
+
return data, status_code, headers
|
|
853
|
+
end
|
|
854
|
+
end
|
|
855
|
+
end
|