late-sdk 0.0.903 → 0.0.905

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -0
  3. data/docs/AdAccountsApi.md +70 -0
  4. data/docs/CheckPhoneNumberAvailability200Response.md +2 -0
  5. data/docs/CreateAdAccount201Response.md +30 -0
  6. data/docs/CreateAdAccountRequest.md +46 -0
  7. data/docs/ListPhoneNumberCountries200ResponseCountriesInner.md +2 -0
  8. data/docs/ListPhoneNumberCountries200ResponseCountriesInnerTypesInner.md +6 -2
  9. data/docs/PhoneNumbersApi.md +1 -1
  10. data/docs/SubmitPhoneNumberKyc200Response.md +2 -0
  11. data/lib/zernio-sdk/api/ad_accounts_api.rb +68 -0
  12. data/lib/zernio-sdk/api/phone_numbers_api.rb +2 -2
  13. data/lib/zernio-sdk/models/check_phone_number_availability200_response.rb +11 -1
  14. data/lib/zernio-sdk/models/create_ad_account201_response.rb +340 -0
  15. data/lib/zernio-sdk/models/create_ad_account_request.rb +611 -0
  16. data/lib/zernio-sdk/models/list_phone_number_countries200_response_countries_inner.rb +11 -1
  17. data/lib/zernio-sdk/models/list_phone_number_countries200_response_countries_inner_types_inner.rb +38 -4
  18. data/lib/zernio-sdk/models/submit_phone_number_kyc200_response.rb +11 -1
  19. data/lib/zernio-sdk/version.rb +1 -1
  20. data/lib/zernio-sdk.rb +2 -0
  21. data/openapi.yaml +132 -4
  22. data/spec/api/ad_accounts_api_spec.rb +12 -0
  23. data/spec/api/phone_numbers_api_spec.rb +1 -1
  24. data/spec/models/check_phone_number_availability200_response_spec.rb +6 -0
  25. data/spec/models/create_ad_account201_response_spec.rb +72 -0
  26. data/spec/models/create_ad_account_request_spec.rb +120 -0
  27. data/spec/models/list_phone_number_countries200_response_countries_inner_spec.rb +6 -0
  28. data/spec/models/list_phone_number_countries200_response_countries_inner_types_inner_spec.rb +16 -0
  29. data/spec/models/submit_phone_number_kyc200_response_spec.rb +6 -0
  30. data/zernio-sdk-0.0.905.gem +0 -0
  31. metadata +10 -2
  32. data/zernio-sdk-0.0.903.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a44c184ab32f70baa94e8c71c5c0624a8c85f15950070dcaf774d6405f2221f
4
- data.tar.gz: becc8336d74f782fcaa2c255d7b2c8ee9c7cc1089289eeed7a2582afe10cf69f
3
+ metadata.gz: cc564a09e08a5c4caf2ad2af1da06d6fa117f751b638afd5985bc7e8177acdeb
4
+ data.tar.gz: 814d1d115a66d0c6b8ea7b3e74f5e3420eee3821742c4794ee21bd92bd7bab91
5
5
  SHA512:
