growwer 2.0.0 → 2.1.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 (201) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +57 -4
  3. data/docs/AccountApi.md +1 -1
  4. data/docs/AdvanceTestOrderRequest.md +18 -0
  5. data/docs/BalanceLowEventData.md +20 -0
  6. data/docs/BalanceLowEventDataWallet.md +20 -0
  7. data/docs/CatalogueApi.md +2 -2
  8. data/docs/CreateWebhookRequest.md +24 -0
  9. data/docs/GetMe200Response.md +3 -1
  10. data/docs/ListWebhookDeliveries200Response.md +20 -0
  11. data/docs/ListWebhooks200Response.md +20 -0
  12. data/docs/OrderEventData.md +18 -0
  13. data/docs/TestHelpersApi.md +222 -0
  14. data/docs/TopUpTestWallet200Response.md +20 -0
  15. data/docs/TopUpTestWalletRequest.md +18 -0
  16. data/docs/UpdateWebhookRequest.md +26 -0
  17. data/docs/Webhook.md +38 -0
  18. data/docs/WebhookDelivery.md +32 -0
  19. data/docs/WebhookDeliveryAttempt.md +26 -0
  20. data/docs/WebhookEvent.md +28 -0
  21. data/docs/WebhookEventData.md +51 -0
  22. data/docs/WebhookEventType.md +15 -0
  23. data/docs/WebhookTestEventData.md +18 -0
  24. data/docs/WebhookWithSecret.md +40 -0
  25. data/docs/WebhooksApi.md +662 -0
  26. data/growwer.gemspec +1 -1
  27. data/lib/growwer/api/account_api.rb +3 -3
  28. data/lib/growwer/api/buyer_orders_api.rb +1 -1
  29. data/lib/growwer/api/buyer_wallet_api.rb +1 -1
  30. data/lib/growwer/api/catalogue_api.rb +5 -5
  31. data/lib/growwer/api/files_api.rb +1 -1
  32. data/lib/growwer/api/managed_services_api.rb +1 -1
  33. data/lib/growwer/api/projects_api.rb +1 -1
  34. data/lib/growwer/api/saved_filters_api.rb +1 -1
  35. data/lib/growwer/api/seller_account_api.rb +1 -1
  36. data/lib/growwer/api/seller_medias_api.rb +1 -1
  37. data/lib/growwer/api/seller_orders_api.rb +1 -1
  38. data/lib/growwer/api/seller_wallet_api.rb +1 -1
  39. data/lib/growwer/api/test_helpers_api.rb +254 -0
  40. data/lib/growwer/api/webhooks_api.rb +707 -0
  41. data/lib/growwer/api_client.rb +2 -2
  42. data/lib/growwer/api_error.rb +1 -1
  43. data/lib/growwer/api_model_base.rb +1 -1
  44. data/lib/growwer/configuration.rb +1 -1
  45. data/lib/growwer/models/advance_test_order_request.rb +189 -0
  46. data/lib/growwer/models/balance.rb +1 -1
  47. data/lib/growwer/models/balance_low_event_data.rb +192 -0
  48. data/lib/growwer/models/balance_low_event_data_wallet.rb +192 -0
  49. data/lib/growwer/models/catalogue_media.rb +1 -1
  50. data/lib/growwer/models/catalogue_media_flash_offer.rb +1 -1
  51. data/lib/growwer/models/catalogue_media_metrics.rb +1 -1
  52. data/lib/growwer/models/catalogue_offer.rb +1 -1
  53. data/lib/growwer/models/catalogue_offer_or_null.rb +1 -1
  54. data/lib/growwer/models/catalogue_post_offer.rb +1 -1
  55. data/lib/growwer/models/catalogue_post_offer_all_of_extras.rb +1 -1
  56. data/lib/growwer/models/catalogue_post_offer_all_of_extras_sensitive_topic.rb +1 -1
  57. data/lib/growwer/models/code_name.rb +1 -1
  58. data/lib/growwer/models/count_saved_filter_medias200_response.rb +1 -1
  59. data/lib/growwer/models/create_project_request.rb +1 -1
  60. data/lib/growwer/models/create_saved_filter_request.rb +1 -1
  61. data/lib/growwer/models/create_seller_media_request.rb +1 -1
  62. data/lib/growwer/models/create_seller_media_request_post_offer.rb +1 -1
  63. data/lib/growwer/models/create_webhook_request.rb +248 -0
  64. data/lib/growwer/models/error.rb +1 -1
  65. data/lib/growwer/models/get_buyer_wallet200_response.rb +1 -1
  66. data/lib/growwer/models/get_me200_response.rb +57 -20
  67. data/lib/growwer/models/get_me200_response_buyer.rb +1 -1
  68. data/lib/growwer/models/get_me200_response_catalogue.rb +1 -1
  69. data/lib/growwer/models/get_me200_response_managed_service.rb +1 -1
  70. data/lib/growwer/models/get_me200_response_seller.rb +2 -1
  71. data/lib/growwer/models/get_seller_wallet200_response.rb +1 -1
  72. data/lib/growwer/models/get_vocabulary200_response.rb +1 -1
  73. data/lib/growwer/models/get_vocabulary200_response_topics_inner.rb +1 -1
  74. data/lib/growwer/models/invoice.rb +1 -1
  75. data/lib/growwer/models/link_addition_order_briefing.rb +1 -1
  76. data/lib/growwer/models/link_addition_order_briefing_request.rb +1 -1
  77. data/lib/growwer/models/list_buyer_transactions200_response.rb +1 -1
  78. data/lib/growwer/models/list_flash_offers200_response.rb +1 -1
  79. data/lib/growwer/models/list_invoices200_response.rb +1 -1
  80. data/lib/growwer/models/list_managed_service_campaigns200_response.rb +1 -1
  81. data/lib/growwer/models/list_managed_service_proposals200_response.rb +1 -1
  82. data/lib/growwer/models/list_orders200_response.rb +1 -1
  83. data/lib/growwer/models/list_projects200_response.rb +1 -1
  84. data/lib/growwer/models/list_saved_filters200_response.rb +1 -1
  85. data/lib/growwer/models/list_seller_medias200_response.rb +1 -1
  86. data/lib/growwer/models/list_seller_orders200_response.rb +1 -1
  87. data/lib/growwer/models/list_seller_transactions200_response.rb +1 -1
  88. data/lib/growwer/models/list_webhook_deliveries200_response.rb +192 -0
  89. data/lib/growwer/models/list_webhooks200_response.rb +192 -0
  90. data/lib/growwer/models/list_withdrawals200_response.rb +1 -1
  91. data/lib/growwer/models/managed_service_campaign.rb +1 -1
  92. data/lib/growwer/models/managed_service_campaign_project.rb +1 -1
  93. data/lib/growwer/models/managed_service_campaign_proposal_counts.rb +1 -1
  94. data/lib/growwer/models/managed_service_campaign_strategy.rb +1 -1
  95. data/lib/growwer/models/managed_service_proposal.rb +1 -1
  96. data/lib/growwer/models/managed_service_proposal_briefing.rb +1 -1
  97. data/lib/growwer/models/managed_service_proposal_briefing_links_inner.rb +1 -1
  98. data/lib/growwer/models/managed_service_proposal_media.rb +1 -1
  99. data/lib/growwer/models/managed_service_proposal_review.rb +1 -1
  100. data/lib/growwer/models/managed_service_proposal_review_request.rb +1 -1
  101. data/lib/growwer/models/managed_service_proposal_review_request_reviews_inner.rb +1 -1
  102. data/lib/growwer/models/managed_service_proposals_estimate.rb +1 -1
  103. data/lib/growwer/models/managed_service_proposals_estimate_request.rb +1 -1
  104. data/lib/growwer/models/managed_service_request.rb +1 -1
  105. data/lib/growwer/models/managed_service_request_sent.rb +1 -1
  106. data/lib/growwer/models/money.rb +1 -1
  107. data/lib/growwer/models/money_or_null.rb +1 -1
  108. data/lib/growwer/models/order.rb +1 -1
  109. data/lib/growwer/models/order_action_reason.rb +1 -1
  110. data/lib/growwer/models/order_briefing.rb +1 -1
  111. data/lib/growwer/models/order_channel.rb +1 -1
  112. data/lib/growwer/models/order_create_request.rb +1 -1
  113. data/lib/growwer/models/order_delivery.rb +1 -1
  114. data/lib/growwer/models/order_draft.rb +1 -1
  115. data/lib/growwer/models/order_estimate.rb +1 -1
  116. data/lib/growwer/models/order_estimate_request.rb +1 -1
  117. data/lib/growwer/models/order_estimate_request_briefing.rb +1 -1
  118. data/lib/growwer/models/order_event_data.rb +165 -0
  119. data/lib/growwer/models/order_link.rb +1 -1
  120. data/lib/growwer/models/order_link_request.rb +1 -1
  121. data/lib/growwer/models/order_media.rb +1 -1
  122. data/lib/growwer/models/order_project.rb +1 -1
  123. data/lib/growwer/models/order_state_history_inner.rb +1 -1
  124. data/lib/growwer/models/order_state_history_inner_reason.rb +1 -1
  125. data/lib/growwer/models/post_order_briefing.rb +1 -1
  126. data/lib/growwer/models/post_order_briefing_request.rb +1 -1
  127. data/lib/growwer/models/project.rb +1 -1
  128. data/lib/growwer/models/project_catalogue_media.rb +1 -1
  129. data/lib/growwer/models/project_catalogue_media_all_of_project.rb +1 -1
  130. data/lib/growwer/models/project_catalogue_media_all_of_project_ai_keywords.rb +1 -1
  131. data/lib/growwer/models/put_seller_holiday200_response.rb +1 -1
  132. data/lib/growwer/models/put_seller_holiday_request.rb +1 -1
  133. data/lib/growwer/models/request_medias201_response.rb +1 -1
  134. data/lib/growwer/models/request_medias_request.rb +1 -1
  135. data/lib/growwer/models/saved_filter.rb +1 -1
  136. data/lib/growwer/models/saved_filter_notifications.rb +1 -1
  137. data/lib/growwer/models/seller_fees.rb +1 -1
  138. data/lib/growwer/models/seller_fees_or_null.rb +1 -1
  139. data/lib/growwer/models/seller_media.rb +1 -1
  140. data/lib/growwer/models/seller_media_flash_offer.rb +1 -1
  141. data/lib/growwer/models/seller_media_link_addition_offer.rb +1 -1
  142. data/lib/growwer/models/seller_media_link_addition_offer_pricing_options_inner.rb +1 -1
  143. data/lib/growwer/models/seller_media_post_offer.rb +1 -1
  144. data/lib/growwer/models/seller_media_post_offer_pricing_options_inner.rb +1 -1
  145. data/lib/growwer/models/seller_order.rb +1 -1
  146. data/lib/growwer/models/seller_order_briefing.rb +1 -1
  147. data/lib/growwer/models/seller_order_channel.rb +1 -1
  148. data/lib/growwer/models/seller_order_draft.rb +1 -1
  149. data/lib/growwer/models/seller_order_draft_file.rb +1 -1
  150. data/lib/growwer/models/seller_order_post_delivery.rb +1 -1
  151. data/lib/growwer/models/seller_order_project.rb +1 -1
  152. data/lib/growwer/models/seller_order_refutation.rb +1 -1
  153. data/lib/growwer/models/seller_order_rejection.rb +1 -1
  154. data/lib/growwer/models/seller_order_rejection_reason.rb +1 -1
  155. data/lib/growwer/models/seller_post_order_briefing.rb +1 -1
  156. data/lib/growwer/models/seller_transaction.rb +1 -1
  157. data/lib/growwer/models/top_up_test_wallet200_response.rb +191 -0
  158. data/lib/growwer/models/top_up_test_wallet_request.rb +165 -0
  159. data/lib/growwer/models/transaction.rb +1 -1
  160. data/lib/growwer/models/update_project_request.rb +1 -1
  161. data/lib/growwer/models/update_seller_media_request.rb +1 -1
  162. data/lib/growwer/models/update_seller_media_request_extra_services_inner.rb +1 -1
  163. data/lib/growwer/models/update_seller_media_request_link_addition_offer.rb +1 -1
  164. data/lib/growwer/models/update_seller_media_request_link_addition_offer_pricing_options_inner.rb +1 -1
  165. data/lib/growwer/models/update_seller_media_request_post_offer.rb +1 -1
  166. data/lib/growwer/models/update_seller_media_request_post_offer_pricing_options_inner.rb +1 -1
  167. data/lib/growwer/models/update_webhook_request.rb +245 -0
  168. data/lib/growwer/models/upload_file201_response.rb +1 -1
  169. data/lib/growwer/models/webhook.rb +395 -0
  170. data/lib/growwer/models/webhook_delivery.rb +365 -0
  171. data/lib/growwer/models/webhook_delivery_attempt.rb +264 -0
  172. data/lib/growwer/models/webhook_event.rb +324 -0
  173. data/lib/growwer/models/webhook_event_data.rb +104 -0
  174. data/lib/growwer/models/webhook_event_type.rb +46 -0
  175. data/lib/growwer/models/webhook_test_event_data.rb +166 -0
  176. data/lib/growwer/models/webhook_with_secret.rb +413 -0
  177. data/lib/growwer/models/withdrawal.rb +1 -1
  178. data/lib/growwer/version.rb +2 -2
  179. data/lib/growwer.rb +21 -1
  180. data/spec/api/test_helpers_api_spec.rb +74 -0
  181. data/spec/api/webhooks_api_spec.rb +154 -0
  182. data/spec/models/advance_test_order_request_spec.rb +40 -0
  183. data/spec/models/balance_low_event_data_spec.rb +42 -0
  184. data/spec/models/balance_low_event_data_wallet_spec.rb +42 -0
  185. data/spec/models/create_webhook_request_spec.rb +54 -0
  186. data/spec/models/list_webhook_deliveries200_response_spec.rb +42 -0
  187. data/spec/models/list_webhooks200_response_spec.rb +42 -0
  188. data/spec/models/order_event_data_spec.rb +36 -0
  189. data/spec/models/top_up_test_wallet200_response_spec.rb +42 -0
  190. data/spec/models/top_up_test_wallet_request_spec.rb +36 -0
  191. data/spec/models/update_webhook_request_spec.rb +60 -0
  192. data/spec/models/webhook_delivery_attempt_spec.rb +64 -0
  193. data/spec/models/webhook_delivery_spec.rb +86 -0
  194. data/spec/models/webhook_event_data_spec.rb +32 -0
  195. data/spec/models/webhook_event_spec.rb +78 -0
  196. data/spec/models/webhook_event_type_spec.rb +30 -0
  197. data/spec/models/webhook_spec.rb +100 -0
  198. data/spec/models/webhook_test_event_data_spec.rb +36 -0
  199. data/spec/models/webhook_with_secret_spec.rb +106 -0
  200. data/spec/spec_helper.rb +1 -1
  201. metadata +82 -2
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Growwer API
3
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.
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`. Test mode: a test key (`gw_sk_test_` plus 43 characters) works on your account's test data alone, apart from the real catalogue: test projects, orders and files, and a test wallet that starts at 1,000.00 EUR. Every response to a test key carries `Growwer-Mode: test`, and an id of the other mode answers 404 as a missing object would. - A test order is validated and debited from the test wallet as a live one is. A simulated seller accepts it a minute later and delivers it two minutes after that; you approve the delivery or request an update. - The Test helpers top the test wallet up, move a test order on at once and reset your test data. A live key on them gets 403 `test_mode_only`. - A test key on the seller and managed service operations, on a project's catalogue writes and on media requests gets 403 `not_available_in_test_mode`. - Idempotency keys are scoped per mode: the same `Idempotency-Key` sent with a live and a test key never replays the other mode's response. Webhooks: a subscription receives the events of its mode, signed as Standard Webhooks. A subscription created with a live key gets the events of your orders and your wallet; one created with a test key gets those of your test orders and test wallet, with `mode: test`, and never a live event. `x-webhooks` lists every event Growwer POSTs and its payload; the WebhookEvent schema describes the headers, the signature and the retries. 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
5
 
6
6
  The version of the OpenAPI document: 1
7
7
  Contact: support@growwer.com
@@ -20,7 +20,7 @@ module Growwer
20
20
  @api_client = api_client
21
21
  end
22
22
  # Your account
23
- # Profile basics, the buyer and seller balances, whether your seller account is restricted, whether the catalogue is open to you, and whether you have a managed service.
23
+ # Profile basics, the buyer and seller balances, whether your seller account is restricted, whether the catalogue is open to you, whether you have a managed service, and whether the key you called with is live or test. A test key reads its test wallet as the buyer balance (1,000.00 EUR until test orders and top-ups move it), never your real balance, and no seller side.
24
24
  # @param [Hash] opts the optional parameters
25
25
  # @return [GetMe200Response]
26
26
  def get_me(opts = {})
@@ -29,7 +29,7 @@ module Growwer
29
29
  end
30
30
 
31
31
  # Your account
32
- # Profile basics, the buyer and seller balances, whether your seller account is restricted, whether the catalogue is open to you, and whether you have a managed service.
32
+ # Profile basics, the buyer and seller balances, whether your seller account is restricted, whether the catalogue is open to you, whether you have a managed service, and whether the key you called with is live or test. A test key reads its test wallet as the buyer balance (1,000.00 EUR until test orders and top-ups move it), never your real balance, and no seller side.
33
33
  # @param [Hash] opts the optional parameters
34
34
  # @return [Array<(GetMe200Response, Integer, Hash)>] GetMe200Response data, response status code and response headers
35
35
  def get_me_with_http_info(opts = {})
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Growwer API
3
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.
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`. Test mode: a test key (`gw_sk_test_` plus 43 characters) works on your account's test data alone, apart from the real catalogue: test projects, orders and files, and a test wallet that starts at 1,000.00 EUR. Every response to a test key carries `Growwer-Mode: test`, and an id of the other mode answers 404 as a missing object would. - A test order is validated and debited from the test wallet as a live one is. A simulated seller accepts it a minute later and delivers it two minutes after that; you approve the delivery or request an update. - The Test helpers top the test wallet up, move a test order on at once and reset your test data. A live key on them gets 403 `test_mode_only`. - A test key on the seller and managed service operations, on a project's catalogue writes and on media requests gets 403 `not_available_in_test_mode`. - Idempotency keys are scoped per mode: the same `Idempotency-Key` sent with a live and a test key never replays the other mode's response. Webhooks: a subscription receives the events of its mode, signed as Standard Webhooks. A subscription created with a live key gets the events of your orders and your wallet; one created with a test key gets those of your test orders and test wallet, with `mode: test`, and never a live event. `x-webhooks` lists every event Growwer POSTs and its payload; the WebhookEvent schema describes the headers, the signature and the retries. 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
5
 
