growwer 1.0.2 → 1.1.1

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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -5
  3. data/docs/CatalogueApi.md +6 -6
  4. data/docs/CreateSellerMediaRequest.md +38 -0
  5. data/docs/CreateSellerMediaRequestPostOffer.md +24 -0
  6. data/docs/GetMe200ResponseCatalogue.md +1 -1
  7. data/docs/LinkAdditionOrderBriefingRequest.md +1 -1
  8. data/docs/ManagedServicesApi.md +3 -3
  9. data/docs/ProjectCatalogueMediaAllOfProject.md +3 -1
  10. data/docs/ProjectCatalogueMediaAllOfProjectAiKeywords.md +20 -0
  11. data/docs/SavedFiltersApi.md +1 -1
  12. data/docs/SellerMedia.md +2 -0
  13. data/docs/SellerMediaPostOffer.md +7 -1
  14. data/docs/SellerMediasApi.md +148 -5
  15. data/docs/SellerOrderPostDelivery.md +1 -1
  16. data/docs/SellerOrdersApi.md +1 -1
  17. data/docs/UpdateSellerMediaRequest.md +2 -0
  18. data/docs/UpdateSellerMediaRequestPostOffer.md +8 -2
  19. data/lib/growwer/api/catalogue_api.rb +8 -8
  20. data/lib/growwer/api/managed_services_api.rb +6 -6
  21. data/lib/growwer/api/saved_filters_api.rb +2 -2
  22. data/lib/growwer/api/seller_medias_api.rb +157 -4
  23. data/lib/growwer/api/seller_orders_api.rb +2 -2
  24. data/lib/growwer/api_client.rb +1 -1
  25. data/lib/growwer/models/create_seller_media_request.rb +447 -0
  26. data/lib/growwer/models/create_seller_media_request_post_offer.rb +273 -0
  27. data/lib/growwer/models/get_me200_response_catalogue.rb +1 -1
  28. data/lib/growwer/models/link_addition_order_briefing_request.rb +1 -1
  29. data/lib/growwer/models/project_catalogue_media_all_of_project.rb +34 -5
  30. data/lib/growwer/models/project_catalogue_media_all_of_project_ai_keywords.rb +211 -0
  31. data/lib/growwer/models/seller_media.rb +29 -1
  32. data/lib/growwer/models/seller_media_post_offer.rb +99 -1
  33. data/lib/growwer/models/seller_order_post_delivery.rb +1 -1
  34. data/lib/growwer/models/update_seller_media_request.rb +44 -1
  35. data/lib/growwer/models/update_seller_media_request_post_offer.rb +96 -12
  36. data/lib/growwer/version.rb +1 -1
  37. data/lib/growwer.rb +3 -0
  38. data/spec/models/create_seller_media_request_post_offer_spec.rb +62 -0
  39. data/spec/models/create_seller_media_request_spec.rb +100 -0
  40. data/spec/models/project_catalogue_media_all_of_project_ai_keywords_spec.rb +46 -0
  41. metadata +14 -2
@@ -243,7 +243,7 @@ module Growwer
243
243
  end
244
244
 
245
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.
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 limit of that operation apply: each new media costs one unit, a page that holds no new media, an empty one included, costs one, and repeating a request already answered the same day is free while the media lists, topics and language of the project stay as they were.
247
247
  # @param project_id [String] The project to search flash offers for.
248
248
  # @param [Hash] opts the optional parameters
249
249
  # @option opts [String] :source Which of the project's medias to search: `all` (the default), `recommended` (those Growwer recommends for the project), or those you marked `favourite`, `discarded` or `requested`, or `bought` for the project. Do not combine it with the parameter of the same state.
@@ -278,7 +278,7 @@ module Growwer
278
278
  # @option opts [Boolean] :discarded `true`: only the medias you discarded for the project; `false`: leave them out.
279
279
  # @option opts [Boolean] :new Medias Growwer matched with the project recently. Only `true` applies it; omit it otherwise.
280
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. `user`: your keywords; `publicGenerated`: 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. `googleAiOverview`, `chatgpt`, `googleAiMode`.
281
+ # @option opts [String] :ranks_ai_keyword A comma-separated list of AI answer engines: medias the web lists an AI keyword of the project for, from any of them. `googleAiOverview`, `chatgpt`, `googleAiMode`.
282
282
  # @option opts [Integer] :limit Medias per page, 1 to 100. (default to 20)
283
283
  # @option opts [Integer] :offset Medias to skip, at most 99900. (default to 0)
284
284
  # @return [ListFlashOffers200Response]
@@ -288,7 +288,7 @@ module Growwer
288
288
  end
289
289
 
290
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 `flashOffer=true`, and takes the same parameters except `flashOffer` and `savedFilterId`. The catalogue access and the daily distinct-media limit of that operation apply.
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 `flashOffer=true`, and takes the same parameters except `flashOffer` and `savedFilterId`. The catalogue access and the daily limit of that operation apply: each new media costs one unit, a page that holds no new media, an empty one included, costs one, and repeating a request already answered the same day is free while the media lists, topics and language of the project stay as they were.
292
292
  # @param project_id [String] The project to search flash offers for.
293
293
  # @param [Hash] opts the optional parameters
