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.
Files changed (383) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +306 -0
  4. data/Rakefile +10 -0
  5. data/docs/AccountApi.md +213 -0
  6. data/docs/Balance.md +20 -0
  7. data/docs/BuyerMoneyApi.md +362 -0
  8. data/docs/CatalogueApi.md +731 -0
  9. data/docs/CatalogueMedia.md +46 -0
  10. data/docs/CatalogueMediaFlashOffer.md +20 -0
  11. data/docs/CatalogueMediaMetrics.md +26 -0
  12. data/docs/CatalogueOffer.md +24 -0
  13. data/docs/CatalogueOfferOrNull.md +24 -0
  14. data/docs/CataloguePostOffer.md +30 -0
  15. data/docs/CataloguePostOfferAllOfExtras.md +20 -0
  16. data/docs/CataloguePostOfferAllOfExtrasSensitiveTopic.md +20 -0
  17. data/docs/CodeName.md +20 -0
  18. data/docs/CountSavedFilterMedias200Response.md +18 -0
  19. data/docs/CreateProjectRequest.md +32 -0
  20. data/docs/CreateSavedFilterRequest.md +22 -0
  21. data/docs/Error.md +24 -0
  22. data/docs/FilesApi.md +79 -0
  23. data/docs/GetBuyerWallet200Response.md +20 -0
  24. data/docs/GetMe200Response.md +34 -0
  25. data/docs/GetMe200ResponseBuyer.md +18 -0
  26. data/docs/GetMe200ResponseCatalogue.md +18 -0
  27. data/docs/GetMe200ResponseManagedService.md +18 -0
  28. data/docs/GetMe200ResponseSeller.md +24 -0
  29. data/docs/GetSellerWallet200Response.md +20 -0
  30. data/docs/GetVocabulary200Response.md +28 -0
  31. data/docs/GetVocabulary200ResponseTopicsInner.md +20 -0
  32. data/docs/Invoice.md +24 -0
  33. data/docs/LinkAdditionOrderBriefing.md +22 -0
  34. data/docs/LinkAdditionOrderBriefingRequest.md +22 -0
  35. data/docs/ListBuyerTransactions200Response.md +20 -0
  36. data/docs/ListFlashOffers200Response.md +20 -0
  37. data/docs/ListInvoices200Response.md +20 -0
  38. data/docs/ListManagedServiceCampaigns200Response.md +20 -0
  39. data/docs/ListManagedServiceProposals200Response.md +20 -0
  40. data/docs/ListOrders200Response.md +20 -0
  41. data/docs/ListProjects200Response.md +20 -0
  42. data/docs/ListSavedFilters200Response.md +20 -0
  43. data/docs/ListSellerMedias200Response.md +20 -0
  44. data/docs/ListSellerOrders200Response.md +20 -0
  45. data/docs/ListSellerTransactions200Response.md +20 -0
  46. data/docs/ListWithdrawals200Response.md +20 -0
  47. data/docs/ManagedServiceCampaign.md +40 -0
  48. data/docs/ManagedServiceCampaignProject.md +20 -0
  49. data/docs/ManagedServiceCampaignProposalCounts.md +26 -0
  50. data/docs/ManagedServiceCampaignStrategy.md +26 -0
  51. data/docs/ManagedServiceProposal.md +40 -0
  52. data/docs/ManagedServiceProposalBriefing.md +24 -0
  53. data/docs/ManagedServiceProposalBriefingLinksInner.md +22 -0
  54. data/docs/ManagedServiceProposalMedia.md +24 -0
  55. data/docs/ManagedServiceProposalReview.md +20 -0
  56. data/docs/ManagedServiceProposalReviewRequest.md +18 -0
  57. data/docs/ManagedServiceProposalReviewRequestReviewsInner.md +22 -0
  58. data/docs/ManagedServiceProposalsEstimate.md +28 -0
  59. data/docs/ManagedServiceProposalsEstimateRequest.md +18 -0
  60. data/docs/ManagedServiceRequest.md +28 -0
  61. data/docs/ManagedServiceRequestSent.md +18 -0
  62. data/docs/ManagedServicesApi.md +593 -0
  63. data/docs/Money.md +20 -0
  64. data/docs/MoneyOrNull.md +20 -0
  65. data/docs/Order.md +48 -0
  66. data/docs/OrderActionReason.md +18 -0
  67. data/docs/OrderBriefing.md +49 -0
  68. data/docs/OrderChannel.md +18 -0
  69. data/docs/OrderCreateRequest.md +32 -0
  70. data/docs/OrderDelivery.md +20 -0
  71. data/docs/OrderDraft.md +22 -0
  72. data/docs/OrderEstimate.md +24 -0
  73. data/docs/OrderEstimateRequest.md +30 -0
  74. data/docs/OrderEstimateRequestBriefing.md +49 -0
  75. data/docs/OrderLink.md +22 -0
  76. data/docs/OrderLinkRequest.md +22 -0
  77. data/docs/OrderMedia.md +20 -0
  78. data/docs/OrderProject.md +20 -0
  79. data/docs/OrderStateHistoryInner.md +22 -0
  80. data/docs/OrderStateHistoryInnerReason.md +20 -0
  81. data/docs/OrdersApi.md +809 -0
  82. data/docs/PostOrderBriefing.md +28 -0
  83. data/docs/PostOrderBriefingRequest.md +24 -0
  84. data/docs/Project.md +38 -0
  85. data/docs/ProjectCatalogueMedia.md +48 -0
  86. data/docs/ProjectCatalogueMediaAllOfProject.md +28 -0
  87. data/docs/ProjectsApi.md +368 -0
  88. data/docs/PutSellerHoliday200Response.md +20 -0
  89. data/docs/PutSellerHolidayRequest.md +20 -0
  90. data/docs/RequestMedias201Response.md +18 -0
  91. data/docs/RequestMediasRequest.md +18 -0
  92. data/docs/SavedFilter.md +26 -0
  93. data/docs/SavedFilterNotifications.md +20 -0
  94. data/docs/SavedFiltersApi.md +296 -0
  95. data/docs/SellerFees.md +20 -0
  96. data/docs/SellerFeesOrNull.md +20 -0
  97. data/docs/SellerMedia.md +54 -0
  98. data/docs/SellerMediaFlashOffer.md +20 -0
  99. data/docs/SellerMediaLinkAdditionOffer.md +18 -0
  100. data/docs/SellerMediaLinkAdditionOfferPricingOptionsInner.md +22 -0
  101. data/docs/SellerMediaPostOffer.md +20 -0
  102. data/docs/SellerMediaPostOfferPricingOptionsInner.md +24 -0
  103. data/docs/SellerMediasApi.md +301 -0
  104. data/docs/SellerMoneyApi.md +364 -0
  105. data/docs/SellerOrder.md +50 -0
  106. data/docs/SellerOrderBriefing.md +49 -0
  107. data/docs/SellerOrderChannel.md +20 -0
  108. data/docs/SellerOrderDraft.md +20 -0
  109. data/docs/SellerOrderDraftFile.md +18 -0
  110. data/docs/SellerOrderPostDelivery.md +20 -0
  111. data/docs/SellerOrderProject.md +18 -0
  112. data/docs/SellerOrderRefutation.md +18 -0
  113. data/docs/SellerOrderRejection.md +18 -0
  114. data/docs/SellerOrderRejectionReason.md +20 -0
  115. data/docs/SellerOrdersApi.md +893 -0
  116. data/docs/SellerPostOrderBriefing.md +30 -0
  117. data/docs/SellerTransaction.md +38 -0
  118. data/docs/Transaction.md +40 -0
  119. data/docs/UpdateProjectRequest.md +30 -0
  120. data/docs/UpdateSellerMediaRequest.md +22 -0
  121. data/docs/UpdateSellerMediaRequestExtraServicesInner.md +20 -0
  122. data/docs/UpdateSellerMediaRequestLinkAdditionOffer.md +18 -0
  123. data/docs/UpdateSellerMediaRequestLinkAdditionOfferPricingOptionsInner.md +20 -0
  124. data/docs/UpdateSellerMediaRequestPostOffer.md +18 -0
  125. data/docs/UpdateSellerMediaRequestPostOfferPricingOptionsInner.md +22 -0
  126. data/docs/UploadFile201Response.md +24 -0
  127. data/docs/Withdrawal.md +28 -0
  128. data/git_push.sh +57 -0
  129. data/growwer.gemspec +41 -0
  130. data/lib/growwer/api/account_api.rb +215 -0
  131. data/lib/growwer/api/buyer_money_api.rb +355 -0
  132. data/lib/growwer/api/catalogue_api.rb +881 -0
  133. data/lib/growwer/api/files_api.rb +102 -0
  134. data/lib/growwer/api/managed_services_api.rb +625 -0
  135. data/lib/growwer/api/orders_api.rb +855 -0
  136. data/lib/growwer/api/projects_api.rb +398 -0
  137. data/lib/growwer/api/saved_filters_api.rb +319 -0
  138. data/lib/growwer/api/seller_medias_api.rb +329 -0
  139. data/lib/growwer/api/seller_money_api.rb +358 -0
  140. data/lib/growwer/api/seller_orders_api.rb +963 -0
  141. data/lib/growwer/api_client.rb +441 -0
  142. data/lib/growwer/api_error.rb +58 -0
  143. data/lib/growwer/api_model_base.rb +88 -0
  144. data/lib/growwer/configuration.rb +392 -0
  145. data/lib/growwer/models/balance.rb +192 -0
  146. data/lib/growwer/models/catalogue_media.rb +491 -0
  147. data/lib/growwer/models/catalogue_media_flash_offer.rb +191 -0
  148. data/lib/growwer/models/catalogue_media_metrics.rb +200 -0
  149. data/lib/growwer/models/catalogue_offer.rb +254 -0
  150. data/lib/growwer/models/catalogue_offer_or_null.rb +254 -0
  151. data/lib/growwer/models/catalogue_post_offer.rb +333 -0
  152. data/lib/growwer/models/catalogue_post_offer_all_of_extras.rb +177 -0
  153. data/lib/growwer/models/catalogue_post_offer_all_of_extras_sensitive_topic.rb +178 -0
  154. data/lib/growwer/models/code_name.rb +190 -0
  155. data/lib/growwer/models/count_saved_filter_medias200_response.rb +173 -0
  156. data/lib/growwer/models/create_project_request.rb +402 -0
  157. data/lib/growwer/models/create_saved_filter_request.rb +247 -0
  158. data/lib/growwer/models/error.rb +231 -0
  159. data/lib/growwer/models/get_buyer_wallet200_response.rb +191 -0
  160. data/lib/growwer/models/get_me200_response.rb +373 -0
  161. data/lib/growwer/models/get_me200_response_buyer.rb +164 -0
  162. data/lib/growwer/models/get_me200_response_catalogue.rb +165 -0
  163. data/lib/growwer/models/get_me200_response_managed_service.rb +165 -0
  164. data/lib/growwer/models/get_me200_response_seller.rb +231 -0
  165. data/lib/growwer/models/get_seller_wallet200_response.rb +191 -0
  166. data/lib/growwer/models/get_vocabulary200_response.rb +311 -0
  167. data/lib/growwer/models/get_vocabulary200_response_topics_inner.rb +190 -0
  168. data/lib/growwer/models/invoice.rb +243 -0
  169. data/lib/growwer/models/link_addition_order_briefing.rb +204 -0
  170. data/lib/growwer/models/link_addition_order_briefing_request.rb +201 -0
  171. data/lib/growwer/models/list_buyer_transactions200_response.rb +192 -0
  172. data/lib/growwer/models/list_flash_offers200_response.rb +192 -0
  173. data/lib/growwer/models/list_invoices200_response.rb +192 -0
  174. data/lib/growwer/models/list_managed_service_campaigns200_response.rb +192 -0
  175. data/lib/growwer/models/list_managed_service_proposals200_response.rb +192 -0
  176. data/lib/growwer/models/list_orders200_response.rb +192 -0
  177. data/lib/growwer/models/list_projects200_response.rb +192 -0
  178. data/lib/growwer/models/list_saved_filters200_response.rb +192 -0
  179. data/lib/growwer/models/list_seller_medias200_response.rb +192 -0
  180. data/lib/growwer/models/list_seller_orders200_response.rb +192 -0
  181. data/lib/growwer/models/list_seller_transactions200_response.rb +192 -0
  182. data/lib/growwer/models/list_withdrawals200_response.rb +192 -0
  183. data/lib/growwer/models/managed_service_campaign.rb +451 -0
  184. data/lib/growwer/models/managed_service_campaign_project.rb +190 -0
  185. data/lib/growwer/models/managed_service_campaign_proposal_counts.rb +269 -0
  186. data/lib/growwer/models/managed_service_campaign_strategy.rb +300 -0
  187. data/lib/growwer/models/managed_service_proposal.rb +428 -0
  188. data/lib/growwer/models/managed_service_proposal_briefing.rb +244 -0
  189. data/lib/growwer/models/managed_service_proposal_briefing_links_inner.rb +226 -0
  190. data/lib/growwer/models/managed_service_proposal_media.rb +214 -0
  191. data/lib/growwer/models/managed_service_proposal_review.rb +193 -0
  192. data/lib/growwer/models/managed_service_proposal_review_request.rb +176 -0
  193. data/lib/growwer/models/managed_service_proposal_review_request_reviews_inner.rb +240 -0
  194. data/lib/growwer/models/managed_service_proposals_estimate.rb +300 -0
  195. data/lib/growwer/models/managed_service_proposals_estimate_request.rb +150 -0
  196. data/lib/growwer/models/managed_service_request.rb +331 -0
  197. data/lib/growwer/models/managed_service_request_sent.rb +188 -0
  198. data/lib/growwer/models/money.rb +192 -0
  199. data/lib/growwer/models/money_or_null.rb +192 -0
  200. data/lib/growwer/models/order.rb +541 -0
  201. data/lib/growwer/models/order_action_reason.rb +183 -0
  202. data/lib/growwer/models/order_briefing.rb +102 -0
  203. data/lib/growwer/models/order_channel.rb +189 -0
  204. data/lib/growwer/models/order_create_request.rb +333 -0
  205. data/lib/growwer/models/order_delivery.rb +179 -0
  206. data/lib/growwer/models/order_draft.rb +220 -0
  207. data/lib/growwer/models/order_estimate.rb +246 -0
  208. data/lib/growwer/models/order_estimate_request.rb +299 -0
  209. data/lib/growwer/models/order_estimate_request_briefing.rb +102 -0
  210. data/lib/growwer/models/order_link.rb +214 -0
  211. data/lib/growwer/models/order_link_request.rb +209 -0
  212. data/lib/growwer/models/order_media.rb +178 -0
  213. data/lib/growwer/models/order_project.rb +178 -0
  214. data/lib/growwer/models/order_state_history_inner.rb +202 -0
  215. data/lib/growwer/models/order_state_history_inner_reason.rb +200 -0
  216. data/lib/growwer/models/post_order_briefing.rb +285 -0
  217. data/lib/growwer/models/post_order_briefing_request.rb +220 -0
  218. data/lib/growwer/models/project.rb +437 -0
  219. data/lib/growwer/models/project_catalogue_media.rb +524 -0
  220. data/lib/growwer/models/project_catalogue_media_all_of_project.rb +298 -0
  221. data/lib/growwer/models/put_seller_holiday200_response.rb +177 -0
  222. data/lib/growwer/models/put_seller_holiday_request.rb +174 -0
  223. data/lib/growwer/models/request_medias201_response.rb +166 -0
  224. data/lib/growwer/models/request_medias_request.rb +167 -0
  225. data/lib/growwer/models/saved_filter.rb +269 -0
  226. data/lib/growwer/models/saved_filter_notifications.rb +211 -0
  227. data/lib/growwer/models/seller_fees.rb +164 -0
  228. data/lib/growwer/models/seller_fees_or_null.rb +164 -0
  229. data/lib/growwer/models/seller_media.rb +573 -0
  230. data/lib/growwer/models/seller_media_flash_offer.rb +191 -0
  231. data/lib/growwer/models/seller_media_link_addition_offer.rb +167 -0
  232. data/lib/growwer/models/seller_media_link_addition_offer_pricing_options_inner.rb +228 -0
  233. data/lib/growwer/models/seller_media_post_offer.rb +195 -0
  234. data/lib/growwer/models/seller_media_post_offer_pricing_options_inner.rb +234 -0
  235. data/lib/growwer/models/seller_order.rb +563 -0
  236. data/lib/growwer/models/seller_order_briefing.rb +102 -0
  237. data/lib/growwer/models/seller_order_channel.rb +214 -0
  238. data/lib/growwer/models/seller_order_draft.rb +193 -0
  239. data/lib/growwer/models/seller_order_draft_file.rb +165 -0
  240. data/lib/growwer/models/seller_order_post_delivery.rb +193 -0
  241. data/lib/growwer/models/seller_order_project.rb +165 -0
  242. data/lib/growwer/models/seller_order_refutation.rb +183 -0
  243. data/lib/growwer/models/seller_order_rejection.rb +164 -0
  244. data/lib/growwer/models/seller_order_rejection_reason.rb +224 -0
  245. data/lib/growwer/models/seller_post_order_briefing.rb +314 -0
  246. data/lib/growwer/models/seller_transaction.rb +415 -0
  247. data/lib/growwer/models/transaction.rb +427 -0
  248. data/lib/growwer/models/update_project_request.rb +339 -0
  249. data/lib/growwer/models/update_seller_media_request.rb +168 -0
  250. data/lib/growwer/models/update_seller_media_request_extra_services_inner.rb +215 -0
  251. data/lib/growwer/models/update_seller_media_request_link_addition_offer.rb +166 -0
  252. data/lib/growwer/models/update_seller_media_request_link_addition_offer_pricing_options_inner.rb +215 -0
  253. data/lib/growwer/models/update_seller_media_request_post_offer.rb +175 -0
  254. data/lib/growwer/models/update_seller_media_request_post_offer_pricing_options_inner.rb +210 -0
  255. data/lib/growwer/models/upload_file201_response.rb +244 -0
  256. data/lib/growwer/models/withdrawal.rb +322 -0
  257. data/lib/growwer/version.rb +15 -0
  258. data/lib/growwer.rb +163 -0
  259. data/spec/api/account_api_spec.rb +70 -0
  260. data/spec/api/buyer_money_api_spec.rb +96 -0
  261. data/spec/api/catalogue_api_spec.rb +213 -0
  262. data/spec/api/files_api_spec.rb +48 -0
  263. data/spec/api/managed_services_api_spec.rb +140 -0
  264. data/spec/api/orders_api_spec.rb +182 -0
  265. data/spec/api/projects_api_spec.rb +100 -0
  266. data/spec/api/saved_filters_api_spec.rb +88 -0
  267. data/spec/api/seller_medias_api_spec.rb +89 -0
  268. data/spec/api/seller_money_api_spec.rb +97 -0
  269. data/spec/api/seller_orders_api_spec.rb +199 -0
  270. data/spec/models/balance_spec.rb +42 -0
  271. data/spec/models/catalogue_media_flash_offer_spec.rb +42 -0
  272. data/spec/models/catalogue_media_metrics_spec.rb +60 -0
  273. data/spec/models/catalogue_media_spec.rb +124 -0
  274. data/spec/models/catalogue_offer_or_null_spec.rb +58 -0
  275. data/spec/models/catalogue_offer_spec.rb +58 -0
  276. data/spec/models/catalogue_post_offer_all_of_extras_sensitive_topic_spec.rb +42 -0
  277. data/spec/models/catalogue_post_offer_all_of_extras_spec.rb +42 -0
  278. data/spec/models/catalogue_post_offer_spec.rb +80 -0
  279. data/spec/models/code_name_spec.rb +42 -0
  280. data/spec/models/count_saved_filter_medias200_response_spec.rb +36 -0
  281. data/spec/models/create_project_request_spec.rb +82 -0
  282. data/spec/models/create_saved_filter_request_spec.rb +52 -0
  283. data/spec/models/error_spec.rb +54 -0
  284. data/spec/models/get_buyer_wallet200_response_spec.rb +42 -0
  285. data/spec/models/get_me200_response_buyer_spec.rb +36 -0
  286. data/spec/models/get_me200_response_catalogue_spec.rb +36 -0
  287. data/spec/models/get_me200_response_managed_service_spec.rb +36 -0
  288. data/spec/models/get_me200_response_seller_spec.rb +54 -0
  289. data/spec/models/get_me200_response_spec.rb +84 -0
  290. data/spec/models/get_seller_wallet200_response_spec.rb +42 -0
  291. data/spec/models/get_vocabulary200_response_spec.rb +74 -0
  292. data/spec/models/get_vocabulary200_response_topics_inner_spec.rb +42 -0
  293. data/spec/models/invoice_spec.rb +54 -0
  294. data/spec/models/link_addition_order_briefing_request_spec.rb +48 -0
  295. data/spec/models/link_addition_order_briefing_spec.rb +48 -0
  296. data/spec/models/list_buyer_transactions200_response_spec.rb +42 -0
  297. data/spec/models/list_flash_offers200_response_spec.rb +42 -0
  298. data/spec/models/list_invoices200_response_spec.rb +42 -0
  299. data/spec/models/list_managed_service_campaigns200_response_spec.rb +42 -0
  300. data/spec/models/list_managed_service_proposals200_response_spec.rb +42 -0
  301. data/spec/models/list_orders200_response_spec.rb +42 -0
  302. data/spec/models/list_projects200_response_spec.rb +42 -0
  303. data/spec/models/list_saved_filters200_response_spec.rb +42 -0
  304. data/spec/models/list_seller_medias200_response_spec.rb +42 -0
  305. data/spec/models/list_seller_orders200_response_spec.rb +42 -0
  306. data/spec/models/list_seller_transactions200_response_spec.rb +42 -0
  307. data/spec/models/list_withdrawals200_response_spec.rb +42 -0
  308. data/spec/models/managed_service_campaign_project_spec.rb +42 -0
  309. data/spec/models/managed_service_campaign_proposal_counts_spec.rb +60 -0
  310. data/spec/models/managed_service_campaign_spec.rb +106 -0
  311. data/spec/models/managed_service_campaign_strategy_spec.rb +64 -0
  312. data/spec/models/managed_service_proposal_briefing_links_inner_spec.rb +52 -0
  313. data/spec/models/managed_service_proposal_briefing_spec.rb +54 -0
  314. data/spec/models/managed_service_proposal_media_spec.rb +54 -0
  315. data/spec/models/managed_service_proposal_review_request_reviews_inner_spec.rb +52 -0
  316. data/spec/models/managed_service_proposal_review_request_spec.rb +36 -0
  317. data/spec/models/managed_service_proposal_review_spec.rb +42 -0
  318. data/spec/models/managed_service_proposal_spec.rb +110 -0
  319. data/spec/models/managed_service_proposals_estimate_request_spec.rb +36 -0
  320. data/spec/models/managed_service_proposals_estimate_spec.rb +66 -0
  321. data/spec/models/managed_service_request_sent_spec.rb +40 -0
  322. data/spec/models/managed_service_request_spec.rb +74 -0
  323. data/spec/models/money_or_null_spec.rb +42 -0
  324. data/spec/models/money_spec.rb +42 -0
  325. data/spec/models/order_action_reason_spec.rb +36 -0
  326. data/spec/models/order_briefing_spec.rb +32 -0
  327. data/spec/models/order_channel_spec.rb +40 -0
  328. data/spec/models/order_create_request_spec.rb +82 -0
  329. data/spec/models/order_delivery_spec.rb +42 -0
  330. data/spec/models/order_draft_spec.rb +48 -0
  331. data/spec/models/order_estimate_request_briefing_spec.rb +32 -0
  332. data/spec/models/order_estimate_request_spec.rb +76 -0
  333. data/spec/models/order_estimate_spec.rb +54 -0
  334. data/spec/models/order_link_request_spec.rb +52 -0
  335. data/spec/models/order_link_spec.rb +52 -0
  336. data/spec/models/order_media_spec.rb +42 -0
  337. data/spec/models/order_project_spec.rb +42 -0
  338. data/spec/models/order_spec.rb +134 -0
  339. data/spec/models/order_state_history_inner_reason_spec.rb +46 -0
  340. data/spec/models/order_state_history_inner_spec.rb +48 -0
  341. data/spec/models/post_order_briefing_request_spec.rb +58 -0
  342. data/spec/models/post_order_briefing_spec.rb +70 -0
  343. data/spec/models/project_catalogue_media_all_of_project_spec.rb +66 -0
  344. data/spec/models/project_catalogue_media_spec.rb +130 -0
  345. data/spec/models/project_spec.rb +104 -0
  346. data/spec/models/put_seller_holiday200_response_spec.rb +42 -0
  347. data/spec/models/put_seller_holiday_request_spec.rb +42 -0
  348. data/spec/models/request_medias201_response_spec.rb +36 -0
  349. data/spec/models/request_medias_request_spec.rb +36 -0
  350. data/spec/models/saved_filter_notifications_spec.rb +46 -0
  351. data/spec/models/saved_filter_spec.rb +60 -0
  352. data/spec/models/seller_fees_or_null_spec.rb +42 -0
  353. data/spec/models/seller_fees_spec.rb +42 -0
  354. data/spec/models/seller_media_flash_offer_spec.rb +42 -0
  355. data/spec/models/seller_media_link_addition_offer_pricing_options_inner_spec.rb +52 -0
  356. data/spec/models/seller_media_link_addition_offer_spec.rb +36 -0
  357. data/spec/models/seller_media_post_offer_pricing_options_inner_spec.rb +58 -0
  358. data/spec/models/seller_media_post_offer_spec.rb +42 -0
  359. data/spec/models/seller_media_spec.rb +148 -0
  360. data/spec/models/seller_order_briefing_spec.rb +32 -0
  361. data/spec/models/seller_order_channel_spec.rb +50 -0
  362. data/spec/models/seller_order_draft_file_spec.rb +36 -0
  363. data/spec/models/seller_order_draft_spec.rb +42 -0
  364. data/spec/models/seller_order_post_delivery_spec.rb +42 -0
  365. data/spec/models/seller_order_project_spec.rb +36 -0
  366. data/spec/models/seller_order_refutation_spec.rb +36 -0
  367. data/spec/models/seller_order_rejection_reason_spec.rb +46 -0
  368. data/spec/models/seller_order_rejection_spec.rb +36 -0
  369. data/spec/models/seller_order_spec.rb +140 -0
  370. data/spec/models/seller_post_order_briefing_spec.rb +80 -0
  371. data/spec/models/seller_transaction_spec.rb +104 -0
  372. data/spec/models/transaction_spec.rb +110 -0
  373. data/spec/models/update_project_request_spec.rb +76 -0
  374. data/spec/models/update_seller_media_request_extra_services_inner_spec.rb +46 -0
  375. data/spec/models/update_seller_media_request_link_addition_offer_pricing_options_inner_spec.rb +46 -0
  376. data/spec/models/update_seller_media_request_link_addition_offer_spec.rb +36 -0
  377. data/spec/models/update_seller_media_request_post_offer_pricing_options_inner_spec.rb +52 -0
  378. data/spec/models/update_seller_media_request_post_offer_spec.rb +36 -0
  379. data/spec/models/update_seller_media_request_spec.rb +48 -0
  380. data/spec/models/upload_file201_response_spec.rb +54 -0
  381. data/spec/models/withdrawal_spec.rb +74 -0
  382. data/spec/spec_helper.rb +111 -0
  383. metadata +618 -0