6
6
  The version of the OpenAPI document: 1
7
7
  Contact: support@growwer.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Growwer API
3
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.
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`. Test mode: a test key (`gw_sk_test_` plus 43 characters) works on your account's test data alone, apart from the real catalogue: test projects, orders and files, and a test wallet that starts at 1,000.00 EUR. Every response to a test key carries `Growwer-Mode: test`, and an id of the other mode answers 404 as a missing object would. - A test order is validated and debited from the test wallet as a live one is. A simulated seller accepts it a minute later and delivers it two minutes after that; you approve the delivery or request an update. - The Test helpers top the test wallet up, move a test order on at once and reset your test data. A live key on them gets 403 `test_mode_only`. - A test key on the seller and managed service operations, on a project's catalogue writes and on media requests gets 403 `not_available_in_test_mode`. - Idempotency keys are scoped per mode: the same `Idempotency-Key` sent with a live and a test key never replays the other mode's response. Webhooks: a subscription receives the events of its mode, signed as Standard Webhooks. A subscription created with a live key gets the events of your orders and your wallet; one created with a test key gets those of your test orders and test wallet, with `mode: test`, and never a live event. `x-webhooks` lists every event Growwer POSTs and its payload; the WebhookEvent schema describes the headers, the signature and the retries. 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
5
 
6
6
  The version of the OpenAPI document: 1
7
7
  Contact: support@growwer.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Growwer API
3
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.
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`. Test mode: a test key (`gw_sk_test_` plus 43 characters) works on your account's test data alone, apart from the real catalogue: test projects, orders and files, and a test wallet that starts at 1,000.00 EUR. Every response to a test key carries `Growwer-Mode: test`, and an id of the other mode answers 404 as a missing object would. - A test order is validated and debited from the test wallet as a live one is. A simulated seller accepts it a minute later and delivers it two minutes after that; you approve the delivery or request an update. - The Test helpers top the test wallet up, move a test order on at once and reset your test data. A live key on them gets 403 `test_mode_only`. - A test key on the seller and managed service operations, on a project's catalogue writes and on media requests gets 403 `not_available_in_test_mode`. - Idempotency keys are scoped per mode: the same `Idempotency-Key` sent with a live and a test key never replays the other mode's response. Webhooks: a subscription receives the events of its mode, signed as Standard Webhooks. A subscription created with a live key gets the events of your orders and your wallet; one created with a test key gets those of your test orders and test wallet, with `mode: test`, and never a live event. `x-webhooks` lists every event Growwer POSTs and its payload; the WebhookEvent schema describes the headers, the signature and the retries. 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
5
 
