growwer 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +61 -6
- data/docs/AccountApi.md +1 -1
- data/docs/AdvanceTestOrderRequest.md +18 -0
- data/docs/BalanceLowEventData.md +20 -0
- data/docs/BalanceLowEventDataWallet.md +20 -0
- data/docs/CatalogueApi.md +2 -2
- data/docs/CreateWebhookRequest.md +24 -0
- data/docs/GetMe200Response.md +3 -1
- data/docs/ListWebhookDeliveries200Response.md +20 -0
- data/docs/ListWebhooks200Response.md +20 -0
- data/docs/Money.md +4 -2
- data/docs/MoneyOrNull.md +4 -2
- data/docs/OrderCreateRequest.md +1 -1
- data/docs/OrderEventData.md +18 -0
- data/docs/SellerMedia.md +3 -1
- data/docs/SellerMediaCompetitiveFeesByLinkTypeInner.md +22 -0
- data/docs/SellerMediasApi.md +5 -5
- data/docs/TestHelpersApi.md +222 -0
- data/docs/TopUpTestWallet200Response.md +20 -0
- data/docs/TopUpTestWalletRequest.md +18 -0
- data/docs/UpdateWebhookRequest.md +26 -0
- data/docs/Webhook.md +38 -0
- data/docs/WebhookDelivery.md +32 -0
- data/docs/WebhookDeliveryAttempt.md +26 -0
- data/docs/WebhookEvent.md +28 -0
- data/docs/WebhookEventData.md +51 -0
- data/docs/WebhookEventType.md +15 -0
- data/docs/WebhookTestEventData.md +18 -0
- data/docs/WebhookWithSecret.md +40 -0
- data/docs/WebhooksApi.md +662 -0
- data/growwer.gemspec +1 -1
- data/lib/growwer/api/account_api.rb +3 -3
- data/lib/growwer/api/buyer_orders_api.rb +1 -1
- data/lib/growwer/api/buyer_wallet_api.rb +1 -1
- data/lib/growwer/api/catalogue_api.rb +5 -5
- data/lib/growwer/api/files_api.rb +1 -1
- data/lib/growwer/api/managed_services_api.rb +1 -1
- data/lib/growwer/api/projects_api.rb +1 -1
- data/lib/growwer/api/saved_filters_api.rb +1 -1
- data/lib/growwer/api/seller_account_api.rb +1 -1
- data/lib/growwer/api/seller_medias_api.rb +5 -5
- data/lib/growwer/api/seller_orders_api.rb +1 -1
- data/lib/growwer/api/seller_wallet_api.rb +1 -1
- data/lib/growwer/api/test_helpers_api.rb +254 -0
- data/lib/growwer/api/webhooks_api.rb +707 -0
- data/lib/growwer/api_client.rb +2 -2
- data/lib/growwer/api_error.rb +1 -1
- data/lib/growwer/api_model_base.rb +1 -1
- data/lib/growwer/configuration.rb +1 -1
- data/lib/growwer/models/advance_test_order_request.rb +189 -0
- data/lib/growwer/models/balance.rb +1 -1
- data/lib/growwer/models/balance_low_event_data.rb +192 -0
- data/lib/growwer/models/balance_low_event_data_wallet.rb +192 -0
- data/lib/growwer/models/catalogue_media.rb +1 -1
- data/lib/growwer/models/catalogue_media_flash_offer.rb +1 -1
- data/lib/growwer/models/catalogue_media_metrics.rb +1 -1
- data/lib/growwer/models/catalogue_offer.rb +1 -1
- data/lib/growwer/models/catalogue_offer_or_null.rb +1 -1
- data/lib/growwer/models/catalogue_post_offer.rb +1 -1
- data/lib/growwer/models/catalogue_post_offer_all_of_extras.rb +1 -1
- data/lib/growwer/models/catalogue_post_offer_all_of_extras_sensitive_topic.rb +1 -1
- data/lib/growwer/models/code_name.rb +1 -1
- data/lib/growwer/models/count_saved_filter_medias200_response.rb +1 -1
- data/lib/growwer/models/create_project_request.rb +1 -1
- data/lib/growwer/models/create_saved_filter_request.rb +1 -1
- data/lib/growwer/models/create_seller_media_request.rb +1 -1
- data/lib/growwer/models/create_seller_media_request_post_offer.rb +1 -1
- data/lib/growwer/models/create_webhook_request.rb +248 -0
- data/lib/growwer/models/error.rb +1 -1
- data/lib/growwer/models/get_buyer_wallet200_response.rb +1 -1
- data/lib/growwer/models/get_me200_response.rb +57 -20
- data/lib/growwer/models/get_me200_response_buyer.rb +1 -1
- data/lib/growwer/models/get_me200_response_catalogue.rb +1 -1
- data/lib/growwer/models/get_me200_response_managed_service.rb +1 -1
- data/lib/growwer/models/get_me200_response_seller.rb +2 -1
- data/lib/growwer/models/get_seller_wallet200_response.rb +1 -1
- data/lib/growwer/models/get_vocabulary200_response.rb +1 -1
- data/lib/growwer/models/get_vocabulary200_response_topics_inner.rb +1 -1
- data/lib/growwer/models/invoice.rb +1 -1
- data/lib/growwer/models/link_addition_order_briefing.rb +1 -1
- data/lib/growwer/models/link_addition_order_briefing_request.rb +1 -1
- data/lib/growwer/models/list_buyer_transactions200_response.rb +1 -1
- data/lib/growwer/models/list_flash_offers200_response.rb +1 -1
- data/lib/growwer/models/list_invoices200_response.rb +1 -1
- data/lib/growwer/models/list_managed_service_campaigns200_response.rb +1 -1
- data/lib/growwer/models/list_managed_service_proposals200_response.rb +1 -1
- data/lib/growwer/models/list_orders200_response.rb +1 -1
- data/lib/growwer/models/list_projects200_response.rb +1 -1
- data/lib/growwer/models/list_saved_filters200_response.rb +1 -1
- data/lib/growwer/models/list_seller_medias200_response.rb +1 -1
- data/lib/growwer/models/list_seller_orders200_response.rb +1 -1
- data/lib/growwer/models/list_seller_transactions200_response.rb +1 -1
- data/lib/growwer/models/list_webhook_deliveries200_response.rb +192 -0
- data/lib/growwer/models/list_webhooks200_response.rb +192 -0
- data/lib/growwer/models/list_withdrawals200_response.rb +1 -1
- data/lib/growwer/models/managed_service_campaign.rb +1 -1
- data/lib/growwer/models/managed_service_campaign_project.rb +1 -1
- data/lib/growwer/models/managed_service_campaign_proposal_counts.rb +1 -1
- data/lib/growwer/models/managed_service_campaign_strategy.rb +1 -1
- data/lib/growwer/models/managed_service_proposal.rb +1 -1
- data/lib/growwer/models/managed_service_proposal_briefing.rb +1 -1
- data/lib/growwer/models/managed_service_proposal_briefing_links_inner.rb +1 -1
- data/lib/growwer/models/managed_service_proposal_media.rb +1 -1
- data/lib/growwer/models/managed_service_proposal_review.rb +1 -1
- data/lib/growwer/models/managed_service_proposal_review_request.rb +1 -1
- data/lib/growwer/models/managed_service_proposal_review_request_reviews_inner.rb +1 -1
- data/lib/growwer/models/managed_service_proposals_estimate.rb +1 -1
- data/lib/growwer/models/managed_service_proposals_estimate_request.rb +1 -1
- data/lib/growwer/models/managed_service_request.rb +1 -1
- data/lib/growwer/models/managed_service_request_sent.rb +1 -1
- data/lib/growwer/models/money.rb +16 -6
- data/lib/growwer/models/money_or_null.rb +16 -6
- data/lib/growwer/models/order.rb +1 -1
- data/lib/growwer/models/order_action_reason.rb +1 -1
- data/lib/growwer/models/order_briefing.rb +1 -1
- data/lib/growwer/models/order_channel.rb +1 -1
- data/lib/growwer/models/order_create_request.rb +2 -2
- data/lib/growwer/models/order_delivery.rb +1 -1
- data/lib/growwer/models/order_draft.rb +1 -1
- data/lib/growwer/models/order_estimate.rb +1 -1
- data/lib/growwer/models/order_estimate_request.rb +1 -1
- data/lib/growwer/models/order_estimate_request_briefing.rb +1 -1
- data/lib/growwer/models/order_event_data.rb +165 -0
- data/lib/growwer/models/order_link.rb +1 -1
- data/lib/growwer/models/order_link_request.rb +1 -1
- data/lib/growwer/models/order_media.rb +1 -1
- data/lib/growwer/models/order_project.rb +1 -1
- data/lib/growwer/models/order_state_history_inner.rb +1 -1
- data/lib/growwer/models/order_state_history_inner_reason.rb +1 -1
- data/lib/growwer/models/post_order_briefing.rb +1 -1
- data/lib/growwer/models/post_order_briefing_request.rb +1 -1
- data/lib/growwer/models/project.rb +1 -1
- data/lib/growwer/models/project_catalogue_media.rb +1 -1
- data/lib/growwer/models/project_catalogue_media_all_of_project.rb +1 -1
- data/lib/growwer/models/project_catalogue_media_all_of_project_ai_keywords.rb +1 -1
- data/lib/growwer/models/put_seller_holiday200_response.rb +1 -1
- data/lib/growwer/models/put_seller_holiday_request.rb +1 -1
- data/lib/growwer/models/request_medias201_response.rb +1 -1
- data/lib/growwer/models/request_medias_request.rb +1 -1
- data/lib/growwer/models/saved_filter.rb +1 -1
- data/lib/growwer/models/saved_filter_notifications.rb +1 -1
- data/lib/growwer/models/seller_fees.rb +1 -1
- data/lib/growwer/models/seller_fees_or_null.rb +1 -1
- data/lib/growwer/models/seller_media.rb +18 -3
- data/lib/growwer/models/seller_media_competitive_fees_by_link_type_inner.rb +214 -0
- data/lib/growwer/models/seller_media_flash_offer.rb +1 -1
- data/lib/growwer/models/seller_media_link_addition_offer.rb +1 -1
- data/lib/growwer/models/seller_media_link_addition_offer_pricing_options_inner.rb +1 -1
- data/lib/growwer/models/seller_media_post_offer.rb +1 -1
- data/lib/growwer/models/seller_media_post_offer_pricing_options_inner.rb +1 -1
- data/lib/growwer/models/seller_order.rb +1 -1
- data/lib/growwer/models/seller_order_briefing.rb +1 -1
- data/lib/growwer/models/seller_order_channel.rb +1 -1
- data/lib/growwer/models/seller_order_draft.rb +1 -1
- data/lib/growwer/models/seller_order_draft_file.rb +1 -1
- data/lib/growwer/models/seller_order_post_delivery.rb +1 -1
- data/lib/growwer/models/seller_order_project.rb +1 -1
- data/lib/growwer/models/seller_order_refutation.rb +1 -1
- data/lib/growwer/models/seller_order_rejection.rb +1 -1
- data/lib/growwer/models/seller_order_rejection_reason.rb +1 -1
- data/lib/growwer/models/seller_post_order_briefing.rb +1 -1
- data/lib/growwer/models/seller_transaction.rb +1 -1
- data/lib/growwer/models/top_up_test_wallet200_response.rb +191 -0
- data/lib/growwer/models/top_up_test_wallet_request.rb +165 -0
- data/lib/growwer/models/transaction.rb +1 -1
- data/lib/growwer/models/update_project_request.rb +1 -1
- data/lib/growwer/models/update_seller_media_request.rb +1 -1
- data/lib/growwer/models/update_seller_media_request_extra_services_inner.rb +1 -1
- data/lib/growwer/models/update_seller_media_request_link_addition_offer.rb +1 -1
- data/lib/growwer/models/update_seller_media_request_link_addition_offer_pricing_options_inner.rb +1 -1
- data/lib/growwer/models/update_seller_media_request_post_offer.rb +1 -1
- data/lib/growwer/models/update_seller_media_request_post_offer_pricing_options_inner.rb +1 -1
- data/lib/growwer/models/update_webhook_request.rb +245 -0
- data/lib/growwer/models/upload_file201_response.rb +1 -1
- data/lib/growwer/models/webhook.rb +395 -0
- data/lib/growwer/models/webhook_delivery.rb +365 -0
- data/lib/growwer/models/webhook_delivery_attempt.rb +264 -0
- data/lib/growwer/models/webhook_event.rb +324 -0
- data/lib/growwer/models/webhook_event_data.rb +104 -0
- data/lib/growwer/models/webhook_event_type.rb +46 -0
- data/lib/growwer/models/webhook_test_event_data.rb +166 -0
- data/lib/growwer/models/webhook_with_secret.rb +413 -0
- data/lib/growwer/models/withdrawal.rb +1 -1
- data/lib/growwer/version.rb +2 -2
- data/lib/growwer.rb +22 -1
- data/spec/api/test_helpers_api_spec.rb +74 -0
- data/spec/api/webhooks_api_spec.rb +154 -0
- data/spec/models/advance_test_order_request_spec.rb +40 -0
- data/spec/models/balance_low_event_data_spec.rb +42 -0
- data/spec/models/balance_low_event_data_wallet_spec.rb +42 -0
- data/spec/models/create_webhook_request_spec.rb +54 -0
- data/spec/models/list_webhook_deliveries200_response_spec.rb +42 -0
- data/spec/models/list_webhooks200_response_spec.rb +42 -0
- data/spec/models/order_event_data_spec.rb +36 -0
- data/spec/models/seller_media_competitive_fees_by_link_type_inner_spec.rb +52 -0
- data/spec/models/top_up_test_wallet200_response_spec.rb +42 -0
- data/spec/models/top_up_test_wallet_request_spec.rb +36 -0
- data/spec/models/update_webhook_request_spec.rb +60 -0
- data/spec/models/webhook_delivery_attempt_spec.rb +64 -0
- data/spec/models/webhook_delivery_spec.rb +86 -0
- data/spec/models/webhook_event_data_spec.rb +32 -0
- data/spec/models/webhook_event_spec.rb +78 -0
- data/spec/models/webhook_event_type_spec.rb +30 -0
- data/spec/models/webhook_spec.rb +100 -0
- data/spec/models/webhook_test_event_data_spec.rb +36 -0
- data/spec/models/webhook_with_secret_spec.rb +106 -0
- data/spec/spec_helper.rb +1 -1
- metadata +86 -2
|
@@ -0,0 +1,154 @@
|
|
|
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. Your orders' events and `balance.low` are live: creating a subscription with a test key gets 403 `not_available_in_test_mode` for now. `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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for Growwer::WebhooksApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'WebhooksApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = Growwer::WebhooksApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of WebhooksApi' do
|
|
30
|
+
it 'should create an instance of WebhooksApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(Growwer::WebhooksApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for create_webhook
|
|
36
|
+
# Create a webhook subscription
|
|
37
|
+
# Subscribes an HTTPS URL to the events you list. Growwer then POSTs each event to it, signed as Standard Webhooks signs (`webhook-id`, `webhook-timestamp`, `webhook-signature`) with the `secret` this answer carries. The secret is shown only here and on POST /webhooks/{id}/rotate-secret: store it now. A replay of this request under its `Idempotency-Key` answers the subscription without it. The URL must be HTTPS and its host must resolve to public addresses only: a loopback, private, link-local, multicast or metadata address is refused with 422 `webhook_url_not_public`, a host that does not resolve with 422 `webhook_url_unresolvable`. `lowBalanceThreshold` is required with `balance.low` and refused without it. An account has at most 20 subscriptions per mode. Test keys get 403 `not_available_in_test_mode` for now.
|
|
38
|
+
# @param idempotency_key A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
39
|
+
# @param create_webhook_request
|
|
40
|
+
# @param [Hash] opts the optional parameters
|
|
41
|
+
# @return [WebhookWithSecret]
|
|
42
|
+
describe 'create_webhook test' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# unit tests for delete_webhook
|
|
49
|
+
# Delete a webhook subscription
|
|
50
|
+
# Deletes one of your webhook subscriptions and its delivery log. Deliveries still pending are not sent.
|
|
51
|
+
# @param id The subscription.
|
|
52
|
+
# @param idempotency_key A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
53
|
+
# @param [Hash] opts the optional parameters
|
|
54
|
+
# @return [nil]
|
|
55
|
+
describe 'delete_webhook test' do
|
|
56
|
+
it 'should work' do
|
|
57
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# unit tests for get_webhook
|
|
62
|
+
# Get a webhook subscription
|
|
63
|
+
# One of your webhook subscriptions, without its secret. A subscription of the other mode is not found.
|
|
64
|
+
# @param id The subscription.
|
|
65
|
+
# @param [Hash] opts the optional parameters
|
|
66
|
+
# @return [Webhook]
|
|
67
|
+
describe 'get_webhook test' do
|
|
68
|
+
it 'should work' do
|
|
69
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# unit tests for list_webhook_deliveries
|
|
74
|
+
# List the deliveries of a webhook subscription
|
|
75
|
+
# The events sent to the subscription in the last 30 days, newest first, each with its status and its latest 10 attempts: when, the status code your endpoint answered, how long it took and the start of its response body. Older deliveries are deleted.
|
|
76
|
+
# @param id The subscription.
|
|
77
|
+
# @param [Hash] opts the optional parameters
|
|
78
|
+
# @option opts [Integer] :limit Deliveries per page, 1 to 100.
|
|
79
|
+
# @option opts [Integer] :offset Deliveries to skip.
|
|
80
|
+
# @return [ListWebhookDeliveries200Response]
|
|
81
|
+
describe 'list_webhook_deliveries test' do
|
|
82
|
+
it 'should work' do
|
|
83
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# unit tests for list_webhooks
|
|
88
|
+
# List your webhook subscriptions
|
|
89
|
+
# Your webhook subscriptions in the mode of the key, newest first, disabled ones included. A live key lists the live ones and a test key the test ones.
|
|
90
|
+
# @param [Hash] opts the optional parameters
|
|
91
|
+
# @option opts [Integer] :limit Subscriptions per page, 1 to 100.
|
|
92
|
+
# @option opts [Integer] :offset Subscriptions to skip.
|
|
93
|
+
# @return [ListWebhooks200Response]
|
|
94
|
+
describe 'list_webhooks test' do
|
|
95
|
+
it 'should work' do
|
|
96
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# unit tests for redeliver_webhook
|
|
101
|
+
# Redeliver a webhook event
|
|
102
|
+
# Queues a delivery that has succeeded or failed again, in a new round of retries, and answers it. It sends the same event with the same `webhook-id`, so a consumer that dedupes by it handles it once. Deliveries are kept 30 days. A delivery still pending, being sent or waiting for its next retry, answers 409 `webhook_delivery_pending` and takes none of the hour's sends; so does a redelivery while the subscription has 10 test events and redeliveries pending, its limit for a redelivery, given in `details.limit`. The pending deliveries of events never redelivered do not count. A subscription takes at most 10 test events and redeliveries an hour: past them it answers 429 `webhook_send_limit_reached` with `Retry-After`. A disabled subscription answers 409 `webhook_disabled`.
|
|
103
|
+
# @param id The subscription.
|
|
104
|
+
# @param delivery_id The delivery.
|
|
105
|
+
# @param idempotency_key A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
106
|
+
# @param [Hash] opts the optional parameters
|
|
107
|
+
# @return [WebhookDelivery]
|
|
108
|
+
describe 'redeliver_webhook test' do
|
|
109
|
+
it 'should work' do
|
|
110
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# unit tests for rotate_webhook_secret
|
|
115
|
+
# Rotate a webhook secret
|
|
116
|
+
# Gives the subscription a new signing secret and answers it: it is shown only here, so store it now. For 24 hours, until `previousSecretExpiresAt`, every delivery carries two signatures in `webhook-signature`, one with each secret, so you can switch without missing an event; after that only the new secret signs. A replay of this request under its `Idempotency-Key` answers the subscription without the secret.
|
|
117
|
+
# @param id The subscription.
|
|
118
|
+
# @param idempotency_key A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
119
|
+
# @param [Hash] opts the optional parameters
|
|
120
|
+
# @return [WebhookWithSecret]
|
|
121
|
+
describe 'rotate_webhook_secret test' do
|
|
122
|
+
it 'should work' do
|
|
123
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# unit tests for send_webhook_test
|
|
128
|
+
# Send a test event
|
|
129
|
+
# Queues a `webhook.test` event for the subscription, whatever events it lists, and answers its delivery: follow it on GET /webhooks/{id}/deliveries. It is signed, retried and logged as any event. It normally supersedes the subscription's earlier test events still pending: their deliveries fail and are not retried, so a test right after fixing the endpoint does not wait behind them; one that cannot be failed then is failed by the next test. A subscription takes at most 10 test events and redeliveries an hour: past them it answers 429 `webhook_send_limit_reached` with `Retry-After`. A disabled subscription answers 409 `webhook_disabled`. A test event that cannot be recorded answers 503 `webhook_test_unavailable`: nothing was sent, the attempt counts toward the hourly limit, and a retry needs a new `Idempotency-Key`.
|
|
130
|
+
# @param id The subscription.
|
|
131
|
+
# @param idempotency_key A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
132
|
+
# @param [Hash] opts the optional parameters
|
|
133
|
+
# @return [WebhookDelivery]
|
|
134
|
+
describe 'send_webhook_test test' do
|
|
135
|
+
it 'should work' do
|
|
136
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# unit tests for update_webhook
|
|
141
|
+
# Edit a webhook subscription
|
|
142
|
+
# Changes only the fields you send. A new `url` is checked as on create. Dropping `balance.low` from `events` drops the threshold with it. `enabled: false` disables the subscription, which then gets no events; `enabled: true` enables it again, including one Growwer disabled because its endpoint answered 410 or failed for 5 days, and forgets its failures.
|
|
143
|
+
# @param id The subscription.
|
|
144
|
+
# @param idempotency_key A new key for each write, reused only to retry that same write. 1 to 255 printable ASCII characters without spaces (`!` to `~`); any other value answers 400 `invalid_idempotency_key`.
|
|
145
|
+
# @param update_webhook_request
|
|
146
|
+
# @param [Hash] opts the optional parameters
|
|
147
|
+
# @return [Webhook]
|
|
148
|
+
describe 'update_webhook test' do
|
|
149
|
+
it 'should work' do
|
|
150
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
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. Your orders' events and `balance.low` are live: creating a subscription with a test key gets 403 `not_available_in_test_mode` for now. `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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Growwer::AdvanceTestOrderRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Growwer::AdvanceTestOrderRequest do
|
|
21
|
+
#let(:instance) { Growwer::AdvanceTestOrderRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of AdvanceTestOrderRequest' do
|
|
24
|
+
it 'should create an instance of AdvanceTestOrderRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Growwer::AdvanceTestOrderRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "to"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["accepted", "rejected", "published", "update_requested", "draft_delivered", "draft_update_requested", "cancelled_by_growwer"])
|
|
34
|
+
# validator.allowable_values.each do |value|
|
|
35
|
+
# expect { instance.to = value }.not_to raise_error
|
|
36
|
+
# end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
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. Your orders' events and `balance.low` are live: creating a subscription with a test key gets 403 `not_available_in_test_mode` for now. `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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Growwer::BalanceLowEventData
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Growwer::BalanceLowEventData do
|
|
21
|
+
#let(:instance) { Growwer::BalanceLowEventData.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of BalanceLowEventData' do
|
|
24
|
+
it 'should create an instance of BalanceLowEventData' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Growwer::BalanceLowEventData)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "wallet"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "threshold"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
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. Your orders' events and `balance.low` are live: creating a subscription with a test key gets 403 `not_available_in_test_mode` for now. `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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Growwer::BalanceLowEventDataWallet
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Growwer::BalanceLowEventDataWallet do
|
|
21
|
+
#let(:instance) { Growwer::BalanceLowEventDataWallet.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of BalanceLowEventDataWallet' do
|
|
24
|
+
it 'should create an instance of BalanceLowEventDataWallet' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Growwer::BalanceLowEventDataWallet)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "available_balance"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "currency"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
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. Your orders' events and `balance.low` are live: creating a subscription with a test key gets 403 `not_available_in_test_mode` for now. `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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Growwer::CreateWebhookRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Growwer::CreateWebhookRequest do
|
|
21
|
+
#let(:instance) { Growwer::CreateWebhookRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CreateWebhookRequest' do
|
|
24
|
+
it 'should create an instance of CreateWebhookRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Growwer::CreateWebhookRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "url"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "events"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "low_balance_threshold"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe 'test attribute "description"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
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. Your orders' events and `balance.low` are live: creating a subscription with a test key gets 403 `not_available_in_test_mode` for now. `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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Growwer::ListWebhookDeliveries200Response
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Growwer::ListWebhookDeliveries200Response do
|
|
21
|
+
#let(:instance) { Growwer::ListWebhookDeliveries200Response.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of ListWebhookDeliveries200Response' do
|
|
24
|
+
it 'should create an instance of ListWebhookDeliveries200Response' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Growwer::ListWebhookDeliveries200Response)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "items"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "total"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
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. Your orders' events and `balance.low` are live: creating a subscription with a test key gets 403 `not_available_in_test_mode` for now. `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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Growwer::ListWebhooks200Response
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Growwer::ListWebhooks200Response do
|
|
21
|
+
#let(:instance) { Growwer::ListWebhooks200Response.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of ListWebhooks200Response' do
|
|
24
|
+
it 'should create an instance of ListWebhooks200Response' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Growwer::ListWebhooks200Response)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "items"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "total"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
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. Your orders' events and `balance.low` are live: creating a subscription with a test key gets 403 `not_available_in_test_mode` for now. `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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Growwer::OrderEventData
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Growwer::OrderEventData do
|
|
21
|
+
#let(:instance) { Growwer::OrderEventData.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of OrderEventData' do
|
|
24
|
+
it 'should create an instance of OrderEventData' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Growwer::OrderEventData)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "order"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
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 (12500 is 125.00 EUR), answered with `amountDecimal`, the same amount as an exact decimal string (\"125.00\"); 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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Growwer::SellerMediaCompetitiveFeesByLinkTypeInner
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Growwer::SellerMediaCompetitiveFeesByLinkTypeInner do
|
|
21
|
+
#let(:instance) { Growwer::SellerMediaCompetitiveFeesByLinkTypeInner.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of SellerMediaCompetitiveFeesByLinkTypeInner' do
|
|
24
|
+
it 'should create an instance of SellerMediaCompetitiveFeesByLinkTypeInner' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Growwer::SellerMediaCompetitiveFeesByLinkTypeInner)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "link_type"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["dofollow", "nofollow", "citation"])
|
|
34
|
+
# validator.allowable_values.each do |value|
|
|
35
|
+
# expect { instance.link_type = value }.not_to raise_error
|
|
36
|
+
# end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
describe 'test attribute "fee_when_seller_writes_post"' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
describe 'test attribute "fee_when_seller_does_not_write_post"' do
|
|
47
|
+
it 'should work' do
|
|
48
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
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. Your orders' events and `balance.low` are live: creating a subscription with a test key gets 403 `not_available_in_test_mode` for now. `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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Growwer::TopUpTestWallet200Response
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Growwer::TopUpTestWallet200Response do
|
|
21
|
+
#let(:instance) { Growwer::TopUpTestWallet200Response.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of TopUpTestWallet200Response' do
|
|
24
|
+
it 'should create an instance of TopUpTestWallet200Response' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Growwer::TopUpTestWallet200Response)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "balance"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "top_up_url"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
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. Your orders' events and `balance.low` are live: creating a subscription with a test key gets 403 `not_available_in_test_mode` for now. `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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Growwer::TopUpTestWalletRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Growwer::TopUpTestWalletRequest do
|
|
21
|
+
#let(:instance) { Growwer::TopUpTestWalletRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of TopUpTestWalletRequest' do
|
|
24
|
+
it 'should create an instance of TopUpTestWalletRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Growwer::TopUpTestWalletRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "amount"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|