6
- metadata.gz: 658132e4ecf5f3fb0b3030be63856e6f203fd1b2fab6f520600a8a8e19b1e16f6d08466cc94bbde9d184a8a4f973904f9ca41453e873efd47faeac0983bdb9e4
7
- data.tar.gz: 52a072a538b01ac58a4cc0aba3d5be383be2ebe3c99e9cb7f216c68ee4772ddadc81c2bb567be596772fc817ad7f8323739d3e48a7506cdb20854980236b5018
6
+ metadata.gz: 9023ceaf046c1b7d7f457233db11fdb9afb60b464e3b59b818e7afffcdfe0d5f278babf228cc9baedafef6e425b5e977be3a32c4aeffcef778e2e2f4c9885509
7
+ data.tar.gz: 5c828499382dc76650229c8e4bac8d29990cddfb5da83d89020f435f0592249867c99ad17d6ebb92ffbd88905ce4e97e1267502d18319cc2537b48a9c8d60fe5
data/README.md CHANGED
@@ -109,6 +109,7 @@ Class | Method | HTTP request | Description
109
109
  *Zernio::AdAccountsApi* | [**add_account_callouts**](docs/AdAccountsApi.md#add_account_callouts) | **POST** /v1/ads/accounts/callouts | Add account callouts
110
110
  *Zernio::AdAccountsApi* | [**add_account_sitelinks**](docs/AdAccountsApi.md#add_account_sitelinks) | **POST** /v1/ads/accounts/sitelinks | Add account sitelinks
111
111
  *Zernio::AdAccountsApi* | [**add_account_structured_snippets**](docs/AdAccountsApi.md#add_account_structured_snippets) | **POST** /v1/ads/accounts/structured-snippets | Add account snippets
112
+ *Zernio::AdAccountsApi* | [**create_ad_account**](docs/AdAccountsApi.md#create_ad_account) | **POST** /v1/ads/accounts | Create Meta ad account
112
113
  *Zernio::AdAccountsApi* | [**create_ad_negative_keyword_list**](docs/AdAccountsApi.md#create_ad_negative_keyword_list) | **POST** /v1/ads/accounts/negative-keyword-lists | Create a negative keyword list
113
114
  *Zernio::AdAccountsApi* | [**create_custom_conversion**](docs/AdAccountsApi.md#create_custom_conversion) | **POST** /v1/accounts/{accountId}/custom-conversions | Create or reuse a custom conversion
114
115
  *Zernio::AdAccountsApi* | [**create_high_demand_period**](docs/AdAccountsApi.md#create_high_demand_period) | **POST** /v1/ads/high-demand-periods | Schedule a budget increase
@@ -1029,6 +1030,8 @@ Class | Method | HTTP request | Description
1029
1030
  - [Zernio::CreateAccountGroup201Response](docs/CreateAccountGroup201Response.md)
1030
1031
  - [Zernio::CreateAccountGroup201ResponseGroup](docs/CreateAccountGroup201ResponseGroup.md)
1031
1032
  - [Zernio::CreateAccountGroupRequest](docs/CreateAccountGroupRequest.md)
1033
+ - [Zernio::CreateAdAccount201Response](docs/CreateAdAccount201Response.md)
1034
+ - [Zernio::CreateAdAccountRequest](docs/CreateAdAccountRequest.md)
1032
1035
  - [Zernio::CreateAdAudience201Response](docs/CreateAdAudience201Response.md)
1033
1036
  - [Zernio::CreateAdAudienceRequest](docs/CreateAdAudienceRequest.md)
1034
1037
  - [Zernio::CreateAdCampaign200Response](docs/CreateAdCampaign200Response.md)
@@ -7,6 +7,7 @@ All URIs are relative to *https://zernio.com/api*
7
7
  | [**add_account_callouts**](AdAccountsApi.md#add_account_callouts) | **POST** /v1/ads/accounts/callouts | Add account callouts |
8
8
  | [**add_account_sitelinks**](AdAccountsApi.md#add_account_sitelinks) | **POST** /v1/ads/accounts/sitelinks | Add account sitelinks |
9
9
  | [**add_account_structured_snippets**](AdAccountsApi.md#add_account_structured_snippets) | **POST** /v1/ads/accounts/structured-snippets | Add account snippets |
10
+ | [**create_ad_account**](AdAccountsApi.md#create_ad_account) | **POST** /v1/ads/accounts | Create Meta ad account |
10
11
  | [**create_ad_negative_keyword_list**](AdAccountsApi.md#create_ad_negative_keyword_list) | **POST** /v1/ads/accounts/negative-keyword-lists | Create a negative keyword list |
11
12
  | [**create_custom_conversion**](AdAccountsApi.md#create_custom_conversion) | **POST** /v1/accounts/{accountId}/custom-conversions | Create or reuse a custom conversion |
12
13
  | [**create_high_demand_period**](AdAccountsApi.md#create_high_demand_period) | **POST** /v1/ads/high-demand-periods | Schedule a budget increase |
@@ -257,6 +258,75 @@ end
257
258
  - **Accept**: application/json
258
259
 
259
260
 
261
+ ## create_ad_account
262
+
263
+ > <CreateAdAccount201Response> create_ad_account(create_ad_account_request)
264
+
265
+ Create Meta ad account
266
+
267
+ Creates a durable Meta ad account in the end user's own business portfolio using their connected Meta Ads token. Requires an active metaads accountId, Ads access, business_management permission and business admin access. Discover portfolios with GET /v1/ads/businesses. System-user tokens may return an empty businesses list; supply the known business ID in that case. The self-serve account starts without a payment method. The user must add a payment method in Ads Manager before ads can deliver. Zernio cannot add payment methods. Meta may require business verification and limits how many accounts a business can create. Closing an account does not guarantee more capacity. An ad account cannot truly be deleted, even after closing it and removing it from a business. timezoneId is Meta's numeric ID, not an IANA timezone name. Select it from https://developers.facebook.com/docs/marketing-api/reference/ad-account/timezone-ids/. For example, 1 is America/Los_Angeles. Meta validates supported currencies and IDs. endAdvertiser, mediaAgency and partner default to NONE for the self-serve flow. The new account is added atomically to an existing scoped ad-account allowlist. Unrestricted connections stay unrestricted. Reconnecting the same Meta identity preserves this scope unless a caller explicitly replaces it. Discovery is nudged immediately. Use the returned adAccountId with the existing ads endpoints. This operation is not idempotent and Zernio never automatically retries it. Unknown body fields are rejected. No validateOnly or dry-run option is supported. After a timeout or a 502 with details.creationStatus=unknown, check the business in Ads Manager before attempting another creation. A 201 with connectionUpdated=false means the account exists but needs reconnecting with adAccountIds containing the returned ID and the previous scoped IDs via GET /v1/connect/facebook/ads. Do not repeat the create call.
268
+
269
+ ### Examples
270
+
271
+ ```ruby
272
+ require 'time'
273
+ require 'zernio-sdk'
274
+ # setup authorization
275
+ Zernio.configure do |config|
276
+ # Configure Bearer authorization (JWT): bearerAuth
277
+ config.access_token = 'YOUR_BEARER_TOKEN'
278
+ end
279
+
280
+ api_instance = Zernio::AdAccountsApi.new
281
+ create_ad_account_request = Zernio::CreateAdAccountRequest.new({account_id: 'account_id_example', business_id: 'business_id_example', name: 'name_example', currency: 'currency_example', timezone_id: 37}) # CreateAdAccountRequest |
282
+
283
+ begin
284
+ # Create Meta ad account
285
+ result = api_instance.create_ad_account(create_ad_account_request)
286
+ p result
287
+ rescue Zernio::ApiError => e
288
+ puts "Error when calling AdAccountsApi->create_ad_account: #{e}"
289
+ end
290
+ ```
291
+
292
+ #### Using the create_ad_account_with_http_info variant
293
+
294
+ This returns an Array which contains the response data, status code and headers.
295
+
296
+ > <Array(<CreateAdAccount201Response>, Integer, Hash)> create_ad_account_with_http_info(create_ad_account_request)
297
+
298
+ ```ruby
299
+ begin
300
+ # Create Meta ad account
301
+ data, status_code, headers = api_instance.create_ad_account_with_http_info(create_ad_account_request)
302
+ p status_code # => 2xx
303
+ p headers # => { ... }
304
+ p data # => <CreateAdAccount201Response>
305
+ rescue Zernio::ApiError => e
306
+ puts "Error when calling AdAccountsApi->create_ad_account_with_http_info: #{e}"
307
+ end
308
+ ```
309
+
310
+ ### Parameters
311
+
312
+ | Name | Type | Description | Notes |
313
+ | ---- | ---- | ----------- | ----- |
314
+ | **create_ad_account_request** | [**CreateAdAccountRequest**](CreateAdAccountRequest.md) | | |
315
+
316
+ ### Return type
317
+
318
+ [**CreateAdAccount201Response**](CreateAdAccount201Response.md)
319
+
320
+ ### Authorization
321
+
322
+ [bearerAuth](../README.md#bearerAuth)
323
+
324
+ ### HTTP request headers
325
+
326
+ - **Content-Type**: application/json
327
+ - **Accept**: application/json
328
+
329
+
260
330
  ## create_ad_negative_keyword_list
261
331
 
262
332
  > <CreateAdNegativeKeywordList201Response> create_ad_negative_keyword_list(create_ad_negative_keyword_list_request)
@@ -7,6 +7,7 @@
7
7
  | **country** | **String** | | [optional] |
8
8
  | **number_type** | **String** | | [optional] |
9
9
  | **available** | **Boolean** | Whether deliverable voice inventory exists right now. | [optional] |
10
+ | **pre_orderable** | **Boolean** | Nothing deliverable now, but this pair can be pre-ordered: submit KYC as usual and the carrier sources the number after review (usually about 3 weeks, never guaranteed). Only document tiers (3/4) qualify. | [optional] |
10
11
  | **address_constraint** | **String** | | [optional] |
11
12
  | **areas** | **Array&lt;String&gt;** | For &#x60;geo&#x60; only: the area(s) the registered address must be in. | [optional] |
12
13
  | **area_options** | [**Array&lt;CheckPhoneNumberAvailability200ResponseAreaOptionsInner&gt;**](CheckPhoneNumberAvailability200ResponseAreaOptionsInner.md) | Live inventory grouped by area code. For US and CA this is the full country inventory (every area code with stock, recognizable metros listed first, then alphabetical); other countries are ordered largest stock first; they list the areas in the latest inventory page (up to 500 numbers, which for most countries is the entire pool). Empty when out of stock (or the area lookup failed). Pass a chosen &#x60;ndc&#x60; as &#x60;areaCode&#x60; on POST /v1/phone-numbers/purchase (or on the KYC submit for regulated countries) to require that area. | [optional] |
@@ -20,6 +21,7 @@ instance = Zernio::CheckPhoneNumberAvailability200Response.new(
20
21
  country: null,
21
22
  number_type: null,
22
23
  available: null,
24
+ pre_orderable: null,
23
25
  address_constraint: null,
24
26
  areas: null,
25
27
  area_options: null
@@ -0,0 +1,30 @@
1
+ # Zernio::CreateAdAccount201Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ad_account_id** | **String** | New Meta ad account ID for subsequent ads calls. | |
8
+ | **business_id** | **String** | Owning business portfolio ID. | |
9
+ | **connection_updated** | **Boolean** | Whether the connection scope and discovery schedule were updated. | |
10
+ | **payment_method_required** | **Boolean** | Always true as a delivery prerequisite. This is not a live funding-source check. Confirm payment or invoicing in Ads Manager. | |
11
+ | **ads_manager_url** | **String** | Open the created account in Ads Manager. | |
12
+ | **next_steps** | **String** | Payment setup instructions for the user. | |
13
+ | **warnings** | **Array&lt;String&gt;** | Recovery instructions if the account could not be attached to the connection. | |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'zernio-sdk'
19
+
20
+ instance = Zernio::CreateAdAccount201Response.new(
21
+ ad_account_id: null,
22
+ business_id: null,
23
+ connection_updated: null,
24
+ payment_method_required: null,
25
+ ads_manager_url: null,
26
+ next_steps: null,
27
+ warnings: null
28
+ )
29
+ ```
30
+
@@ -0,0 +1,46 @@
1
+ # Zernio::CreateAdAccountRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **account_id** | **String** | Zernio metaads SocialAccount ID. | |
8
+ | **business_id** | **String** | Business portfolio that will own the account. | |
9
+ | **name** | **String** | Ad account name. Whitespace is trimmed. | |
10
+ | **currency** | **String** | Uppercase ISO 4217 currency supported by Meta. | |
11
+ | **timezone_id** | **Integer** | Numeric Meta timezone ID from the linked timezone list. For example 1 is America/Los_Angeles. | |
12
+ | **end_advertiser** | **String** | End advertiser business or page ID. NONE uses the owning business. | [optional][default to &#39;NONE&#39;] |
13
+ | **media_agency** | **String** | Media agency business or page ID. NONE for self-serve customers. | [optional][default to &#39;NONE&#39;] |
14
+ | **partner** | **String** | Partner business or page ID. NONE for self-serve customers. | [optional][default to &#39;NONE&#39;] |
15
+ | **invoice** | **Boolean** | Request Meta invoicing. Eligibility is determined by Meta. | [optional] |
16
+ | **invoice_group_id** | **String** | Existing Meta invoice group ID. | [optional] |
17
+ | **invoicing_emails** | **Array&lt;String&gt;** | Addresses for Meta invoices. | [optional] |
18
+ | **io** | **Boolean** | Meta insertion-order invoicing option. | [optional] |
19
+ | **po_number** | **String** | Purchase order number. | [optional] |
20
+ | **funding_id** | **String** | Existing Meta funding reference. Does not add a payment method. | [optional] |
21
+ | **ad_account_created_from_bm_flag** | **Boolean** | Meta Business Manager creation flag. | [optional] |
22
+
23
+ ## Example
24
+
25
+ ```ruby
26
+ require 'zernio-sdk'
27
+
28
+ instance = Zernio::CreateAdAccountRequest.new(
29
+ account_id: null,
30
+ business_id: null,
31
+ name: null,
32
+ currency: null,
33
+ timezone_id: null,
34
+ end_advertiser: null,
35
+ media_agency: null,
36
+ partner: null,
37
+ invoice: null,
38
+ invoice_group_id: null,
39
+ invoicing_emails: null,
40
+ io: null,
41
+ po_number: null,
42
+ funding_id: null,
43
+ ad_account_created_from_bm_flag: null
44
+ )
45
+ ```
46
+
@@ -13,6 +13,7 @@
13
13
  | **sms_available** | **Boolean** | Whether this country&#39;s number type can do SMS. Use it to filter the picker when the buyer wants SMS (pair with &#x60;wantsSms&#x60; on purchase). | [optional] |
14
14
  | **outbound_calling_available** | **Boolean** | WhatsApp Business Calling (BIC) outbound availability, a Meta feature blocked in some countries. NOT the PSTN Calls feature (&#x60;callsAvailable&#x60;). | [optional] |
15
15
  | **in_stock** | **Boolean** | Live carrier-stock snapshot (refreshed every 6h + on availability checks): false when NO offered type currently has deliverable inventory, so a purchase would fail. Treat as advisory; the purchase itself re-checks. | [optional] |
16
+ | **pre_orderable** | **Boolean** | At least one out-of-stock type here can be pre-ordered (see &#x60;types[].preOrderable&#x60;). | [optional] |
16
17
  | **types** | [**Array&lt;ListPhoneNumberCountries200ResponseCountriesInnerTypesInner&gt;**](ListPhoneNumberCountries200ResponseCountriesInnerTypesInner.md) | Every number type offered in this country (default first). Capabilities, KYC tier, monthly price, and stock are per type. The country-level fields above mirror the first (default) entry. Pass the chosen &#x60;numberType&#x60; to POST /v1/phone-numbers/purchase. | [optional] |
17
18
 
18
19
  ## Example
@@ -30,6 +31,7 @@ instance = Zernio::ListPhoneNumberCountries200ResponseCountriesInner.new(
30
31
  sms_available: null,
31
32
  outbound_calling_available: null,
32
33
  in_stock: null,
34
+ pre_orderable: null,
33
35
  types: null
34
36
  )
35
37
  ```
@@ -5,13 +5,15 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **number_type** | **String** | | [optional] |
8
- | **tier** | **Integer** | | [optional] |
8
+ | **tier** | **Integer** | Null on a &#x60;fulfilment: request&#x60; type, whose document tier is only known once its requirements are read. | [optional] |
9
9
  | **needs_kyc** | **Boolean** | | [optional] |
10
10
  | **monthly_cents** | **Integer** | Price a NEW number of this type costs per month, in cents. | [optional] |
11
11
  | **whatsapp_available** | **Boolean** | Always false for toll_free (WhatsApp does not reliably register toll-free numbers). | [optional] |
12
12
  | **sms_available** | **Boolean** | | [optional] |
13
13
  | **calls_available** | **Boolean** | | [optional] |
14
14
  | **in_stock** | **Boolean** | | [optional] |
15
+ | **fulfilment** | **String** | &#x60;request&#x60;: the carrier stocks this type nowhere and only sources it to order, so it is always a pre-order. | [optional] |
16
+ | **pre_orderable** | **Boolean** | Out of stock but orderable anyway. Submit KYC as usual (POST /v1/phone-numbers/kyc) and the carrier sources the number after review, usually about 3 weeks and never guaranteed. Only document tiers (3/4) qualify, and nothing is billed until the number is active. | [optional] |
15
17
 
16
18
  ## Example
17
19
 
@@ -26,7 +28,9 @@ instance = Zernio::ListPhoneNumberCountries200ResponseCountriesInnerTypesInner.n
26
28
  whatsapp_available: null,
27
29
  sms_available: null,
28
30
  calls_available: null,
29
- in_stock: null
31
+ in_stock: null,
32
+ fulfilment: null,
33
+ pre_orderable: null
30
34
  )
31
35
  ```
32
36
 
@@ -391,7 +391,7 @@ end
391
391
 
392
392
  Watch an out-of-stock country
393
393
 
394
- Get notified the first time an out-of-stock country has deliverable numbers again: an email to the account holder plus the `phone_number.stock_available` webhook. Stock is re-checked every 6h. One watch per country and number type; 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 watches at once. Countries and types marked `fulfilment: request` by GET /v1/phone-numbers/countries can also be watched. Those are sourced by a carrier request rather than held in stock, so a watch records interest and no date is implied.
394
+ Get notified the first time an out-of-stock country has deliverable numbers again: an email to the account holder plus the `phone_number.stock_available` webhook. Stock is re-checked every 6h. One watch per country and number type; 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 watches at once. Countries and types marked `fulfilment: request` by GET /v1/phone-numbers/countries can also be watched, but anything with `preOrderable: true` does not need a watch: submit KYC and the carrier sources the number to order.
395
395
 
396
396
  ### Examples
397
397
 
@@ -5,6 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **status** | **String** | | [optional] |
8
+ | **pre_order** | **Boolean** | True when nothing was in stock and this submission placed a pre-order. The number stays &#x60;pending_regulatory&#x60; until the carrier sources it (usually about 3 weeks) and is not billed until active. A pre-order is one number: &#x60;quantity&#x60; above 1 is rejected with 400. | [optional] |
8
9
  | **phone_number** | [**SubmitPhoneNumberKyc200ResponsePhoneNumber**](SubmitPhoneNumberKyc200ResponsePhoneNumber.md) | | [optional] |
9
10
  | **numbers** | [**Array&lt;SubmitPhoneNumberKyc200ResponseNumbersInner&gt;**](SubmitPhoneNumberKyc200ResponseNumbersInner.md) | Every number provisioned from this submission. Length equals the requested &#x60;quantity&#x60; on full success (fewer if some orders failed; best-effort). The first element mirrors &#x60;phoneNumber&#x60;. | [optional] |
10
11
 
@@ -15,6 +16,7 @@ require 'zernio-sdk'
15
16
 
16
17
  instance = Zernio::SubmitPhoneNumberKyc200Response.new(
17
18
  status: null,
19
+ pre_order: null,
18
20
  phone_number: null,
19
21
  numbers: null
20
22
  )
@@ -223,6 +223,74 @@ module Zernio
223
223
  return data, status_code, headers
224
224
  end
225
225
 
226
+ # Create Meta ad account
227
+ # Creates a durable Meta ad account in the end user's own business portfolio using their connected Meta Ads token. Requires an active metaads accountId, Ads access, business_management permission and business admin access. Discover portfolios with GET /v1/ads/businesses. System-user tokens may return an empty businesses list; supply the known business ID in that case. The self-serve account starts without a payment method. The user must add a payment method in Ads Manager before ads can deliver. Zernio cannot add payment methods. Meta may require business verification and limits how many accounts a business can create. Closing an account does not guarantee more capacity. An ad account cannot truly be deleted, even after closing it and removing it from a business. timezoneId is Meta's numeric ID, not an IANA timezone name. Select it from https://developers.facebook.com/docs/marketing-api/reference/ad-account/timezone-ids/. For example, 1 is America/Los_Angeles. Meta validates supported currencies and IDs. endAdvertiser, mediaAgency and partner default to NONE for the self-serve flow. The new account is added atomically to an existing scoped ad-account allowlist. Unrestricted connections stay unrestricted. Reconnecting the same Meta identity preserves this scope unless a caller explicitly replaces it. Discovery is nudged immediately. Use the returned adAccountId with the existing ads endpoints. This operation is not idempotent and Zernio never automatically retries it. Unknown body fields are rejected. No validateOnly or dry-run option is supported. After a timeout or a 502 with details.creationStatus=unknown, check the business in Ads Manager before attempting another creation. A 201 with connectionUpdated=false means the account exists but needs reconnecting with adAccountIds containing the returned ID and the previous scoped IDs via GET /v1/connect/facebook/ads. Do not repeat the create call.
228
+ # @param create_ad_account_request [CreateAdAccountRequest]
229
+ # @param [Hash] opts the optional parameters
230
+ # @return [CreateAdAccount201Response]
231
+ def create_ad_account(create_ad_account_request, opts = {})
232
+ data, _status_code, _headers = create_ad_account_with_http_info(create_ad_account_request, opts)
233
+ data
234
+ end
235
+
236
+ # Create Meta ad account
237
+ # Creates a durable Meta ad account in the end user&#39;s own business portfolio using their connected Meta Ads token. Requires an active metaads accountId, Ads access, business_management permission and business admin access. Discover portfolios with GET /v1/ads/businesses. System-user tokens may return an empty businesses list; supply the known business ID in that case. The self-serve account starts without a payment method. The user must add a payment method in Ads Manager before ads can deliver. Zernio cannot add payment methods. Meta may require business verification and limits how many accounts a business can create. Closing an account does not guarantee more capacity. An ad account cannot truly be deleted, even after closing it and removing it from a business. timezoneId is Meta&#39;s numeric ID, not an IANA timezone name. Select it from https://developers.facebook.com/docs/marketing-api/reference/ad-account/timezone-ids/. For example, 1 is America/Los_Angeles. Meta validates supported currencies and IDs. endAdvertiser, mediaAgency and partner default to NONE for the self-serve flow. The new account is added atomically to an existing scoped ad-account allowlist. Unrestricted connections stay unrestricted. Reconnecting the same Meta identity preserves this scope unless a caller explicitly replaces it. Discovery is nudged immediately. Use the returned adAccountId with the existing ads endpoints. This operation is not idempotent and Zernio never automatically retries it. Unknown body fields are rejected. No validateOnly or dry-run option is supported. After a timeout or a 502 with details.creationStatus&#x3D;unknown, check the business in Ads Manager before attempting another creation. A 201 with connectionUpdated&#x3D;false means the account exists but needs reconnecting with adAccountIds containing the returned ID and the previous scoped IDs via GET /v1/connect/facebook/ads. Do not repeat the create call.
238
+ # @param create_ad_account_request [CreateAdAccountRequest]
239
+ # @param [Hash] opts the optional parameters
240
+ # @return [Array<(CreateAdAccount201Response, Integer, Hash)>] CreateAdAccount201Response data, response status code and response headers
241
+ def create_ad_account_with_http_info(create_ad_account_request, opts = {})
242
+ if @api_client.config.debugging
243
+ @api_client.config.logger.debug 'Calling API: AdAccountsApi.create_ad_account ...'
244
+ end
245
+ # verify the required parameter 'create_ad_account_request' is set
246
+ if @api_client.config.client_side_validation && create_ad_account_request.nil?
247
+ fail ArgumentError, "Missing the required parameter 'create_ad_account_request' when calling AdAccountsApi.create_ad_account"
248
+ end
249
+ # resource path
250
+ local_var_path = '/v1/ads/accounts'
251
+
252
+ # query parameters
253
+ query_params = opts[:query_params] || {}
254
+
255
+ # header parameters
256
+ header_params = opts[:header_params] || {}
257
+ # HTTP header 'Accept' (if needed)
258
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
259
+ # HTTP header 'Content-Type'
260
+ content_type = @api_client.select_header_content_type(['application/json'])
261
+ if !content_type.nil?
262
+ header_params['Content-Type'] = content_type
263
+ end
264
+
265
+ # form parameters
266
+ form_params = opts[:form_params] || {}
267
+
268
+ # http body (model)
269
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_ad_account_request)
270
+
271
+ # return_type
272
+ return_type = opts[:debug_return_type] || 'CreateAdAccount201Response'
273
+
274
+ # auth_names
275
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
276
+
277
+ new_options = opts.merge(
278
+ :operation => :"AdAccountsApi.create_ad_account",
279
+ :header_params => header_params,
280
+ :query_params => query_params,
281
+ :form_params => form_params,
282
+ :body => post_body,
283
+ :auth_names => auth_names,
284
+ :return_type => return_type
285
+ )
286
+
287
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
288
+ if @api_client.config.debugging
289
+ @api_client.config.logger.debug "API called: AdAccountsApi#create_ad_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
290
+ end
291
+ return data, status_code, headers
292
+ end
293
+
226
294
  # Create a negative keyword list
227
295
  # Creates one Google Ads shared negative keyword list with optional initial keywords in a single atomic mutation. Daily quota is reserved for every mutate item, so large batches may return 429 before any change. This operation is not idempotent. The list is not attached to any campaign.
228
296
  # @param create_ad_negative_keyword_list_request [CreateAdNegativeKeywordListRequest]
@@ -361,7 +361,7 @@ module Zernio
361
361
  end
362
362
 
363
363
  # Watch an out-of-stock country
364
- # 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 and number type; 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 watches at once. Countries and types marked `fulfilment: request` by GET /v1/phone-numbers/countries can also be watched. Those are sourced by a carrier request rather than held in stock, so a watch records interest and no date is implied.
364
+ # 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 and number type; 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 watches at once. Countries and types marked `fulfilment: request` by GET /v1/phone-numbers/countries can also be watched, but anything with `preOrderable: true` does not need a watch: submit KYC and the carrier sources the number to order.
365
365
  # @param create_phone_number_stock_watch_request [CreatePhoneNumberStockWatchRequest]
366
366
  # @param [Hash] opts the optional parameters
367
367
  # @return [PhoneNumberStockWatch]
@@ -371,7 +371,7 @@ module Zernio
371
371
  end
372
372
 
373
373
  # Watch an out-of-stock country
374
- # Get notified the first time an out-of-stock country has deliverable numbers again: an email to the account holder plus the &#x60;phone_number.stock_available&#x60; webhook. Stock is re-checked every 6h. One watch per country and number type; 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 watches at once. Countries and types marked &#x60;fulfilment: request&#x60; by GET /v1/phone-numbers/countries can also be watched. Those are sourced by a carrier request rather than held in stock, so a watch records interest and no date is implied.
374
+ # Get notified the first time an out-of-stock country has deliverable numbers again: an email to the account holder plus the &#x60;phone_number.stock_available&#x60; webhook. Stock is re-checked every 6h. One watch per country and number type; 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 watches at once. Countries and types marked &#x60;fulfilment: request&#x60; by GET /v1/phone-numbers/countries can also be watched, but anything with &#x60;preOrderable: true&#x60; does not need a watch: submit KYC and the carrier sources the number to order.
375
375
  # @param create_phone_number_stock_watch_request [CreatePhoneNumberStockWatchRequest]
376
376
  # @param [Hash] opts the optional parameters
377
377
  # @return [Array<(PhoneNumberStockWatch, Integer, Hash)>] PhoneNumberStockWatch data, response status code and response headers
@@ -22,6 +22,9 @@ module Zernio
22
22
  # Whether deliverable voice inventory exists right now.
23
23
  attr_accessor :available
24
24
 
25
+ # Nothing deliverable now, but this pair can be pre-ordered: submit KYC as usual and the carrier sources the number after review (usually about 3 weeks, never guaranteed). Only document tiers (3/4) qualify.
26
+ attr_accessor :pre_orderable
27
+
25
28
  attr_accessor :address_constraint
26
29
 
27
30
  # For `geo` only: the area(s) the registered address must be in.
@@ -58,6 +61,7 @@ module Zernio
58
61
  :'country' => :'country',
59
62
  :'number_type' => :'numberType',
60
63
  :'available' => :'available',
64
+ :'pre_orderable' => :'preOrderable',
61
65
  :'address_constraint' => :'addressConstraint',
62
66
  :'areas' => :'areas',
63
67
  :'area_options' => :'areaOptions'
@@ -80,6 +84,7 @@ module Zernio
80
84
  :'country' => :'String',
81
85
  :'number_type' => :'String',
82
86
  :'available' => :'Boolean',
87
+ :'pre_orderable' => :'Boolean',
83
88
  :'address_constraint' => :'String',
84
89
  :'areas' => :'Array<String>',
85
90
  :'area_options' => :'Array<CheckPhoneNumberAvailability200ResponseAreaOptionsInner>'
@@ -120,6 +125,10 @@ module Zernio
120
125
  self.available = attributes[:'available']
121
126
  end
122
127
 
128
+ if attributes.key?(:'pre_orderable')
129
+ self.pre_orderable = attributes[:'pre_orderable']
130
+ end
131
+
123
132
  if attributes.key?(:'address_constraint')
124
133
  self.address_constraint = attributes[:'address_constraint']
125
134
  end
@@ -172,6 +181,7 @@ module Zernio
172
181
  country == o.country &&
173
182
  number_type == o.number_type &&
174
183
  available == o.available &&
184
+ pre_orderable == o.pre_orderable &&
175
185
  address_constraint == o.address_constraint &&
176
186
  areas == o.areas &&
177
187
  area_options == o.area_options
@@ -186,7 +196,7 @@ module Zernio
186
196
  # Calculates hash code according to all attributes.
187
197
  # @return [Integer] Hash code
188
198
  def hash
189
- [country, number_type, available, address_constraint, areas, area_options].hash
199
+ [country, number_type, available, pre_orderable, address_constraint, areas, area_options].hash
190
200
  end
191
201
 
192
202
  # Builds the object from hash