zernio-sdk 0.0.783 → 0.0.785
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 +9 -0
- data/docs/CommentsApi.md +9 -5
- data/docs/CreatePhoneNumberStockWatchRequest.md +18 -0
- data/docs/ListPhoneNumberStockWatches200Response.md +18 -0
- data/docs/PhoneNumberStockWatch.md +24 -0
- data/docs/PhoneNumbersApi.md +203 -0
- data/docs/ReviewsApi.md +9 -5
- data/docs/WebhookEventsApi.md +69 -0
- data/docs/WebhookPayloadPhoneNumberStockAvailable.md +24 -0
- data/docs/WebhookPayloadPhoneNumberStockAvailableStock.md +20 -0
- data/docs/WebhookPayloadPhoneNumberStockAvailableStockTypesInner.md +20 -0
- data/lib/zernio-sdk/api/comments_api.rb +9 -2
- data/lib/zernio-sdk/api/phone_numbers_api.rb +184 -0
- data/lib/zernio-sdk/api/reviews_api.rb +9 -2
- data/lib/zernio-sdk/api/webhook_events_api.rb +66 -0
- data/lib/zernio-sdk/models/create_phone_number_stock_watch_request.rb +183 -0
- data/lib/zernio-sdk/models/list_phone_number_stock_watches200_response.rb +149 -0
- data/lib/zernio-sdk/models/phone_number_stock_watch.rb +243 -0
- data/lib/zernio-sdk/models/webhook_payload_phone_number_stock_available.rb +269 -0
- data/lib/zernio-sdk/models/webhook_payload_phone_number_stock_available_stock.rb +194 -0
- data/lib/zernio-sdk/models/webhook_payload_phone_number_stock_available_stock_types_inner.rb +192 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +6 -0
- data/openapi.yaml +189 -7
- data/spec/api/comments_api_spec.rb +2 -1
- data/spec/api/phone_numbers_api_spec.rb +33 -0
- data/spec/api/reviews_api_spec.rb +2 -1
- data/spec/models/create_phone_number_stock_watch_request_spec.rb +36 -0
- data/spec/models/create_webhook_settings_request_spec.rb +1 -1
- data/spec/models/list_phone_number_stock_watches200_response_spec.rb +36 -0
- data/spec/models/phone_number_stock_watch_spec.rb +54 -0
- data/spec/models/update_webhook_settings_request_spec.rb +1 -1
- data/spec/models/webhook_payload_phone_number_stock_available_spec.rb +58 -0
- data/spec/models/webhook_payload_phone_number_stock_available_stock_spec.rb +42 -0
- data/spec/models/webhook_payload_phone_number_stock_available_stock_types_inner_spec.rb +42 -0
- data/spec/models/webhook_spec.rb +1 -1
- metadata +25 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0ee3c8cfd0376a80dd135ae4b44cf5a5a156f3820d7f7c72ff9b6ff8ed6ac6d1
|
|
4
|
+
data.tar.gz: '082bd3e247f9c84acfbe33f1ad5946506b3d5f172c1df3b8e196db9fc56f58da'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e4f99fc6ec87bd0744c05cdf0b1b69315b92273d806c271a27952b6bc9247ad21b8cb781a16cd2ce81a8d08f74aff979136effcdc668e16255da9fda538e1590
|
|
7
|
+
data.tar.gz: bf26dbd84671fa505120fe4724d066a76ffcaeb75d4f31367ec753dd029e14c4c139929caef1611477ce1e77436c32a41c7bc614dfece2af249bee815b201e7f
|
data/README.md
CHANGED
|
@@ -426,6 +426,8 @@ Class | Method | HTTP request | Description
|
|
|
426
426
|
*Zernio::PhoneNumbersApi* | [**check_phone_number_portability**](docs/PhoneNumbersApi.md#check_phone_number_portability) | **POST** /v1/phone-numbers/port-in/check | Check portability
|
|
427
427
|
*Zernio::PhoneNumbersApi* | [**create_phone_number_kyc_link**](docs/PhoneNumbersApi.md#create_phone_number_kyc_link) | **POST** /v1/phone-numbers/kyc/share | Create a hosted KYC link
|
|
428
428
|
*Zernio::PhoneNumbersApi* | [**create_phone_number_port_in**](docs/PhoneNumbersApi.md#create_phone_number_port_in) | **POST** /v1/phone-numbers/port-in | Port numbers in
|
|
429
|
+
*Zernio::PhoneNumbersApi* | [**create_phone_number_stock_watch**](docs/PhoneNumbersApi.md#create_phone_number_stock_watch) | **POST** /v1/phone-numbers/stock-watches | Watch an out-of-stock country
|
|
430
|
+
*Zernio::PhoneNumbersApi* | [**delete_phone_number_stock_watch**](docs/PhoneNumbersApi.md#delete_phone_number_stock_watch) | **DELETE** /v1/phone-numbers/stock-watches/{id} | Stop watching a country
|
|
429
431
|
*Zernio::PhoneNumbersApi* | [**get_phone_number**](docs/PhoneNumbersApi.md#get_phone_number) | **GET** /v1/phone-numbers/{id} | Get phone number
|
|
430
432
|
*Zernio::PhoneNumbersApi* | [**get_phone_number_kyc_form**](docs/PhoneNumbersApi.md#get_phone_number_kyc_form) | **GET** /v1/phone-numbers/kyc | Get KYC form spec
|
|
431
433
|
*Zernio::PhoneNumbersApi* | [**get_phone_number_port_in_order_requirements**](docs/PhoneNumbersApi.md#get_phone_number_port_in_order_requirements) | **GET** /v1/phone-numbers/port-in/{id}/requirements | A port-in order's pending requirements
|
|
@@ -433,6 +435,7 @@ Class | Method | HTTP request | Description
|
|
|
433
435
|
*Zernio::PhoneNumbersApi* | [**get_phone_number_remediation**](docs/PhoneNumbersApi.md#get_phone_number_remediation) | **GET** /v1/phone-numbers/{id}/remediate | Get declined requirements
|
|
434
436
|
*Zernio::PhoneNumbersApi* | [**list_phone_number_countries**](docs/PhoneNumbersApi.md#list_phone_number_countries) | **GET** /v1/phone-numbers/countries | List offerable number countries
|
|
435
437
|
*Zernio::PhoneNumbersApi* | [**list_phone_number_port_ins**](docs/PhoneNumbersApi.md#list_phone_number_port_ins) | **GET** /v1/phone-numbers/port-in | List port-in orders
|
|
438
|
+
*Zernio::PhoneNumbersApi* | [**list_phone_number_stock_watches**](docs/PhoneNumbersApi.md#list_phone_number_stock_watches) | **GET** /v1/phone-numbers/stock-watches | List stock watches
|
|
436
439
|
*Zernio::PhoneNumbersApi* | [**list_phone_numbers**](docs/PhoneNumbersApi.md#list_phone_numbers) | **GET** /v1/phone-numbers | List phone numbers
|
|
437
440
|
*Zernio::PhoneNumbersApi* | [**purchase_phone_number**](docs/PhoneNumbersApi.md#purchase_phone_number) | **POST** /v1/phone-numbers/purchase | Purchase phone number
|
|
438
441
|
*Zernio::PhoneNumbersApi* | [**release_phone_number**](docs/PhoneNumbersApi.md#release_phone_number) | **DELETE** /v1/phone-numbers/{id} | Release phone number
|
|
@@ -929,6 +932,7 @@ Class | Method | HTTP request | Description
|
|
|
929
932
|
- [Zernio::CreatePhoneNumberPortInRequest](docs/CreatePhoneNumberPortInRequest.md)
|
|
930
933
|
- [Zernio::CreatePhoneNumberPortInRequestEndUser](docs/CreatePhoneNumberPortInRequestEndUser.md)
|
|
931
934
|
- [Zernio::CreatePhoneNumberPortInRequestRequirementsInner](docs/CreatePhoneNumberPortInRequestRequirementsInner.md)
|
|
935
|
+
- [Zernio::CreatePhoneNumberStockWatchRequest](docs/CreatePhoneNumberStockWatchRequest.md)
|
|
932
936
|
- [Zernio::CreatePinterestBoard201Response](docs/CreatePinterestBoard201Response.md)
|
|
933
937
|
- [Zernio::CreatePinterestBoard201ResponseBoard](docs/CreatePinterestBoard201ResponseBoard.md)
|
|
934
938
|
- [Zernio::CreatePinterestBoardRequest](docs/CreatePinterestBoardRequest.md)
|
|
@@ -1656,6 +1660,7 @@ Class | Method | HTTP request | Description
|
|
|
1656
1660
|
- [Zernio::ListPhoneNumberCountries200ResponseCountriesInnerTypesInner](docs/ListPhoneNumberCountries200ResponseCountriesInnerTypesInner.md)
|
|
1657
1661
|
- [Zernio::ListPhoneNumberPortIns200Response](docs/ListPhoneNumberPortIns200Response.md)
|
|
1658
1662
|
- [Zernio::ListPhoneNumberPortIns200ResponseOrdersInner](docs/ListPhoneNumberPortIns200ResponseOrdersInner.md)
|
|
1663
|
+
- [Zernio::ListPhoneNumberStockWatches200Response](docs/ListPhoneNumberStockWatches200Response.md)
|
|
1659
1664
|
- [Zernio::ListPhoneNumbers200Response](docs/ListPhoneNumbers200Response.md)
|
|
1660
1665
|
- [Zernio::ListPhoneNumbers200ResponseConnectedInner](docs/ListPhoneNumbers200ResponseConnectedInner.md)
|
|
1661
1666
|
- [Zernio::ListPhoneNumbers200ResponseNumbersInner](docs/ListPhoneNumbers200ResponseNumbersInner.md)
|
|
@@ -1758,6 +1763,7 @@ Class | Method | HTTP request | Description
|
|
|
1758
1763
|
- [Zernio::Pagination](docs/Pagination.md)
|
|
1759
1764
|
- [Zernio::PauseWorkflow200Response](docs/PauseWorkflow200Response.md)
|
|
1760
1765
|
- [Zernio::Pending](docs/Pending.md)
|
|
1766
|
+
- [Zernio::PhoneNumberStockWatch](docs/PhoneNumberStockWatch.md)
|
|
1761
1767
|
- [Zernio::PinDiscordMessage200Response](docs/PinDiscordMessage200Response.md)
|
|
1762
1768
|
- [Zernio::PinterestPlatformData](docs/PinterestPlatformData.md)
|
|
1763
1769
|
- [Zernio::PlatformAnalytics](docs/PlatformAnalytics.md)
|
|
@@ -2321,6 +2327,9 @@ Class | Method | HTTP request | Description
|
|
|
2321
2327
|
- [Zernio::WebhookPayloadMessageSentMessageAttachmentsInner](docs/WebhookPayloadMessageSentMessageAttachmentsInner.md)
|
|
2322
2328
|
- [Zernio::WebhookPayloadMessageSentMessageSender](docs/WebhookPayloadMessageSentMessageSender.md)
|
|
2323
2329
|
- [Zernio::WebhookPayloadMessageSentMetadata](docs/WebhookPayloadMessageSentMetadata.md)
|
|
2330
|
+
- [Zernio::WebhookPayloadPhoneNumberStockAvailable](docs/WebhookPayloadPhoneNumberStockAvailable.md)
|
|
2331
|
+
- [Zernio::WebhookPayloadPhoneNumberStockAvailableStock](docs/WebhookPayloadPhoneNumberStockAvailableStock.md)
|
|
2332
|
+
- [Zernio::WebhookPayloadPhoneNumberStockAvailableStockTypesInner](docs/WebhookPayloadPhoneNumberStockAvailableStockTypesInner.md)
|
|
2324
2333
|
- [Zernio::WebhookPayloadPost](docs/WebhookPayloadPost.md)
|
|
2325
2334
|
- [Zernio::WebhookPayloadPostPlatform](docs/WebhookPayloadPostPlatform.md)
|
|
2326
2335
|
- [Zernio::WebhookPayloadPostPlatformAccount](docs/WebhookPayloadPostPlatformAccount.md)
|
data/docs/CommentsApi.md
CHANGED
|
@@ -552,11 +552,11 @@ end
|
|
|
552
552
|
|
|
553
553
|
## reply_to_inbox_post
|
|
554
554
|
|
|
555
|
-
> <ReplyToInboxPost200Response> reply_to_inbox_post(post_id, reply_to_inbox_post_request)
|
|
555
|
+
> <ReplyToInboxPost200Response> reply_to_inbox_post(post_id, reply_to_inbox_post_request, opts)
|
|
556
556
|
|
|
557
557
|
Reply to comment
|
|
558
558
|
|
|
559
|
-
Post a reply to a post or specific comment. Requires accountId in request body.
|
|
559
|
+
Post a reply to a post or specific comment. Requires accountId in request body. **Idempotency:** send an `Idempotency-Key` header to make retries safe (e.g. after a client-side timeout where delivery is unknown): same key + same body replays the original response (with `Idempotent-Replayed: true`) instead of posting the comment a second time; same key + different body returns 422; a key still in flight returns 409. Keys are retained for 24 hours and are scoped to the credential and to this exact path, so reusing a key against a different postId returns 422 rather than replaying the other post's response. Only successful (2xx) responses are stored for replay. If the request throws or returns a non-2xx status the key is released, so the header protects the \"request succeeded but the response was lost\" case. After an ambiguous failure (a 5xx or a network timeout) list the post's comments before retrying with the same key, and treat an empty result as inconclusive rather than as proof nothing was posted.
|
|
560
560
|
|
|
561
561
|
### Examples
|
|
562
562
|
|
|
@@ -572,10 +572,13 @@ end
|
|
|
572
572
|
api_instance = Zernio::CommentsApi.new
|
|
573
573
|
post_id = 'post_id_example' # String | Zernio post ID or platform-specific post ID. LinkedIn third-party posts accept full activity URN or numeric ID.
|
|
574
574
|
reply_to_inbox_post_request = Zernio::ReplyToInboxPostRequest.new({account_id: 'account_id_example', message: 'message_example'}) # ReplyToInboxPostRequest |
|
|
575
|
+
opts = {
|
|
576
|
+
idempotency_key: 'idempotency_key_example' # String | Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
577
|
+
}
|
|
575
578
|
|
|
576
579
|
begin
|
|
577
580
|
# Reply to comment
|
|
578
|
-
result = api_instance.reply_to_inbox_post(post_id, reply_to_inbox_post_request)
|
|
581
|
+
result = api_instance.reply_to_inbox_post(post_id, reply_to_inbox_post_request, opts)
|
|
579
582
|
p result
|
|
580
583
|
rescue Zernio::ApiError => e
|
|
581
584
|
puts "Error when calling CommentsApi->reply_to_inbox_post: #{e}"
|
|
@@ -586,12 +589,12 @@ end
|
|
|
586
589
|
|
|
587
590
|
This returns an Array which contains the response data, status code and headers.
|
|
588
591
|
|
|
589
|
-
> <Array(<ReplyToInboxPost200Response>, Integer, Hash)> reply_to_inbox_post_with_http_info(post_id, reply_to_inbox_post_request)
|
|
592
|
+
> <Array(<ReplyToInboxPost200Response>, Integer, Hash)> reply_to_inbox_post_with_http_info(post_id, reply_to_inbox_post_request, opts)
|
|
590
593
|
|
|
591
594
|
```ruby
|
|
592
595
|
begin
|
|
593
596
|
# Reply to comment
|
|
594
|
-
data, status_code, headers = api_instance.reply_to_inbox_post_with_http_info(post_id, reply_to_inbox_post_request)
|
|
597
|
+
data, status_code, headers = api_instance.reply_to_inbox_post_with_http_info(post_id, reply_to_inbox_post_request, opts)
|
|
595
598
|
p status_code # => 2xx
|
|
596
599
|
p headers # => { ... }
|
|
597
600
|
p data # => <ReplyToInboxPost200Response>
|
|
@@ -606,6 +609,7 @@ end
|
|
|
606
609
|
| ---- | ---- | ----------- | ----- |
|
|
607
610
|
| **post_id** | **String** | Zernio post ID or platform-specific post ID. LinkedIn third-party posts accept full activity URN or numeric ID. | |
|
|
608
611
|
| **reply_to_inbox_post_request** | [**ReplyToInboxPostRequest**](ReplyToInboxPostRequest.md) | | |
|
|
612
|
+
| **idempotency_key** | **String** | Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. | [optional] |
|
|
609
613
|
|
|
610
614
|
### Return type
|
|
611
615
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Zernio::CreatePhoneNumberStockWatchRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **country** | **String** | ISO 3166-1 alpha-2 code of a country listed by GET /v1/phone-numbers/countries. | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zernio-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Zernio::CreatePhoneNumberStockWatchRequest.new(
|
|
15
|
+
country: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Zernio::ListPhoneNumberStockWatches200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **watches** | [**Array<PhoneNumberStockWatch>**](PhoneNumberStockWatch.md) | | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zernio-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Zernio::ListPhoneNumberStockWatches200Response.new(
|
|
15
|
+
watches: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zernio::PhoneNumberStockWatch
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | |
|
|
8
|
+
| **country** | **String** | ISO 3166-1 alpha-2. | |
|
|
9
|
+
| **country_name** | **String** | | |
|
|
10
|
+
| **created_at** | **Time** | | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zernio-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Zernio::PhoneNumberStockWatch.new(
|
|
18
|
+
id: null,
|
|
19
|
+
country: null,
|
|
20
|
+
country_name: null,
|
|
21
|
+
created_at: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
data/docs/PhoneNumbersApi.md
CHANGED
|
@@ -9,6 +9,8 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
9
9
|
| [**check_phone_number_portability**](PhoneNumbersApi.md#check_phone_number_portability) | **POST** /v1/phone-numbers/port-in/check | Check portability |
|
|
10
10
|
| [**create_phone_number_kyc_link**](PhoneNumbersApi.md#create_phone_number_kyc_link) | **POST** /v1/phone-numbers/kyc/share | Create a hosted KYC link |
|
|
11
11
|
| [**create_phone_number_port_in**](PhoneNumbersApi.md#create_phone_number_port_in) | **POST** /v1/phone-numbers/port-in | Port numbers in |
|
|
12
|
+
| [**create_phone_number_stock_watch**](PhoneNumbersApi.md#create_phone_number_stock_watch) | **POST** /v1/phone-numbers/stock-watches | Watch an out-of-stock country |
|
|
13
|
+
| [**delete_phone_number_stock_watch**](PhoneNumbersApi.md#delete_phone_number_stock_watch) | **DELETE** /v1/phone-numbers/stock-watches/{id} | Stop watching a country |
|
|
12
14
|
| [**get_phone_number**](PhoneNumbersApi.md#get_phone_number) | **GET** /v1/phone-numbers/{id} | Get phone number |
|
|
13
15
|
| [**get_phone_number_kyc_form**](PhoneNumbersApi.md#get_phone_number_kyc_form) | **GET** /v1/phone-numbers/kyc | Get KYC form spec |
|
|
14
16
|
| [**get_phone_number_port_in_order_requirements**](PhoneNumbersApi.md#get_phone_number_port_in_order_requirements) | **GET** /v1/phone-numbers/port-in/{id}/requirements | A port-in order's pending requirements |
|
|
@@ -16,6 +18,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
16
18
|
| [**get_phone_number_remediation**](PhoneNumbersApi.md#get_phone_number_remediation) | **GET** /v1/phone-numbers/{id}/remediate | Get declined requirements |
|
|
17
19
|
| [**list_phone_number_countries**](PhoneNumbersApi.md#list_phone_number_countries) | **GET** /v1/phone-numbers/countries | List offerable number countries |
|
|
18
20
|
| [**list_phone_number_port_ins**](PhoneNumbersApi.md#list_phone_number_port_ins) | **GET** /v1/phone-numbers/port-in | List port-in orders |
|
|
21
|
+
| [**list_phone_number_stock_watches**](PhoneNumbersApi.md#list_phone_number_stock_watches) | **GET** /v1/phone-numbers/stock-watches | List stock watches |
|
|
19
22
|
| [**list_phone_numbers**](PhoneNumbersApi.md#list_phone_numbers) | **GET** /v1/phone-numbers | List phone numbers |
|
|
20
23
|
| [**purchase_phone_number**](PhoneNumbersApi.md#purchase_phone_number) | **POST** /v1/phone-numbers/purchase | Purchase phone number |
|
|
21
24
|
| [**release_phone_number**](PhoneNumbersApi.md#release_phone_number) | **DELETE** /v1/phone-numbers/{id} | Release phone number |
|
|
@@ -382,6 +385,142 @@ end
|
|
|
382
385
|
- **Accept**: application/json
|
|
383
386
|
|
|
384
387
|
|
|
388
|
+
## create_phone_number_stock_watch
|
|
389
|
+
|
|
390
|
+
> <PhoneNumberStockWatch> create_phone_number_stock_watch(create_phone_number_stock_watch_request)
|
|
391
|
+
|
|
392
|
+
Watch an out-of-stock country
|
|
393
|
+
|
|
394
|
+
Get notified the first time an out-of-stock country has deliverable numbers again: an email to the account holder plus the `phone_number.stock_available` webhook. Stock is re-checked every 6h. One watch per country; a repeat request returns the existing watch (200). The watch is consumed when it fires, so re-create it if you miss the stock. Up to 20 countries can be watched at once.
|
|
395
|
+
|
|
396
|
+
### Examples
|
|
397
|
+
|
|
398
|
+
```ruby
|
|
399
|
+
require 'time'
|
|
400
|
+
require 'zernio-sdk'
|
|
401
|
+
# setup authorization
|
|
402
|
+
Zernio.configure do |config|
|
|
403
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
404
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
api_instance = Zernio::PhoneNumbersApi.new
|
|
408
|
+
create_phone_number_stock_watch_request = Zernio::CreatePhoneNumberStockWatchRequest.new({country: 'country_example'}) # CreatePhoneNumberStockWatchRequest |
|
|
409
|
+
|
|
410
|
+
begin
|
|
411
|
+
# Watch an out-of-stock country
|
|
412
|
+
result = api_instance.create_phone_number_stock_watch(create_phone_number_stock_watch_request)
|
|
413
|
+
p result
|
|
414
|
+
rescue Zernio::ApiError => e
|
|
415
|
+
puts "Error when calling PhoneNumbersApi->create_phone_number_stock_watch: #{e}"
|
|
416
|
+
end
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
#### Using the create_phone_number_stock_watch_with_http_info variant
|
|
420
|
+
|
|
421
|
+
This returns an Array which contains the response data, status code and headers.
|
|
422
|
+
|
|
423
|
+
> <Array(<PhoneNumberStockWatch>, Integer, Hash)> create_phone_number_stock_watch_with_http_info(create_phone_number_stock_watch_request)
|
|
424
|
+
|
|
425
|
+
```ruby
|
|
426
|
+
begin
|
|
427
|
+
# Watch an out-of-stock country
|
|
428
|
+
data, status_code, headers = api_instance.create_phone_number_stock_watch_with_http_info(create_phone_number_stock_watch_request)
|
|
429
|
+
p status_code # => 2xx
|
|
430
|
+
p headers # => { ... }
|
|
431
|
+
p data # => <PhoneNumberStockWatch>
|
|
432
|
+
rescue Zernio::ApiError => e
|
|
433
|
+
puts "Error when calling PhoneNumbersApi->create_phone_number_stock_watch_with_http_info: #{e}"
|
|
434
|
+
end
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
### Parameters
|
|
438
|
+
|
|
439
|
+
| Name | Type | Description | Notes |
|
|
440
|
+
| ---- | ---- | ----------- | ----- |
|
|
441
|
+
| **create_phone_number_stock_watch_request** | [**CreatePhoneNumberStockWatchRequest**](CreatePhoneNumberStockWatchRequest.md) | | |
|
|
442
|
+
|
|
443
|
+
### Return type
|
|
444
|
+
|
|
445
|
+
[**PhoneNumberStockWatch**](PhoneNumberStockWatch.md)
|
|
446
|
+
|
|
447
|
+
### Authorization
|
|
448
|
+
|
|
449
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
450
|
+
|
|
451
|
+
### HTTP request headers
|
|
452
|
+
|
|
453
|
+
- **Content-Type**: application/json
|
|
454
|
+
- **Accept**: application/json
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
## delete_phone_number_stock_watch
|
|
458
|
+
|
|
459
|
+
> <DeleteSmsSenderId200Response> delete_phone_number_stock_watch(id)
|
|
460
|
+
|
|
461
|
+
Stop watching a country
|
|
462
|
+
|
|
463
|
+
### Examples
|
|
464
|
+
|
|
465
|
+
```ruby
|
|
466
|
+
require 'time'
|
|
467
|
+
require 'zernio-sdk'
|
|
468
|
+
# setup authorization
|
|
469
|
+
Zernio.configure do |config|
|
|
470
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
471
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
472
|
+
end
|
|
473
|
+
|
|
474
|
+
api_instance = Zernio::PhoneNumbersApi.new
|
|
475
|
+
id = 'id_example' # String |
|
|
476
|
+
|
|
477
|
+
begin
|
|
478
|
+
# Stop watching a country
|
|
479
|
+
result = api_instance.delete_phone_number_stock_watch(id)
|
|
480
|
+
p result
|
|
481
|
+
rescue Zernio::ApiError => e
|
|
482
|
+
puts "Error when calling PhoneNumbersApi->delete_phone_number_stock_watch: #{e}"
|
|
483
|
+
end
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
#### Using the delete_phone_number_stock_watch_with_http_info variant
|
|
487
|
+
|
|
488
|
+
This returns an Array which contains the response data, status code and headers.
|
|
489
|
+
|
|
490
|
+
> <Array(<DeleteSmsSenderId200Response>, Integer, Hash)> delete_phone_number_stock_watch_with_http_info(id)
|
|
491
|
+
|
|
492
|
+
```ruby
|
|
493
|
+
begin
|
|
494
|
+
# Stop watching a country
|
|
495
|
+
data, status_code, headers = api_instance.delete_phone_number_stock_watch_with_http_info(id)
|
|
496
|
+
p status_code # => 2xx
|
|
497
|
+
p headers # => { ... }
|
|
498
|
+
p data # => <DeleteSmsSenderId200Response>
|
|
499
|
+
rescue Zernio::ApiError => e
|
|
500
|
+
puts "Error when calling PhoneNumbersApi->delete_phone_number_stock_watch_with_http_info: #{e}"
|
|
501
|
+
end
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
### Parameters
|
|
505
|
+
|
|
506
|
+
| Name | Type | Description | Notes |
|
|
507
|
+
| ---- | ---- | ----------- | ----- |
|
|
508
|
+
| **id** | **String** | | |
|
|
509
|
+
|
|
510
|
+
### Return type
|
|
511
|
+
|
|
512
|
+
[**DeleteSmsSenderId200Response**](DeleteSmsSenderId200Response.md)
|
|
513
|
+
|
|
514
|
+
### Authorization
|
|
515
|
+
|
|
516
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
517
|
+
|
|
518
|
+
### HTTP request headers
|
|
519
|
+
|
|
520
|
+
- **Content-Type**: Not defined
|
|
521
|
+
- **Accept**: application/json
|
|
522
|
+
|
|
523
|
+
|
|
385
524
|
## get_phone_number
|
|
386
525
|
|
|
387
526
|
> <GetPhoneNumber200Response> get_phone_number(id)
|
|
@@ -867,6 +1006,70 @@ This endpoint does not need any parameter.
|
|
|
867
1006
|
- **Accept**: application/json
|
|
868
1007
|
|
|
869
1008
|
|
|
1009
|
+
## list_phone_number_stock_watches
|
|
1010
|
+
|
|
1011
|
+
> <ListPhoneNumberStockWatches200Response> list_phone_number_stock_watches
|
|
1012
|
+
|
|
1013
|
+
List stock watches
|
|
1014
|
+
|
|
1015
|
+
### Examples
|
|
1016
|
+
|
|
1017
|
+
```ruby
|
|
1018
|
+
require 'time'
|
|
1019
|
+
require 'zernio-sdk'
|
|
1020
|
+
# setup authorization
|
|
1021
|
+
Zernio.configure do |config|
|
|
1022
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
1023
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1024
|
+
end
|
|
1025
|
+
|
|
1026
|
+
api_instance = Zernio::PhoneNumbersApi.new
|
|
1027
|
+
|
|
1028
|
+
begin
|
|
1029
|
+
# List stock watches
|
|
1030
|
+
result = api_instance.list_phone_number_stock_watches
|
|
1031
|
+
p result
|
|
1032
|
+
rescue Zernio::ApiError => e
|
|
1033
|
+
puts "Error when calling PhoneNumbersApi->list_phone_number_stock_watches: #{e}"
|
|
1034
|
+
end
|
|
1035
|
+
```
|
|
1036
|
+
|
|
1037
|
+
#### Using the list_phone_number_stock_watches_with_http_info variant
|
|
1038
|
+
|
|
1039
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1040
|
+
|
|
1041
|
+
> <Array(<ListPhoneNumberStockWatches200Response>, Integer, Hash)> list_phone_number_stock_watches_with_http_info
|
|
1042
|
+
|
|
1043
|
+
```ruby
|
|
1044
|
+
begin
|
|
1045
|
+
# List stock watches
|
|
1046
|
+
data, status_code, headers = api_instance.list_phone_number_stock_watches_with_http_info
|
|
1047
|
+
p status_code # => 2xx
|
|
1048
|
+
p headers # => { ... }
|
|
1049
|
+
p data # => <ListPhoneNumberStockWatches200Response>
|
|
1050
|
+
rescue Zernio::ApiError => e
|
|
1051
|
+
puts "Error when calling PhoneNumbersApi->list_phone_number_stock_watches_with_http_info: #{e}"
|
|
1052
|
+
end
|
|
1053
|
+
```
|
|
1054
|
+
|
|
1055
|
+
### Parameters
|
|
1056
|
+
|
|
1057
|
+
This endpoint does not need any parameter.
|
|
1058
|
+
|
|
1059
|
+
### Return type
|
|
1060
|
+
|
|
1061
|
+
[**ListPhoneNumberStockWatches200Response**](ListPhoneNumberStockWatches200Response.md)
|
|
1062
|
+
|
|
1063
|
+
### Authorization
|
|
1064
|
+
|
|
1065
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
1066
|
+
|
|
1067
|
+
### HTTP request headers
|
|
1068
|
+
|
|
1069
|
+
- **Content-Type**: Not defined
|
|
1070
|
+
- **Accept**: application/json
|
|
1071
|
+
|
|
1072
|
+
|
|
870
1073
|
## list_phone_numbers
|
|
871
1074
|
|
|
872
1075
|
> <ListPhoneNumbers200Response> list_phone_numbers(opts)
|
data/docs/ReviewsApi.md
CHANGED
|
@@ -171,11 +171,11 @@ end
|
|
|
171
171
|
|
|
172
172
|
## reply_to_inbox_review
|
|
173
173
|
|
|
174
|
-
> <ReplyToInboxReview200Response> reply_to_inbox_review(review_id, reply_to_inbox_review_request)
|
|
174
|
+
> <ReplyToInboxReview200Response> reply_to_inbox_review(review_id, reply_to_inbox_review_request, opts)
|
|
175
175
|
|
|
176
176
|
Reply to review
|
|
177
177
|
|
|
178
|
-
Post a reply to a review. Requires accountId in request body.
|
|
178
|
+
Post a reply to a review. Requires accountId in request body. **Idempotency:** send an `Idempotency-Key` header to make retries safe (e.g. after a client-side timeout where delivery is unknown): same key + same body replays the original response (with `Idempotent-Replayed: true`) instead of sending the reply to the platform again; same key + different body returns 422; a key still in flight returns 409. Keys are retained for 24 hours and are scoped to the credential and to this exact path, so reusing a key against a different reviewId returns 422 rather than replaying the other review's response. Only successful (2xx) responses are stored for replay. If the request throws or returns a non-2xx status the key is released, so the header protects the \"request succeeded but the response was lost\" case. After an ambiguous failure (a 5xx or a network timeout) fetch the review before retrying with the same key, and treat a missing reply as inconclusive rather than as proof nothing was sent.
|
|
179
179
|
|
|
180
180
|
### Examples
|
|
181
181
|
|
|
@@ -191,10 +191,13 @@ end
|
|
|
191
191
|
api_instance = Zernio::ReviewsApi.new
|
|
192
192
|
review_id = 'review_id_example' # String | Review ID (URL-encoded for Google Business)
|
|
193
193
|
reply_to_inbox_review_request = Zernio::ReplyToInboxReviewRequest.new({account_id: 'account_id_example', message: 'message_example'}) # ReplyToInboxReviewRequest |
|
|
194
|
+
opts = {
|
|
195
|
+
idempotency_key: 'idempotency_key_example' # String | Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
196
|
+
}
|
|
194
197
|
|
|
195
198
|
begin
|
|
196
199
|
# Reply to review
|
|
197
|
-
result = api_instance.reply_to_inbox_review(review_id, reply_to_inbox_review_request)
|
|
200
|
+
result = api_instance.reply_to_inbox_review(review_id, reply_to_inbox_review_request, opts)
|
|
198
201
|
p result
|
|
199
202
|
rescue Zernio::ApiError => e
|
|
200
203
|
puts "Error when calling ReviewsApi->reply_to_inbox_review: #{e}"
|
|
@@ -205,12 +208,12 @@ end
|
|
|
205
208
|
|
|
206
209
|
This returns an Array which contains the response data, status code and headers.
|
|
207
210
|
|
|
208
|
-
> <Array(<ReplyToInboxReview200Response>, Integer, Hash)> reply_to_inbox_review_with_http_info(review_id, reply_to_inbox_review_request)
|
|
211
|
+
> <Array(<ReplyToInboxReview200Response>, Integer, Hash)> reply_to_inbox_review_with_http_info(review_id, reply_to_inbox_review_request, opts)
|
|
209
212
|
|
|
210
213
|
```ruby
|
|
211
214
|
begin
|
|
212
215
|
# Reply to review
|
|
213
|
-
data, status_code, headers = api_instance.reply_to_inbox_review_with_http_info(review_id, reply_to_inbox_review_request)
|
|
216
|
+
data, status_code, headers = api_instance.reply_to_inbox_review_with_http_info(review_id, reply_to_inbox_review_request, opts)
|
|
214
217
|
p status_code # => 2xx
|
|
215
218
|
p headers # => { ... }
|
|
216
219
|
p data # => <ReplyToInboxReview200Response>
|
|
@@ -225,6 +228,7 @@ end
|
|
|
225
228
|
| ---- | ---- | ----------- | ----- |
|
|
226
229
|
| **review_id** | **String** | Review ID (URL-encoded for Google Business) | |
|
|
227
230
|
| **reply_to_inbox_review_request** | [**ReplyToInboxReviewRequest**](ReplyToInboxReviewRequest.md) | | |
|
|
231
|
+
| **idempotency_key** | **String** | Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409. | [optional] |
|
|
228
232
|
|
|
229
233
|
### Return type
|
|
230
234
|
|
data/docs/WebhookEventsApi.md
CHANGED
|
@@ -22,6 +22,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
22
22
|
| [**on_message_read**](WebhookEventsApi.md#on_message_read) | **POST** /message.read | Message read event |
|
|
23
23
|
| [**on_message_received**](WebhookEventsApi.md#on_message_received) | **POST** /message.received | Message received event |
|
|
24
24
|
| [**on_message_sent**](WebhookEventsApi.md#on_message_sent) | **POST** /message.sent | Message sent event |
|
|
25
|
+
| [**on_phone_number_stock_available**](WebhookEventsApi.md#on_phone_number_stock_available) | **POST** /phone_number.stock_available | Phone-number stock available event |
|
|
25
26
|
| [**on_post_cancelled**](WebhookEventsApi.md#on_post_cancelled) | **POST** /post.cancelled | Post cancelled event |
|
|
26
27
|
| [**on_post_external_created**](WebhookEventsApi.md#on_post_external_created) | **POST** /post.external.created | External post created event |
|
|
27
28
|
| [**on_post_external_deleted**](WebhookEventsApi.md#on_post_external_deleted) | **POST** /post.external.deleted | External post deleted event |
|
|
@@ -1280,6 +1281,74 @@ nil (empty response body)
|
|
|
1280
1281
|
- **Accept**: Not defined
|
|
1281
1282
|
|
|
1282
1283
|
|
|
1284
|
+
## on_phone_number_stock_available
|
|
1285
|
+
|
|
1286
|
+
> on_phone_number_stock_available(webhook_payload_phone_number_stock_available)
|
|
1287
|
+
|
|
1288
|
+
Phone-number stock available event
|
|
1289
|
+
|
|
1290
|
+
Fired by the stock sweep (every 6h) the first time a country you watch via POST /v1/phone-numbers/stock-watches has deliverable numbers again. The watch is consumed, so the event fires once per watch; the stock counts are a snapshot and numbers are sold first come, first served. Buy with POST /v1/phone-numbers/purchase.
|
|
1291
|
+
|
|
1292
|
+
### Examples
|
|
1293
|
+
|
|
1294
|
+
```ruby
|
|
1295
|
+
require 'time'
|
|
1296
|
+
require 'zernio-sdk'
|
|
1297
|
+
# setup authorization
|
|
1298
|
+
Zernio.configure do |config|
|
|
1299
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
1300
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1301
|
+
end
|
|
1302
|
+
|
|
1303
|
+
api_instance = Zernio::WebhookEventsApi.new
|
|
1304
|
+
webhook_payload_phone_number_stock_available = # WebhookPayloadPhoneNumberStockAvailable |
|
|
1305
|
+
|
|
1306
|
+
begin
|
|
1307
|
+
# Phone-number stock available event
|
|
1308
|
+
api_instance.on_phone_number_stock_available(webhook_payload_phone_number_stock_available)
|
|
1309
|
+
rescue Zernio::ApiError => e
|
|
1310
|
+
puts "Error when calling WebhookEventsApi->on_phone_number_stock_available: #{e}"
|
|
1311
|
+
end
|
|
1312
|
+
```
|
|
1313
|
+
|
|
1314
|
+
#### Using the on_phone_number_stock_available_with_http_info variant
|
|
1315
|
+
|
|
1316
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
1317
|
+
|
|
1318
|
+
> <Array(nil, Integer, Hash)> on_phone_number_stock_available_with_http_info(webhook_payload_phone_number_stock_available)
|
|
1319
|
+
|
|
1320
|
+
```ruby
|
|
1321
|
+
begin
|
|
1322
|
+
# Phone-number stock available event
|
|
1323
|
+
data, status_code, headers = api_instance.on_phone_number_stock_available_with_http_info(webhook_payload_phone_number_stock_available)
|
|
1324
|
+
p status_code # => 2xx
|
|
1325
|
+
p headers # => { ... }
|
|
1326
|
+
p data # => nil
|
|
1327
|
+
rescue Zernio::ApiError => e
|
|
1328
|
+
puts "Error when calling WebhookEventsApi->on_phone_number_stock_available_with_http_info: #{e}"
|
|
1329
|
+
end
|
|
1330
|
+
```
|
|
1331
|
+
|
|
1332
|
+
### Parameters
|
|
1333
|
+
|
|
1334
|
+
| Name | Type | Description | Notes |
|
|
1335
|
+
| ---- | ---- | ----------- | ----- |
|
|
1336
|
+
| **webhook_payload_phone_number_stock_available** | [**WebhookPayloadPhoneNumberStockAvailable**](WebhookPayloadPhoneNumberStockAvailable.md) | | |
|
|
1337
|
+
|
|
1338
|
+
### Return type
|
|
1339
|
+
|
|
1340
|
+
nil (empty response body)
|
|
1341
|
+
|
|
1342
|
+
### Authorization
|
|
1343
|
+
|
|
1344
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
1345
|
+
|
|
1346
|
+
### HTTP request headers
|
|
1347
|
+
|
|
1348
|
+
- **Content-Type**: application/json
|
|
1349
|
+
- **Accept**: Not defined
|
|
1350
|
+
|
|
1351
|
+
|
|
1283
1352
|
## on_post_cancelled
|
|
1284
1353
|
|
|
1285
1354
|
> on_post_cancelled(webhook_payload_post)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zernio::WebhookPayloadPhoneNumberStockAvailable
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | Stable webhook event ID | |
|
|
8
|
+
| **event** | **String** | | |
|
|
9
|
+
| **stock** | [**WebhookPayloadPhoneNumberStockAvailableStock**](WebhookPayloadPhoneNumberStockAvailableStock.md) | | |
|
|
10
|
+
| **timestamp** | **Time** | UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt. | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zernio-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Zernio::WebhookPayloadPhoneNumberStockAvailable.new(
|
|
18
|
+
id: null,
|
|
19
|
+
event: null,
|
|
20
|
+
stock: null,
|
|
21
|
+
timestamp: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::WebhookPayloadPhoneNumberStockAvailableStock
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **country** | **String** | ISO 3166-1 alpha-2 country code of the watched country. | |
|
|
8
|
+
| **types** | [**Array<WebhookPayloadPhoneNumberStockAvailableStockTypesInner>**](WebhookPayloadPhoneNumberStockAvailableStockTypesInner.md) | Number types deliverable at sweep time. Only types with stock are listed. | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::WebhookPayloadPhoneNumberStockAvailableStock.new(
|
|
16
|
+
country: null,
|
|
17
|
+
types: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::WebhookPayloadPhoneNumberStockAvailableStockTypesInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **number_type** | **String** | local, mobile, national or toll_free. | |
|
|
8
|
+
| **available_count** | **Integer** | Deliverable numbers at sweep time; first come, first served. | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::WebhookPayloadPhoneNumberStockAvailableStockTypesInner.new(
|
|
16
|
+
number_type: null,
|
|
17
|
+
available_count: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -609,10 +609,11 @@ module Zernio
|
|
|
609
609
|
end
|
|
610
610
|
|
|
611
611
|
# Reply to comment
|
|
612
|
-
# Post a reply to a post or specific comment. Requires accountId in request body.
|
|
612
|
+
# Post a reply to a post or specific comment. Requires accountId in request body. **Idempotency:** send an `Idempotency-Key` header to make retries safe (e.g. after a client-side timeout where delivery is unknown): same key + same body replays the original response (with `Idempotent-Replayed: true`) instead of posting the comment a second time; same key + different body returns 422; a key still in flight returns 409. Keys are retained for 24 hours and are scoped to the credential and to this exact path, so reusing a key against a different postId returns 422 rather than replaying the other post's response. Only successful (2xx) responses are stored for replay. If the request throws or returns a non-2xx status the key is released, so the header protects the \"request succeeded but the response was lost\" case. After an ambiguous failure (a 5xx or a network timeout) list the post's comments before retrying with the same key, and treat an empty result as inconclusive rather than as proof nothing was posted.
|
|
613
613
|
# @param post_id [String] Zernio post ID or platform-specific post ID. LinkedIn third-party posts accept full activity URN or numeric ID.
|
|
614
614
|
# @param reply_to_inbox_post_request [ReplyToInboxPostRequest]
|
|
615
615
|
# @param [Hash] opts the optional parameters
|
|
616
|
+
# @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
616
617
|
# @return [ReplyToInboxPost200Response]
|
|
617
618
|
def reply_to_inbox_post(post_id, reply_to_inbox_post_request, opts = {})
|
|
618
619
|
data, _status_code, _headers = reply_to_inbox_post_with_http_info(post_id, reply_to_inbox_post_request, opts)
|
|
@@ -620,10 +621,11 @@ module Zernio
|
|
|
620
621
|
end
|
|
621
622
|
|
|
622
623
|
# Reply to comment
|
|
623
|
-
# Post a reply to a post or specific comment. Requires accountId in request body.
|
|
624
|
+
# Post a reply to a post or specific comment. Requires accountId in request body. **Idempotency:** send an `Idempotency-Key` header to make retries safe (e.g. after a client-side timeout where delivery is unknown): same key + same body replays the original response (with `Idempotent-Replayed: true`) instead of posting the comment a second time; same key + different body returns 422; a key still in flight returns 409. Keys are retained for 24 hours and are scoped to the credential and to this exact path, so reusing a key against a different postId returns 422 rather than replaying the other post's response. Only successful (2xx) responses are stored for replay. If the request throws or returns a non-2xx status the key is released, so the header protects the \"request succeeded but the response was lost\" case. After an ambiguous failure (a 5xx or a network timeout) list the post's comments before retrying with the same key, and treat an empty result as inconclusive rather than as proof nothing was posted.
|
|
624
625
|
# @param post_id [String] Zernio post ID or platform-specific post ID. LinkedIn third-party posts accept full activity URN or numeric ID.
|
|
625
626
|
# @param reply_to_inbox_post_request [ReplyToInboxPostRequest]
|
|
626
627
|
# @param [Hash] opts the optional parameters
|
|
628
|
+
# @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
627
629
|
# @return [Array<(ReplyToInboxPost200Response, Integer, Hash)>] ReplyToInboxPost200Response data, response status code and response headers
|
|
628
630
|
def reply_to_inbox_post_with_http_info(post_id, reply_to_inbox_post_request, opts = {})
|
|
629
631
|
if @api_client.config.debugging
|
|
@@ -637,6 +639,10 @@ module Zernio
|
|
|
637
639
|
if @api_client.config.client_side_validation && reply_to_inbox_post_request.nil?
|
|
638
640
|
fail ArgumentError, "Missing the required parameter 'reply_to_inbox_post_request' when calling CommentsApi.reply_to_inbox_post"
|
|
639
641
|
end
|
|
642
|
+
if @api_client.config.client_side_validation && !opts[:'idempotency_key'].nil? && opts[:'idempotency_key'].to_s.length > 255
|
|
643
|
+
fail ArgumentError, 'invalid value for "opts[:"idempotency_key"]" when calling CommentsApi.reply_to_inbox_post, the character length must be smaller than or equal to 255.'
|
|
644
|
+
end
|
|
645
|
+
|
|
640
646
|
# resource path
|
|
641
647
|
local_var_path = '/v1/inbox/comments/{postId}'.sub('{' + 'postId' + '}', CGI.escape(post_id.to_s))
|
|
642
648
|
|
|
@@ -652,6 +658,7 @@ module Zernio
|
|
|
652
658
|
if !content_type.nil?
|
|
653
659
|
header_params['Content-Type'] = content_type
|
|
654
660
|
end
|
|
661
|
+
header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
|
655
662
|
|
|
656
663
|
# form parameters
|
|
657
664
|
form_params = opts[:form_params] || {}
|