@@ -0,0 +1,881 @@
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 CatalogueApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Discard a media for a project
23
+ # Discards a media for one of your projects, as the web does. Discarding it again changes nothing. The media must be one the catalogue shows for the project: another media, including one of your own as a seller, is answered as not found.
24
+ # @param id [String] The project.
25
+ # @param media_id [String] The media.
26
+ # @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 (&#x60;!&#x60; to &#x60;~&#x60;); any other value answers 400 &#x60;invalid_idempotency_key&#x60;.
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [nil]
29
+ def discard_media(id, media_id, idempotency_key, opts = {})
30
+ discard_media_with_http_info(id, media_id, idempotency_key, opts)
31
+ nil
32
+ end
33
+
34
+ # Discard a media for a project
35
+ # Discards a media for one of your projects, as the web does. Discarding it again changes nothing. The media must be one the catalogue shows for the project: another media, including one of your own as a seller, is answered as not found.
36
+ # @param id [String] The project.
37
+ # @param media_id [String] The media.
38
+ # @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 (&#x60;!&#x60; to &#x60;~&#x60;); any other value answers 400 &#x60;invalid_idempotency_key&#x60;.
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
41
+ def discard_media_with_http_info(id, media_id, idempotency_key, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: CatalogueApi.discard_media ...'
44
+ end
45
+ # verify the required parameter 'id' is set
46
+ if @api_client.config.client_side_validation && id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogueApi.discard_media"
48
+ end
49
+ # verify the required parameter 'media_id' is set
50
+ if @api_client.config.client_side_validation && media_id.nil?
51
+ fail ArgumentError, "Missing the required parameter 'media_id' when calling CatalogueApi.discard_media"
52
+ end
53
+ # verify the required parameter 'idempotency_key' is set
54
+ if @api_client.config.client_side_validation && idempotency_key.nil?
55
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling CatalogueApi.discard_media"
56
+ end
57
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
58
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling CatalogueApi.discard_media, the character length must be smaller than or equal to 255.'
59
+ end
60
+
61
+ # resource path
62
+ local_var_path = '/api/v1/projects/{id}/discards/{mediaId}'.sub('{id}', CGI.escape(id.to_s)).sub('{mediaId}', CGI.escape(media_id.to_s))
63
+
64
+ # query parameters
65
+ query_params = opts[:query_params] || {}
66
+
67
+ # header parameters
68
+ header_params = opts[:header_params] || {}
69
+ # HTTP header 'Accept' (if needed)
70
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
71
+ header_params[:'Idempotency-Key'] = idempotency_key
72
+
73
+ # form parameters
74
+ form_params = opts[:form_params] || {}
75
+
76
+ # http body (model)
77
+ post_body = opts[:debug_body]
78
+
79
+ # return_type
80
+ return_type = opts[:debug_return_type]
81
+
82
+ # auth_names
83
+ auth_names = opts[:debug_auth_names] || ['apiKey']
84
+
85
+ new_options = opts.merge(
86
+ :operation => :"CatalogueApi.discard_media",
87
+ :header_params => header_params,
88
+ :query_params => query_params,
89
+ :form_params => form_params,
90
+ :body => post_body,
91
+ :auth_names => auth_names,
92
+ :return_type => return_type
93
+ )
94
+
95
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
96
+ if @api_client.config.debugging
97
+ @api_client.config.logger.debug "API called: CatalogueApi#discard_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
98
+ end
99
+ return data, status_code, headers
100
+ end
101
+
102
+ # Add a media to the favourites of a project
103
+ # Marks a media as a favourite of one of your projects, as the heart on the web does. Adding a favourite again changes nothing. The media must be one the catalogue shows for the project: another media, including one of your own as a seller, is answered as not found.
104
+ # @param id [String] The project.
105
+ # @param media_id [String] The media.
106
+ # @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 (&#x60;!&#x60; to &#x60;~&#x60;); any other value answers 400 &#x60;invalid_idempotency_key&#x60;.
107
+ # @param [Hash] opts the optional parameters
108
+ # @return [nil]
109
+ def favourite_media(id, media_id, idempotency_key, opts = {})
110
+ favourite_media_with_http_info(id, media_id, idempotency_key, opts)
111
+ nil
112
+ end
113
+
114
+ # Add a media to the favourites of a project
115
+ # Marks a media as a favourite of one of your projects, as the heart on the web does. Adding a favourite again changes nothing. The media must be one the catalogue shows for the project: another media, including one of your own as a seller, is answered as not found.
116
+ # @param id [String] The project.
117
+ # @param media_id [String] The media.
118
+ # @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 (&#x60;!&#x60; to &#x60;~&#x60;); any other value answers 400 &#x60;invalid_idempotency_key&#x60;.
119
+ # @param [Hash] opts the optional parameters
120
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
121
+ def favourite_media_with_http_info(id, media_id, idempotency_key, opts = {})
122
+ if @api_client.config.debugging
123
+ @api_client.config.logger.debug 'Calling API: CatalogueApi.favourite_media ...'
124
+ end
125
+ # verify the required parameter 'id' is set
126
+ if @api_client.config.client_side_validation && id.nil?
127
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogueApi.favourite_media"
128
+ end
129
+ # verify the required parameter 'media_id' is set
130
+ if @api_client.config.client_side_validation && media_id.nil?
131
+ fail ArgumentError, "Missing the required parameter 'media_id' when calling CatalogueApi.favourite_media"
132
+ end
133
+ # verify the required parameter 'idempotency_key' is set
134
+ if @api_client.config.client_side_validation && idempotency_key.nil?
135
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling CatalogueApi.favourite_media"
136
+ end
137
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
138
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling CatalogueApi.favourite_media, the character length must be smaller than or equal to 255.'
139
+ end
140
+
141
+ # resource path
142
+ local_var_path = '/api/v1/projects/{id}/favourites/{mediaId}'.sub('{id}', CGI.escape(id.to_s)).sub('{mediaId}', CGI.escape(media_id.to_s))
143
+
144
+ # query parameters
145
+ query_params = opts[:query_params] || {}
146
+
147
+ # header parameters
148
+ header_params = opts[:header_params] || {}
149
+ # HTTP header 'Accept' (if needed)
150
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
151
+ header_params[:'Idempotency-Key'] = idempotency_key
152
+
153
+ # form parameters
154
+ form_params = opts[:form_params] || {}
155
+
156
+ # http body (model)
157
+ post_body = opts[:debug_body]
158
+
159
+ # return_type
160
+ return_type = opts[:debug_return_type]
161
+
162
+ # auth_names
163
+ auth_names = opts[:debug_auth_names] || ['apiKey']
164
+
165
+ new_options = opts.merge(
166
+ :operation => :"CatalogueApi.favourite_media",
167
+ :header_params => header_params,
168
+ :query_params => query_params,
169
+ :form_params => form_params,
170
+ :body => post_body,
171
+ :auth_names => auth_names,
172
+ :return_type => return_type
173
+ )
174
+
175
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
176
+ if @api_client.config.debugging
177
+ @api_client.config.logger.debug "API called: CatalogueApi#favourite_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
178
+ end
179
+ return data, status_code, headers
180
+ end
181
+
182
+ # Get a media
183
+ # One media of the catalogue: an active, public media. A media you have ordered is always readable, even if it has since left the catalogue, and is open to every account. Otherwise the catalogue is open to accounts with recent completed orders (see `catalogue.eligible` on GET /me), and the media counts towards the distinct medias the account may see per day (UTC). For the media's state in one of your projects, search the project with GET /projects/{id}/medias.
184
+ # @param id [String] The media.
185
+ # @param [Hash] opts the optional parameters
186
+ # @return [CatalogueMedia]
187
+ def get_catalogue_media(id, opts = {})
188
+ data, _status_code, _headers = get_catalogue_media_with_http_info(id, opts)
189
+ data
190
+ end
191
+
192
+ # Get a media
193
+ # One media of the catalogue: an active, public media. A media you have ordered is always readable, even if it has since left the catalogue, and is open to every account. Otherwise the catalogue is open to accounts with recent completed orders (see &#x60;catalogue.eligible&#x60; on GET /me), and the media counts towards the distinct medias the account may see per day (UTC). For the media&#39;s state in one of your projects, search the project with GET /projects/{id}/medias.
194
+ # @param id [String] The media.
195
+ # @param [Hash] opts the optional parameters
196
+ # @return [Array<(CatalogueMedia, Integer, Hash)>] CatalogueMedia data, response status code and response headers
197
+ def get_catalogue_media_with_http_info(id, opts = {})
198
+ if @api_client.config.debugging
199
+ @api_client.config.logger.debug 'Calling API: CatalogueApi.get_catalogue_media ...'
200
+ end
201
+ # verify the required parameter 'id' is set
202
+ if @api_client.config.client_side_validation && id.nil?
203
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogueApi.get_catalogue_media"
204
+ end
205
+ # resource path
206
+ local_var_path = '/api/v1/medias/{id}'.sub('{id}', CGI.escape(id.to_s))
207
+
208
+ # query parameters
209
+ query_params = opts[:query_params] || {}
210
+
211
+ # header parameters
212
+ header_params = opts[:header_params] || {}
213
+ # HTTP header 'Accept' (if needed)
214
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
215
+
216
+ # form parameters
217
+ form_params = opts[:form_params] || {}
218
+
219
+ # http body (model)
220
+ post_body = opts[:debug_body]
221
+
222
+ # return_type
223
+ return_type = opts[:debug_return_type] || 'CatalogueMedia'
224
+
225
+ # auth_names
226
+ auth_names = opts[:debug_auth_names] || ['apiKey']
227
+
228
+ new_options = opts.merge(
229
+ :operation => :"CatalogueApi.get_catalogue_media",
230
+ :header_params => header_params,
231
+ :query_params => query_params,
232
+ :form_params => form_params,
233
+ :body => post_body,
234
+ :auth_names => auth_names,
235
+ :return_type => return_type
236
+ )
237
+
238
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
239
+ if @api_client.config.debugging
240
+ @api_client.config.logger.debug "API called: CatalogueApi#get_catalogue_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
241
+ end
242
+ return data, status_code, headers
243
+ end
244
+
245
+ # List flash offers
246
+ # The medias on a flash offer, a time-limited discount, in the catalogue of one of your projects. It is GET /projects/{id}/medias with `flashOffer=true`, and takes the same parameters except `flashOffer` and `savedFilterId`. The catalogue access and the daily distinct-media limit of that operation apply.
247
+ # @param project_id [String] The project to search flash offers for.
248
+ # @param [Hash] opts the optional parameters
249
+ # @option opts [String] :source Which of the project&#39;s medias to search: &#x60;all&#x60; (the default), &#x60;recommended&#x60; (those Growwer recommends for the project), or those you marked &#x60;favourite&#x60;, &#x60;discarded&#x60; or &#x60;requested&#x60;, or &#x60;bought&#x60; for the project. Do not combine it with the parameter of the same state.
250
+ # @option opts [String] :sort The order. Without it, the web&#39;s default order: medias on the project&#39;s topic and language first, then best sellers and medias with more published orders. Ties are always broken by media id, so pages never overlap. &#x60;-growwerRank&#x60;: best match first; &#x60;postPrice&#x60;, &#x60;linkAdditionPrice&#x60;: cheapest first; &#x60;matchedAt&#x60;, &#x60;-matchedAt&#x60;: when Growwer matched the media with the project; &#x60;-traffic&#x60;, &#x60;-domainRating&#x60;, &#x60;-referringDomains&#x60;: highest first; &#x60;linkedToReferringRatio&#x60;: lowest first.
251
+ # @option opts [String] :domain Medias whose domain contains this text, 1 to 255 characters.
252
+ # @option opts [String] :website_type A comma-separated list of website types: &#x60;blog&#x60;, &#x60;press&#x60;.
253
+ # @option opts [String] :language A comma-separated list of language codes, as in GET /vocabulary.
254
+ # @option opts [String] :country A comma-separated list of country codes, as in GET /vocabulary.
255
+ # @option opts [String] :topics A comma-separated list of topic ids, as in GET /vocabulary: medias on any of them.
256
+ # @option opts [Boolean] :not_banned_topics Leave out medias that refuse the topic of the project. Only &#x60;true&#x60; applies it; omit it otherwise.
257
+ # @option opts [Integer] :min_traffic Minimum monthly organic traffic.
258
+ # @option opts [Integer] :max_traffic Maximum monthly organic traffic.
259
+ # @option opts [Boolean] :traffic_trend_upward Medias whose traffic is growing. Only &#x60;true&#x60; applies it; omit it otherwise.
260
+ # @option opts [Integer] :min_domain_rating Minimum domain rating, 0 to 100.
261
+ # @option opts [Integer] :max_domain_rating Maximum domain rating, 0 to 100.
262
+ # @option opts [Float] :min_linked_to_referring_ratio Minimum ratio of linked domains to referring domains, such as 0.5.
263
+ # @option opts [Float] :max_linked_to_referring_ratio Maximum ratio of linked domains to referring domains, such as 1.5.
264
+ # @option opts [Integer] :min_post_price Minimum post price, in cents.
265
+ # @option opts [Integer] :max_post_price Maximum post price, in cents.
266
+ # @option opts [String] :post_link_type A comma-separated list of link types the post offer gives: &#x60;dofollow&#x60;, &#x60;nofollow&#x60;, &#x60;citation&#x60;.
267
+ # @option opts [String] :promoted_social_network A comma-separated list of social networks the media promotes posts on: &#x60;twitter&#x60;, &#x60;instagram&#x60;, &#x60;facebook&#x60;, &#x60;pinterest&#x60;, &#x60;tumblr&#x60;, &#x60;newsletter&#x60;.
268
+ # @option opts [Boolean] :without_advertising_label Medias that never label posts as advertising. Only &#x60;true&#x60; applies it; omit it otherwise.
269
+ # @option opts [Boolean] :homepage_listing Medias that offer listing the post on their homepage. Only &#x60;true&#x60; applies it; omit it otherwise.
270
+ # @option opts [Boolean] :has_link_addition Medias that offer adding a link to an existing article. Only &#x60;true&#x60; applies it; omit it otherwise.
271
+ # @option opts [Integer] :min_link_addition_price Minimum link addition price, in cents.
272
+ # @option opts [Integer] :max_link_addition_price Maximum link addition price, in cents.
273
+ # @option opts [String] :link_addition_link_type A comma-separated list of link types the link addition offer gives: &#x60;dofollow&#x60;, &#x60;nofollow&#x60;, &#x60;citation&#x60;.
274
+ # @option opts [Boolean] :recommended &#x60;true&#x60;: only the medias Growwer recommends for the project; &#x60;false&#x60;: only the others.
275
+ # @option opts [Boolean] :favourite &#x60;true&#x60;: only your favourites for the project; &#x60;false&#x60;: leave them out.
276
+ # @option opts [Boolean] :requested &#x60;true&#x60;: only the medias you requested for the project; &#x60;false&#x60;: leave them out.
277
+ # @option opts [Boolean] :bought &#x60;true&#x60;: only medias you bought for the project; &#x60;false&#x60;: leave them out.
278
+ # @option opts [Boolean] :discarded &#x60;true&#x60;: only the medias you discarded for the project; &#x60;false&#x60;: leave them out.
279
+ # @option opts [Boolean] :new Medias Growwer matched with the project recently. Only &#x60;true&#x60; applies it; omit it otherwise.
280
+ # @option opts [String] :ranks_goal_keyword A comma-separated list of keyword origins: medias that rank for a keyword of the project from any of them. &#x60;user&#x60;: your keywords; &#x60;publicGenerated&#x60;: keywords Growwer found for the project.
281
+ # @option opts [String] :ranks_ai_keyword A comma-separated list of AI answer engines: medias cited for a keyword of the project by any of them. &#x60;googleAiOverview&#x60;, &#x60;chatgpt&#x60;, &#x60;googleAiMode&#x60;.
282
+ # @option opts [Integer] :limit Medias per page, 1 to 100. (default to 20)
283
+ # @option opts [Integer] :offset Medias to skip, at most 99900. (default to 0)
284
+ # @return [ListFlashOffers200Response]
285
+ def list_flash_offers(project_id, opts = {})
286
+ data, _status_code, _headers = list_flash_offers_with_http_info(project_id, opts)
287
+ data
288
+ end
289
+
290
+ # List flash offers
291
+ # The medias on a flash offer, a time-limited discount, in the catalogue of one of your projects. It is GET /projects/{id}/medias with &#x60;flashOffer&#x3D;true&#x60;, and takes the same parameters except &#x60;flashOffer&#x60; and &#x60;savedFilterId&#x60;. The catalogue access and the daily distinct-media limit of that operation apply.
292
+ # @param project_id [String] The project to search flash offers for.
293
+ # @param [Hash] opts the optional parameters
294
+ # @option opts [String] :source Which of the project&#39;s medias to search: &#x60;all&#x60; (the default), &#x60;recommended&#x60; (those Growwer recommends for the project), or those you marked &#x60;favourite&#x60;, &#x60;discarded&#x60; or &#x60;requested&#x60;, or &#x60;bought&#x60; for the project. Do not combine it with the parameter of the same state.
295
+ # @option opts [String] :sort The order. Without it, the web&#39;s default order: medias on the project&#39;s topic and language first, then best sellers and medias with more published orders. Ties are always broken by media id, so pages never overlap. &#x60;-growwerRank&#x60;: best match first; &#x60;postPrice&#x60;, &#x60;linkAdditionPrice&#x60;: cheapest first; &#x60;matchedAt&#x60;, &#x60;-matchedAt&#x60;: when Growwer matched the media with the project; &#x60;-traffic&#x60;, &#x60;-domainRating&#x60;, &#x60;-referringDomains&#x60;: highest first; &#x60;linkedToReferringRatio&#x60;: lowest first.
296
+ # @option opts [String] :domain Medias whose domain contains this text, 1 to 255 characters.
297
+ # @option opts [String] :website_type A comma-separated list of website types: &#x60;blog&#x60;, &#x60;press&#x60;.
298
+ # @option opts [String] :language A comma-separated list of language codes, as in GET /vocabulary.
299
+ # @option opts [String] :country A comma-separated list of country codes, as in GET /vocabulary.
300
+ # @option opts [String] :topics A comma-separated list of topic ids, as in GET /vocabulary: medias on any of them.
301
+ # @option opts [Boolean] :not_banned_topics Leave out medias that refuse the topic of the project. Only &#x60;true&#x60; applies it; omit it otherwise.
302
+ # @option opts [Integer] :min_traffic Minimum monthly organic traffic.
303
+ # @option opts [Integer] :max_traffic Maximum monthly organic traffic.
304
+ # @option opts [Boolean] :traffic_trend_upward Medias whose traffic is growing. Only &#x60;true&#x60; applies it; omit it otherwise.
305
+ # @option opts [Integer] :min_domain_rating Minimum domain rating, 0 to 100.
306
+ # @option opts [Integer] :max_domain_rating Maximum domain rating, 0 to 100.
307
+ # @option opts [Float] :min_linked_to_referring_ratio Minimum ratio of linked domains to referring domains, such as 0.5.
308
+ # @option opts [Float] :max_linked_to_referring_ratio Maximum ratio of linked domains to referring domains, such as 1.5.
309
+ # @option opts [Integer] :min_post_price Minimum post price, in cents.
310
+ # @option opts [Integer] :max_post_price Maximum post price, in cents.
311
+ # @option opts [String] :post_link_type A comma-separated list of link types the post offer gives: &#x60;dofollow&#x60;, &#x60;nofollow&#x60;, &#x60;citation&#x60;.
312
+ # @option opts [String] :promoted_social_network A comma-separated list of social networks the media promotes posts on: &#x60;twitter&#x60;, &#x60;instagram&#x60;, &#x60;facebook&#x60;, &#x60;pinterest&#x60;, &#x60;tumblr&#x60;, &#x60;newsletter&#x60;.
313
+ # @option opts [Boolean] :without_advertising_label Medias that never label posts as advertising. Only &#x60;true&#x60; applies it; omit it otherwise.
314
+ # @option opts [Boolean] :homepage_listing Medias that offer listing the post on their homepage. Only &#x60;true&#x60; applies it; omit it otherwise.
315
+ # @option opts [Boolean] :has_link_addition Medias that offer adding a link to an existing article. Only &#x60;true&#x60; applies it; omit it otherwise.
316
+ # @option opts [Integer] :min_link_addition_price Minimum link addition price, in cents.
317
+ # @option opts [Integer] :max_link_addition_price Maximum link addition price, in cents.
318
+ # @option opts [String] :link_addition_link_type A comma-separated list of link types the link addition offer gives: &#x60;dofollow&#x60;, &#x60;nofollow&#x60;, &#x60;citation&#x60;.
319
+ # @option opts [Boolean] :recommended &#x60;true&#x60;: only the medias Growwer recommends for the project; &#x60;false&#x60;: only the others.
320
+ # @option opts [Boolean] :favourite &#x60;true&#x60;: only your favourites for the project; &#x60;false&#x60;: leave them out.
321
+ # @option opts [Boolean] :requested &#x60;true&#x60;: only the medias you requested for the project; &#x60;false&#x60;: leave them out.
322
+ # @option opts [Boolean] :bought &#x60;true&#x60;: only medias you bought for the project; &#x60;false&#x60;: leave them out.
323
+ # @option opts [Boolean] :discarded &#x60;true&#x60;: only the medias you discarded for the project; &#x60;false&#x60;: leave them out.
324
+ # @option opts [Boolean] :new Medias Growwer matched with the project recently. Only &#x60;true&#x60; applies it; omit it otherwise.
325
+ # @option opts [String] :ranks_goal_keyword A comma-separated list of keyword origins: medias that rank for a keyword of the project from any of them. &#x60;user&#x60;: your keywords; &#x60;publicGenerated&#x60;: keywords Growwer found for the project.
326
+ # @option opts [String] :ranks_ai_keyword A comma-separated list of AI answer engines: medias cited for a keyword of the project by any of them. &#x60;googleAiOverview&#x60;, &#x60;chatgpt&#x60;, &#x60;googleAiMode&#x60;.
327
+ # @option opts [Integer] :limit Medias per page, 1 to 100. (default to 20)
328
+ # @option opts [Integer] :offset Medias to skip, at most 99900. (default to 0)
329
+ # @return [Array<(ListFlashOffers200Response, Integer, Hash)>] ListFlashOffers200Response data, response status code and response headers
330
+ def list_flash_offers_with_http_info(project_id, opts = {})
331
+ if @api_client.config.debugging
332
+ @api_client.config.logger.debug 'Calling API: CatalogueApi.list_flash_offers ...'
333
+ end
334
+ # verify the required parameter 'project_id' is set
335
+ if @api_client.config.client_side_validation && project_id.nil?
336
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling CatalogueApi.list_flash_offers"
337
+ end
338
+ allowable_values = ["all", "recommended", "favourite", "discarded", "requested", "bought"]
339
+ if @api_client.config.client_side_validation && opts[:'source'] && !allowable_values.include?(opts[:'source'])
340
+ fail ArgumentError, "invalid value for \"source\", must be one of #{allowable_values}"
341
+ end
342
+ allowable_values = ["-growwerRank", "postPrice", "linkAdditionPrice", "matchedAt", "-matchedAt", "-traffic", "-domainRating", "linkedToReferringRatio", "-referringDomains"]
343
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
344
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
345
+ end
346
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
347
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CatalogueApi.list_flash_offers, must be smaller than or equal to 100.'
348
+ end
349
+
350
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
351
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CatalogueApi.list_flash_offers, must be greater than or equal to 1.'
352
+ end
353
+
354
+ if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] > 99900
355
+ fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling CatalogueApi.list_flash_offers, must be smaller than or equal to 99900.'
356
+ end
357
+
358
+ if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
359
+ fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling CatalogueApi.list_flash_offers, must be greater than or equal to 0.'
360
+ end
361
+
362
+ # resource path
363
+ local_var_path = '/api/v1/flash-offers'
364
+
365
+ # query parameters
366
+ query_params = opts[:query_params] || {}
367
+ query_params[:'projectId'] = project_id
368
+ query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil?
369
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
370
+ query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
371
+ query_params[:'websiteType'] = opts[:'website_type'] if !opts[:'website_type'].nil?
372
+ query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
373
+ query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil?
374
+ query_params[:'topics'] = opts[:'topics'] if !opts[:'topics'].nil?
375
+ query_params[:'notBannedTopics'] = opts[:'not_banned_topics'] if !opts[:'not_banned_topics'].nil?
376
+ query_params[:'minTraffic'] = opts[:'min_traffic'] if !opts[:'min_traffic'].nil?
377
+ query_params[:'maxTraffic'] = opts[:'max_traffic'] if !opts[:'max_traffic'].nil?
378
+ query_params[:'trafficTrendUpward'] = opts[:'traffic_trend_upward'] if !opts[:'traffic_trend_upward'].nil?
379
+ query_params[:'minDomainRating'] = opts[:'min_domain_rating'] if !opts[:'min_domain_rating'].nil?
380
+ query_params[:'maxDomainRating'] = opts[:'max_domain_rating'] if !opts[:'max_domain_rating'].nil?
381
+ query_params[:'minLinkedToReferringRatio'] = opts[:'min_linked_to_referring_ratio'] if !opts[:'min_linked_to_referring_ratio'].nil?
382
+ query_params[:'maxLinkedToReferringRatio'] = opts[:'max_linked_to_referring_ratio'] if !opts[:'max_linked_to_referring_ratio'].nil?
383
+ query_params[:'minPostPrice'] = opts[:'min_post_price'] if !opts[:'min_post_price'].nil?
384
+ query_params[:'maxPostPrice'] = opts[:'max_post_price'] if !opts[:'max_post_price'].nil?
385
+ query_params[:'postLinkType'] = opts[:'post_link_type'] if !opts[:'post_link_type'].nil?
386
+ query_params[:'promotedSocialNetwork'] = opts[:'promoted_social_network'] if !opts[:'promoted_social_network'].nil?
387
+ query_params[:'withoutAdvertisingLabel'] = opts[:'without_advertising_label'] if !opts[:'without_advertising_label'].nil?
388
+ query_params[:'homepageListing'] = opts[:'homepage_listing'] if !opts[:'homepage_listing'].nil?
389
+ query_params[:'hasLinkAddition'] = opts[:'has_link_addition'] if !opts[:'has_link_addition'].nil?
390
+ query_params[:'minLinkAdditionPrice'] = opts[:'min_link_addition_price'] if !opts[:'min_link_addition_price'].nil?
391
+ query_params[:'maxLinkAdditionPrice'] = opts[:'max_link_addition_price'] if !opts[:'max_link_addition_price'].nil?
392
+ query_params[:'linkAdditionLinkType'] = opts[:'link_addition_link_type'] if !opts[:'link_addition_link_type'].nil?
393
+ query_params[:'recommended'] = opts[:'recommended'] if !opts[:'recommended'].nil?
394
+ query_params[:'favourite'] = opts[:'favourite'] if !opts[:'favourite'].nil?
395
+ query_params[:'requested'] = opts[:'requested'] if !opts[:'requested'].nil?
396
+ query_params[:'bought'] = opts[:'bought'] if !opts[:'bought'].nil?
397
+ query_params[:'discarded'] = opts[:'discarded'] if !opts[:'discarded'].nil?
398
+ query_params[:'new'] = opts[:'new'] if !opts[:'new'].nil?
399
+ query_params[:'ranksGoalKeyword'] = opts[:'ranks_goal_keyword'] if !opts[:'ranks_goal_keyword'].nil?
400
+ query_params[:'ranksAiKeyword'] = opts[:'ranks_ai_keyword'] if !opts[:'ranks_ai_keyword'].nil?
401
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
402
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
403
+
404
+ # header parameters
405
+ header_params = opts[:header_params] || {}
406
+ # HTTP header 'Accept' (if needed)
407
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
408
+
409
+ # form parameters
410
+ form_params = opts[:form_params] || {}
411
+
412
+ # http body (model)
413
+ post_body = opts[:debug_body]
414
+
415
+ # return_type
416
+ return_type = opts[:debug_return_type] || 'ListFlashOffers200Response'
417
+
418
+ # auth_names
419
+ auth_names = opts[:debug_auth_names] || ['apiKey']
420
+
421
+ new_options = opts.merge(
422
+ :operation => :"CatalogueApi.list_flash_offers",
423
+ :header_params => header_params,
424
+ :query_params => query_params,
425
+ :form_params => form_params,
426
+ :body => post_body,
427
+ :auth_names => auth_names,
428
+ :return_type => return_type
429
+ )
430
+
431
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
432
+ if @api_client.config.debugging
433
+ @api_client.config.logger.debug "API called: CatalogueApi#list_flash_offers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
434
+ end
435
+ return data, status_code, headers
436
+ end
437
+
438
+ # Request specific medias for a project
439
+ # Asks Growwer to find the medias of these domains for one of your projects, as the \"request specific domains\" form on the web does. Each entry may be a domain or a URL; it is read as its full domain, lowercased. Repeated domains are requested once, and a domain already requested changes nothing. Up to 200 distinct domains per call. They then appear in the project's catalogue with `project.requested` true (`requested=true` on GET /projects/{id}/medias) once Growwer lists them.
440
+ # @param id [String] The project.
441
+ # @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 (&#x60;!&#x60; to &#x60;~&#x60;); any other value answers 400 &#x60;invalid_idempotency_key&#x60;.
442
+ # @param request_medias_request [RequestMediasRequest]
443
+ # @param [Hash] opts the optional parameters
444
+ # @return [RequestMedias201Response]
445
+ def request_medias(id, idempotency_key, request_medias_request, opts = {})
446
+ data, _status_code, _headers = request_medias_with_http_info(id, idempotency_key, request_medias_request, opts)
447
+ data
448
+ end
449
+
450
+ # Request specific medias for a project
451
+ # Asks Growwer to find the medias of these domains for one of your projects, as the \&quot;request specific domains\&quot; form on the web does. Each entry may be a domain or a URL; it is read as its full domain, lowercased. Repeated domains are requested once, and a domain already requested changes nothing. Up to 200 distinct domains per call. They then appear in the project&#39;s catalogue with &#x60;project.requested&#x60; true (&#x60;requested&#x3D;true&#x60; on GET /projects/{id}/medias) once Growwer lists them.
452
+ # @param id [String] The project.
453
+ # @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 (&#x60;!&#x60; to &#x60;~&#x60;); any other value answers 400 &#x60;invalid_idempotency_key&#x60;.
454
+ # @param request_medias_request [RequestMediasRequest]
455
+ # @param [Hash] opts the optional parameters
456
+ # @return [Array<(RequestMedias201Response, Integer, Hash)>] RequestMedias201Response data, response status code and response headers
457
+ def request_medias_with_http_info(id, idempotency_key, request_medias_request, opts = {})
458
+ if @api_client.config.debugging
459
+ @api_client.config.logger.debug 'Calling API: CatalogueApi.request_medias ...'
460
+ end
461
+ # verify the required parameter 'id' is set
462
+ if @api_client.config.client_side_validation && id.nil?
463
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogueApi.request_medias"
464
+ end
465
+ # verify the required parameter 'idempotency_key' is set
466
+ if @api_client.config.client_side_validation && idempotency_key.nil?
467
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling CatalogueApi.request_medias"
468
+ end
469
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
470
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling CatalogueApi.request_medias, the character length must be smaller than or equal to 255.'
471
+ end
472
+
473
+ # verify the required parameter 'request_medias_request' is set
474
+ if @api_client.config.client_side_validation && request_medias_request.nil?
475
+ fail ArgumentError, "Missing the required parameter 'request_medias_request' when calling CatalogueApi.request_medias"
476
+ end
477
+ # resource path
478
+ local_var_path = '/api/v1/projects/{id}/media-requests'.sub('{id}', CGI.escape(id.to_s))
479
+
480
+ # query parameters
481
+ query_params = opts[:query_params] || {}
482
+
483
+ # header parameters
484
+ header_params = opts[:header_params] || {}
485
+ # HTTP header 'Accept' (if needed)
486
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
487
+ # HTTP header 'Content-Type'
488
+ content_type = @api_client.select_header_content_type(['application/json'])
489
+ if !content_type.nil?
490
+ header_params['Content-Type'] = content_type
491
+ end
492
+ header_params[:'Idempotency-Key'] = idempotency_key
493
+
494
+ # form parameters
495
+ form_params = opts[:form_params] || {}
496
+
497
+ # http body (model)
498
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(request_medias_request)
499
+
500
+ # return_type
501
+ return_type = opts[:debug_return_type] || 'RequestMedias201Response'
502
+
503
+ # auth_names
504
+ auth_names = opts[:debug_auth_names] || ['apiKey']
505
+
506
+ new_options = opts.merge(
507
+ :operation => :"CatalogueApi.request_medias",
508
+ :header_params => header_params,
509
+ :query_params => query_params,
510
+ :form_params => form_params,
511
+ :body => post_body,
512
+ :auth_names => auth_names,
513
+ :return_type => return_type
514
+ )
515
+
516
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
517
+ if @api_client.config.debugging
518
+ @api_client.config.logger.debug "API called: CatalogueApi#request_medias\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
519
+ end
520
+ return data, status_code, headers
521
+ end
522
+
523
+ # Search the catalogue for a project
524
+ # The medias the catalogue offers for one of your projects, as the web lists them, with each media's state in the project. Filter with the parameters below, which all combine, or apply one of your saved filters with `savedFilterId` alone. The catalogue is open to accounts with recent completed orders (see `catalogue.eligible` on GET /me), and each account can see a limited number of distinct medias per day (UTC) across the catalogue operations; medias seen again the same day are free.
525
+ # @param id [String] The project.
526
+ # @param [Hash] opts the optional parameters
527
+ # @option opts [String] :source Which of the project&#39;s medias to search: &#x60;all&#x60; (the default), &#x60;recommended&#x60; (those Growwer recommends for the project), or those you marked &#x60;favourite&#x60;, &#x60;discarded&#x60; or &#x60;requested&#x60;, or &#x60;bought&#x60; for the project. Do not combine it with the parameter of the same state.
528
+ # @option opts [String] :sort The order. Without it, the web&#39;s default order: medias on the project&#39;s topic and language first, then best sellers and medias with more published orders. Ties are always broken by media id, so pages never overlap. &#x60;-growwerRank&#x60;: best match first; &#x60;postPrice&#x60;, &#x60;linkAdditionPrice&#x60;: cheapest first; &#x60;matchedAt&#x60;, &#x60;-matchedAt&#x60;: when Growwer matched the media with the project; &#x60;-traffic&#x60;, &#x60;-domainRating&#x60;, &#x60;-referringDomains&#x60;: highest first; &#x60;linkedToReferringRatio&#x60;: lowest first.
529
+ # @option opts [String] :saved_filter_id Apply one of your saved filters of this project, including one saved on the web, instead of the other parameters. Do not combine it with any filter, &#x60;source&#x60; or &#x60;sort&#x60;. A filter saved on the web that uses a filter the API does not support is refused with 422 &#x60;saved_filter_unsupported&#x60;.
530
+ # @option opts [String] :domain Medias whose domain contains this text, 1 to 255 characters.
531
+ # @option opts [String] :website_type A comma-separated list of website types: &#x60;blog&#x60;, &#x60;press&#x60;.
532
+ # @option opts [String] :language A comma-separated list of language codes, as in GET /vocabulary.
533
+ # @option opts [String] :country A comma-separated list of country codes, as in GET /vocabulary.
534
+ # @option opts [String] :topics A comma-separated list of topic ids, as in GET /vocabulary: medias on any of them.
535
+ # @option opts [Boolean] :not_banned_topics Leave out medias that refuse the topic of the project. Only &#x60;true&#x60; applies it; omit it otherwise.
536
+ # @option opts [Integer] :min_traffic Minimum monthly organic traffic.
537
+ # @option opts [Integer] :max_traffic Maximum monthly organic traffic.
538
+ # @option opts [Boolean] :traffic_trend_upward Medias whose traffic is growing. Only &#x60;true&#x60; applies it; omit it otherwise.
539
+ # @option opts [Integer] :min_domain_rating Minimum domain rating, 0 to 100.
540
+ # @option opts [Integer] :max_domain_rating Maximum domain rating, 0 to 100.
541
+ # @option opts [Float] :min_linked_to_referring_ratio Minimum ratio of linked domains to referring domains, such as 0.5.
542
+ # @option opts [Float] :max_linked_to_referring_ratio Maximum ratio of linked domains to referring domains, such as 1.5.
543
+ # @option opts [Integer] :min_post_price Minimum post price, in cents.
544
+ # @option opts [Integer] :max_post_price Maximum post price, in cents.
545
+ # @option opts [String] :post_link_type A comma-separated list of link types the post offer gives: &#x60;dofollow&#x60;, &#x60;nofollow&#x60;, &#x60;citation&#x60;.
546
+ # @option opts [String] :promoted_social_network A comma-separated list of social networks the media promotes posts on: &#x60;twitter&#x60;, &#x60;instagram&#x60;, &#x60;facebook&#x60;, &#x60;pinterest&#x60;, &#x60;tumblr&#x60;, &#x60;newsletter&#x60;.
547
+ # @option opts [Boolean] :without_advertising_label Medias that never label posts as advertising. Only &#x60;true&#x60; applies it; omit it otherwise.
548
+ # @option opts [Boolean] :homepage_listing Medias that offer listing the post on their homepage. Only &#x60;true&#x60; applies it; omit it otherwise.
549
+ # @option opts [Boolean] :has_link_addition Medias that offer adding a link to an existing article. Only &#x60;true&#x60; applies it; omit it otherwise.
550
+ # @option opts [Integer] :min_link_addition_price Minimum link addition price, in cents.
551
+ # @option opts [Integer] :max_link_addition_price Maximum link addition price, in cents.
552
+ # @option opts [String] :link_addition_link_type A comma-separated list of link types the link addition offer gives: &#x60;dofollow&#x60;, &#x60;nofollow&#x60;, &#x60;citation&#x60;.
553
+ # @option opts [Boolean] :recommended &#x60;true&#x60;: only the medias Growwer recommends for the project; &#x60;false&#x60;: only the others.
554
+ # @option opts [Boolean] :favourite &#x60;true&#x60;: only your favourites for the project; &#x60;false&#x60;: leave them out.
555
+ # @option opts [Boolean] :requested &#x60;true&#x60;: only the medias you requested for the project; &#x60;false&#x60;: leave them out.
556
+ # @option opts [Boolean] :flash_offer &#x60;true&#x60;: only medias with a flash offer running; &#x60;false&#x60;: leave them out.
557
+ # @option opts [Boolean] :bought &#x60;true&#x60;: only medias you bought for the project; &#x60;false&#x60;: leave them out.
558
+ # @option opts [Boolean] :discarded &#x60;true&#x60;: only the medias you discarded for the project; &#x60;false&#x60;: leave them out.
559
+ # @option opts [Boolean] :new Medias Growwer matched with the project recently. Only &#x60;true&#x60; applies it; omit it otherwise.
560
+ # @option opts [String] :ranks_goal_keyword A comma-separated list of keyword origins: medias that rank for a keyword of the project from any of them. &#x60;user&#x60;: your keywords; &#x60;publicGenerated&#x60;: keywords Growwer found for the project.
561
+ # @option opts [String] :ranks_ai_keyword A comma-separated list of AI answer engines: medias cited for a keyword of the project by any of them. &#x60;googleAiOverview&#x60;, &#x60;chatgpt&#x60;, &#x60;googleAiMode&#x60;.
562
+ # @option opts [Integer] :limit Medias per page, 1 to 100. (default to 20)
563
+ # @option opts [Integer] :offset Medias to skip, at most 99900. (default to 0)
564
+ # @return [ListFlashOffers200Response]
565
+ def search_project_medias(id, opts = {})
566
+ data, _status_code, _headers = search_project_medias_with_http_info(id, opts)
567
+ data
568
+ end
569
+
570
+ # Search the catalogue for a project
571
+ # The medias the catalogue offers for one of your projects, as the web lists them, with each media&#39;s state in the project. Filter with the parameters below, which all combine, or apply one of your saved filters with &#x60;savedFilterId&#x60; alone. The catalogue is open to accounts with recent completed orders (see &#x60;catalogue.eligible&#x60; on GET /me), and each account can see a limited number of distinct medias per day (UTC) across the catalogue operations; medias seen again the same day are free.
572
+ # @param id [String] The project.
573
+ # @param [Hash] opts the optional parameters
574
+ # @option opts [String] :source Which of the project&#39;s medias to search: &#x60;all&#x60; (the default), &#x60;recommended&#x60; (those Growwer recommends for the project), or those you marked &#x60;favourite&#x60;, &#x60;discarded&#x60; or &#x60;requested&#x60;, or &#x60;bought&#x60; for the project. Do not combine it with the parameter of the same state.
575
+ # @option opts [String] :sort The order. Without it, the web&#39;s default order: medias on the project&#39;s topic and language first, then best sellers and medias with more published orders. Ties are always broken by media id, so pages never overlap. &#x60;-growwerRank&#x60;: best match first; &#x60;postPrice&#x60;, &#x60;linkAdditionPrice&#x60;: cheapest first; &#x60;matchedAt&#x60;, &#x60;-matchedAt&#x60;: when Growwer matched the media with the project; &#x60;-traffic&#x60;, &#x60;-domainRating&#x60;, &#x60;-referringDomains&#x60;: highest first; &#x60;linkedToReferringRatio&#x60;: lowest first.
576
+ # @option opts [String] :saved_filter_id Apply one of your saved filters of this project, including one saved on the web, instead of the other parameters. Do not combine it with any filter, &#x60;source&#x60; or &#x60;sort&#x60;. A filter saved on the web that uses a filter the API does not support is refused with 422 &#x60;saved_filter_unsupported&#x60;.
577
+ # @option opts [String] :domain Medias whose domain contains this text, 1 to 255 characters.
578
+ # @option opts [String] :website_type A comma-separated list of website types: &#x60;blog&#x60;, &#x60;press&#x60;.
579
+ # @option opts [String] :language A comma-separated list of language codes, as in GET /vocabulary.
580
+ # @option opts [String] :country A comma-separated list of country codes, as in GET /vocabulary.
581
+ # @option opts [String] :topics A comma-separated list of topic ids, as in GET /vocabulary: medias on any of them.
582
+ # @option opts [Boolean] :not_banned_topics Leave out medias that refuse the topic of the project. Only &#x60;true&#x60; applies it; omit it otherwise.
583
+ # @option opts [Integer] :min_traffic Minimum monthly organic traffic.
584
+ # @option opts [Integer] :max_traffic Maximum monthly organic traffic.
585
+ # @option opts [Boolean] :traffic_trend_upward Medias whose traffic is growing. Only &#x60;true&#x60; applies it; omit it otherwise.
586
+ # @option opts [Integer] :min_domain_rating Minimum domain rating, 0 to 100.
587
+ # @option opts [Integer] :max_domain_rating Maximum domain rating, 0 to 100.
588
+ # @option opts [Float] :min_linked_to_referring_ratio Minimum ratio of linked domains to referring domains, such as 0.5.
589
+ # @option opts [Float] :max_linked_to_referring_ratio Maximum ratio of linked domains to referring domains, such as 1.5.
590
+ # @option opts [Integer] :min_post_price Minimum post price, in cents.
591
+ # @option opts [Integer] :max_post_price Maximum post price, in cents.
592
+ # @option opts [String] :post_link_type A comma-separated list of link types the post offer gives: &#x60;dofollow&#x60;, &#x60;nofollow&#x60;, &#x60;citation&#x60;.
593
+ # @option opts [String] :promoted_social_network A comma-separated list of social networks the media promotes posts on: &#x60;twitter&#x60;, &#x60;instagram&#x60;, &#x60;facebook&#x60;, &#x60;pinterest&#x60;, &#x60;tumblr&#x60;, &#x60;newsletter&#x60;.
594
+ # @option opts [Boolean] :without_advertising_label Medias that never label posts as advertising. Only &#x60;true&#x60; applies it; omit it otherwise.
595
+ # @option opts [Boolean] :homepage_listing Medias that offer listing the post on their homepage. Only &#x60;true&#x60; applies it; omit it otherwise.
596
+ # @option opts [Boolean] :has_link_addition Medias that offer adding a link to an existing article. Only &#x60;true&#x60; applies it; omit it otherwise.
597
+ # @option opts [Integer] :min_link_addition_price Minimum link addition price, in cents.
598
+ # @option opts [Integer] :max_link_addition_price Maximum link addition price, in cents.
599
+ # @option opts [String] :link_addition_link_type A comma-separated list of link types the link addition offer gives: &#x60;dofollow&#x60;, &#x60;nofollow&#x60;, &#x60;citation&#x60;.
600
+ # @option opts [Boolean] :recommended &#x60;true&#x60;: only the medias Growwer recommends for the project; &#x60;false&#x60;: only the others.
601
+ # @option opts [Boolean] :favourite &#x60;true&#x60;: only your favourites for the project; &#x60;false&#x60;: leave them out.
602
+ # @option opts [Boolean] :requested &#x60;true&#x60;: only the medias you requested for the project; &#x60;false&#x60;: leave them out.
603
+ # @option opts [Boolean] :flash_offer &#x60;true&#x60;: only medias with a flash offer running; &#x60;false&#x60;: leave them out.
604
+ # @option opts [Boolean] :bought &#x60;true&#x60;: only medias you bought for the project; &#x60;false&#x60;: leave them out.
605
+ # @option opts [Boolean] :discarded &#x60;true&#x60;: only the medias you discarded for the project; &#x60;false&#x60;: leave them out.
606
+ # @option opts [Boolean] :new Medias Growwer matched with the project recently. Only &#x60;true&#x60; applies it; omit it otherwise.
607
+ # @option opts [String] :ranks_goal_keyword A comma-separated list of keyword origins: medias that rank for a keyword of the project from any of them. &#x60;user&#x60;: your keywords; &#x60;publicGenerated&#x60;: keywords Growwer found for the project.
608
+ # @option opts [String] :ranks_ai_keyword A comma-separated list of AI answer engines: medias cited for a keyword of the project by any of them. &#x60;googleAiOverview&#x60;, &#x60;chatgpt&#x60;, &#x60;googleAiMode&#x60;.
609
+ # @option opts [Integer] :limit Medias per page, 1 to 100. (default to 20)
610
+ # @option opts [Integer] :offset Medias to skip, at most 99900. (default to 0)
611
+ # @return [Array<(ListFlashOffers200Response, Integer, Hash)>] ListFlashOffers200Response data, response status code and response headers
612
+ def search_project_medias_with_http_info(id, opts = {})
613
+ if @api_client.config.debugging
614
+ @api_client.config.logger.debug 'Calling API: CatalogueApi.search_project_medias ...'
615
+ end
616
+ # verify the required parameter 'id' is set
617
+ if @api_client.config.client_side_validation && id.nil?
618
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogueApi.search_project_medias"
619
+ end
620
+ allowable_values = ["all", "recommended", "favourite", "discarded", "requested", "bought"]
621
+ if @api_client.config.client_side_validation && opts[:'source'] && !allowable_values.include?(opts[:'source'])
622
+ fail ArgumentError, "invalid value for \"source\", must be one of #{allowable_values}"
623
+ end
624
+ allowable_values = ["-growwerRank", "postPrice", "linkAdditionPrice", "matchedAt", "-matchedAt", "-traffic", "-domainRating", "linkedToReferringRatio", "-referringDomains"]
625
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
626
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
627
+ end
628
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
629
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CatalogueApi.search_project_medias, must be smaller than or equal to 100.'
630
+ end
631
+
632
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
633
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CatalogueApi.search_project_medias, must be greater than or equal to 1.'
634
+ end
635
+
636
+ if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] > 99900
637
+ fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling CatalogueApi.search_project_medias, must be smaller than or equal to 99900.'
638
+ end
639
+
640
+ if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
641
+ fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling CatalogueApi.search_project_medias, must be greater than or equal to 0.'
642
+ end
643
+
644
+ # resource path
645
+ local_var_path = '/api/v1/projects/{id}/medias'.sub('{id}', CGI.escape(id.to_s))
646
+
647
+ # query parameters
648
+ query_params = opts[:query_params] || {}
649
+ query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil?
650
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
651
+ query_params[:'savedFilterId'] = opts[:'saved_filter_id'] if !opts[:'saved_filter_id'].nil?
652
+ query_params[:'domain'] = opts[:'domain'] if !opts[:'domain'].nil?
653
+ query_params[:'websiteType'] = opts[:'website_type'] if !opts[:'website_type'].nil?
654
+ query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
655
+ query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil?
656
+ query_params[:'topics'] = opts[:'topics'] if !opts[:'topics'].nil?
657
+ query_params[:'notBannedTopics'] = opts[:'not_banned_topics'] if !opts[:'not_banned_topics'].nil?
658
+ query_params[:'minTraffic'] = opts[:'min_traffic'] if !opts[:'min_traffic'].nil?
659
+ query_params[:'maxTraffic'] = opts[:'max_traffic'] if !opts[:'max_traffic'].nil?
660
+ query_params[:'trafficTrendUpward'] = opts[:'traffic_trend_upward'] if !opts[:'traffic_trend_upward'].nil?
661
+ query_params[:'minDomainRating'] = opts[:'min_domain_rating'] if !opts[:'min_domain_rating'].nil?
662
+ query_params[:'maxDomainRating'] = opts[:'max_domain_rating'] if !opts[:'max_domain_rating'].nil?
663
+ query_params[:'minLinkedToReferringRatio'] = opts[:'min_linked_to_referring_ratio'] if !opts[:'min_linked_to_referring_ratio'].nil?
664
+ query_params[:'maxLinkedToReferringRatio'] = opts[:'max_linked_to_referring_ratio'] if !opts[:'max_linked_to_referring_ratio'].nil?
665
+ query_params[:'minPostPrice'] = opts[:'min_post_price'] if !opts[:'min_post_price'].nil?
666
+ query_params[:'maxPostPrice'] = opts[:'max_post_price'] if !opts[:'max_post_price'].nil?
667
+ query_params[:'postLinkType'] = opts[:'post_link_type'] if !opts[:'post_link_type'].nil?
668
+ query_params[:'promotedSocialNetwork'] = opts[:'promoted_social_network'] if !opts[:'promoted_social_network'].nil?
669
+ query_params[:'withoutAdvertisingLabel'] = opts[:'without_advertising_label'] if !opts[:'without_advertising_label'].nil?
670
+ query_params[:'homepageListing'] = opts[:'homepage_listing'] if !opts[:'homepage_listing'].nil?
671
+ query_params[:'hasLinkAddition'] = opts[:'has_link_addition'] if !opts[:'has_link_addition'].nil?
672
+ query_params[:'minLinkAdditionPrice'] = opts[:'min_link_addition_price'] if !opts[:'min_link_addition_price'].nil?
673
+ query_params[:'maxLinkAdditionPrice'] = opts[:'max_link_addition_price'] if !opts[:'max_link_addition_price'].nil?
674
+ query_params[:'linkAdditionLinkType'] = opts[:'link_addition_link_type'] if !opts[:'link_addition_link_type'].nil?
675
+ query_params[:'recommended'] = opts[:'recommended'] if !opts[:'recommended'].nil?
676
+ query_params[:'favourite'] = opts[:'favourite'] if !opts[:'favourite'].nil?
677
+ query_params[:'requested'] = opts[:'requested'] if !opts[:'requested'].nil?
678
+ query_params[:'flashOffer'] = opts[:'flash_offer'] if !opts[:'flash_offer'].nil?
679
+ query_params[:'bought'] = opts[:'bought'] if !opts[:'bought'].nil?
680
+ query_params[:'discarded'] = opts[:'discarded'] if !opts[:'discarded'].nil?
681
+ query_params[:'new'] = opts[:'new'] if !opts[:'new'].nil?
682
+ query_params[:'ranksGoalKeyword'] = opts[:'ranks_goal_keyword'] if !opts[:'ranks_goal_keyword'].nil?
683
+ query_params[:'ranksAiKeyword'] = opts[:'ranks_ai_keyword'] if !opts[:'ranks_ai_keyword'].nil?
684
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
685
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
686
+
687
+ # header parameters
688
+ header_params = opts[:header_params] || {}
689
+ # HTTP header 'Accept' (if needed)
690
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
691
+
692
+ # form parameters
693
+ form_params = opts[:form_params] || {}
694
+
695
+ # http body (model)
696
+ post_body = opts[:debug_body]
697
+
698
+ # return_type
699
+ return_type = opts[:debug_return_type] || 'ListFlashOffers200Response'
700
+
701
+ # auth_names
702
+ auth_names = opts[:debug_auth_names] || ['apiKey']
703
+
704
+ new_options = opts.merge(
705
+ :operation => :"CatalogueApi.search_project_medias",
706
+ :header_params => header_params,
707
+ :query_params => query_params,
708
+ :form_params => form_params,
709
+ :body => post_body,
710
+ :auth_names => auth_names,
711
+ :return_type => return_type
712
+ )
713
+
714
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
715
+ if @api_client.config.debugging
716
+ @api_client.config.logger.debug "API called: CatalogueApi#search_project_medias\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
717
+ end
718
+ return data, status_code, headers
719
+ end
720
+
721
+ # Restore a discarded media for a project
722
+ # Restores a media you discarded for one of your projects. Restoring one that is not discarded changes nothing. It works for any media, even one the catalogue no longer shows.
723
+ # @param id [String] The project.
724
+ # @param media_id [String] The media.
725
+ # @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 (&#x60;!&#x60; to &#x60;~&#x60;); any other value answers 400 &#x60;invalid_idempotency_key&#x60;.
726
+ # @param [Hash] opts the optional parameters
727
+ # @return [nil]
728
+ def undiscard_media(id, media_id, idempotency_key, opts = {})
729
+ undiscard_media_with_http_info(id, media_id, idempotency_key, opts)
730
+ nil
731
+ end
732
+
733
+ # Restore a discarded media for a project
734
+ # Restores a media you discarded for one of your projects. Restoring one that is not discarded changes nothing. It works for any media, even one the catalogue no longer shows.
735
+ # @param id [String] The project.
736
+ # @param media_id [String] The media.
737
+ # @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 (&#x60;!&#x60; to &#x60;~&#x60;); any other value answers 400 &#x60;invalid_idempotency_key&#x60;.
738
+ # @param [Hash] opts the optional parameters
739
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
740
+ def undiscard_media_with_http_info(id, media_id, idempotency_key, opts = {})
741
+ if @api_client.config.debugging
742
+ @api_client.config.logger.debug 'Calling API: CatalogueApi.undiscard_media ...'
743
+ end
744
+ # verify the required parameter 'id' is set
745
+ if @api_client.config.client_side_validation && id.nil?
746
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogueApi.undiscard_media"
747
+ end
748
+ # verify the required parameter 'media_id' is set
749
+ if @api_client.config.client_side_validation && media_id.nil?
750
+ fail ArgumentError, "Missing the required parameter 'media_id' when calling CatalogueApi.undiscard_media"
751
+ end
752
+ # verify the required parameter 'idempotency_key' is set
753
+ if @api_client.config.client_side_validation && idempotency_key.nil?
754
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling CatalogueApi.undiscard_media"
755
+ end
756
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
757
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling CatalogueApi.undiscard_media, the character length must be smaller than or equal to 255.'
758
+ end
759
+
760
+ # resource path
761
+ local_var_path = '/api/v1/projects/{id}/discards/{mediaId}'.sub('{id}', CGI.escape(id.to_s)).sub('{mediaId}', CGI.escape(media_id.to_s))
762
+
763
+ # query parameters
764
+ query_params = opts[:query_params] || {}
765
+
766
+ # header parameters
767
+ header_params = opts[:header_params] || {}
768
+ # HTTP header 'Accept' (if needed)
769
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
770
+ header_params[:'Idempotency-Key'] = idempotency_key
771
+
772
+ # form parameters
773
+ form_params = opts[:form_params] || {}
774
+
775
+ # http body (model)
776
+ post_body = opts[:debug_body]
777
+
778
+ # return_type
779
+ return_type = opts[:debug_return_type]
780
+
781
+ # auth_names
782
+ auth_names = opts[:debug_auth_names] || ['apiKey']
783
+
784
+ new_options = opts.merge(
785
+ :operation => :"CatalogueApi.undiscard_media",
786
+ :header_params => header_params,
787
+ :query_params => query_params,
788
+ :form_params => form_params,
789
+ :body => post_body,
790
+ :auth_names => auth_names,
791
+ :return_type => return_type
792
+ )
793
+
794
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
795
+ if @api_client.config.debugging
796
+ @api_client.config.logger.debug "API called: CatalogueApi#undiscard_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
797
+ end
798
+ return data, status_code, headers
799
+ end
800
+
801
+ # Remove a media from the favourites of a project
802
+ # Removes a media from the favourites of one of your projects. Removing one that is not a favourite changes nothing. It works for any media, even one the catalogue no longer shows.
803
+ # @param id [String] The project.
804
+ # @param media_id [String] The media.
805
+ # @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 (&#x60;!&#x60; to &#x60;~&#x60;); any other value answers 400 &#x60;invalid_idempotency_key&#x60;.
806
+ # @param [Hash] opts the optional parameters
807
+ # @return [nil]
808
+ def unfavourite_media(id, media_id, idempotency_key, opts = {})
809
+ unfavourite_media_with_http_info(id, media_id, idempotency_key, opts)
810
+ nil
811
+ end
812
+
813
+ # Remove a media from the favourites of a project
814
+ # Removes a media from the favourites of one of your projects. Removing one that is not a favourite changes nothing. It works for any media, even one the catalogue no longer shows.
815
+ # @param id [String] The project.
816
+ # @param media_id [String] The media.
817
+ # @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 (&#x60;!&#x60; to &#x60;~&#x60;); any other value answers 400 &#x60;invalid_idempotency_key&#x60;.
818
+ # @param [Hash] opts the optional parameters
819
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
820
+ def unfavourite_media_with_http_info(id, media_id, idempotency_key, opts = {})
821
+ if @api_client.config.debugging
822
+ @api_client.config.logger.debug 'Calling API: CatalogueApi.unfavourite_media ...'
823
+ end
824
+ # verify the required parameter 'id' is set
825
+ if @api_client.config.client_side_validation && id.nil?
826
+ fail ArgumentError, "Missing the required parameter 'id' when calling CatalogueApi.unfavourite_media"
827
+ end
828
+ # verify the required parameter 'media_id' is set
829
+ if @api_client.config.client_side_validation && media_id.nil?
830
+ fail ArgumentError, "Missing the required parameter 'media_id' when calling CatalogueApi.unfavourite_media"
831
+ end
832
+ # verify the required parameter 'idempotency_key' is set
833
+ if @api_client.config.client_side_validation && idempotency_key.nil?
834
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling CatalogueApi.unfavourite_media"
835
+ end
836
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
837
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling CatalogueApi.unfavourite_media, the character length must be smaller than or equal to 255.'
838
+ end
839
+
840
+ # resource path
841
+ local_var_path = '/api/v1/projects/{id}/favourites/{mediaId}'.sub('{id}', CGI.escape(id.to_s)).sub('{mediaId}', CGI.escape(media_id.to_s))
842
+
843
+ # query parameters
844
+ query_params = opts[:query_params] || {}
845
+
846
+ # header parameters
847
+ header_params = opts[:header_params] || {}
848
+ # HTTP header 'Accept' (if needed)
849
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
850
+ header_params[:'Idempotency-Key'] = idempotency_key
851
+
852
+ # form parameters
853
+ form_params = opts[:form_params] || {}
854
+
855
+ # http body (model)
856
+ post_body = opts[:debug_body]
857
+
858
+ # return_type
859
+ return_type = opts[:debug_return_type]
860
+
861
+ # auth_names
862
+ auth_names = opts[:debug_auth_names] || ['apiKey']
863
+
864
+ new_options = opts.merge(
865
+ :operation => :"CatalogueApi.unfavourite_media",
866
+ :header_params => header_params,
867
+ :query_params => query_params,
868
+ :form_params => form_params,
869
+ :body => post_body,
870
+ :auth_names => auth_names,
871
+ :return_type => return_type
872
+ )
873
+
874
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
875
+ if @api_client.config.debugging
876
+ @api_client.config.logger.debug "API called: CatalogueApi#unfavourite_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
877
+ end
878
+ return data, status_code, headers
879
+ end
880
+ end
881
+ end