294
294
  # @option opts [String] :source Which of the project's medias to search: `all` (the default), `recommended` (those Growwer recommends for the project), or those you marked `favourite`, `discarded` or `requested`, or `bought` for the project. Do not combine it with the parameter of the same state.
@@ -323,7 +323,7 @@ module Growwer
323
323
  # @option opts [Boolean] :discarded `true`: only the medias you discarded for the project; `false`: leave them out.
324
324
  # @option opts [Boolean] :new Medias Growwer matched with the project recently. Only `true` applies it; omit it otherwise.
325
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. `user`: your keywords; `publicGenerated`: 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. `googleAiOverview`, `chatgpt`, `googleAiMode`.
326
+ # @option opts [String] :ranks_ai_keyword A comma-separated list of AI answer engines: medias the web lists an AI keyword of the project for, from any of them. `googleAiOverview`, `chatgpt`, `googleAiMode`.
327
327
  # @option opts [Integer] :limit Medias per page, 1 to 100. (default to 20)
328
328
  # @option opts [Integer] :offset Medias to skip, at most 99900. (default to 0)
329
329
  # @return [Array<(ListFlashOffers200Response, Integer, Hash)>] ListFlashOffers200Response data, response status code and response headers
@@ -521,7 +521,7 @@ module Growwer
521
521
  end
522
522
 
523
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. Each account can see a limited number of distinct medias per day (UTC) across the catalogue operations: the full daily cap for accounts with recent completed orders, as buyer or as seller, and a smaller trial quota for other accounts, which rises to the full cap after a completed order (see `catalogue.eligible`, `catalogue.dailyCap` and `catalogue.remainingToday` on GET /me). Medias seen again the same day are free.
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. Each account can see a limited number of distinct medias per day (UTC) across the catalogue operations: the full daily cap for accounts with recent completed orders, as buyer or as seller, and a smaller trial quota for other accounts, which rises to the full cap after a completed order (see `catalogue.eligible`, `catalogue.dailyCap` and `catalogue.remainingToday` on GET /me). Each new media of a page costs one unit of that limit, and a page that holds no new media, an empty one included, costs one unit, so a `total` costs at least one; repeating a request already answered the same day is free, and so are medias seen again that day. A change of the media lists of the project (a media request, a favourite, a discard), its topics or its language makes the same request a new one.
525
525
  # @param id [String] The project.
526
526
  # @param [Hash] opts the optional parameters
527
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.
@@ -558,7 +558,7 @@ module Growwer
558
558
  # @option opts [Boolean] :discarded &#x60;true&#x60;: only the medias you discarded for the project; &#x60;false&#x60;: leave them out.
559
559
  # @option opts [Boolean] :new Medias Growwer matched with the project recently. Only &#x60;true&#x60; applies it; omit it otherwise.
560
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;.
561
+ # @option opts [String] :ranks_ai_keyword A comma-separated list of AI answer engines: medias the web lists an AI keyword of the project for, from any of them. &#x60;googleAiOverview&#x60;, &#x60;chatgpt&#x60;, &#x60;googleAiMode&#x60;.
562
562
  # @option opts [Integer] :limit Medias per page, 1 to 100. (default to 20)
563
563
  # @option opts [Integer] :offset Medias to skip, at most 99900. (default to 0)
564
564
  # @return [ListFlashOffers200Response]
@@ -568,7 +568,7 @@ module Growwer
568
568
  end
569
569
 
