late-sdk 0.0.918 → 0.0.920
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/docs/AnalyticsApi.md +2 -2
- data/docs/AnalyticsDeltaEntryMetrics.md +5 -1
- data/docs/PhoneNumbersApi.md +2 -2
- data/docs/PostAnalytics.md +4 -0
- data/docs/PurchasePhoneNumberRequest.md +2 -0
- data/docs/PurchaseWhatsAppPhoneNumberRequest.md +2 -0
- data/docs/SearchAvailablePhoneNumbers200ResponseNumbersInner.md +6 -2
- data/docs/SearchAvailableWhatsAppNumbers200ResponseNumbersInner.md +5 -1
- data/docs/WhatsAppPhoneNumbersApi.md +1 -1
- data/lib/zernio-sdk/api/analytics_api.rb +3 -3
- data/lib/zernio-sdk/api/phone_numbers_api.rb +4 -4
- data/lib/zernio-sdk/api/whats_app_phone_numbers_api.rb +2 -2
- data/lib/zernio-sdk/models/analytics_delta_entry_metrics.rb +58 -4
- data/lib/zernio-sdk/models/post_analytics.rb +21 -1
- data/lib/zernio-sdk/models/purchase_phone_number409_response.rb +2 -2
- data/lib/zernio-sdk/models/purchase_phone_number_request.rb +32 -1
- data/lib/zernio-sdk/models/purchase_whats_app_phone_number_request.rb +32 -1
- data/lib/zernio-sdk/models/search_available_phone_numbers200_response_numbers_inner.rb +25 -4
- data/lib/zernio-sdk/models/search_available_whats_app_numbers200_response_numbers_inner.rb +22 -4
- data/lib/zernio-sdk/version.rb +1 -1
- data/openapi.yaml +46 -13
- data/spec/api/analytics_api_spec.rb +1 -1
- data/spec/api/phone_numbers_api_spec.rb +2 -2
- data/spec/api/whats_app_phone_numbers_api_spec.rb +1 -1
- data/spec/models/analytics_delta_entry_metrics_spec.rb +12 -0
- data/spec/models/post_analytics_spec.rb +12 -0
- data/spec/models/purchase_phone_number409_response_spec.rb +1 -1
- data/spec/models/purchase_phone_number_request_spec.rb +6 -0
- data/spec/models/purchase_whats_app_phone_number_request_spec.rb +6 -0
- data/spec/models/search_available_phone_numbers200_response_numbers_inner_spec.rb +12 -0
- data/spec/models/search_available_whats_app_numbers200_response_numbers_inner_spec.rb +12 -0
- data/zernio-sdk-0.0.920.gem +0 -0
- metadata +2 -2
- data/zernio-sdk-0.0.918.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 40e2044e5a7296ed3c98b27ebbe305a8774a0ea47146a6f679d3e31127b2fa11
|
|
4
|
+
data.tar.gz: dad4e1e52cd622362f1409fd7f4cf66923e9e45edfd7140d77d05372df23d33b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 96c3456acb147bca85978b4f2ca9ac4d9d6003d57f586ffd75f86ca20ae7e7291af33a688efc45e084a876a26eea3031701db20206d4b6172ce11976da4b544d
|
|
7
|
+
data.tar.gz: 742671702d09b3f84b24be024bd2563289b3ea4c6a6b5951010aa210522882eb50d5dc216c6acc02847f267c3f13ee2447597e052608b548fe3b5de52bd03e86
|
data/docs/AnalyticsApi.md
CHANGED
|
@@ -62,7 +62,7 @@ opts = {
|
|
|
62
62
|
to_date: Date.parse('2013-10-20'), # Date | Inclusive upper bound (YYYY-MM-DD). Defaults to today if omitted.
|
|
63
63
|
limit: 56, # Integer | Page size (default 50)
|
|
64
64
|
page: 56, # Integer | Page number (default 1)
|
|
65
|
-
sort_by: 'date', # String | Sort by date, engagement, or a specific metric.
|
|
65
|
+
sort_by: 'date', # String | Sort by date, engagement, or a specific metric. Platform-specific metrics (follows, reposts, reels_skip_rate, ig_reels_*, completion_rate, profile_views) sort a null value as 0.
|
|
66
66
|
order: 'asc' # String | Sort order
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -106,7 +106,7 @@ end
|
|
|
106
106
|
| **to_date** | **Date** | Inclusive upper bound (YYYY-MM-DD). Defaults to today if omitted. | [optional] |
|
|
107
107
|
| **limit** | **Integer** | Page size (default 50) | [optional][default to 50] |
|
|
108
108
|
| **page** | **Integer** | Page number (default 1) | [optional][default to 1] |
|
|
109
|
-
| **sort_by** | **String** | Sort by date, engagement, or a specific metric.
|
|
109
|
+
| **sort_by** | **String** | Sort by date, engagement, or a specific metric. Platform-specific metrics (follows, reposts, reels_skip_rate, ig_reels_*, completion_rate, profile_views) sort a null value as 0. | [optional][default to 'date'] |
|
|
110
110
|
| **order** | **String** | Sort order | [optional][default to 'desc'] |
|
|
111
111
|
|
|
112
112
|
### Return type
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
| **ig_reels_video_view_total_time** | **Integer** | Instagram Reels total watch time, in milliseconds | |
|
|
19
19
|
| **reposts** | **Integer** | | |
|
|
20
20
|
| **reels_skip_rate** | **Float** | Instagram Reels skip rate, 0 to 1 | |
|
|
21
|
+
| **completion_rate** | **Float** | TikTok business lane: share of viewers who watched to the end, 0 to 1 | |
|
|
22
|
+
| **profile_views** | **Integer** | TikTok business lane: profile views attributed to the post | |
|
|
21
23
|
|
|
22
24
|
## Example
|
|
23
25
|
|
|
@@ -38,7 +40,9 @@ instance = Zernio::AnalyticsDeltaEntryMetrics.new(
|
|
|
38
40
|
ig_reels_avg_watch_time: null,
|
|
39
41
|
ig_reels_video_view_total_time: null,
|
|
40
42
|
reposts: null,
|
|
41
|
-
reels_skip_rate: null
|
|
43
|
+
reels_skip_rate: null,
|
|
44
|
+
completion_rate: null,
|
|
45
|
+
profile_views: null
|
|
42
46
|
)
|
|
43
47
|
```
|
|
44
48
|
|
data/docs/PhoneNumbersApi.md
CHANGED
|
@@ -1149,7 +1149,7 @@ end
|
|
|
1149
1149
|
|
|
1150
1150
|
Purchase phone number
|
|
1151
1151
|
|
|
1152
|
-
Payment-first:
|
|
1152
|
+
Payment-first: the system provisions a number and auto-assigns it, unless you pass `phoneNumber` to buy one exact number from `GET /v1/phone-numbers/available`. With usage-based billing active and a payment method on file, the number provisions inline and bills per month on your usage-based invoice (there is no checkout redirect). No payment method on file returns `402 PAYMENT_REQUIRED`; a regulated country returns `202` with `status: \"kyc_required\"` and a `kycUrl`. The monthly price is the one `GET /v1/phone-numbers/countries` quotes for that country and `numberType` at the time of purchase, and it is stamped on the number: later rate-card changes never move a number you already own. Requires usage-based billing (the Usage plan). The maximum number of phone numbers is determined by the user's plan.
|
|
1153
1153
|
|
|
1154
1154
|
### Examples
|
|
1155
1155
|
|
|
@@ -1569,7 +1569,7 @@ end
|
|
|
1569
1569
|
|
|
1570
1570
|
Search available numbers
|
|
1571
1571
|
|
|
1572
|
-
Search the provider's inventory for numbers available to purchase in a country (default US). Optional filters narrow the results. The country must be offerable (see GET /v1/phone-numbers/countries). Voice capability is always required; pass `sms=true` to only see numbers that can also text (SMS support is per-number, not per-country).
|
|
1572
|
+
Search the provider's inventory for numbers available to purchase in a country (default US). Optional filters narrow the results. The country must be offerable (see GET /v1/phone-numbers/countries). Voice capability is always required; pass `sms=true` to only see numbers that can also text (SMS support is per-number, not per-country). Numbers a purchase would refuse are left out, and any result's `phoneNumber` can be bought exactly by passing it to POST /v1/phone-numbers/purchase.
|
|
1573
1573
|
|
|
1574
1574
|
### Examples
|
|
1575
1575
|
|
data/docs/PostAnalytics.md
CHANGED
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
| **ig_reels_avg_watch_time** | **Integer** | Instagram Reels only: average watch time per play, in milliseconds. 0 for non-Reels media and other platforms. | [optional] |
|
|
17
17
|
| **ig_reels_video_view_total_time** | **Integer** | Instagram Reels only: total watch time including replays, in milliseconds. 0 for non-Reels media and other platforms. | [optional] |
|
|
18
18
|
| **reels_skip_rate** | **Float** | Instagram Reels only: percentage (0-100) of initial views that skipped the reel within its first 3 seconds, as reported by Meta. Meta labels the metric estimated and in development, so it can move between syncs. 0 for non-Reels media and other platforms. When a post is published to several accounts, the aggregate is weighted by views. | [optional] |
|
|
19
|
+
| **completion_rate** | **Float** | TikTok accounts connected through the TikTok for Business app only: share of viewers who watched the video to the end, 0 to 1, as TikTok reports it (T+24-48h, only for posts active in the last 7 days). 0 for other platforms. When a post is published to several accounts, the aggregate is weighted by views. | [optional] |
|
|
20
|
+
| **profile_views** | **Integer** | TikTok accounts connected through the TikTok for Business app only: profile views from users who reached the profile through this post (T+24-48h). 0 for other platforms. | [optional] |
|
|
19
21
|
| **reposts** | **Integer** | Instagram accounts connected with Facebook Login only: reposts of the media by other users, minus deleted reposts, on feed posts, reels and stories. Meta does not expose this metric for accounts connected with Instagram Login, so those always report 0. 0 for other platforms, including Threads, where reposts are counted in shares instead. | [optional] |
|
|
20
22
|
| **video_duration_seconds** | **Integer** | Video length in seconds. Currently Instagram Reels only; combine with igReelsAvgWatchTime (ms) to estimate retention. Null when unknown (other platforms, non-video media, or when Instagram does not expose the media URL, e.g. reels with copyrighted audio). | [optional] |
|
|
21
23
|
| **engagement_rate** | **Float** | Percentage, rounded to 2 decimals: (likes + comments + shares + saves) / (impressions or reach or views) * 100. Clicks and follows are never counted. The denominator is the FIRST of impressions, reach, views that is non-zero, so it is not the same basis on every post: a post with impressions divides by impressions, one without falls back to reach, then to views. If you need a single consistent basis (e.g. interactions / reach), compute it from the raw fields above. The engagementRate on the LinkedIn account endpoints is a different formula. | [optional] |
|
|
@@ -39,6 +41,8 @@ instance = Zernio::PostAnalytics.new(
|
|
|
39
41
|
ig_reels_avg_watch_time: 0,
|
|
40
42
|
ig_reels_video_view_total_time: 0,
|
|
41
43
|
reels_skip_rate: 48.8,
|
|
44
|
+
completion_rate: 0,
|
|
45
|
+
profile_views: 0,
|
|
42
46
|
reposts: 0,
|
|
43
47
|
video_duration_seconds: 30,
|
|
44
48
|
engagement_rate: 6.59,
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
| **country** | **String** | ISO 3166-1 alpha-2 country for the number (default US). International numbers require usage-based billing. Tier 3/4 countries return 202 { status: \"kyc_required\", kycUrl }. The customer must complete KYC at that URL before the number is ordered. See GET /v1/phone-numbers/countries. | [optional][default to 'US'] |
|
|
9
9
|
| **number_type** | **String** | Which of the country's offered number types to order (see `types[]` on GET /v1/phone-numbers/countries). Omitted = the country's default type, which is always the WhatsApp-safe choice. Capabilities, price, and KYC requirements are per (country, type): toll_free can never connect WhatsApp (400 when combined with connectWhatsapp:true), and wantsSms:true requires an SMS-capable type. | [optional] |
|
|
10
10
|
| **area_code** | **String** | Area code (national destination code, e.g. 11 for Sao Paulo) the number must be in. Hard constraint: when the area has no deliverable inventory the purchase fails with 409 code AREA_CODE_UNAVAILABLE instead of assigning a number from another area, and later replacements stay in this area too. Omit for any area. Get live options from GET /v1/phone-numbers/availability (areaOptions). | [optional] |
|
|
11
|
+
| **phone_number** | **String** | One exact number to buy, in E.164, taken from GET /v1/phone-numbers/available. Hard constraint: when it is no longer available (bought by someone else, or WhatsApp's buy-time check rejects it) the purchase fails with 409 code PHONE_NUMBER_UNAVAILABLE instead of assigning another number; search again and pick another. Only for countries and types that activate instantly: a regulated one (202 kyc_required) returns 400 when phoneNumber is set. | [optional] |
|
|
11
12
|
| **connect_whatsapp** | **Boolean** | A phone number is the unit; WhatsApp is one optional feature. Pass false to buy a STANDALONE number (Calls/SMS only): provisioning skips the Meta pre-verify/OTP steps and the number activates immediately. Omitted defaults to the WhatsApp provisioning path. WhatsApp can be connected to a standalone number later from the connect flow. | [optional][default to true] |
|
|
12
13
|
| **wants_sms** | **Boolean** | SMS capability is per-number, not per-country. Pass true to provision from the SMS-capable inventory pool so the number can actually text (see also GET /v1/phone-numbers/available with sms=true, and smsAvailable on GET /v1/phone-numbers/countries). | [optional][default to false] |
|
|
13
14
|
| **wants_whatsapp** | **Boolean** | Declare WhatsApp intent on a STANDALONE purchase (connectWhatsapp:false). The number still activates and bills immediately, but if WhatsApp's buy-time check rejects the assigned number, it is automatically swapped for a WhatsApp-eligible one during the purchase instead of being delivered with WhatsApp unavailable. Ignored on the WhatsApp provisioning path (connectWhatsapp omitted or true), which always delivers a WhatsApp-verified number. | [optional][default to false] |
|
|
@@ -24,6 +25,7 @@ instance = Zernio::PurchasePhoneNumberRequest.new(
|
|
|
24
25
|
country: null,
|
|
25
26
|
number_type: null,
|
|
26
27
|
area_code: null,
|
|
28
|
+
phone_number: null,
|
|
27
29
|
connect_whatsapp: null,
|
|
28
30
|
wants_sms: null,
|
|
29
31
|
wants_whatsapp: null,
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **profile_id** | **String** | Profile to associate the number with | |
|
|
8
8
|
| **country** | **String** | ISO 3166-1 alpha-2 country for the number (default US). International numbers require usage-based billing. Tier 3/4 countries return 202 { status: \"kyc_required\", kycUrl }. The customer must complete KYC at that URL before the number is ordered. See GET /v1/whatsapp/phone-numbers/countries. | [optional][default to 'US'] |
|
|
9
|
+
| **phone_number** | **String** | One exact number to buy, in E.164, taken from GET /v1/phone-numbers/available. Fails with 409 code PHONE_NUMBER_UNAVAILABLE when it is no longer available. | [optional] |
|
|
9
10
|
| **purchase_intent_id** | **String** | Optional idempotency key. Send the same value when retrying a purchase: if a number was already bought under this key, the API returns { status: \"already_purchased\", numberId, phoneNumber } instead of provisioning a second number. Generate a fresh key for each genuinely new purchase. | [optional] |
|
|
10
11
|
| **allow_multiple** | **Boolean** | Any second purchase within 10 minutes of a previous one is rejected with 409 code PURCHASE_VELOCITY as duplicate protection. Pass true to confirm the additional purchase is intentional (e.g. bulk provisioning). | [optional][default to false] |
|
|
11
12
|
|
|
@@ -17,6 +18,7 @@ require 'zernio-sdk'
|
|
|
17
18
|
instance = Zernio::PurchaseWhatsAppPhoneNumberRequest.new(
|
|
18
19
|
profile_id: null,
|
|
19
20
|
country: null,
|
|
21
|
+
phone_number: null,
|
|
20
22
|
purchase_intent_id: null,
|
|
21
23
|
allow_multiple: null
|
|
22
24
|
)
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **phone_number** | **String** |
|
|
7
|
+
| **phone_number** | **String** | E.164. Pass it as `phoneNumber` on POST /v1/phone-numbers/purchase to buy this exact number. | [optional] |
|
|
8
8
|
| **features** | **Array<String>** | Provider capability list for this number (e.g. voice, sms, mms). | [optional] |
|
|
9
|
+
| **locality** | **String** | Town or rate center the number belongs to, as the carrier names it (e.g. WACO). | [optional] |
|
|
10
|
+
| **best_effort** | **Boolean** | true when the carrier added this number because too few matched your filters, so it may be outside the requested prefix or locality. | [optional] |
|
|
9
11
|
|
|
10
12
|
## Example
|
|
11
13
|
|
|
@@ -14,7 +16,9 @@ require 'zernio-sdk'
|
|
|
14
16
|
|
|
15
17
|
instance = Zernio::SearchAvailablePhoneNumbers200ResponseNumbersInner.new(
|
|
16
18
|
phone_number: null,
|
|
17
|
-
features: null
|
|
19
|
+
features: null,
|
|
20
|
+
locality: null,
|
|
21
|
+
best_effort: null
|
|
18
22
|
)
|
|
19
23
|
```
|
|
20
24
|
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **phone_number** | **String** | | [optional] |
|
|
8
|
+
| **locality** | **String** | | [optional] |
|
|
9
|
+
| **best_effort** | **Boolean** | | [optional] |
|
|
8
10
|
|
|
9
11
|
## Example
|
|
10
12
|
|
|
@@ -12,7 +14,9 @@
|
|
|
12
14
|
require 'zernio-sdk'
|
|
13
15
|
|
|
14
16
|
instance = Zernio::SearchAvailableWhatsAppNumbers200ResponseNumbersInner.new(
|
|
15
|
-
phone_number: null
|
|
17
|
+
phone_number: null,
|
|
18
|
+
locality: null,
|
|
19
|
+
best_effort: null
|
|
16
20
|
)
|
|
17
21
|
```
|
|
18
22
|
|
|
@@ -660,7 +660,7 @@ end
|
|
|
660
660
|
|
|
661
661
|
Purchase phone number
|
|
662
662
|
|
|
663
|
-
Deprecated alias of `/v1/phone-numbers/purchase`; same contract. New integrations should use that path. Payment-first:
|
|
663
|
+
Deprecated alias of `/v1/phone-numbers/purchase`; same contract. New integrations should use that path. Payment-first: the system provisions a number and auto-assigns it, unless you pass `phoneNumber` to buy one exact number from `GET /v1/phone-numbers/available`. With usage-based billing active and a payment method on file, the number provisions inline and bills per month on your usage-based invoice (there is no checkout redirect). No payment method on file returns `402 PAYMENT_REQUIRED`; a regulated country returns `202` with `status: \"kyc_required\"` and a `kycUrl`. The monthly price is the one `GET /v1/phone-numbers/countries` quotes for that country and `numberType` at the time of purchase, and it is stamped on the number: later rate-card changes never move a number you already own. Requires usage-based billing (the Usage plan). The maximum number of phone numbers is determined by the user's plan.
|
|
664
664
|
|
|
665
665
|
### Examples
|
|
666
666
|
|
|
@@ -31,7 +31,7 @@ module Zernio
|
|
|
31
31
|
# @option opts [Date] :to_date Inclusive upper bound (YYYY-MM-DD). Defaults to today if omitted.
|
|
32
32
|
# @option opts [Integer] :limit Page size (default 50) (default to 50)
|
|
33
33
|
# @option opts [Integer] :page Page number (default 1) (default to 1)
|
|
34
|
-
# @option opts [String] :sort_by Sort by date, engagement, or a specific metric.
|
|
34
|
+
# @option opts [String] :sort_by Sort by date, engagement, or a specific metric. Platform-specific metrics (follows, reposts, reels_skip_rate, ig_reels_*, completion_rate, profile_views) sort a null value as 0. (default to 'date')
|
|
35
35
|
# @option opts [String] :order Sort order (default to 'desc')
|
|
36
36
|
# @return [GetAnalytics200Response]
|
|
37
37
|
def get_analytics(opts = {})
|
|
@@ -51,7 +51,7 @@ module Zernio
|
|
|
51
51
|
# @option opts [Date] :to_date Inclusive upper bound (YYYY-MM-DD). Defaults to today if omitted.
|
|
52
52
|
# @option opts [Integer] :limit Page size (default 50) (default to 50)
|
|
53
53
|
# @option opts [Integer] :page Page number (default 1) (default to 1)
|
|
54
|
-
# @option opts [String] :sort_by Sort by date, engagement, or a specific metric.
|
|
54
|
+
# @option opts [String] :sort_by Sort by date, engagement, or a specific metric. Platform-specific metrics (follows, reposts, reels_skip_rate, ig_reels_*, completion_rate, profile_views) sort a null value as 0. (default to 'date')
|
|
55
55
|
# @option opts [String] :order Sort order (default to 'desc')
|
|
56
56
|
# @return [Array<(GetAnalytics200Response, Integer, Hash)>] GetAnalytics200Response data, response status code and response headers
|
|
57
57
|
def get_analytics_with_http_info(opts = {})
|
|
@@ -74,7 +74,7 @@ module Zernio
|
|
|
74
74
|
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.get_analytics, must be greater than or equal to 1.'
|
|
75
75
|
end
|
|
76
76
|
|
|
77
|
-
allowable_values = ["date", "engagement", "impressions", "reach", "likes", "comments", "shares", "saves", "clicks", "views", "follows", "ig_reels_avg_watch_time", "ig_reels_video_view_total_time", "reposts", "reels_skip_rate"]
|
|
77
|
+
allowable_values = ["date", "engagement", "impressions", "reach", "likes", "comments", "shares", "saves", "clicks", "views", "follows", "ig_reels_avg_watch_time", "ig_reels_video_view_total_time", "reposts", "reels_skip_rate", "completion_rate", "profile_views"]
|
|
78
78
|
if @api_client.config.client_side_validation && opts[:'sort_by'] && !allowable_values.include?(opts[:'sort_by'])
|
|
79
79
|
fail ArgumentError, "invalid value for \"sort_by\", must be one of #{allowable_values}"
|
|
80
80
|
end
|
|
@@ -1065,7 +1065,7 @@ module Zernio
|
|
|
1065
1065
|
end
|
|
1066
1066
|
|
|
1067
1067
|
# Purchase phone number
|
|
1068
|
-
# Payment-first:
|
|
1068
|
+
# Payment-first: the system provisions a number and auto-assigns it, unless you pass `phoneNumber` to buy one exact number from `GET /v1/phone-numbers/available`. With usage-based billing active and a payment method on file, the number provisions inline and bills per month on your usage-based invoice (there is no checkout redirect). No payment method on file returns `402 PAYMENT_REQUIRED`; a regulated country returns `202` with `status: \"kyc_required\"` and a `kycUrl`. The monthly price is the one `GET /v1/phone-numbers/countries` quotes for that country and `numberType` at the time of purchase, and it is stamped on the number: later rate-card changes never move a number you already own. Requires usage-based billing (the Usage plan). The maximum number of phone numbers is determined by the user's plan.
|
|
1069
1069
|
# @param purchase_phone_number_request [PurchasePhoneNumberRequest]
|
|
1070
1070
|
# @param [Hash] opts the optional parameters
|
|
1071
1071
|
# @return [PurchasePhoneNumber200Response]
|
|
@@ -1075,7 +1075,7 @@ module Zernio
|
|
|
1075
1075
|
end
|
|
1076
1076
|
|
|
1077
1077
|
# Purchase phone number
|
|
1078
|
-
# Payment-first:
|
|
1078
|
+
# Payment-first: the system provisions a number and auto-assigns it, unless you pass `phoneNumber` to buy one exact number from `GET /v1/phone-numbers/available`. With usage-based billing active and a payment method on file, the number provisions inline and bills per month on your usage-based invoice (there is no checkout redirect). No payment method on file returns `402 PAYMENT_REQUIRED`; a regulated country returns `202` with `status: \"kyc_required\"` and a `kycUrl`. The monthly price is the one `GET /v1/phone-numbers/countries` quotes for that country and `numberType` at the time of purchase, and it is stamped on the number: later rate-card changes never move a number you already own. Requires usage-based billing (the Usage plan). The maximum number of phone numbers is determined by the user's plan.
|
|
1079
1079
|
# @param purchase_phone_number_request [PurchasePhoneNumberRequest]
|
|
1080
1080
|
# @param [Hash] opts the optional parameters
|
|
1081
1081
|
# @return [Array<(PurchasePhoneNumber200Response, Integer, Hash)>] PurchasePhoneNumber200Response data, response status code and response headers
|
|
@@ -1486,7 +1486,7 @@ module Zernio
|
|
|
1486
1486
|
end
|
|
1487
1487
|
|
|
1488
1488
|
# Search available numbers
|
|
1489
|
-
# Search the provider's inventory for numbers available to purchase in a country (default US). Optional filters narrow the results. The country must be offerable (see GET /v1/phone-numbers/countries). Voice capability is always required; pass `sms=true` to only see numbers that can also text (SMS support is per-number, not per-country).
|
|
1489
|
+
# Search the provider's inventory for numbers available to purchase in a country (default US). Optional filters narrow the results. The country must be offerable (see GET /v1/phone-numbers/countries). Voice capability is always required; pass `sms=true` to only see numbers that can also text (SMS support is per-number, not per-country). Numbers a purchase would refuse are left out, and any result's `phoneNumber` can be bought exactly by passing it to POST /v1/phone-numbers/purchase.
|
|
1490
1490
|
# @param [Hash] opts the optional parameters
|
|
1491
1491
|
# @option opts [String] :country (default to 'US')
|
|
1492
1492
|
# @option opts [String] :type Number type; defaults to the country's WhatsApp-safe type
|
|
@@ -1502,7 +1502,7 @@ module Zernio
|
|
|
1502
1502
|
end
|
|
1503
1503
|
|
|
1504
1504
|
# Search available numbers
|
|
1505
|
-
# Search the provider's inventory for numbers available to purchase in a country (default US). Optional filters narrow the results. The country must be offerable (see GET /v1/phone-numbers/countries). Voice capability is always required; pass `sms=true` to only see numbers that can also text (SMS support is per-number, not per-country).
|
|
1505
|
+
# Search the provider's inventory for numbers available to purchase in a country (default US). Optional filters narrow the results. The country must be offerable (see GET /v1/phone-numbers/countries). Voice capability is always required; pass `sms=true` to only see numbers that can also text (SMS support is per-number, not per-country). Numbers a purchase would refuse are left out, and any result's `phoneNumber` can be bought exactly by passing it to POST /v1/phone-numbers/purchase.
|
|
1506
1506
|
# @param [Hash] opts the optional parameters
|
|
1507
1507
|
# @option opts [String] :country (default to 'US')
|
|
1508
1508
|
# @option opts [String] :type Number type; defaults to the country's WhatsApp-safe type
|
|
@@ -621,7 +621,7 @@ module Zernio
|
|
|
621
621
|
end
|
|
622
622
|
|
|
623
623
|
# Purchase phone number
|
|
624
|
-
# Deprecated alias of `/v1/phone-numbers/purchase`; same contract. New integrations should use that path. Payment-first:
|
|
624
|
+
# Deprecated alias of `/v1/phone-numbers/purchase`; same contract. New integrations should use that path. Payment-first: the system provisions a number and auto-assigns it, unless you pass `phoneNumber` to buy one exact number from `GET /v1/phone-numbers/available`. With usage-based billing active and a payment method on file, the number provisions inline and bills per month on your usage-based invoice (there is no checkout redirect). No payment method on file returns `402 PAYMENT_REQUIRED`; a regulated country returns `202` with `status: \"kyc_required\"` and a `kycUrl`. The monthly price is the one `GET /v1/phone-numbers/countries` quotes for that country and `numberType` at the time of purchase, and it is stamped on the number: later rate-card changes never move a number you already own. Requires usage-based billing (the Usage plan). The maximum number of phone numbers is determined by the user's plan.
|
|
625
625
|
# @param purchase_whats_app_phone_number_request [PurchaseWhatsAppPhoneNumberRequest]
|
|
626
626
|
# @param [Hash] opts the optional parameters
|
|
627
627
|
# @return [PurchaseWhatsAppPhoneNumber200Response]
|
|
@@ -631,7 +631,7 @@ module Zernio
|
|
|
631
631
|
end
|
|
632
632
|
|
|
633
633
|
# Purchase phone number
|
|
634
|
-
# Deprecated alias of `/v1/phone-numbers/purchase`; same contract. New integrations should use that path. Payment-first:
|
|
634
|
+
# Deprecated alias of `/v1/phone-numbers/purchase`; same contract. New integrations should use that path. Payment-first: the system provisions a number and auto-assigns it, unless you pass `phoneNumber` to buy one exact number from `GET /v1/phone-numbers/available`. With usage-based billing active and a payment method on file, the number provisions inline and bills per month on your usage-based invoice (there is no checkout redirect). No payment method on file returns `402 PAYMENT_REQUIRED`; a regulated country returns `202` with `status: \"kyc_required\"` and a `kycUrl`. The monthly price is the one `GET /v1/phone-numbers/countries` quotes for that country and `numberType` at the time of purchase, and it is stamped on the number: later rate-card changes never move a number you already own. Requires usage-based billing (the Usage plan). The maximum number of phone numbers is determined by the user's plan.
|
|
635
635
|
# @param purchase_whats_app_phone_number_request [PurchaseWhatsAppPhoneNumberRequest]
|
|
636
636
|
# @param [Hash] opts the optional parameters
|
|
637
637
|
# @return [Array<(PurchaseWhatsAppPhoneNumber200Response, Integer, Hash)>] PurchaseWhatsAppPhoneNumber200Response data, response status code and response headers
|
|
@@ -48,6 +48,12 @@ module Zernio
|
|
|
48
48
|
# Instagram Reels skip rate, 0 to 1
|
|
49
49
|
attr_accessor :reels_skip_rate
|
|
50
50
|
|
|
51
|
+
# TikTok business lane: share of viewers who watched to the end, 0 to 1
|
|
52
|
+
attr_accessor :completion_rate
|
|
53
|
+
|
|
54
|
+
# TikTok business lane: profile views attributed to the post
|
|
55
|
+
attr_accessor :profile_views
|
|
56
|
+
|
|
51
57
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
52
58
|
def self.attribute_map
|
|
53
59
|
{
|
|
@@ -64,7 +70,9 @@ module Zernio
|
|
|
64
70
|
:'ig_reels_avg_watch_time' => :'igReelsAvgWatchTime',
|
|
65
71
|
:'ig_reels_video_view_total_time' => :'igReelsVideoViewTotalTime',
|
|
66
72
|
:'reposts' => :'reposts',
|
|
67
|
-
:'reels_skip_rate' => :'reelsSkipRate'
|
|
73
|
+
:'reels_skip_rate' => :'reelsSkipRate',
|
|
74
|
+
:'completion_rate' => :'completionRate',
|
|
75
|
+
:'profile_views' => :'profileViews'
|
|
68
76
|
}
|
|
69
77
|
end
|
|
70
78
|
|
|
@@ -94,7 +102,9 @@ module Zernio
|
|
|
94
102
|
:'ig_reels_avg_watch_time' => :'Integer',
|
|
95
103
|
:'ig_reels_video_view_total_time' => :'Integer',
|
|
96
104
|
:'reposts' => :'Integer',
|
|
97
|
-
:'reels_skip_rate' => :'Float'
|
|
105
|
+
:'reels_skip_rate' => :'Float',
|
|
106
|
+
:'completion_rate' => :'Float',
|
|
107
|
+
:'profile_views' => :'Integer'
|
|
98
108
|
}
|
|
99
109
|
end
|
|
100
110
|
|
|
@@ -203,6 +213,18 @@ module Zernio
|
|
|
203
213
|
else
|
|
204
214
|
self.reels_skip_rate = nil
|
|
205
215
|
end
|
|
216
|
+
|
|
217
|
+
if attributes.key?(:'completion_rate')
|
|
218
|
+
self.completion_rate = attributes[:'completion_rate']
|
|
219
|
+
else
|
|
220
|
+
self.completion_rate = nil
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
if attributes.key?(:'profile_views')
|
|
224
|
+
self.profile_views = attributes[:'profile_views']
|
|
225
|
+
else
|
|
226
|
+
self.profile_views = nil
|
|
227
|
+
end
|
|
206
228
|
end
|
|
207
229
|
|
|
208
230
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -266,6 +288,14 @@ module Zernio
|
|
|
266
288
|
invalid_properties.push('invalid value for "reels_skip_rate", reels_skip_rate cannot be nil.')
|
|
267
289
|
end
|
|
268
290
|
|
|
291
|
+
if @completion_rate.nil?
|
|
292
|
+
invalid_properties.push('invalid value for "completion_rate", completion_rate cannot be nil.')
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
if @profile_views.nil?
|
|
296
|
+
invalid_properties.push('invalid value for "profile_views", profile_views cannot be nil.')
|
|
297
|
+
end
|
|
298
|
+
|
|
269
299
|
invalid_properties
|
|
270
300
|
end
|
|
271
301
|
|
|
@@ -287,6 +317,8 @@ module Zernio
|
|
|
287
317
|
return false if @ig_reels_video_view_total_time.nil?
|
|
288
318
|
return false if @reposts.nil?
|
|
289
319
|
return false if @reels_skip_rate.nil?
|
|
320
|
+
return false if @completion_rate.nil?
|
|
321
|
+
return false if @profile_views.nil?
|
|
290
322
|
true
|
|
291
323
|
end
|
|
292
324
|
|
|
@@ -430,6 +462,26 @@ module Zernio
|
|
|
430
462
|
@reels_skip_rate = reels_skip_rate
|
|
431
463
|
end
|
|
432
464
|
|
|
465
|
+
# Custom attribute writer method with validation
|
|
466
|
+
# @param [Object] completion_rate Value to be assigned
|
|
467
|
+
def completion_rate=(completion_rate)
|
|
468
|
+
if completion_rate.nil?
|
|
469
|
+
fail ArgumentError, 'completion_rate cannot be nil'
|
|
470
|
+
end
|
|
471
|
+
|
|
472
|
+
@completion_rate = completion_rate
|
|
473
|
+
end
|
|
474
|
+
|
|
475
|
+
# Custom attribute writer method with validation
|
|
476
|
+
# @param [Object] profile_views Value to be assigned
|
|
477
|
+
def profile_views=(profile_views)
|
|
478
|
+
if profile_views.nil?
|
|
479
|
+
fail ArgumentError, 'profile_views cannot be nil'
|
|
480
|
+
end
|
|
481
|
+
|
|
482
|
+
@profile_views = profile_views
|
|
483
|
+
end
|
|
484
|
+
|
|
433
485
|
# Checks equality by comparing each attribute.
|
|
434
486
|
# @param [Object] Object to be compared
|
|
435
487
|
def ==(o)
|
|
@@ -448,7 +500,9 @@ module Zernio
|
|
|
448
500
|
ig_reels_avg_watch_time == o.ig_reels_avg_watch_time &&
|
|
449
501
|
ig_reels_video_view_total_time == o.ig_reels_video_view_total_time &&
|
|
450
502
|
reposts == o.reposts &&
|
|
451
|
-
reels_skip_rate == o.reels_skip_rate
|
|
503
|
+
reels_skip_rate == o.reels_skip_rate &&
|
|
504
|
+
completion_rate == o.completion_rate &&
|
|
505
|
+
profile_views == o.profile_views
|
|
452
506
|
end
|
|
453
507
|
|
|
454
508
|
# @see the `==` method
|
|
@@ -460,7 +514,7 @@ module Zernio
|
|
|
460
514
|
# Calculates hash code according to all attributes.
|
|
461
515
|
# @return [Integer] Hash code
|
|
462
516
|
def hash
|
|
463
|
-
[impressions, reach, likes, comments, shares, saves, sends, clicks, views, follows, ig_reels_avg_watch_time, ig_reels_video_view_total_time, reposts, reels_skip_rate].hash
|
|
517
|
+
[impressions, reach, likes, comments, shares, saves, sends, clicks, views, follows, ig_reels_avg_watch_time, ig_reels_video_view_total_time, reposts, reels_skip_rate, completion_rate, profile_views].hash
|
|
464
518
|
end
|
|
465
519
|
|
|
466
520
|
# Builds the object from hash
|
|
@@ -44,6 +44,12 @@ module Zernio
|
|
|
44
44
|
# Instagram Reels only: percentage (0-100) of initial views that skipped the reel within its first 3 seconds, as reported by Meta. Meta labels the metric estimated and in development, so it can move between syncs. 0 for non-Reels media and other platforms. When a post is published to several accounts, the aggregate is weighted by views.
|
|
45
45
|
attr_accessor :reels_skip_rate
|
|
46
46
|
|
|
47
|
+
# TikTok accounts connected through the TikTok for Business app only: share of viewers who watched the video to the end, 0 to 1, as TikTok reports it (T+24-48h, only for posts active in the last 7 days). 0 for other platforms. When a post is published to several accounts, the aggregate is weighted by views.
|
|
48
|
+
attr_accessor :completion_rate
|
|
49
|
+
|
|
50
|
+
# TikTok accounts connected through the TikTok for Business app only: profile views from users who reached the profile through this post (T+24-48h). 0 for other platforms.
|
|
51
|
+
attr_accessor :profile_views
|
|
52
|
+
|
|
47
53
|
# Instagram accounts connected with Facebook Login only: reposts of the media by other users, minus deleted reposts, on feed posts, reels and stories. Meta does not expose this metric for accounts connected with Instagram Login, so those always report 0. 0 for other platforms, including Threads, where reposts are counted in shares instead.
|
|
48
54
|
attr_accessor :reposts
|
|
49
55
|
|
|
@@ -70,6 +76,8 @@ module Zernio
|
|
|
70
76
|
:'ig_reels_avg_watch_time' => :'igReelsAvgWatchTime',
|
|
71
77
|
:'ig_reels_video_view_total_time' => :'igReelsVideoViewTotalTime',
|
|
72
78
|
:'reels_skip_rate' => :'reelsSkipRate',
|
|
79
|
+
:'completion_rate' => :'completionRate',
|
|
80
|
+
:'profile_views' => :'profileViews',
|
|
73
81
|
:'reposts' => :'reposts',
|
|
74
82
|
:'video_duration_seconds' => :'videoDurationSeconds',
|
|
75
83
|
:'engagement_rate' => :'engagementRate',
|
|
@@ -102,6 +110,8 @@ module Zernio
|
|
|
102
110
|
:'ig_reels_avg_watch_time' => :'Integer',
|
|
103
111
|
:'ig_reels_video_view_total_time' => :'Integer',
|
|
104
112
|
:'reels_skip_rate' => :'Float',
|
|
113
|
+
:'completion_rate' => :'Float',
|
|
114
|
+
:'profile_views' => :'Integer',
|
|
105
115
|
:'reposts' => :'Integer',
|
|
106
116
|
:'video_duration_seconds' => :'Integer',
|
|
107
117
|
:'engagement_rate' => :'Float',
|
|
@@ -181,6 +191,14 @@ module Zernio
|
|
|
181
191
|
self.reels_skip_rate = attributes[:'reels_skip_rate']
|
|
182
192
|
end
|
|
183
193
|
|
|
194
|
+
if attributes.key?(:'completion_rate')
|
|
195
|
+
self.completion_rate = attributes[:'completion_rate']
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
if attributes.key?(:'profile_views')
|
|
199
|
+
self.profile_views = attributes[:'profile_views']
|
|
200
|
+
end
|
|
201
|
+
|
|
184
202
|
if attributes.key?(:'reposts')
|
|
185
203
|
self.reposts = attributes[:'reposts']
|
|
186
204
|
end
|
|
@@ -230,6 +248,8 @@ module Zernio
|
|
|
230
248
|
ig_reels_avg_watch_time == o.ig_reels_avg_watch_time &&
|
|
231
249
|
ig_reels_video_view_total_time == o.ig_reels_video_view_total_time &&
|
|
232
250
|
reels_skip_rate == o.reels_skip_rate &&
|
|
251
|
+
completion_rate == o.completion_rate &&
|
|
252
|
+
profile_views == o.profile_views &&
|
|
233
253
|
reposts == o.reposts &&
|
|
234
254
|
video_duration_seconds == o.video_duration_seconds &&
|
|
235
255
|
engagement_rate == o.engagement_rate &&
|
|
@@ -245,7 +265,7 @@ module Zernio
|
|
|
245
265
|
# Calculates hash code according to all attributes.
|
|
246
266
|
# @return [Integer] Hash code
|
|
247
267
|
def hash
|
|
248
|
-
[impressions, reach, likes, comments, shares, saves, clicks, views, follows, ig_reels_avg_watch_time, ig_reels_video_view_total_time, reels_skip_rate, reposts, video_duration_seconds, engagement_rate, last_updated].hash
|
|
268
|
+
[impressions, reach, likes, comments, shares, saves, clicks, views, follows, ig_reels_avg_watch_time, ig_reels_video_view_total_time, reels_skip_rate, completion_rate, profile_views, reposts, video_duration_seconds, engagement_rate, last_updated].hash
|
|
249
269
|
end
|
|
250
270
|
|
|
251
271
|
# Builds the object from hash
|
|
@@ -110,7 +110,7 @@ module Zernio
|
|
|
110
110
|
# @return true if the model is valid
|
|
111
111
|
def valid?
|
|
112
112
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
113
|
-
code_validator = EnumAttributeValidator.new('String', ["PURCHASE_VELOCITY", "AREA_CODE_UNAVAILABLE"])
|
|
113
|
+
code_validator = EnumAttributeValidator.new('String', ["PURCHASE_VELOCITY", "AREA_CODE_UNAVAILABLE", "PHONE_NUMBER_UNAVAILABLE"])
|
|
114
114
|
return false unless code_validator.valid?(@code)
|
|
115
115
|
true
|
|
116
116
|
end
|
|
@@ -118,7 +118,7 @@ module Zernio
|
|
|
118
118
|
# Custom attribute writer method checking allowed values (enum).
|
|
119
119
|
# @param [Object] code Object to be assigned
|
|
120
120
|
def code=(code)
|
|
121
|
-
validator = EnumAttributeValidator.new('String', ["PURCHASE_VELOCITY", "AREA_CODE_UNAVAILABLE"])
|
|
121
|
+
validator = EnumAttributeValidator.new('String', ["PURCHASE_VELOCITY", "AREA_CODE_UNAVAILABLE", "PHONE_NUMBER_UNAVAILABLE"])
|
|
122
122
|
unless validator.valid?(code)
|
|
123
123
|
fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}."
|
|
124
124
|
end
|
|
@@ -27,6 +27,9 @@ module Zernio
|
|
|
27
27
|
# Area code (national destination code, e.g. 11 for Sao Paulo) the number must be in. Hard constraint: when the area has no deliverable inventory the purchase fails with 409 code AREA_CODE_UNAVAILABLE instead of assigning a number from another area, and later replacements stay in this area too. Omit for any area. Get live options from GET /v1/phone-numbers/availability (areaOptions).
|
|
28
28
|
attr_accessor :area_code
|
|
29
29
|
|
|
30
|
+
# One exact number to buy, in E.164, taken from GET /v1/phone-numbers/available. Hard constraint: when it is no longer available (bought by someone else, or WhatsApp's buy-time check rejects it) the purchase fails with 409 code PHONE_NUMBER_UNAVAILABLE instead of assigning another number; search again and pick another. Only for countries and types that activate instantly: a regulated one (202 kyc_required) returns 400 when phoneNumber is set.
|
|
31
|
+
attr_accessor :phone_number
|
|
32
|
+
|
|
30
33
|
# A phone number is the unit; WhatsApp is one optional feature. Pass false to buy a STANDALONE number (Calls/SMS only): provisioning skips the Meta pre-verify/OTP steps and the number activates immediately. Omitted defaults to the WhatsApp provisioning path. WhatsApp can be connected to a standalone number later from the connect flow.
|
|
31
34
|
attr_accessor :connect_whatsapp
|
|
32
35
|
|
|
@@ -71,6 +74,7 @@ module Zernio
|
|
|
71
74
|
:'country' => :'country',
|
|
72
75
|
:'number_type' => :'numberType',
|
|
73
76
|
:'area_code' => :'areaCode',
|
|
77
|
+
:'phone_number' => :'phoneNumber',
|
|
74
78
|
:'connect_whatsapp' => :'connectWhatsapp',
|
|
75
79
|
:'wants_sms' => :'wantsSms',
|
|
76
80
|
:'wants_whatsapp' => :'wantsWhatsapp',
|
|
@@ -96,6 +100,7 @@ module Zernio
|
|
|
96
100
|
:'country' => :'String',
|
|
97
101
|
:'number_type' => :'String',
|
|
98
102
|
:'area_code' => :'String',
|
|
103
|
+
:'phone_number' => :'String',
|
|
99
104
|
:'connect_whatsapp' => :'Boolean',
|
|
100
105
|
:'wants_sms' => :'Boolean',
|
|
101
106
|
:'wants_whatsapp' => :'Boolean',
|
|
@@ -146,6 +151,10 @@ module Zernio
|
|
|
146
151
|
self.area_code = attributes[:'area_code']
|
|
147
152
|
end
|
|
148
153
|
|
|
154
|
+
if attributes.key?(:'phone_number')
|
|
155
|
+
self.phone_number = attributes[:'phone_number']
|
|
156
|
+
end
|
|
157
|
+
|
|
149
158
|
if attributes.key?(:'connect_whatsapp')
|
|
150
159
|
self.connect_whatsapp = attributes[:'connect_whatsapp']
|
|
151
160
|
else
|
|
@@ -189,6 +198,11 @@ module Zernio
|
|
|
189
198
|
invalid_properties.push("invalid value for \"area_code\", must conform to the pattern #{pattern}.")
|
|
190
199
|
end
|
|
191
200
|
|
|
201
|
+
pattern = Regexp.new(/^\+[1-9]\d{6,14}$/)
|
|
202
|
+
if !@phone_number.nil? && @phone_number !~ pattern
|
|
203
|
+
invalid_properties.push("invalid value for \"phone_number\", must conform to the pattern #{pattern}.")
|
|
204
|
+
end
|
|
205
|
+
|
|
192
206
|
if !@purchase_intent_id.nil? && @purchase_intent_id.to_s.length > 100
|
|
193
207
|
invalid_properties.push('invalid value for "purchase_intent_id", the character length must be smaller than or equal to 100.')
|
|
194
208
|
end
|
|
@@ -204,6 +218,7 @@ module Zernio
|
|
|
204
218
|
number_type_validator = EnumAttributeValidator.new('String', ["local", "mobile", "national", "toll_free"])
|
|
205
219
|
return false unless number_type_validator.valid?(@number_type)
|
|
206
220
|
return false if !@area_code.nil? && @area_code !~ Regexp.new(/^\d{1,4}$/)
|
|
221
|
+
return false if !@phone_number.nil? && @phone_number !~ Regexp.new(/^\+[1-9]\d{6,14}$/)
|
|
207
222
|
return false if !@purchase_intent_id.nil? && @purchase_intent_id.to_s.length > 100
|
|
208
223
|
true
|
|
209
224
|
end
|
|
@@ -243,6 +258,21 @@ module Zernio
|
|
|
243
258
|
@area_code = area_code
|
|
244
259
|
end
|
|
245
260
|
|
|
261
|
+
# Custom attribute writer method with validation
|
|
262
|
+
# @param [Object] phone_number Value to be assigned
|
|
263
|
+
def phone_number=(phone_number)
|
|
264
|
+
if phone_number.nil?
|
|
265
|
+
fail ArgumentError, 'phone_number cannot be nil'
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
pattern = Regexp.new(/^\+[1-9]\d{6,14}$/)
|
|
269
|
+
if phone_number !~ pattern
|
|
270
|
+
fail ArgumentError, "invalid value for \"phone_number\", must conform to the pattern #{pattern}."
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
@phone_number = phone_number
|
|
274
|
+
end
|
|
275
|
+
|
|
246
276
|
# Custom attribute writer method with validation
|
|
247
277
|
# @param [Object] purchase_intent_id Value to be assigned
|
|
248
278
|
def purchase_intent_id=(purchase_intent_id)
|
|
@@ -266,6 +296,7 @@ module Zernio
|
|
|
266
296
|
country == o.country &&
|
|
267
297
|
number_type == o.number_type &&
|
|
268
298
|
area_code == o.area_code &&
|
|
299
|
+
phone_number == o.phone_number &&
|
|
269
300
|
connect_whatsapp == o.connect_whatsapp &&
|
|
270
301
|
wants_sms == o.wants_sms &&
|
|
271
302
|
wants_whatsapp == o.wants_whatsapp &&
|
|
@@ -282,7 +313,7 @@ module Zernio
|
|
|
282
313
|
# Calculates hash code according to all attributes.
|
|
283
314
|
# @return [Integer] Hash code
|
|
284
315
|
def hash
|
|
285
|
-
[profile_id, country, number_type, area_code, connect_whatsapp, wants_sms, wants_whatsapp, purchase_intent_id, allow_multiple].hash
|
|
316
|
+
[profile_id, country, number_type, area_code, phone_number, connect_whatsapp, wants_sms, wants_whatsapp, purchase_intent_id, allow_multiple].hash
|
|
286
317
|
end
|
|
287
318
|
|
|
288
319
|
# Builds the object from hash
|
|
@@ -21,6 +21,9 @@ module Zernio
|
|
|
21
21
|
# ISO 3166-1 alpha-2 country for the number (default US). International numbers require usage-based billing. Tier 3/4 countries return 202 { status: \"kyc_required\", kycUrl }. The customer must complete KYC at that URL before the number is ordered. See GET /v1/whatsapp/phone-numbers/countries.
|
|
22
22
|
attr_accessor :country
|
|
23
23
|
|
|
24
|
+
# One exact number to buy, in E.164, taken from GET /v1/phone-numbers/available. Fails with 409 code PHONE_NUMBER_UNAVAILABLE when it is no longer available.
|
|
25
|
+
attr_accessor :phone_number
|
|
26
|
+
|
|
24
27
|
# Optional idempotency key. Send the same value when retrying a purchase: if a number was already bought under this key, the API returns { status: \"already_purchased\", numberId, phoneNumber } instead of provisioning a second number. Generate a fresh key for each genuinely new purchase.
|
|
25
28
|
attr_accessor :purchase_intent_id
|
|
26
29
|
|
|
@@ -32,6 +35,7 @@ module Zernio
|
|
|
32
35
|
{
|
|
33
36
|
:'profile_id' => :'profileId',
|
|
34
37
|
:'country' => :'country',
|
|
38
|
+
:'phone_number' => :'phoneNumber',
|
|
35
39
|
:'purchase_intent_id' => :'purchaseIntentId',
|
|
36
40
|
:'allow_multiple' => :'allowMultiple'
|
|
37
41
|
}
|
|
@@ -52,6 +56,7 @@ module Zernio
|
|
|
52
56
|
{
|
|
53
57
|
:'profile_id' => :'String',
|
|
54
58
|
:'country' => :'String',
|
|
59
|
+
:'phone_number' => :'String',
|
|
55
60
|
:'purchase_intent_id' => :'String',
|
|
56
61
|
:'allow_multiple' => :'Boolean'
|
|
57
62
|
}
|
|
@@ -91,6 +96,10 @@ module Zernio
|
|
|
91
96
|
self.country = 'US'
|
|
92
97
|
end
|
|
93
98
|
|
|
99
|
+
if attributes.key?(:'phone_number')
|
|
100
|
+
self.phone_number = attributes[:'phone_number']
|
|
101
|
+
end
|
|
102
|
+
|
|
94
103
|
if attributes.key?(:'purchase_intent_id')
|
|
95
104
|
self.purchase_intent_id = attributes[:'purchase_intent_id']
|
|
96
105
|
end
|
|
@@ -111,6 +120,11 @@ module Zernio
|
|
|
111
120
|
invalid_properties.push('invalid value for "profile_id", profile_id cannot be nil.')
|
|
112
121
|
end
|
|
113
122
|
|
|
123
|
+
pattern = Regexp.new(/^\+[1-9]\d{6,14}$/)
|
|
124
|
+
if !@phone_number.nil? && @phone_number !~ pattern
|
|
125
|
+
invalid_properties.push("invalid value for \"phone_number\", must conform to the pattern #{pattern}.")
|
|
126
|
+
end
|
|
127
|
+
|
|
114
128
|
if !@purchase_intent_id.nil? && @purchase_intent_id.to_s.length > 100
|
|
115
129
|
invalid_properties.push('invalid value for "purchase_intent_id", the character length must be smaller than or equal to 100.')
|
|
116
130
|
end
|
|
@@ -123,6 +137,7 @@ module Zernio
|
|
|
123
137
|
def valid?
|
|
124
138
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
125
139
|
return false if @profile_id.nil?
|
|
140
|
+
return false if !@phone_number.nil? && @phone_number !~ Regexp.new(/^\+[1-9]\d{6,14}$/)
|
|
126
141
|
return false if !@purchase_intent_id.nil? && @purchase_intent_id.to_s.length > 100
|
|
127
142
|
true
|
|
128
143
|
end
|
|
@@ -137,6 +152,21 @@ module Zernio
|
|
|
137
152
|
@profile_id = profile_id
|
|
138
153
|
end
|
|
139
154
|
|
|
155
|
+
# Custom attribute writer method with validation
|
|
156
|
+
# @param [Object] phone_number Value to be assigned
|
|
157
|
+
def phone_number=(phone_number)
|
|
158
|
+
if phone_number.nil?
|
|
159
|
+
fail ArgumentError, 'phone_number cannot be nil'
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
pattern = Regexp.new(/^\+[1-9]\d{6,14}$/)
|
|
163
|
+
if phone_number !~ pattern
|
|
164
|
+
fail ArgumentError, "invalid value for \"phone_number\", must conform to the pattern #{pattern}."
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
@phone_number = phone_number
|
|
168
|
+
end
|
|
169
|
+
|
|
140
170
|
# Custom attribute writer method with validation
|
|
141
171
|
# @param [Object] purchase_intent_id Value to be assigned
|
|
142
172
|
def purchase_intent_id=(purchase_intent_id)
|
|
@@ -158,6 +188,7 @@ module Zernio
|
|
|
158
188
|
self.class == o.class &&
|
|
159
189
|
profile_id == o.profile_id &&
|
|
160
190
|
country == o.country &&
|
|
191
|
+
phone_number == o.phone_number &&
|
|
161
192
|
purchase_intent_id == o.purchase_intent_id &&
|
|
162
193
|
allow_multiple == o.allow_multiple
|
|
163
194
|
end
|
|
@@ -171,7 +202,7 @@ module Zernio
|
|
|
171
202
|
# Calculates hash code according to all attributes.
|
|
172
203
|
# @return [Integer] Hash code
|
|
173
204
|
def hash
|
|
174
|
-
[profile_id, country, purchase_intent_id, allow_multiple].hash
|
|
205
|
+
[profile_id, country, phone_number, purchase_intent_id, allow_multiple].hash
|
|
175
206
|
end
|
|
176
207
|
|
|
177
208
|
# Builds the object from hash
|
|
@@ -15,16 +15,25 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
17
|
class SearchAvailablePhoneNumbers200ResponseNumbersInner < ApiModelBase
|
|
18
|
+
# E.164. Pass it as `phoneNumber` on POST /v1/phone-numbers/purchase to buy this exact number.
|
|
18
19
|
attr_accessor :phone_number
|
|
19
20
|
|
|
20
21
|
# Provider capability list for this number (e.g. voice, sms, mms).
|
|
21
22
|
attr_accessor :features
|
|
22
23
|
|
|
24
|
+
# Town or rate center the number belongs to, as the carrier names it (e.g. WACO).
|
|
25
|
+
attr_accessor :locality
|
|
26
|
+
|
|
27
|
+
# true when the carrier added this number because too few matched your filters, so it may be outside the requested prefix or locality.
|
|
28
|
+
attr_accessor :best_effort
|
|
29
|
+
|
|
23
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
31
|
def self.attribute_map
|
|
25
32
|
{
|
|
26
33
|
:'phone_number' => :'phoneNumber',
|
|
27
|
-
:'features' => :'features'
|
|
34
|
+
:'features' => :'features',
|
|
35
|
+
:'locality' => :'locality',
|
|
36
|
+
:'best_effort' => :'bestEffort'
|
|
28
37
|
}
|
|
29
38
|
end
|
|
30
39
|
|
|
@@ -42,7 +51,9 @@ module Zernio
|
|
|
42
51
|
def self.openapi_types
|
|
43
52
|
{
|
|
44
53
|
:'phone_number' => :'String',
|
|
45
|
-
:'features' => :'Array<String>'
|
|
54
|
+
:'features' => :'Array<String>',
|
|
55
|
+
:'locality' => :'String',
|
|
56
|
+
:'best_effort' => :'Boolean'
|
|
46
57
|
}
|
|
47
58
|
end
|
|
48
59
|
|
|
@@ -77,6 +88,14 @@ module Zernio
|
|
|
77
88
|
self.features = value
|
|
78
89
|
end
|
|
79
90
|
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'locality')
|
|
93
|
+
self.locality = attributes[:'locality']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'best_effort')
|
|
97
|
+
self.best_effort = attributes[:'best_effort']
|
|
98
|
+
end
|
|
80
99
|
end
|
|
81
100
|
|
|
82
101
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -100,7 +119,9 @@ module Zernio
|
|
|
100
119
|
return true if self.equal?(o)
|
|
101
120
|
self.class == o.class &&
|
|
102
121
|
phone_number == o.phone_number &&
|
|
103
|
-
features == o.features
|
|
122
|
+
features == o.features &&
|
|
123
|
+
locality == o.locality &&
|
|
124
|
+
best_effort == o.best_effort
|
|
104
125
|
end
|
|
105
126
|
|
|
106
127
|
# @see the `==` method
|
|
@@ -112,7 +133,7 @@ module Zernio
|
|
|
112
133
|
# Calculates hash code according to all attributes.
|
|
113
134
|
# @return [Integer] Hash code
|
|
114
135
|
def hash
|
|
115
|
-
[phone_number, features].hash
|
|
136
|
+
[phone_number, features, locality, best_effort].hash
|
|
116
137
|
end
|
|
117
138
|
|
|
118
139
|
# Builds the object from hash
|
|
@@ -17,10 +17,16 @@ module Zernio
|
|
|
17
17
|
class SearchAvailableWhatsAppNumbers200ResponseNumbersInner < ApiModelBase
|
|
18
18
|
attr_accessor :phone_number
|
|
19
19
|
|
|
20
|
+
attr_accessor :locality
|
|
21
|
+
|
|
22
|
+
attr_accessor :best_effort
|
|
23
|
+
|
|
20
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
25
|
def self.attribute_map
|
|
22
26
|
{
|
|
23
|
-
:'phone_number' => :'phoneNumber'
|
|
27
|
+
:'phone_number' => :'phoneNumber',
|
|
28
|
+
:'locality' => :'locality',
|
|
29
|
+
:'best_effort' => :'bestEffort'
|
|
24
30
|
}
|
|
25
31
|
end
|
|
26
32
|
|
|
@@ -37,7 +43,9 @@ module Zernio
|
|
|
37
43
|
# Attribute type mapping.
|
|
38
44
|
def self.openapi_types
|
|
39
45
|
{
|
|
40
|
-
:'phone_number' => :'String'
|
|
46
|
+
:'phone_number' => :'String',
|
|
47
|
+
:'locality' => :'String',
|
|
48
|
+
:'best_effort' => :'Boolean'
|
|
41
49
|
}
|
|
42
50
|
end
|
|
43
51
|
|
|
@@ -66,6 +74,14 @@ module Zernio
|
|
|
66
74
|
if attributes.key?(:'phone_number')
|
|
67
75
|
self.phone_number = attributes[:'phone_number']
|
|
68
76
|
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'locality')
|
|
79
|
+
self.locality = attributes[:'locality']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'best_effort')
|
|
83
|
+
self.best_effort = attributes[:'best_effort']
|
|
84
|
+
end
|
|
69
85
|
end
|
|
70
86
|
|
|
71
87
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -88,7 +104,9 @@ module Zernio
|
|
|
88
104
|
def ==(o)
|
|
89
105
|
return true if self.equal?(o)
|
|
90
106
|
self.class == o.class &&
|
|
91
|
-
phone_number == o.phone_number
|
|
107
|
+
phone_number == o.phone_number &&
|
|
108
|
+
locality == o.locality &&
|
|
109
|
+
best_effort == o.best_effort
|
|
92
110
|
end
|
|
93
111
|
|
|
94
112
|
# @see the `==` method
|
|
@@ -100,7 +118,7 @@ module Zernio
|
|
|
100
118
|
# Calculates hash code according to all attributes.
|
|
101
119
|
# @return [Integer] Hash code
|
|
102
120
|
def hash
|
|
103
|
-
[phone_number].hash
|
|
121
|
+
[phone_number, locality, best_effort].hash
|
|
104
122
|
end
|
|
105
123
|
|
|
106
124
|
# Builds the object from hash
|
data/lib/zernio-sdk/version.rb
CHANGED
data/openapi.yaml
CHANGED
|
@@ -7781,6 +7781,8 @@ components:
|
|
|
7781
7781
|
igReelsAvgWatchTime: { type: integer, example: 0, description: 'Instagram Reels only: average watch time per play, in milliseconds. 0 for non-Reels media and other platforms.' }
|
|
7782
7782
|
igReelsVideoViewTotalTime: { type: integer, example: 0, description: 'Instagram Reels only: total watch time including replays, in milliseconds. 0 for non-Reels media and other platforms.' }
|
|
7783
7783
|
reelsSkipRate: { type: number, example: 48.8, description: 'Instagram Reels only: percentage (0-100) of initial views that skipped the reel within its first 3 seconds, as reported by Meta. Meta labels the metric estimated and in development, so it can move between syncs. 0 for non-Reels media and other platforms. When a post is published to several accounts, the aggregate is weighted by views.' }
|
|
7784
|
+
completionRate: { type: number, example: 0, description: 'TikTok accounts connected through the TikTok for Business app only: share of viewers who watched the video to the end, 0 to 1, as TikTok reports it (T+24-48h, only for posts active in the last 7 days). 0 for other platforms. When a post is published to several accounts, the aggregate is weighted by views.' }
|
|
7785
|
+
profileViews: { type: integer, example: 0, description: 'TikTok accounts connected through the TikTok for Business app only: profile views from users who reached the profile through this post (T+24-48h). 0 for other platforms.' }
|
|
7784
7786
|
reposts: { type: integer, example: 0, description: 'Instagram accounts connected with Facebook Login only: reposts of the media by other users, minus deleted reposts, on feed posts, reels and stories. Meta does not expose this metric for accounts connected with Instagram Login, so those always report 0. 0 for other platforms, including Threads, where reposts are counted in shares instead.' }
|
|
7785
7787
|
videoDurationSeconds: { type: [integer, "null"], example: 30, description: 'Video length in seconds. Currently Instagram Reels only; combine with igReelsAvgWatchTime (ms) to estimate retention. Null when unknown (other platforms, non-video media, or when Instagram does not expose the media URL, e.g. reels with copyrighted audio).' }
|
|
7786
7788
|
engagementRate: { type: number, example: 6.59, description: 'Percentage, rounded to 2 decimals: (likes + comments + shares + saves) / (impressions or reach or views) * 100. Clicks and follows are never counted. The denominator is the FIRST of impressions, reach, views that is non-zero, so it is not the same basis on every post: a post with impressions divides by impressions, one without falls back to reach, then to views. If you need a single consistent basis (e.g. interactions / reach), compute it from the raw fields above. The engagementRate on the LinkedIn account endpoints is a different formula.' }
|
|
@@ -7976,7 +7978,7 @@ components:
|
|
|
7976
7978
|
metrics:
|
|
7977
7979
|
type: object
|
|
7978
7980
|
description: 'Metrics a platform does not report are 0, not absent.'
|
|
7979
|
-
required: [impressions, reach, likes, comments, shares, saves, sends, clicks, views, follows, igReelsAvgWatchTime, igReelsVideoViewTotalTime, reposts, reelsSkipRate]
|
|
7981
|
+
required: [impressions, reach, likes, comments, shares, saves, sends, clicks, views, follows, igReelsAvgWatchTime, igReelsVideoViewTotalTime, reposts, reelsSkipRate, completionRate, profileViews]
|
|
7980
7982
|
properties:
|
|
7981
7983
|
impressions: { type: integer }
|
|
7982
7984
|
reach: { type: integer }
|
|
@@ -7992,6 +7994,8 @@ components:
|
|
|
7992
7994
|
igReelsVideoViewTotalTime: { type: integer, description: 'Instagram Reels total watch time, in milliseconds' }
|
|
7993
7995
|
reposts: { type: integer }
|
|
7994
7996
|
reelsSkipRate: { type: number, description: 'Instagram Reels skip rate, 0 to 1' }
|
|
7997
|
+
completionRate: { type: number, description: 'TikTok business lane: share of viewers who watched to the end, 0 to 1' }
|
|
7998
|
+
profileViews: { type: integer, description: 'TikTok business lane: profile views attributed to the post' }
|
|
7995
7999
|
AnalyticsDeltaResponse:
|
|
7996
8000
|
type: object
|
|
7997
8001
|
required: [data, nextCursor, hasMore]
|
|
@@ -12187,8 +12191,8 @@ paths:
|
|
|
12187
12191
|
description: Page number (default 1)
|
|
12188
12192
|
- name: sortBy
|
|
12189
12193
|
in: query
|
|
12190
|
-
schema: { type: string, enum: [date, engagement, impressions, reach, likes, comments, shares, saves, clicks, views, follows, ig_reels_avg_watch_time, ig_reels_video_view_total_time, reposts, reels_skip_rate], default: date }
|
|
12191
|
-
description: 'Sort by date, engagement, or a specific metric.
|
|
12194
|
+
schema: { type: string, enum: [date, engagement, impressions, reach, likes, comments, shares, saves, clicks, views, follows, ig_reels_avg_watch_time, ig_reels_video_view_total_time, reposts, reels_skip_rate, completion_rate, profile_views], default: date }
|
|
12195
|
+
description: 'Sort by date, engagement, or a specific metric. Platform-specific metrics (follows, reposts, reels_skip_rate, ig_reels_*, completion_rate, profile_views) sort a null value as 0.'
|
|
12192
12196
|
- name: order
|
|
12193
12197
|
in: query
|
|
12194
12198
|
schema: { type: string, enum: [asc, desc], default: desc }
|
|
@@ -12498,6 +12502,8 @@ paths:
|
|
|
12498
12502
|
igReelsVideoViewTotalTime: 0
|
|
12499
12503
|
reposts: 0
|
|
12500
12504
|
reelsSkipRate: 0
|
|
12505
|
+
completionRate: 0
|
|
12506
|
+
profileViews: 0
|
|
12501
12507
|
nextCursor: "v1.WyIyMDI2LTA5LTAxIDE3OjEyOjA0IiwiNjVmMWMwYTllMmI1YWYwMDEyYWIzNGNkIl0"
|
|
12502
12508
|
hasMore: true
|
|
12503
12509
|
'400': { $ref: '#/components/responses/BadRequest' }
|
|
@@ -36373,8 +36379,9 @@ paths:
|
|
|
36373
36379
|
tags: [Phone Numbers]
|
|
36374
36380
|
summary: Purchase phone number
|
|
36375
36381
|
description: |
|
|
36376
|
-
Payment-first:
|
|
36377
|
-
|
|
36382
|
+
Payment-first: the system provisions a number and auto-assigns it, unless you pass
|
|
36383
|
+
`phoneNumber` to buy one exact number from `GET /v1/phone-numbers/available`. With
|
|
36384
|
+
usage-based billing active and a payment method on file, the
|
|
36378
36385
|
number provisions inline and bills per month on your usage-based invoice (there is
|
|
36379
36386
|
no checkout redirect). No payment method on file returns `402 PAYMENT_REQUIRED`;
|
|
36380
36387
|
a regulated country returns `202` with `status: "kyc_required"` and a `kycUrl`.
|
|
@@ -36436,6 +36443,18 @@ paths:
|
|
|
36436
36443
|
number from another area, and later replacements stay in
|
|
36437
36444
|
this area too. Omit for any area. Get live options from
|
|
36438
36445
|
GET /v1/phone-numbers/availability (areaOptions).
|
|
36446
|
+
phoneNumber:
|
|
36447
|
+
type: string
|
|
36448
|
+
pattern: '^\+[1-9]\d{6,14}$'
|
|
36449
|
+
description: >
|
|
36450
|
+
One exact number to buy, in E.164, taken from GET
|
|
36451
|
+
/v1/phone-numbers/available. Hard constraint: when it is no
|
|
36452
|
+
longer available (bought by someone else, or WhatsApp's
|
|
36453
|
+
buy-time check rejects it) the purchase fails with 409 code
|
|
36454
|
+
PHONE_NUMBER_UNAVAILABLE instead of assigning another number;
|
|
36455
|
+
search again and pick another. Only for countries and types
|
|
36456
|
+
that activate instantly: a regulated one (202 kyc_required)
|
|
36457
|
+
returns 400 when phoneNumber is set.
|
|
36439
36458
|
connectWhatsapp:
|
|
36440
36459
|
type: boolean
|
|
36441
36460
|
default: true
|
|
@@ -36534,14 +36553,14 @@ paths:
|
|
|
36534
36553
|
another number was purchased within the last 10 minutes; retry
|
|
36535
36554
|
with allowMultiple: true to confirm), or the requested areaCode
|
|
36536
36555
|
has no deliverable inventory right now (code
|
|
36537
|
-
AREA_CODE_UNAVAILABLE: pick another area or omit areaCode).
|
|
36556
|
+
AREA_CODE_UNAVAILABLE: pick another area or omit areaCode; PHONE_NUMBER_UNAVAILABLE: search again and pick another number).
|
|
36538
36557
|
content:
|
|
36539
36558
|
application/json:
|
|
36540
36559
|
schema:
|
|
36541
36560
|
type: object
|
|
36542
36561
|
properties:
|
|
36543
36562
|
error: { type: string }
|
|
36544
|
-
code: { type: string, enum: [PURCHASE_VELOCITY, AREA_CODE_UNAVAILABLE] }
|
|
36563
|
+
code: { type: string, enum: [PURCHASE_VELOCITY, AREA_CODE_UNAVAILABLE, PHONE_NUMBER_UNAVAILABLE] }
|
|
36545
36564
|
'202':
|
|
36546
36565
|
description: Country requires end-user KYC before the number can be ordered.
|
|
36547
36566
|
content:
|
|
@@ -36627,7 +36646,9 @@ paths:
|
|
|
36627
36646
|
country (default US). Optional filters narrow the results. The country
|
|
36628
36647
|
must be offerable (see GET /v1/phone-numbers/countries). Voice
|
|
36629
36648
|
capability is always required; pass `sms=true` to only see numbers that
|
|
36630
|
-
can also text (SMS support is per-number, not per-country).
|
|
36649
|
+
can also text (SMS support is per-number, not per-country). Numbers a
|
|
36650
|
+
purchase would refuse are left out, and any result's `phoneNumber` can
|
|
36651
|
+
be bought exactly by passing it to POST /v1/phone-numbers/purchase.
|
|
36631
36652
|
security:
|
|
36632
36653
|
- bearerAuth: []
|
|
36633
36654
|
parameters:
|
|
@@ -36654,8 +36675,10 @@ paths:
|
|
|
36654
36675
|
items:
|
|
36655
36676
|
type: object
|
|
36656
36677
|
properties:
|
|
36657
|
-
phoneNumber: { type: string }
|
|
36678
|
+
phoneNumber: { type: string, description: "E.164. Pass it as `phoneNumber` on POST /v1/phone-numbers/purchase to buy this exact number." }
|
|
36658
36679
|
features: { type: array, items: { type: string }, description: "Provider capability list for this number (e.g. voice, sms, mms)." }
|
|
36680
|
+
locality: { type: string, description: "Town or rate center the number belongs to, as the carrier names it (e.g. WACO)." }
|
|
36681
|
+
bestEffort: { type: boolean, description: "true when the carrier added this number because too few matched your filters, so it may be outside the requested prefix or locality." }
|
|
36659
36682
|
'400': { description: Country not available }
|
|
36660
36683
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
36661
36684
|
|
|
@@ -36841,8 +36864,9 @@ paths:
|
|
|
36841
36864
|
Deprecated alias of `/v1/phone-numbers/purchase`; same contract. New
|
|
36842
36865
|
integrations should use that path.
|
|
36843
36866
|
|
|
36844
|
-
Payment-first:
|
|
36845
|
-
|
|
36867
|
+
Payment-first: the system provisions a number and auto-assigns it, unless you pass
|
|
36868
|
+
`phoneNumber` to buy one exact number from `GET /v1/phone-numbers/available`. With
|
|
36869
|
+
usage-based billing active and a payment method on file, the
|
|
36846
36870
|
number provisions inline and bills per month on your usage-based invoice (there is
|
|
36847
36871
|
no checkout redirect). No payment method on file returns `402 PAYMENT_REQUIRED`;
|
|
36848
36872
|
a regulated country returns `202` with `status: "kyc_required"` and a `kycUrl`.
|
|
@@ -36876,6 +36900,13 @@ paths:
|
|
|
36876
36900
|
The customer must complete KYC at that URL before the number
|
|
36877
36901
|
is ordered. See GET /v1/whatsapp/phone-numbers/countries.
|
|
36878
36902
|
default: US
|
|
36903
|
+
phoneNumber:
|
|
36904
|
+
type: string
|
|
36905
|
+
pattern: '^\+[1-9]\d{6,14}$'
|
|
36906
|
+
description: >
|
|
36907
|
+
One exact number to buy, in E.164, taken from GET
|
|
36908
|
+
/v1/phone-numbers/available. Fails with 409 code
|
|
36909
|
+
PHONE_NUMBER_UNAVAILABLE when it is no longer available.
|
|
36879
36910
|
purchaseIntentId:
|
|
36880
36911
|
type: string
|
|
36881
36912
|
maxLength: 100
|
|
@@ -36940,14 +36971,14 @@ paths:
|
|
|
36940
36971
|
another number was purchased within the last 10 minutes; retry
|
|
36941
36972
|
with allowMultiple: true to confirm), or the requested areaCode
|
|
36942
36973
|
has no deliverable inventory right now (code
|
|
36943
|
-
AREA_CODE_UNAVAILABLE: pick another area or omit areaCode).
|
|
36974
|
+
AREA_CODE_UNAVAILABLE: pick another area or omit areaCode; PHONE_NUMBER_UNAVAILABLE: search again and pick another number).
|
|
36944
36975
|
content:
|
|
36945
36976
|
application/json:
|
|
36946
36977
|
schema:
|
|
36947
36978
|
type: object
|
|
36948
36979
|
properties:
|
|
36949
36980
|
error: { type: string }
|
|
36950
|
-
code: { type: string, enum: [PURCHASE_VELOCITY, AREA_CODE_UNAVAILABLE] }
|
|
36981
|
+
code: { type: string, enum: [PURCHASE_VELOCITY, AREA_CODE_UNAVAILABLE, PHONE_NUMBER_UNAVAILABLE] }
|
|
36951
36982
|
'202':
|
|
36952
36983
|
description: Country requires end-user KYC before the number can be ordered.
|
|
36953
36984
|
content:
|
|
@@ -37038,6 +37069,8 @@ paths:
|
|
|
37038
37069
|
type: object
|
|
37039
37070
|
properties:
|
|
37040
37071
|
phoneNumber: { type: string }
|
|
37072
|
+
locality: { type: string }
|
|
37073
|
+
bestEffort: { type: boolean }
|
|
37041
37074
|
'400': { description: Country not available }
|
|
37042
37075
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
37043
37076
|
|
|
@@ -45,7 +45,7 @@ describe 'AnalyticsApi' do
|
|
|
45
45
|
# @option opts [Date] :to_date Inclusive upper bound (YYYY-MM-DD). Defaults to today if omitted.
|
|
46
46
|
# @option opts [Integer] :limit Page size (default 50)
|
|
47
47
|
# @option opts [Integer] :page Page number (default 1)
|
|
48
|
-
# @option opts [String] :sort_by Sort by date, engagement, or a specific metric.
|
|
48
|
+
# @option opts [String] :sort_by Sort by date, engagement, or a specific metric. Platform-specific metrics (follows, reposts, reels_skip_rate, ig_reels_*, completion_rate, profile_views) sort a null value as 0.
|
|
49
49
|
# @option opts [String] :order Sort order
|
|
50
50
|
# @return [GetAnalytics200Response]
|
|
51
51
|
describe 'get_analytics test' do
|
|
@@ -226,7 +226,7 @@ describe 'PhoneNumbersApi' do
|
|
|
226
226
|
|
|
227
227
|
# unit tests for purchase_phone_number
|
|
228
228
|
# Purchase phone number
|
|
229
|
-
# Payment-first:
|
|
229
|
+
# Payment-first: the system provisions a number and auto-assigns it, unless you pass `phoneNumber` to buy one exact number from `GET /v1/phone-numbers/available`. With usage-based billing active and a payment method on file, the number provisions inline and bills per month on your usage-based invoice (there is no checkout redirect). No payment method on file returns `402 PAYMENT_REQUIRED`; a regulated country returns `202` with `status: \"kyc_required\"` and a `kycUrl`. The monthly price is the one `GET /v1/phone-numbers/countries` quotes for that country and `numberType` at the time of purchase, and it is stamped on the number: later rate-card changes never move a number you already own. Requires usage-based billing (the Usage plan). The maximum number of phone numbers is determined by the user's plan.
|
|
230
230
|
# @param purchase_phone_number_request
|
|
231
231
|
# @param [Hash] opts the optional parameters
|
|
232
232
|
# @return [PurchasePhoneNumber200Response]
|
|
@@ -301,7 +301,7 @@ describe 'PhoneNumbersApi' do
|
|
|
301
301
|
|
|
302
302
|
# unit tests for search_available_phone_numbers
|
|
303
303
|
# Search available numbers
|
|
304
|
-
# Search the provider's inventory for numbers available to purchase in a country (default US). Optional filters narrow the results. The country must be offerable (see GET /v1/phone-numbers/countries). Voice capability is always required; pass `sms=true` to only see numbers that can also text (SMS support is per-number, not per-country).
|
|
304
|
+
# Search the provider's inventory for numbers available to purchase in a country (default US). Optional filters narrow the results. The country must be offerable (see GET /v1/phone-numbers/countries). Voice capability is always required; pass `sms=true` to only see numbers that can also text (SMS support is per-number, not per-country). Numbers a purchase would refuse are left out, and any result's `phoneNumber` can be bought exactly by passing it to POST /v1/phone-numbers/purchase.
|
|
305
305
|
# @param [Hash] opts the optional parameters
|
|
306
306
|
# @option opts [String] :country
|
|
307
307
|
# @option opts [String] :type Number type; defaults to the country's WhatsApp-safe type
|
|
@@ -146,7 +146,7 @@ describe 'WhatsAppPhoneNumbersApi' do
|
|
|
146
146
|
|
|
147
147
|
# unit tests for purchase_whats_app_phone_number
|
|
148
148
|
# Purchase phone number
|
|
149
|
-
# Deprecated alias of `/v1/phone-numbers/purchase`; same contract. New integrations should use that path. Payment-first:
|
|
149
|
+
# Deprecated alias of `/v1/phone-numbers/purchase`; same contract. New integrations should use that path. Payment-first: the system provisions a number and auto-assigns it, unless you pass `phoneNumber` to buy one exact number from `GET /v1/phone-numbers/available`. With usage-based billing active and a payment method on file, the number provisions inline and bills per month on your usage-based invoice (there is no checkout redirect). No payment method on file returns `402 PAYMENT_REQUIRED`; a regulated country returns `202` with `status: \"kyc_required\"` and a `kycUrl`. The monthly price is the one `GET /v1/phone-numbers/countries` quotes for that country and `numberType` at the time of purchase, and it is stamped on the number: later rate-card changes never move a number you already own. Requires usage-based billing (the Usage plan). The maximum number of phone numbers is determined by the user's plan.
|
|
150
150
|
# @param purchase_whats_app_phone_number_request
|
|
151
151
|
# @param [Hash] opts the optional parameters
|
|
152
152
|
# @return [PurchaseWhatsAppPhoneNumber200Response]
|
|
@@ -111,4 +111,16 @@ describe Zernio::AnalyticsDeltaEntryMetrics do
|
|
|
111
111
|
end
|
|
112
112
|
end
|
|
113
113
|
|
|
114
|
+
describe 'test attribute "completion_rate"' 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
|
+
|
|
120
|
+
describe 'test attribute "profile_views"' do
|
|
121
|
+
it 'should work' do
|
|
122
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
114
126
|
end
|
|
@@ -99,6 +99,18 @@ describe Zernio::PostAnalytics do
|
|
|
99
99
|
end
|
|
100
100
|
end
|
|
101
101
|
|
|
102
|
+
describe 'test attribute "completion_rate"' do
|
|
103
|
+
it 'should work' do
|
|
104
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
describe 'test attribute "profile_views"' 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
|
+
|
|
102
114
|
describe 'test attribute "reposts"' do
|
|
103
115
|
it 'should work' do
|
|
104
116
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -36,7 +36,7 @@ describe Zernio::PurchasePhoneNumber409Response do
|
|
|
36
36
|
describe 'test attribute "code"' do
|
|
37
37
|
it 'should work' do
|
|
38
38
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["PURCHASE_VELOCITY", "AREA_CODE_UNAVAILABLE"])
|
|
39
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["PURCHASE_VELOCITY", "AREA_CODE_UNAVAILABLE", "PHONE_NUMBER_UNAVAILABLE"])
|
|
40
40
|
# validator.allowable_values.each do |value|
|
|
41
41
|
# expect { instance.code = value }.not_to raise_error
|
|
42
42
|
# end
|
|
@@ -55,6 +55,12 @@ describe Zernio::PurchasePhoneNumberRequest do
|
|
|
55
55
|
end
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
+
describe 'test attribute "phone_number"' do
|
|
59
|
+
it 'should work' do
|
|
60
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
58
64
|
describe 'test attribute "connect_whatsapp"' do
|
|
59
65
|
it 'should work' do
|
|
60
66
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -39,6 +39,12 @@ describe Zernio::PurchaseWhatsAppPhoneNumberRequest do
|
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
describe 'test attribute "phone_number"' 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
|
+
|
|
42
48
|
describe 'test attribute "purchase_intent_id"' do
|
|
43
49
|
it 'should work' do
|
|
44
50
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -39,4 +39,16 @@ describe Zernio::SearchAvailablePhoneNumbers200ResponseNumbersInner do
|
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
describe 'test attribute "locality"' 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 "best_effort"' 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
|
+
|
|
42
54
|
end
|
|
@@ -33,4 +33,16 @@ describe Zernio::SearchAvailableWhatsAppNumbers200ResponseNumbersInner do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "locality"' 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 "best_effort"' 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
|
+
|
|
36
48
|
end
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: late-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.920
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -6355,7 +6355,7 @@ files:
|
|
|
6355
6355
|
- spec/models/you_tube_video_retention_response_retention_curve_inner_spec.rb
|
|
6356
6356
|
- spec/models/you_tube_video_retention_response_spec.rb
|
|
6357
6357
|
- spec/spec_helper.rb
|
|
6358
|
-
- zernio-sdk-0.0.
|
|
6358
|
+
- zernio-sdk-0.0.920.gem
|
|
6359
6359
|
- zernio-sdk.gemspec
|
|
6360
6360
|
homepage: https://openapi-generator.tech
|
|
6361
6361
|
licenses:
|
data/zernio-sdk-0.0.918.gem
DELETED
|
Binary file
|