late-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
- data/zernio-sdk-0.0.785.gem +0 -0
- metadata +26 -2
- data/zernio-sdk-0.0.783.gem +0 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class WebhookPayloadPhoneNumberStockAvailableStockTypesInner < ApiModelBase
|
|
18
|
+
# local, mobile, national or toll_free.
|
|
19
|
+
attr_accessor :number_type
|
|
20
|
+
|
|
21
|
+
# Deliverable numbers at sweep time; first come, first served.
|
|
22
|
+
attr_accessor :available_count
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'number_type' => :'numberType',
|
|
28
|
+
:'available_count' => :'availableCount'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'number_type' => :'String',
|
|
46
|
+
:'available_count' => :'Integer'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::WebhookPayloadPhoneNumberStockAvailableStockTypesInner` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::WebhookPayloadPhoneNumberStockAvailableStockTypesInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
|
+
end
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'number_type')
|
|
73
|
+
self.number_type = attributes[:'number_type']
|
|
74
|
+
else
|
|
75
|
+
self.number_type = nil
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'available_count')
|
|
79
|
+
self.available_count = attributes[:'available_count']
|
|
80
|
+
else
|
|
81
|
+
self.available_count = nil
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @number_type.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "number_type", number_type cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if @available_count.nil?
|
|
95
|
+
invalid_properties.push('invalid value for "available_count", available_count cannot be nil.')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
invalid_properties
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Check to see if the all the properties in the model are valid
|
|
102
|
+
# @return true if the model is valid
|
|
103
|
+
def valid?
|
|
104
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
+
return false if @number_type.nil?
|
|
106
|
+
return false if @available_count.nil?
|
|
107
|
+
true
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Custom attribute writer method with validation
|
|
111
|
+
# @param [Object] number_type Value to be assigned
|
|
112
|
+
def number_type=(number_type)
|
|
113
|
+
if number_type.nil?
|
|
114
|
+
fail ArgumentError, 'number_type cannot be nil'
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
@number_type = number_type
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method with validation
|
|
121
|
+
# @param [Object] available_count Value to be assigned
|
|
122
|
+
def available_count=(available_count)
|
|
123
|
+
if available_count.nil?
|
|
124
|
+
fail ArgumentError, 'available_count cannot be nil'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
@available_count = available_count
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Checks equality by comparing each attribute.
|
|
131
|
+
# @param [Object] Object to be compared
|
|
132
|
+
def ==(o)
|
|
133
|
+
return true if self.equal?(o)
|
|
134
|
+
self.class == o.class &&
|
|
135
|
+
number_type == o.number_type &&
|
|
136
|
+
available_count == o.available_count
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# @see the `==` method
|
|
140
|
+
# @param [Object] Object to be compared
|
|
141
|
+
def eql?(o)
|
|
142
|
+
self == o
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Calculates hash code according to all attributes.
|
|
146
|
+
# @return [Integer] Hash code
|
|
147
|
+
def hash
|
|
148
|
+
[number_type, available_count].hash
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Builds the object from hash
|
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
153
|
+
# @return [Object] Returns the model itself
|
|
154
|
+
def self.build_from_hash(attributes)
|
|
155
|
+
return nil unless attributes.is_a?(Hash)
|
|
156
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
157
|
+
transformed_hash = {}
|
|
158
|
+
openapi_types.each_pair do |key, type|
|
|
159
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
160
|
+
transformed_hash["#{key}"] = nil
|
|
161
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
162
|
+
# check to ensure the input is an array given that the attribute
|
|
163
|
+
# is documented as an array but the input is not
|
|
164
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
165
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
166
|
+
end
|
|
167
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
168
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
new(transformed_hash)
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Returns the object in the form of hash
|
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
|
176
|
+
def to_hash
|
|
177
|
+
hash = {}
|
|
178
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
179
|
+
value = self.send(attr)
|
|
180
|
+
if value.nil?
|
|
181
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
182
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
hash[param] = _to_hash(value)
|
|
186
|
+
end
|
|
187
|
+
hash
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -278,6 +278,7 @@ require 'zernio-sdk/models/create_phone_number_port_in201_response_orders_inner'
|
|
|
278
278
|
require 'zernio-sdk/models/create_phone_number_port_in_request'
|
|
279
279
|
require 'zernio-sdk/models/create_phone_number_port_in_request_end_user'
|
|
280
280
|
require 'zernio-sdk/models/create_phone_number_port_in_request_requirements_inner'
|
|
281
|
+
require 'zernio-sdk/models/create_phone_number_stock_watch_request'
|
|
281
282
|
require 'zernio-sdk/models/create_pinterest_board201_response'
|
|
282
283
|
require 'zernio-sdk/models/create_pinterest_board201_response_board'
|
|
283
284
|
require 'zernio-sdk/models/create_pinterest_board_request'
|
|
@@ -1005,6 +1006,7 @@ require 'zernio-sdk/models/list_phone_number_countries200_response_countries_inn
|
|
|
1005
1006
|
require 'zernio-sdk/models/list_phone_number_countries200_response_countries_inner_types_inner'
|
|
1006
1007
|
require 'zernio-sdk/models/list_phone_number_port_ins200_response'
|
|
1007
1008
|
require 'zernio-sdk/models/list_phone_number_port_ins200_response_orders_inner'
|
|
1009
|
+
require 'zernio-sdk/models/list_phone_number_stock_watches200_response'
|
|
1008
1010
|
require 'zernio-sdk/models/list_phone_numbers200_response'
|
|
1009
1011
|
require 'zernio-sdk/models/list_phone_numbers200_response_connected_inner'
|
|
1010
1012
|
require 'zernio-sdk/models/list_phone_numbers200_response_numbers_inner'
|
|
@@ -1107,6 +1109,7 @@ require 'zernio-sdk/models/on_whats_app_number_verification_required_request'
|
|
|
1107
1109
|
require 'zernio-sdk/models/pagination'
|
|
1108
1110
|
require 'zernio-sdk/models/pause_workflow200_response'
|
|
1109
1111
|
require 'zernio-sdk/models/pending'
|
|
1112
|
+
require 'zernio-sdk/models/phone_number_stock_watch'
|
|
1110
1113
|
require 'zernio-sdk/models/pin_discord_message200_response'
|
|
1111
1114
|
require 'zernio-sdk/models/pinterest_platform_data'
|
|
1112
1115
|
require 'zernio-sdk/models/platform_analytics'
|
|
@@ -1670,6 +1673,9 @@ require 'zernio-sdk/models/webhook_payload_message_sent_message'
|
|
|
1670
1673
|
require 'zernio-sdk/models/webhook_payload_message_sent_message_attachments_inner'
|
|
1671
1674
|
require 'zernio-sdk/models/webhook_payload_message_sent_message_sender'
|
|
1672
1675
|
require 'zernio-sdk/models/webhook_payload_message_sent_metadata'
|
|
1676
|
+
require 'zernio-sdk/models/webhook_payload_phone_number_stock_available'
|
|
1677
|
+
require 'zernio-sdk/models/webhook_payload_phone_number_stock_available_stock'
|
|
1678
|
+
require 'zernio-sdk/models/webhook_payload_phone_number_stock_available_stock_types_inner'
|
|
1673
1679
|
require 'zernio-sdk/models/webhook_payload_post'
|
|
1674
1680
|
require 'zernio-sdk/models/webhook_payload_post_platform'
|
|
1675
1681
|
require 'zernio-sdk/models/webhook_payload_post_platform_account'
|
data/openapi.yaml
CHANGED
|
@@ -182,6 +182,7 @@ x-documentation:
|
|
|
182
182
|
- `call.failed` - A call failed with a hard error before or during bridging
|
|
183
183
|
- `call.permission_request` - A WhatsApp user accepted or rejected your call-permission request
|
|
184
184
|
- `whatsapp.automatic_event` - Meta's automatic event identification detected a lead or purchase in a Click-to-WhatsApp conversation. Branch on `eventName` (`LeadSubmitted` | `Purchase`); carries the `ctwa_clid` Conversions API match key
|
|
185
|
+
- `phone_number.stock_available` - An out-of-stock country you watch (POST /v1/phone-numbers/stock-watches) has deliverable numbers again. Fires once per watch, then the watch is consumed. Carries the deliverable count per number type at sweep time (first come, first served).
|
|
185
186
|
- `whatsapp.number.kyc_submitted` - An end customer completed a hosted KYC share link; the number entered regulatory review under your account
|
|
186
187
|
- `whatsapp.number.activated` - A provisioned WhatsApp number finished setup and is ready to connect
|
|
187
188
|
- `whatsapp.number.declined` - A regulated number order was declined in review; nothing activates and nothing is billed
|
|
@@ -430,7 +431,7 @@ tags:
|
|
|
430
431
|
- name: Webhooks
|
|
431
432
|
description: |
|
|
432
433
|
Configure webhooks for real-time notifications. Webhooks can be created from the dashboard (Settings → Webhooks) or via this API.
|
|
433
|
-
Events: post.scheduled, post.published, post.failed, post.partial, post.cancelled, post.recycled, post.platform.published, post.platform.failed, post.platform.deleted, post.tiktok.url_resolved, post.external.created, post.external.updated, post.external.deleted, account.connected, account.disconnected, account.ads.initial_sync_completed, message.received, conversation.started, call.received, call.ended, call.failed, call.permission_request, message.sent, message.edited, message.deleted, message.delivered, message.read, message.failed, reaction.received, referral.received, comment.received, review.new, review.updated, lead.received, ad.status_changed, whatsapp.template.status_updated, whatsapp.template.category_updated, whatsapp.account.name_status_updated, whatsapp.automatic_event, whatsapp.number.activated, whatsapp.number.declined, whatsapp.number.action_required, whatsapp.number.verification_required, whatsapp.number.suspended, whatsapp.number.reactivated, whatsapp.number.released, whatsapp.number.kyc_submitted, verification.approved, verification.failed, webhook.test.
|
|
434
|
+
Events: post.scheduled, post.published, post.failed, post.partial, post.cancelled, post.recycled, post.platform.published, post.platform.failed, post.platform.deleted, post.tiktok.url_resolved, post.external.created, post.external.updated, post.external.deleted, account.connected, account.disconnected, account.ads.initial_sync_completed, message.received, conversation.started, call.received, call.ended, call.failed, call.permission_request, message.sent, message.edited, message.deleted, message.delivered, message.read, message.failed, reaction.received, referral.received, comment.received, review.new, review.updated, lead.received, ad.status_changed, whatsapp.template.status_updated, whatsapp.template.category_updated, whatsapp.account.name_status_updated, whatsapp.automatic_event, whatsapp.number.activated, whatsapp.number.declined, whatsapp.number.action_required, whatsapp.number.verification_required, whatsapp.number.suspended, whatsapp.number.reactivated, whatsapp.number.released, whatsapp.number.kyc_submitted, phone_number.stock_available, verification.approved, verification.failed, webhook.test.
|
|
434
435
|
Security: optional HMAC-SHA256 signature in X-Zernio-Signature header. Configure a secret key to enable verification. Custom headers supported.
|
|
435
436
|
|
|
436
437
|
Resource groups. Every event belongs to one group: post.* to publishing, message.*, reaction.*, conversation.*, call.* and whatsapp.automatic_event to messages, comment.* and review.* to engagement, lead.* to contacts, ad.* to ads, account.*, whatsapp.template.* and whatsapp.account.* to accounts, whatsapp.number.* and verification.* to telephony, webhook.test to webhooks. Two independent controls use that mapping. (1) A restricted (zrk_) API key can only subscribe to, test-fire, redeliver, or read delivery logs for events in the groups it holds, so it can never create a subscription broader than itself. (2) Each subscription carries its own `disabledResourceGroups` denylist: events in a disabled group are dropped before delivery to that endpoint, on live delivery and on every replay path, no matter which key or session created the subscription. Changing that denylist applies to every event emitted after the change; events already queued when it landed can still be delivered for up to five minutes after they were enqueued, because the delivery worker trusts a five-minute enqueue-time snapshot before re-checking. Absent or empty on a subscription means it receives everything it subscribes to, which is the behavior of every subscription created before the field existed.
|
|
@@ -545,7 +546,7 @@ components:
|
|
|
545
546
|
IdempotencyKeyInFlight:
|
|
546
547
|
description: Same Idempotency-Key still processing; retry after a short backoff
|
|
547
548
|
IdempotencyKeyReused:
|
|
548
|
-
description: Idempotency-Key reused with a different
|
|
549
|
+
description: Idempotency-Key reused with a different request
|
|
549
550
|
BadRequest:
|
|
550
551
|
description: Invalid request
|
|
551
552
|
content:
|
|
@@ -2430,7 +2431,7 @@ components:
|
|
|
2430
2431
|
type: array
|
|
2431
2432
|
items:
|
|
2432
2433
|
type: string
|
|
2433
|
-
enum: [post.scheduled, post.published, post.failed, post.partial, post.cancelled, post.recycled, post.platform.published, post.platform.failed, post.platform.deleted, post.tiktok.url_resolved, post.external.created, post.external.updated, post.external.deleted, account.connected, account.disconnected, account.ads.initial_sync_completed, message.received, conversation.started, call.received, call.ended, call.failed, call.permission_request, message.sent, message.edited, message.deleted, message.delivered, message.read, message.failed, reaction.received, referral.received, comment.received, review.new, review.updated, lead.received, ad.status_changed, whatsapp.template.status_updated, whatsapp.template.category_updated, whatsapp.account.name_status_updated, whatsapp.automatic_event, whatsapp.number.activated, whatsapp.number.declined, whatsapp.number.action_required, whatsapp.number.verification_required, whatsapp.number.suspended, whatsapp.number.reactivated, whatsapp.number.released, whatsapp.number.kyc_submitted, verification.approved, verification.failed]
|
|
2434
|
+
enum: [post.scheduled, post.published, post.failed, post.partial, post.cancelled, post.recycled, post.platform.published, post.platform.failed, post.platform.deleted, post.tiktok.url_resolved, post.external.created, post.external.updated, post.external.deleted, account.connected, account.disconnected, account.ads.initial_sync_completed, message.received, conversation.started, call.received, call.ended, call.failed, call.permission_request, message.sent, message.edited, message.deleted, message.delivered, message.read, message.failed, reaction.received, referral.received, comment.received, review.new, review.updated, lead.received, ad.status_changed, whatsapp.template.status_updated, whatsapp.template.category_updated, whatsapp.account.name_status_updated, whatsapp.automatic_event, whatsapp.number.activated, whatsapp.number.declined, whatsapp.number.action_required, whatsapp.number.verification_required, whatsapp.number.suspended, whatsapp.number.reactivated, whatsapp.number.released, whatsapp.number.kyc_submitted, phone_number.stock_available, verification.approved, verification.failed]
|
|
2434
2435
|
description: Events subscribed to
|
|
2435
2436
|
isActive:
|
|
2436
2437
|
type: boolean
|
|
@@ -2692,6 +2693,45 @@ components:
|
|
|
2692
2693
|
type: string
|
|
2693
2694
|
format: date-time
|
|
2694
2695
|
description: '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.'
|
|
2696
|
+
PhoneNumberStockWatch:
|
|
2697
|
+
type: object
|
|
2698
|
+
required: [id, country, countryName, createdAt]
|
|
2699
|
+
properties:
|
|
2700
|
+
id: { type: string }
|
|
2701
|
+
country: { type: string, description: 'ISO 3166-1 alpha-2.' }
|
|
2702
|
+
countryName: { type: string }
|
|
2703
|
+
createdAt: { type: string, format: date-time }
|
|
2704
|
+
WebhookPayloadPhoneNumberStockAvailable:
|
|
2705
|
+
type: object
|
|
2706
|
+
description: Webhook payload for phone_number.stock_available events
|
|
2707
|
+
required: [id, event, stock, timestamp]
|
|
2708
|
+
properties:
|
|
2709
|
+
id:
|
|
2710
|
+
type: string
|
|
2711
|
+
description: Stable webhook event ID
|
|
2712
|
+
event:
|
|
2713
|
+
type: string
|
|
2714
|
+
enum: [phone_number.stock_available]
|
|
2715
|
+
stock:
|
|
2716
|
+
type: object
|
|
2717
|
+
required: [country, types]
|
|
2718
|
+
properties:
|
|
2719
|
+
country:
|
|
2720
|
+
type: string
|
|
2721
|
+
description: 'ISO 3166-1 alpha-2 country code of the watched country.'
|
|
2722
|
+
types:
|
|
2723
|
+
type: array
|
|
2724
|
+
description: 'Number types deliverable at sweep time. Only types with stock are listed.'
|
|
2725
|
+
items:
|
|
2726
|
+
type: object
|
|
2727
|
+
required: [numberType, availableCount]
|
|
2728
|
+
properties:
|
|
2729
|
+
numberType: { type: string, description: 'local, mobile, national or toll_free.' }
|
|
2730
|
+
availableCount: { type: integer, description: 'Deliverable numbers at sweep time; first come, first served.' }
|
|
2731
|
+
timestamp:
|
|
2732
|
+
type: string
|
|
2733
|
+
format: date-time
|
|
2734
|
+
description: '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.'
|
|
2695
2735
|
WebhookPayloadAccountDisconnected:
|
|
2696
2736
|
type: object
|
|
2697
2737
|
description: Webhook payload for account disconnected events
|
|
@@ -10166,6 +10206,26 @@ webhooks:
|
|
|
10166
10206
|
responses:
|
|
10167
10207
|
'200':
|
|
10168
10208
|
description: Webhook received successfully
|
|
10209
|
+
phone_number.stock_available:
|
|
10210
|
+
post:
|
|
10211
|
+
operationId: onPhoneNumberStockAvailable
|
|
10212
|
+
summary: Phone-number stock available event
|
|
10213
|
+
description: |
|
|
10214
|
+
Fired by the stock sweep (every 6h) the first time a country you watch
|
|
10215
|
+
via POST /v1/phone-numbers/stock-watches has deliverable numbers again.
|
|
10216
|
+
The watch is consumed, so the event fires once per watch; the stock
|
|
10217
|
+
counts are a snapshot and numbers are sold first come, first served.
|
|
10218
|
+
Buy with POST /v1/phone-numbers/purchase.
|
|
10219
|
+
tags: [Webhook Events]
|
|
10220
|
+
requestBody:
|
|
10221
|
+
required: true
|
|
10222
|
+
content:
|
|
10223
|
+
application/json:
|
|
10224
|
+
schema:
|
|
10225
|
+
$ref: '#/components/schemas/WebhookPayloadPhoneNumberStockAvailable'
|
|
10226
|
+
responses:
|
|
10227
|
+
'200':
|
|
10228
|
+
description: Webhook received successfully
|
|
10169
10229
|
verification.approved:
|
|
10170
10230
|
post:
|
|
10171
10231
|
operationId: onVerificationApproved
|
|
@@ -25030,7 +25090,7 @@ paths:
|
|
|
25030
25090
|
minItems: 1
|
|
25031
25091
|
items:
|
|
25032
25092
|
type: string
|
|
25033
|
-
enum: [post.scheduled, post.published, post.failed, post.partial, post.cancelled, post.recycled, post.platform.published, post.platform.failed, post.platform.deleted, post.tiktok.url_resolved, post.external.created, post.external.updated, post.external.deleted, account.connected, account.disconnected, account.ads.initial_sync_completed, message.received, conversation.started, call.received, call.ended, call.failed, call.permission_request, message.sent, message.edited, message.deleted, message.delivered, message.read, message.failed, reaction.received, referral.received, comment.received, review.new, review.updated, lead.received, ad.status_changed, whatsapp.template.status_updated, whatsapp.template.category_updated, whatsapp.account.name_status_updated, whatsapp.automatic_event, whatsapp.number.activated, whatsapp.number.declined, whatsapp.number.action_required, whatsapp.number.verification_required, whatsapp.number.suspended, whatsapp.number.reactivated, whatsapp.number.released, whatsapp.number.kyc_submitted, verification.approved, verification.failed]
|
|
25093
|
+
enum: [post.scheduled, post.published, post.failed, post.partial, post.cancelled, post.recycled, post.platform.published, post.platform.failed, post.platform.deleted, post.tiktok.url_resolved, post.external.created, post.external.updated, post.external.deleted, account.connected, account.disconnected, account.ads.initial_sync_completed, message.received, conversation.started, call.received, call.ended, call.failed, call.permission_request, message.sent, message.edited, message.deleted, message.delivered, message.read, message.failed, reaction.received, referral.received, comment.received, review.new, review.updated, lead.received, ad.status_changed, whatsapp.template.status_updated, whatsapp.template.category_updated, whatsapp.account.name_status_updated, whatsapp.automatic_event, whatsapp.number.activated, whatsapp.number.declined, whatsapp.number.action_required, whatsapp.number.verification_required, whatsapp.number.suspended, whatsapp.number.reactivated, whatsapp.number.released, whatsapp.number.kyc_submitted, phone_number.stock_available, verification.approved, verification.failed]
|
|
25034
25094
|
description: Events to subscribe to (at least one required)
|
|
25035
25095
|
isActive:
|
|
25036
25096
|
type: boolean
|
|
@@ -25149,7 +25209,7 @@ paths:
|
|
|
25149
25209
|
minItems: 1
|
|
25150
25210
|
items:
|
|
25151
25211
|
type: string
|
|
25152
|
-
enum: [post.scheduled, post.published, post.failed, post.partial, post.cancelled, post.recycled, post.platform.published, post.platform.failed, post.platform.deleted, post.tiktok.url_resolved, post.external.created, post.external.updated, post.external.deleted, account.connected, account.disconnected, account.ads.initial_sync_completed, message.received, conversation.started, call.received, call.ended, call.failed, call.permission_request, message.sent, message.edited, message.deleted, message.delivered, message.read, message.failed, reaction.received, referral.received, comment.received, review.new, review.updated, lead.received, ad.status_changed, whatsapp.template.status_updated, whatsapp.template.category_updated, whatsapp.account.name_status_updated, whatsapp.automatic_event, whatsapp.number.activated, whatsapp.number.declined, whatsapp.number.action_required, whatsapp.number.verification_required, whatsapp.number.suspended, whatsapp.number.reactivated, whatsapp.number.released, whatsapp.number.kyc_submitted, verification.approved, verification.failed]
|
|
25212
|
+
enum: [post.scheduled, post.published, post.failed, post.partial, post.cancelled, post.recycled, post.platform.published, post.platform.failed, post.platform.deleted, post.tiktok.url_resolved, post.external.created, post.external.updated, post.external.deleted, account.connected, account.disconnected, account.ads.initial_sync_completed, message.received, conversation.started, call.received, call.ended, call.failed, call.permission_request, message.sent, message.edited, message.deleted, message.delivered, message.read, message.failed, reaction.received, referral.received, comment.received, review.new, review.updated, lead.received, ad.status_changed, whatsapp.template.status_updated, whatsapp.template.category_updated, whatsapp.account.name_status_updated, whatsapp.automatic_event, whatsapp.number.activated, whatsapp.number.declined, whatsapp.number.action_required, whatsapp.number.verification_required, whatsapp.number.suspended, whatsapp.number.reactivated, whatsapp.number.released, whatsapp.number.kyc_submitted, phone_number.stock_available, verification.approved, verification.failed]
|
|
25153
25213
|
description: Events to subscribe to. Must contain at least one event if provided.
|
|
25154
25214
|
isActive:
|
|
25155
25215
|
type: boolean
|
|
@@ -28202,7 +28262,24 @@ paths:
|
|
|
28202
28262
|
x-resource-group: "engagement"
|
|
28203
28263
|
operationId: replyToInboxPost
|
|
28204
28264
|
summary: Reply to comment
|
|
28205
|
-
description:
|
|
28265
|
+
description: |
|
|
28266
|
+
Post a reply to a post or specific comment. Requires accountId in request body.
|
|
28267
|
+
|
|
28268
|
+
**Idempotency:** send an `Idempotency-Key` header to make retries safe
|
|
28269
|
+
(e.g. after a client-side timeout where delivery is unknown): same key +
|
|
28270
|
+
same body replays the original response (with `Idempotent-Replayed: true`)
|
|
28271
|
+
instead of posting the comment a second time; same key + different body
|
|
28272
|
+
returns 422; a key still in flight returns 409. Keys are retained for 24
|
|
28273
|
+
hours and are scoped to the credential and to this exact path, so reusing
|
|
28274
|
+
a key against a different postId returns 422 rather than replaying the
|
|
28275
|
+
other post's response.
|
|
28276
|
+
|
|
28277
|
+
Only successful (2xx) responses are stored for replay. If the request
|
|
28278
|
+
throws or returns a non-2xx status the key is released, so the header
|
|
28279
|
+
protects the "request succeeded but the response was lost" case. After an
|
|
28280
|
+
ambiguous failure (a 5xx or a network timeout) list the post's comments
|
|
28281
|
+
before retrying with the same key, and treat an empty result as
|
|
28282
|
+
inconclusive rather than as proof nothing was posted.
|
|
28206
28283
|
tags: [Comments]
|
|
28207
28284
|
security: [{ bearerAuth: [] }]
|
|
28208
28285
|
parameters:
|
|
@@ -28211,6 +28288,7 @@ paths:
|
|
|
28211
28288
|
required: true
|
|
28212
28289
|
description: Zernio post ID or platform-specific post ID. LinkedIn third-party posts accept full activity URN or numeric ID.
|
|
28213
28290
|
schema: { type: string }
|
|
28291
|
+
- $ref: '#/components/parameters/IdempotencyKeyHeader'
|
|
28214
28292
|
requestBody:
|
|
28215
28293
|
required: true
|
|
28216
28294
|
content:
|
|
@@ -28249,6 +28327,8 @@ paths:
|
|
|
28249
28327
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
28250
28328
|
'403':
|
|
28251
28329
|
description: 'Inbox addon required, or the connected account is not permitted to comment on this post on the platform (code platform_api_error, type platform_error)'
|
|
28330
|
+
'409': { $ref: '#/components/responses/IdempotencyKeyInFlight' }
|
|
28331
|
+
'422': { $ref: '#/components/responses/IdempotencyKeyReused' }
|
|
28252
28332
|
'429': { $ref: '#/components/responses/RateLimited' }
|
|
28253
28333
|
'502':
|
|
28254
28334
|
description: 'Upstream platform error (code platform_api_error, type platform_error)'
|
|
@@ -29624,7 +29704,24 @@ paths:
|
|
|
29624
29704
|
x-resource-group: "engagement"
|
|
29625
29705
|
operationId: replyToInboxReview
|
|
29626
29706
|
summary: Reply to review
|
|
29627
|
-
description:
|
|
29707
|
+
description: |
|
|
29708
|
+
Post a reply to a review. Requires accountId in request body.
|
|
29709
|
+
|
|
29710
|
+
**Idempotency:** send an `Idempotency-Key` header to make retries safe
|
|
29711
|
+
(e.g. after a client-side timeout where delivery is unknown): same key +
|
|
29712
|
+
same body replays the original response (with `Idempotent-Replayed: true`)
|
|
29713
|
+
instead of sending the reply to the platform again; same key + different
|
|
29714
|
+
body returns 422; a key still in flight returns 409. Keys are retained for
|
|
29715
|
+
24 hours and are scoped to the credential and to this exact path, so
|
|
29716
|
+
reusing a key against a different reviewId returns 422 rather than
|
|
29717
|
+
replaying the other review's response.
|
|
29718
|
+
|
|
29719
|
+
Only successful (2xx) responses are stored for replay. If the request
|
|
29720
|
+
throws or returns a non-2xx status the key is released, so the header
|
|
29721
|
+
protects the "request succeeded but the response was lost" case. After an
|
|
29722
|
+
ambiguous failure (a 5xx or a network timeout) fetch the review before
|
|
29723
|
+
retrying with the same key, and treat a missing reply as inconclusive
|
|
29724
|
+
rather than as proof nothing was sent.
|
|
29628
29725
|
tags: [Reviews]
|
|
29629
29726
|
security: [{ bearerAuth: [] }]
|
|
29630
29727
|
parameters:
|
|
@@ -29633,6 +29730,7 @@ paths:
|
|
|
29633
29730
|
required: true
|
|
29634
29731
|
schema: { type: string }
|
|
29635
29732
|
description: Review ID (URL-encoded for Google Business)
|
|
29733
|
+
- $ref: '#/components/parameters/IdempotencyKeyHeader'
|
|
29636
29734
|
requestBody:
|
|
29637
29735
|
required: true
|
|
29638
29736
|
content:
|
|
@@ -29662,6 +29760,8 @@ paths:
|
|
|
29662
29760
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
29663
29761
|
'403':
|
|
29664
29762
|
description: Inbox addon required
|
|
29763
|
+
'409': { $ref: '#/components/responses/IdempotencyKeyInFlight' }
|
|
29764
|
+
'422': { $ref: '#/components/responses/IdempotencyKeyReused' }
|
|
29665
29765
|
delete:
|
|
29666
29766
|
x-resource-group: "engagement"
|
|
29667
29767
|
operationId: deleteInboxReviewReply
|
|
@@ -35208,6 +35308,88 @@ paths:
|
|
|
35208
35308
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
35209
35309
|
'404': { description: Number not found }
|
|
35210
35310
|
|
|
35311
|
+
/v1/phone-numbers/stock-watches:
|
|
35312
|
+
post:
|
|
35313
|
+
x-resource-group: "telephony"
|
|
35314
|
+
operationId: createPhoneNumberStockWatch
|
|
35315
|
+
tags: [Phone Numbers]
|
|
35316
|
+
summary: Watch an out-of-stock country
|
|
35317
|
+
description: |
|
|
35318
|
+
Get notified the first time an out-of-stock country has deliverable
|
|
35319
|
+
numbers again: an email to the account holder plus the
|
|
35320
|
+
`phone_number.stock_available` webhook. Stock is re-checked every 6h.
|
|
35321
|
+
One watch per country; a repeat request returns the existing watch
|
|
35322
|
+
(200). The watch is consumed when it fires, so re-create it if you
|
|
35323
|
+
miss the stock. Up to 20 countries can be watched at once.
|
|
35324
|
+
security:
|
|
35325
|
+
- bearerAuth: []
|
|
35326
|
+
requestBody:
|
|
35327
|
+
required: true
|
|
35328
|
+
content:
|
|
35329
|
+
application/json:
|
|
35330
|
+
schema:
|
|
35331
|
+
type: object
|
|
35332
|
+
required: [country]
|
|
35333
|
+
properties:
|
|
35334
|
+
country: { type: string, minLength: 2, maxLength: 2, description: 'ISO 3166-1 alpha-2 code of a country listed by GET /v1/phone-numbers/countries.' }
|
|
35335
|
+
responses:
|
|
35336
|
+
'201':
|
|
35337
|
+
description: Watch created.
|
|
35338
|
+
content:
|
|
35339
|
+
application/json:
|
|
35340
|
+
schema:
|
|
35341
|
+
$ref: '#/components/schemas/PhoneNumberStockWatch'
|
|
35342
|
+
'200':
|
|
35343
|
+
description: A watch for this country already existed; returned unchanged.
|
|
35344
|
+
content:
|
|
35345
|
+
application/json:
|
|
35346
|
+
schema:
|
|
35347
|
+
$ref: '#/components/schemas/PhoneNumberStockWatch'
|
|
35348
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
35349
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
35350
|
+
'409': { description: 'The country is in stock right now (buy instead of watching), or the 20-country watch limit is reached (code invalid_resource_state).' }
|
|
35351
|
+
get:
|
|
35352
|
+
x-resource-group: "telephony"
|
|
35353
|
+
operationId: listPhoneNumberStockWatches
|
|
35354
|
+
tags: [Phone Numbers]
|
|
35355
|
+
summary: List stock watches
|
|
35356
|
+
security:
|
|
35357
|
+
- bearerAuth: []
|
|
35358
|
+
responses:
|
|
35359
|
+
'200':
|
|
35360
|
+
description: The caller's active watches, oldest first.
|
|
35361
|
+
content:
|
|
35362
|
+
application/json:
|
|
35363
|
+
schema:
|
|
35364
|
+
type: object
|
|
35365
|
+
properties:
|
|
35366
|
+
watches:
|
|
35367
|
+
type: array
|
|
35368
|
+
items:
|
|
35369
|
+
$ref: '#/components/schemas/PhoneNumberStockWatch'
|
|
35370
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
35371
|
+
/v1/phone-numbers/stock-watches/{id}:
|
|
35372
|
+
delete:
|
|
35373
|
+
x-resource-group: "telephony"
|
|
35374
|
+
operationId: deletePhoneNumberStockWatch
|
|
35375
|
+
tags: [Phone Numbers]
|
|
35376
|
+
summary: Stop watching a country
|
|
35377
|
+
security:
|
|
35378
|
+
- bearerAuth: []
|
|
35379
|
+
parameters:
|
|
35380
|
+
- { name: id, in: path, required: true, schema: { type: string } }
|
|
35381
|
+
responses:
|
|
35382
|
+
'200':
|
|
35383
|
+
description: Watch deleted.
|
|
35384
|
+
content:
|
|
35385
|
+
application/json:
|
|
35386
|
+
schema:
|
|
35387
|
+
type: object
|
|
35388
|
+
properties:
|
|
35389
|
+
deleted: { type: boolean }
|
|
35390
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
35391
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
35392
|
+
'404': { description: 'Stock watch not found (code stock_watch_not_found).' }
|
|
35211
35393
|
/v1/phone-numbers/sip-trunks:
|
|
35212
35394
|
post:
|
|
35213
35395
|
x-resource-group: "telephony"
|
|
@@ -140,10 +140,11 @@ describe 'CommentsApi' do
|
|
|
140
140
|
|
|
141
141
|
# unit tests for reply_to_inbox_post
|
|
142
142
|
# Reply to comment
|
|
143
|
-
# Post a reply to a post or specific comment. Requires accountId in request body.
|
|
143
|
+
# 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.
|
|
144
144
|
# @param post_id Zernio post ID or platform-specific post ID. LinkedIn third-party posts accept full activity URN or numeric ID.
|
|
145
145
|
# @param reply_to_inbox_post_request
|
|
146
146
|
# @param [Hash] opts the optional parameters
|
|
147
|
+
# @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.
|
|
147
148
|
# @return [ReplyToInboxPost200Response]
|
|
148
149
|
describe 'reply_to_inbox_post test' do
|
|
149
150
|
it 'should work' do
|
|
@@ -94,6 +94,29 @@ describe 'PhoneNumbersApi' do
|
|
|
94
94
|
end
|
|
95
95
|
end
|
|
96
96
|
|
|
97
|
+
# unit tests for create_phone_number_stock_watch
|
|
98
|
+
# Watch an out-of-stock country
|
|
99
|
+
# 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.
|
|
100
|
+
# @param create_phone_number_stock_watch_request
|
|
101
|
+
# @param [Hash] opts the optional parameters
|
|
102
|
+
# @return [PhoneNumberStockWatch]
|
|
103
|
+
describe 'create_phone_number_stock_watch test' do
|
|
104
|
+
it 'should work' do
|
|
105
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# unit tests for delete_phone_number_stock_watch
|
|
110
|
+
# Stop watching a country
|
|
111
|
+
# @param id
|
|
112
|
+
# @param [Hash] opts the optional parameters
|
|
113
|
+
# @return [DeleteSmsSenderId200Response]
|
|
114
|
+
describe 'delete_phone_number_stock_watch test' do
|
|
115
|
+
it 'should work' do
|
|
116
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
|
|
97
120
|
# unit tests for get_phone_number
|
|
98
121
|
# Get phone number
|
|
99
122
|
# Retrieve the current status of a purchased phone number. Poll this to track Meta pre-verification (US sync path) and, for regulated (Tier 3/4) numbers, the async lifecycle: pending_regulatory → active (or regulatory_declined). When a regulated number has an Onfido ID step, `onfidoVerificationUrl` appears here once the order is placed — forward it to the end user. (Or subscribe to the whatsapp.number.* webhooks instead of polling.)
|
|
@@ -178,6 +201,16 @@ describe 'PhoneNumbersApi' do
|
|
|
178
201
|
end
|
|
179
202
|
end
|
|
180
203
|
|
|
204
|
+
# unit tests for list_phone_number_stock_watches
|
|
205
|
+
# List stock watches
|
|
206
|
+
# @param [Hash] opts the optional parameters
|
|
207
|
+
# @return [ListPhoneNumberStockWatches200Response]
|
|
208
|
+
describe 'list_phone_number_stock_watches test' do
|
|
209
|
+
it 'should work' do
|
|
210
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
|
|
181
214
|
# unit tests for list_phone_numbers
|
|
182
215
|
# List phone numbers
|
|
183
216
|
# List all phone numbers purchased by the authenticated user. By default, released numbers are excluded. Connected (bring-your-own) WhatsApp numbers are returned in the separate `connected` array; they are not billed and have no provisioning lifecycle.
|
|
@@ -68,10 +68,11 @@ describe 'ReviewsApi' do
|
|
|
68
68
|
|
|
69
69
|
# unit tests for reply_to_inbox_review
|
|
70
70
|
# Reply to review
|
|
71
|
-
# Post a reply to a review. Requires accountId in request body.
|
|
71
|
+
# 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.
|
|
72
72
|
# @param review_id Review ID (URL-encoded for Google Business)
|
|
73
73
|
# @param reply_to_inbox_review_request
|
|
74
74
|
# @param [Hash] opts the optional parameters
|
|
75
|
+
# @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.
|
|
75
76
|
# @return [ReplyToInboxReview200Response]
|
|
76
77
|
describe 'reply_to_inbox_review test' do
|
|
77
78
|
it 'should work' do
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zernio::CreatePhoneNumberStockWatchRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::CreatePhoneNumberStockWatchRequest do
|
|
21
|
+
#let(:instance) { Zernio::CreatePhoneNumberStockWatchRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CreatePhoneNumberStockWatchRequest' do
|
|
24
|
+
it 'should create an instance of CreatePhoneNumberStockWatchRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::CreatePhoneNumberStockWatchRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "country"' 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
|