570
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. Each account can see a limited number of distinct medias per day (UTC) across the catalogue operations: the full daily cap for accounts with recent completed orders, as buyer or as seller, and a smaller trial quota for other accounts, which rises to the full cap after a completed order (see &#x60;catalogue.eligible&#x60;, &#x60;catalogue.dailyCap&#x60; and &#x60;catalogue.remainingToday&#x60; on GET /me). Medias seen again the same day are free.
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. Each account can see a limited number of distinct medias per day (UTC) across the catalogue operations: the full daily cap for accounts with recent completed orders, as buyer or as seller, and a smaller trial quota for other accounts, which rises to the full cap after a completed order (see &#x60;catalogue.eligible&#x60;, &#x60;catalogue.dailyCap&#x60; and &#x60;catalogue.remainingToday&#x60; on GET /me). Each new media of a page costs one unit of that limit, and a page that holds no new media, an empty one included, costs one unit, so a &#x60;total&#x60; costs at least one; repeating a request already answered the same day is free, and so are medias seen again that day. A change of the media lists of the project (a media request, a favourite, a discard), its topics or its language makes the same request a new one.
572
572
  # @param id [String] The project.
573
573
  # @param [Hash] opts the optional parameters
574
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.
@@ -605,7 +605,7 @@ module Growwer
605
605
  # @option opts [Boolean] :discarded &#x60;true&#x60;: only the medias you discarded for the project; &#x60;false&#x60;: leave them out.
606
606
  # @option opts [Boolean] :new Medias Growwer matched with the project recently. Only &#x60;true&#x60; applies it; omit it otherwise.
607
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;.
608
+ # @option opts [String] :ranks_ai_keyword A comma-separated list of AI answer engines: medias the web lists an AI keyword of the project for, from any of them. &#x60;googleAiOverview&#x60;, &#x60;chatgpt&#x60;, &#x60;googleAiMode&#x60;.
609
609
  # @option opts [Integer] :limit Medias per page, 1 to 100. (default to 20)
610
610
  # @option opts [Integer] :offset Medias to skip, at most 99900. (default to 0)
611
611
  # @return [Array<(ListFlashOffers200Response, Integer, Hash)>] ListFlashOffers200Response data, response status code and response headers
@@ -151,7 +151,7 @@ module Growwer
151
151
  end
152
152
 
153
153
  # Download the summary of a campaign's proposals
154
- # The PDF the campaign page offers: the proposals awaiting your review, accepted or being published, newest first, in your language. With `extended=true` it also shows each proposal's price, the price it was proposed at (`proposedPrice`).
154
+ # The PDF the campaign page offers: the proposals awaiting your review, accepted or being published, newest first, in your language. With `extended=true` it also shows each proposal's price, the price it was proposed at (`proposedPrice`). One summary of yours is rendered at a time: a request while another is being rendered gets 429 `proposals_summary_in_progress`, to retry after the `Retry-After` header.
155
155
  # @param id [String]
156
156
  # @param [Hash] opts the optional parameters
157
157
  # @option opts [String] :extended Whether to show the prices. (default to 'false')
@@ -162,7 +162,7 @@ module Growwer
162
162
  end
163
163
 
164
164
  # Download the summary of a campaign&#39;s proposals
165
- # The PDF the campaign page offers: the proposals awaiting your review, accepted or being published, newest first, in your language. With &#x60;extended&#x3D;true&#x60; it also shows each proposal&#39;s price, the price it was proposed at (&#x60;proposedPrice&#x60;).
165
+ # The PDF the campaign page offers: the proposals awaiting your review, accepted or being published, newest first, in your language. With &#x60;extended&#x3D;true&#x60; it also shows each proposal&#39;s price, the price it was proposed at (&#x60;proposedPrice&#x60;). One summary of yours is rendered at a time: a request while another is being rendered gets 429 &#x60;proposals_summary_in_progress&#x60;, to retry after the &#x60;Retry-After&#x60; header.
166
166
  # @param id [String]
167
167
  # @param [Hash] opts the optional parameters
168
168
  # @option opts [String] :extended Whether to show the prices. (default to 'false')
@@ -380,7 +380,7 @@ module Growwer
380
380
  end
381
381
 
382
382
  # Request a new campaign
383
- # Asks your account manager for a new campaign, as the managed service page does: the team emails you to agree on it. For accounts with a managed service (GET /me `managedService.active`); without one, POST /managed-service/info-requests asks about the service. You may send 5 such requests per UTC day through the API. Past them it answers 429 `managed_service_request_limit_reached`, with `Retry-After` the time to the next UTC midnight. A request that is refused (4xx) does not count; one that fails on the server (5xx) does, as it may have been sent.
383
+ # Asks your account manager for a new campaign, as the managed service page does: the team emails you to agree on it. For accounts with a managed service (GET /me `managedService.active`); without one, POST /managed-service/info-requests asks about the service. The API admits a limited number of such requests per user and UTC day (5 by default; the refusal message states the current limit). Past it, it answers 429 `managed_service_request_limit_reached`, with `Retry-After` the time to the next UTC midnight. A request that is refused (4xx) does not count; one that fails on the server (5xx) does, as it may have been sent.
384
384
  # @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;.
385
385
  # @param managed_service_request [ManagedServiceRequest]
386
386
  # @param [Hash] opts the optional parameters
@@ -391,7 +391,7 @@ module Growwer
391
391
  end
392
392
 
393
393
  # Request a new campaign
394
- # Asks your account manager for a new campaign, as the managed service page does: the team emails you to agree on it. For accounts with a managed service (GET /me &#x60;managedService.active&#x60;); without one, POST /managed-service/info-requests asks about the service. You may send 5 such requests per UTC day through the API. Past them it answers 429 &#x60;managed_service_request_limit_reached&#x60;, with &#x60;Retry-After&#x60; the time to the next UTC midnight. A request that is refused (4xx) does not count; one that fails on the server (5xx) does, as it may have been sent.
394
+ # Asks your account manager for a new campaign, as the managed service page does: the team emails you to agree on it. For accounts with a managed service (GET /me &#x60;managedService.active&#x60;); without one, POST /managed-service/info-requests asks about the service. The API admits a limited number of such requests per user and UTC day (5 by default; the refusal message states the current limit). Past it, it answers 429 &#x60;managed_service_request_limit_reached&#x60;, with &#x60;Retry-After&#x60; the time to the next UTC midnight. A request that is refused (4xx) does not count; one that fails on the server (5xx) does, as it may have been sent.
395
395
  # @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;.
396
396
  # @param managed_service_request [ManagedServiceRequest]
397
397
  # @param [Hash] opts the optional parameters
@@ -459,7 +459,7 @@ module Growwer
459
459
  end
460
460
 
461
461
  # Ask about the managed service
462
- # Asks the team about the managed service for your website, as the managed service landing page does: the team contacts you. For accounts without a managed service (GET /me `managedService.active`); with one, POST /managed-service/campaign-requests requests a new campaign. You may send 5 such requests per UTC day through the API. Past them it answers 429 `managed_service_request_limit_reached`, with `Retry-After` the time to the next UTC midnight. A request that is refused (4xx) does not count; one that fails on the server (5xx) does, as it may have been sent.
462
+ # Asks the team about the managed service for your website, as the managed service landing page does: the team contacts you. For accounts without a managed service (GET /me `managedService.active`); with one, POST /managed-service/campaign-requests requests a new campaign. The API admits a limited number of such requests per user and UTC day (5 by default; the refusal message states the current limit). Past it, it answers 429 `managed_service_request_limit_reached`, with `Retry-After` the time to the next UTC midnight. A request that is refused (4xx) does not count; one that fails on the server (5xx) does, as it may have been sent.
463
463
  # @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;.
464
464
  # @param managed_service_request [ManagedServiceRequest]
465
465
  # @param [Hash] opts the optional parameters
@@ -470,7 +470,7 @@ module Growwer
470
470
  end
471
471
 
472
472
  # Ask about the managed service
473
- # Asks the team about the managed service for your website, as the managed service landing page does: the team contacts you. For accounts without a managed service (GET /me &#x60;managedService.active&#x60;); with one, POST /managed-service/campaign-requests requests a new campaign. You may send 5 such requests per UTC day through the API. Past them it answers 429 &#x60;managed_service_request_limit_reached&#x60;, with &#x60;Retry-After&#x60; the time to the next UTC midnight. A request that is refused (4xx) does not count; one that fails on the server (5xx) does, as it may have been sent.
473
+ # Asks the team about the managed service for your website, as the managed service landing page does: the team contacts you. For accounts without a managed service (GET /me &#x60;managedService.active&#x60;); with one, POST /managed-service/campaign-requests requests a new campaign. The API admits a limited number of such requests per user and UTC day (5 by default; the refusal message states the current limit). Past it, it answers 429 &#x60;managed_service_request_limit_reached&#x60;, with &#x60;Retry-After&#x60; the time to the next UTC midnight. A request that is refused (4xx) does not count; one that fails on the server (5xx) does, as it may have been sent.
474
474
  # @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;.
475
475
  # @param managed_service_request [ManagedServiceRequest]
476
476
  # @param [Hash] opts the optional parameters
@@ -20,7 +20,7 @@ module Growwer
20
20
  @api_client = api_client
21
21
  end
22
22
  # Count the medias of a saved filter
23
- # How many medias of the project's catalogue one of your saved filters matches: the `total` of GET /projects/{id}/medias with its `savedFilterId`. The number is cached for up to 24 hours, and it can differ from the count the web shows, which is not limited to the project's catalogue. A filter saved on the web that uses a filter the API does not support is refused with 422 `saved_filter_unsupported`.
23
+ # How many medias of the project's catalogue one of your saved filters matches: the `total` of GET /projects/{id}/medias with its `savedFilterId`. The number is cached for up to 24 hours, and it can differ from the count the web shows, which is not limited to the project's catalogue. A filter saved on the web that uses a filter the API does not support is refused with 422 `saved_filter_unsupported`. The catalogue access and the daily limit of the catalogue apply: a count costs one unit of that limit the first time a filter is counted in a UTC day, and counting the same filter again that day is free.
24
24
  # @param id [String] The project.
25
25
  # @param filter_id [String] The saved filter.
26
26
  # @param [Hash] opts the optional parameters
@@ -31,7 +31,7 @@ module Growwer
31
31
  end
32
32
 
33
33
  # Count the medias of a saved filter
34
- # How many medias of the project&#39;s catalogue one of your saved filters matches: the &#x60;total&#x60; of GET /projects/{id}/medias with its &#x60;savedFilterId&#x60;. The number is cached for up to 24 hours, and it can differ from the count the web shows, which is not limited to the project&#39;s catalogue. A filter saved on the web that uses a filter the API does not support is refused with 422 &#x60;saved_filter_unsupported&#x60;.
34
+ # How many medias of the project&#39;s catalogue one of your saved filters matches: the &#x60;total&#x60; of GET /projects/{id}/medias with its &#x60;savedFilterId&#x60;. The number is cached for up to 24 hours, and it can differ from the count the web shows, which is not limited to the project&#39;s catalogue. A filter saved on the web that uses a filter the API does not support is refused with 422 &#x60;saved_filter_unsupported&#x60;. The catalogue access and the daily limit of the catalogue apply: a count costs one unit of that limit the first time a filter is counted in a UTC day, and counting the same filter again that day is free.
35
35
  # @param id [String] The project.
36
36
  # @param filter_id [String] The saved filter.
37
37
  # @param [Hash] opts the optional parameters
@@ -93,6 +93,159 @@ module Growwer
93
93
  return data, status_code, headers
94
94
  end
95
95
 
96
+ # Register a media you sell on
97
+ # Registers one of your medias, as the media create page does. The media is created with `state: pending_review` and Growwer reviews it in the background, as for a media registered on the web; GET /seller/medias/{id} shows its state. - `rootUrl` is the media's root URL; `typology` is `blog` or `press`. - `country` and `language` take the codes GET /vocabulary publishes; `topics` and `bannedTopics` take its topic ids, at most 100 each, and no topic may be both; `bannedTopics` left out bans none. - `postOffer.pricingOptions` lists every link type you offer for sponsored posts, at least one. Each option needs at least one fee, and every option must offer the same sides (written by you, written by the buyer or Growwer), as the page requires. Each fee is at least 1 EUR, sent in cents. - `postOffer.maximumLinks` is how many links a sponsored post may hold, 1 to 4; `postOffer.advertisingLabellingPolicy` whether posts are labelled as advertising, `never` when left out; `postOffer.promotedSocialNetworks` the social networks posts are promoted on, none when left out. - `linkAdditionOffer.pricingOptions` lists the link types you offer for adding a link to an existing article; left out, `null` or an empty list offers none. - `extraServices` lists the extra services you offer, none when left out. It is sent at the top level, although GET /seller/medias/{id} reads it inside `postOffer`. - `acceptMediaPublishingTerms` and `declareMediaOwnership` must be `true`: they accept the media publishing terms and declare that you own or manage the media, as the page's checkboxes do, and are recorded as your consents for the media. A media registered already, by you or by anyone else, is refused with 409 `media_already_registered`, and each such refusal counts toward a daily limit of refusals (429 `media_duplicate_limit_reached` once reached); medias not registered yet are never limited by it. To register many medias, call this operation once per media, each call with its own `Idempotency-Key` and its own answer (201, 409, 422 or 429); there is no batch operation. The request limits apply to the loop as to any calls (600 requests per minute per user and 300 per key), and each 409 `media_already_registered` counts toward the daily limit of refusals as it does for a single call. Retry a call that got no answer with its same `Idempotency-Key`, as for any write.
98
+ # @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;.
99
+ # @param create_seller_media_request [CreateSellerMediaRequest]
100
+ # @param [Hash] opts the optional parameters
101
+ # @return [SellerMedia]
102
+ def create_seller_media(idempotency_key, create_seller_media_request, opts = {})
103
+ data, _status_code, _headers = create_seller_media_with_http_info(idempotency_key, create_seller_media_request, opts)
104
+ data
105
+ end
106
+
107
+ # Register a media you sell on
108
+ # Registers one of your medias, as the media create page does. The media is created with &#x60;state: pending_review&#x60; and Growwer reviews it in the background, as for a media registered on the web; GET /seller/medias/{id} shows its state. - &#x60;rootUrl&#x60; is the media&#39;s root URL; &#x60;typology&#x60; is &#x60;blog&#x60; or &#x60;press&#x60;. - &#x60;country&#x60; and &#x60;language&#x60; take the codes GET /vocabulary publishes; &#x60;topics&#x60; and &#x60;bannedTopics&#x60; take its topic ids, at most 100 each, and no topic may be both; &#x60;bannedTopics&#x60; left out bans none. - &#x60;postOffer.pricingOptions&#x60; lists every link type you offer for sponsored posts, at least one. Each option needs at least one fee, and every option must offer the same sides (written by you, written by the buyer or Growwer), as the page requires. Each fee is at least 1 EUR, sent in cents. - &#x60;postOffer.maximumLinks&#x60; is how many links a sponsored post may hold, 1 to 4; &#x60;postOffer.advertisingLabellingPolicy&#x60; whether posts are labelled as advertising, &#x60;never&#x60; when left out; &#x60;postOffer.promotedSocialNetworks&#x60; the social networks posts are promoted on, none when left out. - &#x60;linkAdditionOffer.pricingOptions&#x60; lists the link types you offer for adding a link to an existing article; left out, &#x60;null&#x60; or an empty list offers none. - &#x60;extraServices&#x60; lists the extra services you offer, none when left out. It is sent at the top level, although GET /seller/medias/{id} reads it inside &#x60;postOffer&#x60;. - &#x60;acceptMediaPublishingTerms&#x60; and &#x60;declareMediaOwnership&#x60; must be &#x60;true&#x60;: they accept the media publishing terms and declare that you own or manage the media, as the page&#39;s checkboxes do, and are recorded as your consents for the media. A media registered already, by you or by anyone else, is refused with 409 &#x60;media_already_registered&#x60;, and each such refusal counts toward a daily limit of refusals (429 &#x60;media_duplicate_limit_reached&#x60; once reached); medias not registered yet are never limited by it. To register many medias, call this operation once per media, each call with its own &#x60;Idempotency-Key&#x60; and its own answer (201, 409, 422 or 429); there is no batch operation. The request limits apply to the loop as to any calls (600 requests per minute per user and 300 per key), and each 409 &#x60;media_already_registered&#x60; counts toward the daily limit of refusals as it does for a single call. Retry a call that got no answer with its same &#x60;Idempotency-Key&#x60;, as for any write.
109
+ # @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;.
110
+ # @param create_seller_media_request [CreateSellerMediaRequest]
111
+ # @param [Hash] opts the optional parameters
112
+ # @return [Array<(SellerMedia, Integer, Hash)>] SellerMedia data, response status code and response headers
113
+ def create_seller_media_with_http_info(idempotency_key, create_seller_media_request, opts = {})
114
+ if @api_client.config.debugging
115
+ @api_client.config.logger.debug 'Calling API: SellerMediasApi.create_seller_media ...'
116
+ end
117
+ # verify the required parameter 'idempotency_key' is set
118
+ if @api_client.config.client_side_validation && idempotency_key.nil?
119
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling SellerMediasApi.create_seller_media"
120
+ end
121
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
122
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling SellerMediasApi.create_seller_media, the character length must be smaller than or equal to 255.'
123
+ end
124
+
125
+ # verify the required parameter 'create_seller_media_request' is set
126
+ if @api_client.config.client_side_validation && create_seller_media_request.nil?
127
+ fail ArgumentError, "Missing the required parameter 'create_seller_media_request' when calling SellerMediasApi.create_seller_media"
128
+ end
129
+ # resource path
130
+ local_var_path = '/api/v1/seller/medias'
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
+ # HTTP header 'Content-Type'
140
+ content_type = @api_client.select_header_content_type(['application/json'])
141
+ if !content_type.nil?
142
+ header_params['Content-Type'] = content_type
143
+ end
144
+ header_params[:'Idempotency-Key'] = idempotency_key
145
+
146
+ # form parameters
147
+ form_params = opts[:form_params] || {}
148
+
149
+ # http body (model)
150
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_seller_media_request)
151
+
152
+ # return_type
153
+ return_type = opts[:debug_return_type] || 'SellerMedia'
154
+
155
+ # auth_names
156
+ auth_names = opts[:debug_auth_names] || ['apiKey']
157
+
158
+ new_options = opts.merge(
159
+ :operation => :"SellerMediasApi.create_seller_media",
160
+ :header_params => header_params,
161
+ :query_params => query_params,
162
+ :form_params => form_params,
163
+ :body => post_body,
164
+ :auth_names => auth_names,
165
+ :return_type => return_type
166
+ )
167
+
168
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
169
+ if @api_client.config.debugging
170
+ @api_client.config.logger.debug "API called: SellerMediasApi#create_seller_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
171
+ end
172
+ return data, status_code, headers
173
+ end
174
+
175
+ # Delete a media you sell on
176
+ # Deletes one of your medias, in any state, as the media delete button does. The media must have no order in progress: close or reject its orders first. The API never cancels an order for you, and an order placed while the delete runs is refused, never cancelled. What goes with the media, as on the web: - A running flash offer ends with it, and its managed-service proposals are deleted. - Its finished orders stay, with the media's URL; they read `media.id` null. - Buyers' favourites and discards of the domain stay, as they are kept by domain. - The catalogue search drops the media shortly after the 204, as the search index updates asynchronously. Repeating the call with the same `Idempotency-Key` answers the same 204 with `Idempotent-Replayed: true`; a new key after the delete answers 404.
177
+ # @param id [String]
178
+ # @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;.
179
+ # @param [Hash] opts the optional parameters
180
+ # @return [nil]
181
+ def delete_seller_media(id, idempotency_key, opts = {})
182
+ delete_seller_media_with_http_info(id, idempotency_key, opts)
183
+ nil
184
+ end
185
+
186
+ # Delete a media you sell on
187
+ # Deletes one of your medias, in any state, as the media delete button does. The media must have no order in progress: close or reject its orders first. The API never cancels an order for you, and an order placed while the delete runs is refused, never cancelled. What goes with the media, as on the web: - A running flash offer ends with it, and its managed-service proposals are deleted. - Its finished orders stay, with the media&#39;s URL; they read &#x60;media.id&#x60; null. - Buyers&#39; favourites and discards of the domain stay, as they are kept by domain. - The catalogue search drops the media shortly after the 204, as the search index updates asynchronously. Repeating the call with the same &#x60;Idempotency-Key&#x60; answers the same 204 with &#x60;Idempotent-Replayed: true&#x60;; a new key after the delete answers 404.
188
+ # @param id [String]
189
+ # @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;.
190
+ # @param [Hash] opts the optional parameters
191
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
192
+ def delete_seller_media_with_http_info(id, idempotency_key, opts = {})
193
+ if @api_client.config.debugging
194
+ @api_client.config.logger.debug 'Calling API: SellerMediasApi.delete_seller_media ...'
195
+ end
196
+ # verify the required parameter 'id' is set
197
+ if @api_client.config.client_side_validation && id.nil?
198
+ fail ArgumentError, "Missing the required parameter 'id' when calling SellerMediasApi.delete_seller_media"
199
+ end
200
+ # verify the required parameter 'idempotency_key' is set
201
+ if @api_client.config.client_side_validation && idempotency_key.nil?
202
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling SellerMediasApi.delete_seller_media"
203
+ end
204
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
205
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling SellerMediasApi.delete_seller_media, the character length must be smaller than or equal to 255.'
206
+ end
207
+
208
+ # resource path
209
+ local_var_path = '/api/v1/seller/medias/{id}'.sub('{id}', CGI.escape(id.to_s))
210
+
211
+ # query parameters
212
+ query_params = opts[:query_params] || {}
213
+
214
+ # header parameters
215
+ header_params = opts[:header_params] || {}
216
+ # HTTP header 'Accept' (if needed)
217
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
218
+ header_params[:'Idempotency-Key'] = idempotency_key
219
+
220
+ # form parameters
221
+ form_params = opts[:form_params] || {}
222
+
223
+ # http body (model)
224
+ post_body = opts[:debug_body]
225
+
226
+ # return_type
227
+ return_type = opts[:debug_return_type]
228
+
229
+ # auth_names
230
+ auth_names = opts[:debug_auth_names] || ['apiKey']
231
+
232
+ new_options = opts.merge(
233
+ :operation => :"SellerMediasApi.delete_seller_media",
234
+ :header_params => header_params,
235
+ :query_params => query_params,
236
+ :form_params => form_params,
237
+ :body => post_body,
238
+ :auth_names => auth_names,
239
+ :return_type => return_type
240
+ )
241
+
242
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
243
+ if @api_client.config.debugging
244
+ @api_client.config.logger.debug "API called: SellerMediasApi#delete_seller_media\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
245
+ end
246
+ return data, status_code, headers
247
+ end
248
+
96
249
  # Get a media you sell on
97
250
  # One of your medias, with your fees, its extras, the competitive fees Growwer suggests and how it performs. Another seller's media is not found.
98
251
  # @param id [String]
@@ -241,8 +394,8 @@ module Growwer
241
394
  return data, status_code, headers
242
395
  end
243
396
 
244
- # Edit the fees of a media you sell on
245
- # Sets the fees of one of your medias, as the media edit page saves them. Send only the sections you change: a section you send replaces that section wholly, a section you leave out stays as it is. - `postOffer.pricingOptions` lists every link type you offer for sponsored posts, at least one. A link type you leave out is no longer offered. Each option needs at least one fee, and every option must offer the same sides (written by you, written by the buyer or Growwer), as the page requires. Each fee is at least 1 EUR. - `linkAdditionOffer.pricingOptions` lists the link types you offer for adding a link to an existing article; `null` or an empty list stops offering link additions. - `extraServices` is the full list of extra services you offer; an empty list removes them all. The fees are your base fees, the ones GET /seller/medias/{id} returns: while a flash offer runs, its discount keeps applying on top of them, and `currentCost` shows the result. `currentCost` may be sent back as read and is ignored. Characteristics, topics and comments are not edited here. As on the page, a change of the post offer's price may cancel the managed-service proposals accepted for the media whose price it changes, and raising the price above the best competitor's tells Growwer's support team. A restricted seller account may edit its fees.
397
+ # Edit the offer of a media you sell on
398
+ # Sets the fees, extra services, typology and post offer characteristics of one of your medias, as the media edit page saves them. Send only the fields you change: a field you send replaces that field wholly, a field you leave out stays as it is, inside `postOffer` too (sending only `postOffer.maximumLinks` keeps your fees). - `typology` is `blog` or `press`. - `postOffer.pricingOptions` lists every link type you offer for sponsored posts, at least one. A link type you leave out is no longer offered. Each option needs at least one fee, and every option must offer the same sides (written by you, written by the buyer or Growwer), as the page requires. Each fee is at least 1 EUR. - `postOffer.maximumLinks` is how many links a sponsored post may hold, 1 to 4; `postOffer.advertisingLabellingPolicy` whether posts are labelled as advertising (`always` or `never`); `postOffer.promotedSocialNetworks` the full list of social networks posts are promoted on, each once (an empty list for none). - `linkAdditionOffer.pricingOptions` lists the link types you offer for adding a link to an existing article; `null` or an empty list stops offering link additions. - `extraServices` is the full list of extra services you offer; an empty list removes them all. It is sent at the top level, although GET /seller/medias/{id} reads it inside `postOffer`. The fees are your base fees, the ones GET /seller/medias/{id} returns: while a flash offer runs, its discount keeps applying on top of them, and `currentCost` shows the result. `currentCost` may be sent back as read and is ignored. Country, language, topics and comments are not edited here. As on the page, a change of the post offer's price may cancel the managed-service proposals accepted for the media whose price it changes, and raising the price above the best competitor's tells Growwer's support team. A restricted seller account may edit its offer.
246
399
  # @param id [String]
247
400
  # @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;.
248
401
  # @param update_seller_media_request [UpdateSellerMediaRequest]
@@ -253,8 +406,8 @@ module Growwer
253
406
  data
254
407
  end
255
408
 
256
- # Edit the fees of a media you sell on
257
- # Sets the fees of one of your medias, as the media edit page saves them. Send only the sections you change: a section you send replaces that section wholly, a section you leave out stays as it is. - &#x60;postOffer.pricingOptions&#x60; lists every link type you offer for sponsored posts, at least one. A link type you leave out is no longer offered. Each option needs at least one fee, and every option must offer the same sides (written by you, written by the buyer or Growwer), as the page requires. Each fee is at least 1 EUR. - &#x60;linkAdditionOffer.pricingOptions&#x60; lists the link types you offer for adding a link to an existing article; &#x60;null&#x60; or an empty list stops offering link additions. - &#x60;extraServices&#x60; is the full list of extra services you offer; an empty list removes them all. The fees are your base fees, the ones GET /seller/medias/{id} returns: while a flash offer runs, its discount keeps applying on top of them, and &#x60;currentCost&#x60; shows the result. &#x60;currentCost&#x60; may be sent back as read and is ignored. Characteristics, topics and comments are not edited here. As on the page, a change of the post offer&#39;s price may cancel the managed-service proposals accepted for the media whose price it changes, and raising the price above the best competitor&#39;s tells Growwer&#39;s support team. A restricted seller account may edit its fees.
409
+ # Edit the offer of a media you sell on
410
+ # Sets the fees, extra services, typology and post offer characteristics of one of your medias, as the media edit page saves them. Send only the fields you change: a field you send replaces that field wholly, a field you leave out stays as it is, inside &#x60;postOffer&#x60; too (sending only &#x60;postOffer.maximumLinks&#x60; keeps your fees). - &#x60;typology&#x60; is &#x60;blog&#x60; or &#x60;press&#x60;. - &#x60;postOffer.pricingOptions&#x60; lists every link type you offer for sponsored posts, at least one. A link type you leave out is no longer offered. Each option needs at least one fee, and every option must offer the same sides (written by you, written by the buyer or Growwer), as the page requires. Each fee is at least 1 EUR. - &#x60;postOffer.maximumLinks&#x60; is how many links a sponsored post may hold, 1 to 4; &#x60;postOffer.advertisingLabellingPolicy&#x60; whether posts are labelled as advertising (&#x60;always&#x60; or &#x60;never&#x60;); &#x60;postOffer.promotedSocialNetworks&#x60; the full list of social networks posts are promoted on, each once (an empty list for none). - &#x60;linkAdditionOffer.pricingOptions&#x60; lists the link types you offer for adding a link to an existing article; &#x60;null&#x60; or an empty list stops offering link additions. - &#x60;extraServices&#x60; is the full list of extra services you offer; an empty list removes them all. It is sent at the top level, although GET /seller/medias/{id} reads it inside &#x60;postOffer&#x60;. The fees are your base fees, the ones GET /seller/medias/{id} returns: while a flash offer runs, its discount keeps applying on top of them, and &#x60;currentCost&#x60; shows the result. &#x60;currentCost&#x60; may be sent back as read and is ignored. Country, language, topics and comments are not edited here. As on the page, a change of the post offer&#39;s price may cancel the managed-service proposals accepted for the media whose price it changes, and raising the price above the best competitor&#39;s tells Growwer&#39;s support team. A restricted seller account may edit its offer.
258
411
  # @param id [String]
259
412
  # @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;.
260
413
  # @param update_seller_media_request [UpdateSellerMediaRequest]
@@ -94,7 +94,7 @@ module Growwer
94
94
  end
95
95
 
96
96
  # Deliver an order
97
- # Delivers an order placed on one of your medias (`state` `pending_order_delivery`), as the web does. A post order takes the URL of the published post and the confirmation of its publication date; a link addition order takes no body, and any field is refused. The order moves to `pending_order_delivery_review` and the buyer is asked to review it, or, for a post order whose scheduled publication date is still to come, to `scheduled` without telling the buyer yet. The URL is checked to be a URL only, as the web does.
97
+ # Delivers an order placed on one of your medias (`state` `pending_order_delivery`), as the web does. A post order takes the URL of the published post and the confirmation of its publication date; a link addition order takes no body, and any field is refused. The order moves to `pending_order_delivery_review` and the buyer is asked to review it, or, for a post order whose scheduled publication date is still to come, to `scheduled` without telling the buyer yet. The URL is checked to be a URL without `<` or `>`, as the web does.
98
98
  # @param id [String]
99
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 (&#x60;!&#x60; to &#x60;~&#x60;); any other value answers 400 &#x60;invalid_idempotency_key&#x60;.
100
100
  # @param [Hash] opts the optional parameters
@@ -106,7 +106,7 @@ module Growwer
106
106
  end
107
107
 
108
108
  # Deliver an order
109
- # Delivers an order placed on one of your medias (&#x60;state&#x60; &#x60;pending_order_delivery&#x60;), as the web does. A post order takes the URL of the published post and the confirmation of its publication date; a link addition order takes no body, and any field is refused. The order moves to &#x60;pending_order_delivery_review&#x60; and the buyer is asked to review it, or, for a post order whose scheduled publication date is still to come, to &#x60;scheduled&#x60; without telling the buyer yet. The URL is checked to be a URL only, as the web does.
109
+ # Delivers an order placed on one of your medias (&#x60;state&#x60; &#x60;pending_order_delivery&#x60;), as the web does. A post order takes the URL of the published post and the confirmation of its publication date; a link addition order takes no body, and any field is refused. The order moves to &#x60;pending_order_delivery_review&#x60; and the buyer is asked to review it, or, for a post order whose scheduled publication date is still to come, to &#x60;scheduled&#x60; without telling the buyer yet. The URL is checked to be a URL without &#x60;&lt;&#x60; or &#x60;&gt;&#x60;, as the web does.
110
110
  # @param id [String]
111
111
  # @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;.
112
112
  # @param [Hash] opts the optional parameters
@@ -34,7 +34,7 @@ module Growwer
34
34
  # @option config [Configuration] Configuration for initializing the object, default to Configuration.default
35
35
  def initialize(config = Configuration.default)
36
36
  @config = config
37
- @user_agent = "growwer-ruby/1.0.2"
37
+ @user_agent = "growwer-ruby/1.1.1"
38
38
  @default_headers = {
39
39
  'Content-Type' => 'application/json',
40
40
  'User-Agent' => @user_agent