6
6
  The version of the OpenAPI document: 1
7
7
  Contact: support@growwer.com
@@ -719,7 +719,7 @@ module Growwer
719
719
  end
720
720
 
721
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.
722
+ # Restores a media you discarded for one of your projects. Restoring one that is not discarded, or an id no media has, changes nothing and answers the same. It works for any media, even one the catalogue no longer shows.
723
723
  # @param id [String] The project.
724
724
  # @param media_id [String] The media.
725
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;.
@@ -731,7 +731,7 @@ module Growwer
731
731
  end
732
732
 
733
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.
734
+ # Restores a media you discarded for one of your projects. Restoring one that is not discarded, or an id no media has, changes nothing and answers the same. It works for any media, even one the catalogue no longer shows.
735
735
  # @param id [String] The project.
736
736
  # @param media_id [String] The media.
737
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;.
@@ -799,7 +799,7 @@ module Growwer
799
799
  end
800
800
 
801
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.
802
+ # Removes a media from the favourites of one of your projects. Removing one that is not a favourite, or an id no media has, changes nothing and answers the same. It works for any media, even one the catalogue no longer shows.
803
803
  # @param id [String] The project.
804
804
  # @param media_id [String] The media.
805
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;.
@@ -811,7 +811,7 @@ module Growwer
811
811
  end
812
812
 
813
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.
814
+ # Removes a media from the favourites of one of your projects. Removing one that is not a favourite, or an id no media has, changes nothing and answers the same. It works for any media, even one the catalogue no longer shows.
815
815
  # @param id [String] The project.
816
816
  # @param media_id [String] The media.
817
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;.
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Growwer API
3
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.
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`. Test mode: a test key (`gw_sk_test_` plus 43 characters) works on your account's test data alone, apart from the real catalogue: test projects, orders and files, and a test wallet that starts at 1,000.00 EUR. Every response to a test key carries `Growwer-Mode: test`, and an id of the other mode answers 404 as a missing object would. - A test order is validated and debited from the test wallet as a live one is. A simulated seller accepts it a minute later and delivers it two minutes after that; you approve the delivery or request an update. - The Test helpers top the test wallet up, move a test order on at once and reset your test data. A live key on them gets 403 `test_mode_only`. - A test key on the seller and managed service operations, on a project's catalogue writes and on media requests gets 403 `not_available_in_test_mode`. - Idempotency keys are scoped per mode: the same `Idempotency-Key` sent with a live and a test key never replays the other mode's response. Webhooks: a subscription receives the events of its mode, signed as Standard Webhooks. A subscription created with a live key gets the events of your orders and your wallet; one created with a test key gets those of your test orders and test wallet, with `mode: test`, and never a live event. `x-webhooks` lists every event Growwer POSTs and its payload; the WebhookEvent schema describes the headers, the signature and the retries. 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
5
 
6
6
  The version of the OpenAPI document: 1
7
7
  Contact: support@growwer.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Growwer API
3
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.
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`. Test mode: a test key (`gw_sk_test_` plus 43 characters) works on your account's test data alone, apart from the real catalogue: test projects, orders and files, and a test wallet that starts at 1,000.00 EUR. Every response to a test key carries `Growwer-Mode: test`, and an id of the other mode answers 404 as a missing object would. - A test order is validated and debited from the test wallet as a live one is. A simulated seller accepts it a minute later and delivers it two minutes after that; you approve the delivery or request an update. - The Test helpers top the test wallet up, move a test order on at once and reset your test data. A live key on them gets 403 `test_mode_only`. - A test key on the seller and managed service operations, on a project's catalogue writes and on media requests gets 403 `not_available_in_test_mode`. - Idempotency keys are scoped per mode: the same `Idempotency-Key` sent with a live and a test key never replays the other mode's response. Webhooks: a subscription receives the events of its mode, signed as Standard Webhooks. A subscription created with a live key gets the events of your orders and your wallet; one created with a test key gets those of your test orders and test wallet, with `mode: test`, and never a live event. `x-webhooks` lists every event Growwer POSTs and its payload; the WebhookEvent schema describes the headers, the signature and the retries. 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
5
 
6
6
  The version of the OpenAPI document: 1
7
7
  Contact: support@growwer.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Growwer API
3
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.
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`. Test mode: a test key (`gw_sk_test_` plus 43 characters) works on your account's test data alone, apart from the real catalogue: test projects, orders and files, and a test wallet that starts at 1,000.00 EUR. Every response to a test key carries `Growwer-Mode: test`, and an id of the other mode answers 404 as a missing object would. - A test order is validated and debited from the test wallet as a live one is. A simulated seller accepts it a minute later and delivers it two minutes after that; you approve the delivery or request an update. - The Test helpers top the test wallet up, move a test order on at once and reset your test data. A live key on them gets 403 `test_mode_only`. - A test key on the seller and managed service operations, on a project's catalogue writes and on media requests gets 403 `not_available_in_test_mode`. - Idempotency keys are scoped per mode: the same `Idempotency-Key` sent with a live and a test key never replays the other mode's response. Webhooks: a subscription receives the events of its mode, signed as Standard Webhooks. A subscription created with a live key gets the events of your orders and your wallet; one created with a test key gets those of your test orders and test wallet, with `mode: test`, and never a live event. `x-webhooks` lists every event Growwer POSTs and its payload; the WebhookEvent schema describes the headers, the signature and the retries. 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
5
 
6
6
  The version of the OpenAPI document: 1
7
7
  Contact: support@growwer.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Growwer API
3
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.
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`. Test mode: a test key (`gw_sk_test_` plus 43 characters) works on your account's test data alone, apart from the real catalogue: test projects, orders and files, and a test wallet that starts at 1,000.00 EUR. Every response to a test key carries `Growwer-Mode: test`, and an id of the other mode answers 404 as a missing object would. - A test order is validated and debited from the test wallet as a live one is. A simulated seller accepts it a minute later and delivers it two minutes after that; you approve the delivery or request an update. - The Test helpers top the test wallet up, move a test order on at once and reset your test data. A live key on them gets 403 `test_mode_only`. - A test key on the seller and managed service operations, on a project's catalogue writes and on media requests gets 403 `not_available_in_test_mode`. - Idempotency keys are scoped per mode: the same `Idempotency-Key` sent with a live and a test key never replays the other mode's response. Webhooks: a subscription receives the events of its mode, signed as Standard Webhooks. A subscription created with a live key gets the events of your orders and your wallet; one created with a test key gets those of your test orders and test wallet, with `mode: test`, and never a live event. `x-webhooks` lists every event Growwer POSTs and its payload; the WebhookEvent schema describes the headers, the signature and the retries. 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
5
 
6
6
  The version of the OpenAPI document: 1
7
7
  Contact: support@growwer.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Growwer API
3
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.
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`. Test mode: a test key (`gw_sk_test_` plus 43 characters) works on your account's test data alone, apart from the real catalogue: test projects, orders and files, and a test wallet that starts at 1,000.00 EUR. Every response to a test key carries `Growwer-Mode: test`, and an id of the other mode answers 404 as a missing object would. - A test order is validated and debited from the test wallet as a live one is. A simulated seller accepts it a minute later and delivers it two minutes after that; you approve the delivery or request an update. - The Test helpers top the test wallet up, move a test order on at once and reset your test data. A live key on them gets 403 `test_mode_only`. - A test key on the seller and managed service operations, on a project's catalogue writes and on media requests gets 403 `not_available_in_test_mode`. - Idempotency keys are scoped per mode: the same `Idempotency-Key` sent with a live and a test key never replays the other mode's response. Webhooks: a subscription receives the events of its mode, signed as Standard Webhooks. A subscription created with a live key gets the events of your orders and your wallet; one created with a test key gets those of your test orders and test wallet, with `mode: test`, and never a live event. `x-webhooks` lists every event Growwer POSTs and its payload; the WebhookEvent schema describes the headers, the signature and the retries. 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
5
 
6
6
  The version of the OpenAPI document: 1
7
7
  Contact: support@growwer.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Growwer API
3
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.
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`. Test mode: a test key (`gw_sk_test_` plus 43 characters) works on your account's test data alone, apart from the real catalogue: test projects, orders and files, and a test wallet that starts at 1,000.00 EUR. Every response to a test key carries `Growwer-Mode: test`, and an id of the other mode answers 404 as a missing object would. - A test order is validated and debited from the test wallet as a live one is. A simulated seller accepts it a minute later and delivers it two minutes after that; you approve the delivery or request an update. - The Test helpers top the test wallet up, move a test order on at once and reset your test data. A live key on them gets 403 `test_mode_only`. - A test key on the seller and managed service operations, on a project's catalogue writes and on media requests gets 403 `not_available_in_test_mode`. - Idempotency keys are scoped per mode: the same `Idempotency-Key` sent with a live and a test key never replays the other mode's response. Webhooks: a subscription receives the events of its mode, signed as Standard Webhooks. A subscription created with a live key gets the events of your orders and your wallet; one created with a test key gets those of your test orders and test wallet, with `mode: test`, and never a live event. `x-webhooks` lists every event Growwer POSTs and its payload; the WebhookEvent schema describes the headers, the signature and the retries. 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
5
 
6
6
  The version of the OpenAPI document: 1
7
7
  Contact: support@growwer.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Growwer API
3
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.
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`. Test mode: a test key (`gw_sk_test_` plus 43 characters) works on your account's test data alone, apart from the real catalogue: test projects, orders and files, and a test wallet that starts at 1,000.00 EUR. Every response to a test key carries `Growwer-Mode: test`, and an id of the other mode answers 404 as a missing object would. - A test order is validated and debited from the test wallet as a live one is. A simulated seller accepts it a minute later and delivers it two minutes after that; you approve the delivery or request an update. - The Test helpers top the test wallet up, move a test order on at once and reset your test data. A live key on them gets 403 `test_mode_only`. - A test key on the seller and managed service operations, on a project's catalogue writes and on media requests gets 403 `not_available_in_test_mode`. - Idempotency keys are scoped per mode: the same `Idempotency-Key` sent with a live and a test key never replays the other mode's response. Webhooks: a subscription receives the events of its mode, signed as Standard Webhooks. A subscription created with a live key gets the events of your orders and your wallet; one created with a test key gets those of your test orders and test wallet, with `mode: test`, and never a live event. `x-webhooks` lists every event Growwer POSTs and its payload; the WebhookEvent schema describes the headers, the signature and the retries. 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
5
 
6
6
  The version of the OpenAPI document: 1
7
7
  Contact: support@growwer.com
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #Growwer API
3
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.
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`. Test mode: a test key (`gw_sk_test_` plus 43 characters) works on your account's test data alone, apart from the real catalogue: test projects, orders and files, and a test wallet that starts at 1,000.00 EUR. Every response to a test key carries `Growwer-Mode: test`, and an id of the other mode answers 404 as a missing object would. - A test order is validated and debited from the test wallet as a live one is. A simulated seller accepts it a minute later and delivers it two minutes after that; you approve the delivery or request an update. - The Test helpers top the test wallet up, move a test order on at once and reset your test data. A live key on them gets 403 `test_mode_only`. - A test key on the seller and managed service operations, on a project's catalogue writes and on media requests gets 403 `not_available_in_test_mode`. - Idempotency keys are scoped per mode: the same `Idempotency-Key` sent with a live and a test key never replays the other mode's response. Webhooks: a subscription receives the events of its mode, signed as Standard Webhooks. A subscription created with a live key gets the events of your orders and your wallet; one created with a test key gets those of your test orders and test wallet, with `mode: test`, and never a live event. `x-webhooks` lists every event Growwer POSTs and its payload; the WebhookEvent schema describes the headers, the signature and the retries. 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
5
 
6
6
  The version of the OpenAPI document: 1
7
7
  Contact: support@growwer.com
@@ -0,0 +1,254 @@
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`. Test mode: a test key (`gw_sk_test_` plus 43 characters) works on your account's test data alone, apart from the real catalogue: test projects, orders and files, and a test wallet that starts at 1,000.00 EUR. Every response to a test key carries `Growwer-Mode: test`, and an id of the other mode answers 404 as a missing object would. - A test order is validated and debited from the test wallet as a live one is. A simulated seller accepts it a minute later and delivers it two minutes after that; you approve the delivery or request an update. - The Test helpers top the test wallet up, move a test order on at once and reset your test data. A live key on them gets 403 `test_mode_only`. - A test key on the seller and managed service operations, on a project's catalogue writes and on media requests gets 403 `not_available_in_test_mode`. - Idempotency keys are scoped per mode: the same `Idempotency-Key` sent with a live and a test key never replays the other mode's response. Webhooks: a subscription receives the events of its mode, signed as Standard Webhooks. A subscription created with a live key gets the events of your orders and your wallet; one created with a test key gets those of your test orders and test wallet, with `mode: test`, and never a live event. `x-webhooks` lists every event Growwer POSTs and its payload; the WebhookEvent schema describes the headers, the signature and the retries. 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 TestHelpersApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Advance a test order
23
+ # Test keys only. Moves one of your test orders at once to `to`, without waiting for the simulated seller: `accepted` or `rejected` (by the seller, from `pending_acceptance`), `draft_delivered` (the sample draft, from `pending_draft` or `pending_draft_update`), `draft_update_requested` (as if you sent the draft back, from `pending_draft_review`), `published` (delivered for your review, from `pending_order_delivery`, `scheduled` or `pending_order_delivery_update`), `update_requested` (as if you sent the delivery back, from `pending_order_delivery_review`) or `cancelled_by_growwer` (from any state that is not finished). The order and your test wallet change as that move changes them live, a rejection or a cancellation refunding the price, and the simulated seller carries on from the new state. A post with a future `scheduledPublicationDate` waits in `scheduled` until that date once the simulated seller delivers it; `published` skips the wait. A target its state does not allow answers 409 `invalid_transition` with the targets it allows. A live key gets 403 `test_mode_only`.
24
+ # @param id [String]
25
+ # @param idempotency_key [String] A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (&#x60;!&#x60; to &#x60;~&#x60;); any other value answers 400 &#x60;invalid_idempotency_key&#x60;.
26
+ # @param advance_test_order_request [AdvanceTestOrderRequest]
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [Order]
29
+ def advance_test_order(id, idempotency_key, advance_test_order_request, opts = {})
30
+ data, _status_code, _headers = advance_test_order_with_http_info(id, idempotency_key, advance_test_order_request, opts)
31
+ data
32
+ end
33
+
34
+ # Advance a test order
35
+ # Test keys only. Moves one of your test orders at once to &#x60;to&#x60;, without waiting for the simulated seller: &#x60;accepted&#x60; or &#x60;rejected&#x60; (by the seller, from &#x60;pending_acceptance&#x60;), &#x60;draft_delivered&#x60; (the sample draft, from &#x60;pending_draft&#x60; or &#x60;pending_draft_update&#x60;), &#x60;draft_update_requested&#x60; (as if you sent the draft back, from &#x60;pending_draft_review&#x60;), &#x60;published&#x60; (delivered for your review, from &#x60;pending_order_delivery&#x60;, &#x60;scheduled&#x60; or &#x60;pending_order_delivery_update&#x60;), &#x60;update_requested&#x60; (as if you sent the delivery back, from &#x60;pending_order_delivery_review&#x60;) or &#x60;cancelled_by_growwer&#x60; (from any state that is not finished). The order and your test wallet change as that move changes them live, a rejection or a cancellation refunding the price, and the simulated seller carries on from the new state. A post with a future &#x60;scheduledPublicationDate&#x60; waits in &#x60;scheduled&#x60; until that date once the simulated seller delivers it; &#x60;published&#x60; skips the wait. A target its state does not allow answers 409 &#x60;invalid_transition&#x60; with the targets it allows. A live key gets 403 &#x60;test_mode_only&#x60;.
36
+ # @param id [String]
37
+ # @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;.
38
+ # @param advance_test_order_request [AdvanceTestOrderRequest]
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [Array<(Order, Integer, Hash)>] Order data, response status code and response headers
41
+ def advance_test_order_with_http_info(id, idempotency_key, advance_test_order_request, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: TestHelpersApi.advance_test_order ...'
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 TestHelpersApi.advance_test_order"
48
+ end
49
+ # verify the required parameter 'idempotency_key' is set
50
+ if @api_client.config.client_side_validation && idempotency_key.nil?
51
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling TestHelpersApi.advance_test_order"
52
+ end
53
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
54
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling TestHelpersApi.advance_test_order, the character length must be smaller than or equal to 255.'
55
+ end
56
+
57
+ # verify the required parameter 'advance_test_order_request' is set
58
+ if @api_client.config.client_side_validation && advance_test_order_request.nil?
59
+ fail ArgumentError, "Missing the required parameter 'advance_test_order_request' when calling TestHelpersApi.advance_test_order"
60
+ end
61
+ # resource path
62
+ local_var_path = '/api/v1/test-helpers/orders/{id}/advance'.sub('{id}', CGI.escape(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
+ # HTTP header 'Content-Type'
72
+ content_type = @api_client.select_header_content_type(['application/json'])
73
+ if !content_type.nil?
74
+ header_params['Content-Type'] = content_type
75
+ end
76
+ header_params[:'Idempotency-Key'] = idempotency_key
77
+
78
+ # form parameters
79
+ form_params = opts[:form_params] || {}
80
+
81
+ # http body (model)
82
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(advance_test_order_request)
83
+
84
+ # return_type
85
+ return_type = opts[:debug_return_type] || 'Order'
86
+
87
+ # auth_names
88
+ auth_names = opts[:debug_auth_names] || ['apiKey']
89
+
90
+ new_options = opts.merge(
91
+ :operation => :"TestHelpersApi.advance_test_order",
92
+ :header_params => header_params,
93
+ :query_params => query_params,
94
+ :form_params => form_params,
95
+ :body => post_body,
96
+ :auth_names => auth_names,
97
+ :return_type => return_type
98
+ )
99
+
100
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
101
+ if @api_client.config.debugging
102
+ @api_client.config.logger.debug "API called: TestHelpersApi#advance_test_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
103
+ end
104
+ return data, status_code, headers
105
+ end
106
+
107
+ # Reset your test data
108
+ # Test keys only. Deletes your test projects, orders and uploaded test files, and returns your test wallet to its opening balance of 1,000.00 EUR with no movements. Your API keys and webhook subscriptions stay, and nothing of your live account changes. It takes no body. A live key gets 403 `test_mode_only`.
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 [Hash] opts the optional parameters
111
+ # @return [nil]
112
+ def reset_test_data(idempotency_key, opts = {})
113
+ reset_test_data_with_http_info(idempotency_key, opts)
114
+ nil
115
+ end
116
+
117
+ # Reset your test data
118
+ # Test keys only. Deletes your test projects, orders and uploaded test files, and returns your test wallet to its opening balance of 1,000.00 EUR with no movements. Your API keys and webhook subscriptions stay, and nothing of your live account changes. It takes no body. A live key gets 403 &#x60;test_mode_only&#x60;.
119
+ # @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;.
120
+ # @param [Hash] opts the optional parameters
121
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
122
+ def reset_test_data_with_http_info(idempotency_key, opts = {})
123
+ if @api_client.config.debugging
124
+ @api_client.config.logger.debug 'Calling API: TestHelpersApi.reset_test_data ...'
125
+ end
126
+ # verify the required parameter 'idempotency_key' is set
127
+ if @api_client.config.client_side_validation && idempotency_key.nil?
128
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling TestHelpersApi.reset_test_data"
129
+ end
130
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
131
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling TestHelpersApi.reset_test_data, the character length must be smaller than or equal to 255.'
132
+ end
133
+
134
+ # resource path
135
+ local_var_path = '/api/v1/test-helpers/reset'
136
+
137
+ # query parameters
138
+ query_params = opts[:query_params] || {}
139
+
140
+ # header parameters
141
+ header_params = opts[:header_params] || {}
142
+ # HTTP header 'Accept' (if needed)
143
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
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]
151
+
152
+ # return_type
153
+ return_type = opts[:debug_return_type]
154
+
155
+ # auth_names
156
+ auth_names = opts[:debug_auth_names] || ['apiKey']
157
+
158
+ new_options = opts.merge(
159
+ :operation => :"TestHelpersApi.reset_test_data",
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: TestHelpersApi#reset_test_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
171
+ end
172
+ return data, status_code, headers
173
+ end
174
+
175
+ # Top up your test wallet
176
+ # Test keys only. Credits your test wallet, the buyer wallet a test key spends from, with fictitious money: more than nothing and at most 10,000.00 EUR per call. It never touches your real wallets, takes no payment and issues no invoice; the movement shows in GET /wallets/buyer/transactions for a test key as a confirmed `deposit`. A live key gets 403 `test_mode_only`.
177
+ # @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;.
178
+ # @param top_up_test_wallet_request [TopUpTestWalletRequest]
179
+ # @param [Hash] opts the optional parameters
180
+ # @return [TopUpTestWallet200Response]
181
+ def top_up_test_wallet(idempotency_key, top_up_test_wallet_request, opts = {})
182
+ data, _status_code, _headers = top_up_test_wallet_with_http_info(idempotency_key, top_up_test_wallet_request, opts)
183
+ data
184
+ end
185
+
186
+ # Top up your test wallet
187
+ # Test keys only. Credits your test wallet, the buyer wallet a test key spends from, with fictitious money: more than nothing and at most 10,000.00 EUR per call. It never touches your real wallets, takes no payment and issues no invoice; the movement shows in GET /wallets/buyer/transactions for a test key as a confirmed &#x60;deposit&#x60;. A live key gets 403 &#x60;test_mode_only&#x60;.
188
+ # @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;.
189
+ # @param top_up_test_wallet_request [TopUpTestWalletRequest]
190
+ # @param [Hash] opts the optional parameters
191
+ # @return [Array<(TopUpTestWallet200Response, Integer, Hash)>] TopUpTestWallet200Response data, response status code and response headers
192
+ def top_up_test_wallet_with_http_info(idempotency_key, top_up_test_wallet_request, opts = {})
193
+ if @api_client.config.debugging
194
+ @api_client.config.logger.debug 'Calling API: TestHelpersApi.top_up_test_wallet ...'
195
+ end
196
+ # verify the required parameter 'idempotency_key' is set
197
+ if @api_client.config.client_side_validation && idempotency_key.nil?
198
+ fail ArgumentError, "Missing the required parameter 'idempotency_key' when calling TestHelpersApi.top_up_test_wallet"
199
+ end
200
+ if @api_client.config.client_side_validation && idempotency_key.to_s.length > 255
201
+ fail ArgumentError, 'invalid value for "idempotency_key" when calling TestHelpersApi.top_up_test_wallet, the character length must be smaller than or equal to 255.'
202
+ end
203
+
204
+ # verify the required parameter 'top_up_test_wallet_request' is set
205
+ if @api_client.config.client_side_validation && top_up_test_wallet_request.nil?
206
+ fail ArgumentError, "Missing the required parameter 'top_up_test_wallet_request' when calling TestHelpersApi.top_up_test_wallet"
207
+ end
208
+ # resource path
209
+ local_var_path = '/api/v1/test-helpers/wallet/top-up'
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
+ # HTTP header 'Content-Type'
219
+ content_type = @api_client.select_header_content_type(['application/json'])
220
+ if !content_type.nil?
221
+ header_params['Content-Type'] = content_type
222
+ end
223
+ header_params[:'Idempotency-Key'] = idempotency_key
224
+
225
+ # form parameters
226
+ form_params = opts[:form_params] || {}
227
+
228
+ # http body (model)
229
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(top_up_test_wallet_request)
230
+
231
+ # return_type
232
+ return_type = opts[:debug_return_type] || 'TopUpTestWallet200Response'
233
+
234
+ # auth_names
235
+ auth_names = opts[:debug_auth_names] || ['apiKey']
236
+
237
+ new_options = opts.merge(
238
+ :operation => :"TestHelpersApi.top_up_test_wallet",
239
+ :header_params => header_params,
240
+ :query_params => query_params,
241
+ :form_params => form_params,
242
+ :body => post_body,
243
+ :auth_names => auth_names,
244
+ :return_type => return_type
245
+ )
246
+
247
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
248
+ if @api_client.config.debugging
249
+ @api_client.config.logger.debug "API called: TestHelpersApi#top_up_test_wallet\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
250
+ end
251
+ return data, status_code, headers
252
+ end
253
+ end
254
+ end