late-sdk 0.0.568 → 0.0.570

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 (46) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -0
  3. data/docs/Ad.md +5 -1
  4. data/docs/AdCampaign.md +1 -1
  5. data/docs/AdReviewStatus.md +15 -0
  6. data/docs/AdTreeCampaign.md +1 -1
  7. data/docs/CheckPhoneNumberAvailability200Response.md +3 -1
  8. data/docs/CheckPhoneNumberAvailability200ResponseAreaOptionsInner.md +22 -0
  9. data/docs/CreatePhoneNumberKycLinkRequest.md +2 -0
  10. data/docs/PhoneNumbersApi.md +3 -1
  11. data/docs/PurchasePhoneNumberRequest.md +2 -0
  12. data/docs/SubmitPhoneNumberKycRequest.md +2 -0
  13. data/docs/SubmitWhatsAppNumberKycRequest.md +2 -0
  14. data/docs/WhatsAppPhoneNumbersApi.md +3 -1
  15. data/lib/zernio-sdk/api/phone_numbers_api.rb +3 -0
  16. data/lib/zernio-sdk/api/whats_app_phone_numbers_api.rb +3 -0
  17. data/lib/zernio-sdk/models/ad.rb +23 -1
  18. data/lib/zernio-sdk/models/ad_campaign.rb +1 -14
  19. data/lib/zernio-sdk/models/ad_review_status.rb +42 -0
  20. data/lib/zernio-sdk/models/ad_tree_campaign.rb +1 -14
  21. data/lib/zernio-sdk/models/check_phone_number_availability200_response.rb +16 -4
  22. data/lib/zernio-sdk/models/check_phone_number_availability200_response_area_options_inner.rb +168 -0
  23. data/lib/zernio-sdk/models/create_phone_number_kyc_link_request.rb +32 -1
  24. data/lib/zernio-sdk/models/purchase_phone_number409_response.rb +2 -2
  25. data/lib/zernio-sdk/models/purchase_phone_number_request.rb +32 -1
  26. data/lib/zernio-sdk/models/submit_phone_number_kyc_request.rb +32 -1
  27. data/lib/zernio-sdk/models/submit_whats_app_number_kyc_request.rb +32 -1
  28. data/lib/zernio-sdk/version.rb +1 -1
  29. data/lib/zernio-sdk.rb +2 -0
  30. data/openapi.yaml +80 -15
  31. data/spec/api/phone_numbers_api_spec.rb +1 -0
  32. data/spec/api/whats_app_phone_numbers_api_spec.rb +1 -0
  33. data/spec/models/ad_campaign_spec.rb +0 -4
  34. data/spec/models/ad_review_status_spec.rb +30 -0
  35. data/spec/models/ad_spec.rb +12 -0
  36. data/spec/models/ad_tree_campaign_spec.rb +0 -4
  37. data/spec/models/check_phone_number_availability200_response_area_options_inner_spec.rb +48 -0
  38. data/spec/models/check_phone_number_availability200_response_spec.rb +6 -0
  39. data/spec/models/create_phone_number_kyc_link_request_spec.rb +6 -0
  40. data/spec/models/purchase_phone_number409_response_spec.rb +1 -1
  41. data/spec/models/purchase_phone_number_request_spec.rb +6 -0
  42. data/spec/models/submit_phone_number_kyc_request_spec.rb +6 -0
  43. data/spec/models/submit_whats_app_number_kyc_request_spec.rb +6 -0
  44. data/zernio-sdk-0.0.570.gem +0 -0
  45. metadata +10 -2
  46. data/zernio-sdk-0.0.568.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a70e3f3fd6763affa173155600bbdb8649cf1ce2bacb9d84cee782e66e87485
4
- data.tar.gz: dc8b7db72e44904c3d8a5c631bc46c134e2fc9fac93a8e94e882ecc074b5b617
3
+ metadata.gz: c6662697b65680201c5406dc215197a7698d35f9eb962faaf4b131add23906cb
4
+ data.tar.gz: 53a2f69256a9bd88806d40e70be0aaa70bb415d5fccb72fa99c9ca9f8f6c0aa8
5
5
  SHA512:
6
- metadata.gz: 58d7ef4c3afdc63222deb589c0e419876b6bfb74b3f9a789299f76a9dd337aaf00f31ee6f3d28fa15694adfdf3ee45ab72dd7f05992f6021a42668ef18d9e42a
7
- data.tar.gz: 8949191da1d9267120b272529f958760067baf88261d0b14abbb847fbdea6721ba024ffdfdaa1a3ab2d1351e1c8c3e15f3e5c0da4caf29a77f58ca2014e94884
6
+ metadata.gz: a794eb29b649101ab9b233ca322079b4141b15d7440222181ff56ff2f99a3320d6785abb4160d22770b9a5af7433a6e52f6f65a377d58c4299834fa1c7ec5322
7
+ data.tar.gz: e6ec84fb9678b5043b3edca764f0b1a3d4a140a84d127da39ea20591833a734bcc27ae57fb5094565c689e1d27cdd9bf1df1f8f79644e5cebe9e266fc5710614
data/README.md CHANGED
@@ -604,6 +604,7 @@ Class | Method | HTTP request | Description
604
604
  - [Zernio::AdDailyMetrics](docs/AdDailyMetrics.md)
605
605
  - [Zernio::AdMetrics](docs/AdMetrics.md)
606
606
  - [Zernio::AdPromotedObject](docs/AdPromotedObject.md)
607
+ - [Zernio::AdReviewStatus](docs/AdReviewStatus.md)
607
608
  - [Zernio::AdSchedule](docs/AdSchedule.md)
608
609
  - [Zernio::AdStatus](docs/AdStatus.md)
609
610
  - [Zernio::AdTreeAdSet](docs/AdTreeAdSet.md)
@@ -694,6 +695,7 @@ Class | Method | HTTP request | Description
694
695
  - [Zernio::CancelBroadcast200Response](docs/CancelBroadcast200Response.md)
695
696
  - [Zernio::CancelPhoneNumberPortIn200Response](docs/CancelPhoneNumberPortIn200Response.md)
696
697
  - [Zernio::CheckPhoneNumberAvailability200Response](docs/CheckPhoneNumberAvailability200Response.md)
698
+ - [Zernio::CheckPhoneNumberAvailability200ResponseAreaOptionsInner](docs/CheckPhoneNumberAvailability200ResponseAreaOptionsInner.md)
697
699
  - [Zernio::CheckPhoneNumberPortability200Response](docs/CheckPhoneNumberPortability200Response.md)
698
700
  - [Zernio::CheckPhoneNumberPortability200ResponseResultsInner](docs/CheckPhoneNumberPortability200ResponseResultsInner.md)
699
701
  - [Zernio::CheckPhoneNumberPortabilityRequest](docs/CheckPhoneNumberPortabilityRequest.md)
data/docs/Ad.md CHANGED
@@ -7,7 +7,9 @@
7
7
  | **_id** | **String** | | [optional] |
8
8
  | **name** | **String** | | [optional] |
9
9
  | **platform** | **String** | | [optional] |
10
- | **status** | [**AdStatus**](AdStatus.md) | | [optional] |
10
+ | **status** | [**AdStatus**](AdStatus.md) | Delivery status. Derived from the platform `effective_status`, so it inherits ancestor pauses (an ACTIVE ad under a PAUSED campaign reads `paused`). For the ad's own on/off toggle use `configuredStatus`; for the review state use `reviewStatus`. | [optional] |
11
+ | **configured_status** | **String** | The ad's own on/off toggle as configured on the platform (Meta `configured_status`: ACTIVE / PAUSED), unaffected by ancestor (ad set / campaign) pauses. Distinct from `status`, which is the ancestor-cascaded delivery status. Only present for Meta ads synced after this field was added. | [optional] |
12
+ | **review_status** | [**AdReviewStatus**](AdReviewStatus.md) | Platform review state of this ad, independent of delivery `status` / `configuredStatus`. Absent when the platform reports no review signal. | [optional] |
11
13
  | **ad_type** | **String** | | [optional] |
12
14
  | **goal** | **String** | Available goals vary by platform. Meta (Facebook/Instagram) supports all 9 (incl. `lead_conversion` = website pixel lead optimization and `catalog_sales` = Advantage+ catalog ads). TikTok supports the 7 non-`lead_conversion` goals. LinkedIn supports all except app_promotion / lead_conversion. Twitter/X supports engagement, traffic, awareness, video_views, app_promotion. Pinterest and Google Ads support only engagement, traffic, awareness, video_views. | [optional] |
13
15
  | **is_external** | **Boolean** | True for ads synced from platform ad managers | [optional] |
@@ -44,6 +46,8 @@ instance = Zernio::Ad.new(
44
46
  name: null,
45
47
  platform: null,
46
48
  status: null,
49
+ configured_status: ACTIVE,
50
+ review_status: null,
47
51
  ad_type: null,
48
52
  goal: null,
49
53
  is_external: null,
data/docs/AdCampaign.md CHANGED
@@ -8,7 +8,7 @@
8
8
  | **platform** | **String** | | [optional] |
9
9
  | **campaign_name** | **String** | | [optional] |
10
10
  | **status** | [**AdStatus**](AdStatus.md) | Delivery status derived from child ad statuses. Distinct from `reviewStatus`. | [optional] |
11
- | **review_status** | **String** | Platform-side review state of the campaign. See AdTreeCampaign.reviewStatus for the full description. | [optional] |
11
+ | **review_status** | [**AdReviewStatus**](AdReviewStatus.md) | | [optional] |
12
12
  | **platform_campaign_status** | **String** | Raw platform-level campaign status (Meta `effective_status`). | [optional] |
13
13
  | **campaign_issues_info** | **Array<Object>** | Platform-reported campaign issues (Meta `issues_info[]`). | [optional] |
14
14
  | **ad_count** | **Integer** | | [optional] |
@@ -0,0 +1,15 @@
1
+ # Zernio::AdReviewStatus
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'zernio-sdk'
12
+
13
+ instance = Zernio::AdReviewStatus.new()
14
+ ```
15
+
@@ -8,7 +8,7 @@
8
8
  | **platform** | **String** | | [optional] |
9
9
  | **campaign_name** | **String** | | [optional] |
10
10
  | **status** | [**AdStatus**](AdStatus.md) | Delivery status derived from child ad statuses. Distinct from `reviewStatus`, which reflects the platform-side review state. | [optional] |
11
- | **review_status** | **String** | Platform-side review state of the campaign. Independent of the children-derived delivery `status`: a campaign can have ads already active (status=active) while the campaign itself is still being reviewed by the platform (reviewStatus=in_review). For Meta, derived from `effective_status` + `issues_info` on the Campaign, plus ad-level PENDING_REVIEW rollup. | [optional] |
11
+ | **review_status** | [**AdReviewStatus**](AdReviewStatus.md) | | [optional] |
12
12
  | **platform_campaign_status** | **String** | Raw platform-level campaign status (Meta `effective_status`: ACTIVE, PAUSED, DELETED, ARCHIVED, IN_PROCESS, WITH_ISSUES). Distinct from per-ad `platformStatus`. | [optional] |
13
13
  | **campaign_issues_info** | **Array<Object>** | Platform-reported campaign issues (Meta `issues_info[]`). Populated only when the platform has delivery issues to report; contains the specific error codes and messages. | [optional] |
14
14
  | **ad_count** | **Integer** | Total ads across all ad sets | [optional] |
@@ -9,6 +9,7 @@
9
9
  | **available** | **Boolean** | Whether deliverable voice inventory exists right now. | [optional] |
10
10
  | **address_constraint** | **String** | | [optional] |
11
11
  | **areas** | **Array<String>** | For `geo` only — the area(s) the registered address must be in. | [optional] |
12
+ | **area_options** | [**Array<CheckPhoneNumberAvailability200ResponseAreaOptionsInner>**](CheckPhoneNumberAvailability200ResponseAreaOptionsInner.md) | Live inventory grouped by area code, largest stock first. Empty when out of stock (or the area lookup failed). Pass a chosen `ndc` as `areaCode` on POST /v1/phone-numbers/purchase (or on the KYC submit for regulated countries) to require that area. | [optional] |
12
13
 
13
14
  ## Example
14
15
 
@@ -20,7 +21,8 @@ instance = Zernio::CheckPhoneNumberAvailability200Response.new(
20
21
  number_type: null,
21
22
  available: null,
22
23
  address_constraint: null,
23
- areas: null
24
+ areas: null,
25
+ area_options: null
24
26
  )
25
27
  ```
26
28
 
@@ -0,0 +1,22 @@
1
+ # Zernio::CheckPhoneNumberAvailability200ResponseAreaOptionsInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ndc** | **String** | Area code (national destination code), e.g. \"11\". | [optional] |
8
+ | **name** | **String** | Human-readable area name, e.g. \"Sao Paulo\". | [optional] |
9
+ | **count** | **Integer** | Deliverable numbers seen in this area on the latest inventory page. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::CheckPhoneNumberAvailability200ResponseAreaOptionsInner.new(
17
+ ndc: null,
18
+ name: null,
19
+ count: null
20
+ )
21
+ ```
22
+
@@ -6,6 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **profile_id** | **String** | | |
8
8
  | **country** | **String** | ISO 3166-1 alpha-2 country code (must be a regulated/KYC country). | |
9
+ | **area_code** | **String** | Area code (NDC) the eventual number must be in. Hard constraint carried by the link; the end customer filling the form makes no area choice. Options come from GET /v1/phone-numbers/availability (areaOptions). | [optional] |
9
10
  | **branding** | [**CreatePhoneNumberKycLinkRequestBranding**](CreatePhoneNumberKycLinkRequestBranding.md) | | [optional] |
10
11
  | **redirect_url** | **String** | Where to send the end customer's browser after a successful submit. On completion Zernio appends `kyc=submitted` and `country=<ISO-2>` as query params. When omitted, the hosted page shows a built-in confirmation screen instead. | [optional] |
11
12
 
@@ -17,6 +18,7 @@ require 'zernio-sdk'
17
18
  instance = Zernio::CreatePhoneNumberKycLinkRequest.new(
18
19
  profile_id: null,
19
20
  country: null,
21
+ area_code: null,
20
22
  branding: null,
21
23
  redirect_url: null
22
24
  )
@@ -122,7 +122,8 @@ end
122
122
  api_instance = Zernio::PhoneNumbersApi.new
123
123
  country = 'country_example' # String | ISO-2 country code.
124
124
  opts = {
125
- number_type: 'local' # String | Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type.
125
+ number_type: 'local', # String | Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type.
126
+ sms: true # Boolean | Pass true when the buyer wants SMS: availability, areas, and areaOptions then describe the SMS-capable pool (an SMS purchase orders from it), not the wider voice-only pool.
126
127
  }
127
128
 
128
129
  begin
@@ -158,6 +159,7 @@ end
158
159
  | ---- | ---- | ----------- | ----- |
159
160
  | **country** | **String** | ISO-2 country code. | |
160
161
  | **number_type** | **String** | Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type. | [optional] |
162
+ | **sms** | **Boolean** | Pass true when the buyer wants SMS: availability, areas, and areaOptions then describe the SMS-capable pool (an SMS purchase orders from it), not the wider voice-only pool. | [optional] |
161
163
 
162
164
  ### Return type
163
165
 
@@ -7,6 +7,7 @@
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/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
+ | **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] |
10
11
  | **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] |
11
12
  | **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] |
12
13
  | **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] |
@@ -22,6 +23,7 @@ instance = Zernio::PurchasePhoneNumberRequest.new(
22
23
  profile_id: null,
23
24
  country: null,
24
25
  number_type: null,
26
+ area_code: null,
25
27
  connect_whatsapp: null,
26
28
  wants_sms: null,
27
29
  wants_whatsapp: null,
@@ -11,6 +11,7 @@
11
11
  | **reuse** | **Boolean** | Reuse a prior approved verification for this country (skips document/field collection; places the order immediately). | [optional] |
12
12
  | **reuse_option_id** | **String** | Which reusable verification to use (GET reusable.options[].id). The unambiguous selection key. Omitted = the approved default. No match = 409. | [optional] |
13
13
  | **reuse_from** | **String** | Legacy fallback for `reuseOptionId`: the source phone number (GET reusable.options[].fromPhoneNumber). Ambiguous when a number labels two verifications — prefer `reuseOptionId`. Omitted = the approved default. No match = 409. | [optional] |
14
+ | **area_code** | **String** | Area code (NDC) the number must be in. Hard constraint: an empty area pool fails with 409 code AREA_CODE_UNAVAILABLE instead of ordering from another area. Omit for any area. Options come from GET /v1/phone-numbers/availability (areaOptions); the purchase 202 kycUrl echoes the areaCode picked at purchase time so it can be passed here. | [optional] |
14
15
  | **end_user_first_name** | **String** | End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement. | [optional] |
15
16
  | **end_user_last_name** | **String** | End user's legal last name. Same condition as endUserFirstName. | [optional] |
16
17
  | **values** | **Hash<String, String>** | requirementId → textual value | [optional] |
@@ -30,6 +31,7 @@ instance = Zernio::SubmitPhoneNumberKycRequest.new(
30
31
  reuse: null,
31
32
  reuse_option_id: null,
32
33
  reuse_from: null,
34
+ area_code: null,
33
35
  end_user_first_name: null,
34
36
  end_user_last_name: null,
35
37
  values: null,
@@ -11,6 +11,7 @@
11
11
  | **reuse** | **Boolean** | Reuse a prior approved verification for this country (skips document/field collection; places the order immediately). | [optional] |
12
12
  | **reuse_option_id** | **String** | Which reusable verification to use (GET reusable.options[].id). The unambiguous selection key. Omitted = the approved default. No match = 409. | [optional] |
13
13
  | **reuse_from** | **String** | Legacy fallback for `reuseOptionId`: the source phone number (GET reusable.options[].fromPhoneNumber). Ambiguous when a number labels two verifications — prefer `reuseOptionId`. Omitted = the approved default. No match = 409. | [optional] |
14
+ | **area_code** | **String** | Area code (NDC) the number must be in. Hard constraint: an empty area pool fails with 409 code AREA_CODE_UNAVAILABLE instead of ordering from another area. Omit for any area. Options come from GET /v1/phone-numbers/availability (areaOptions); the purchase 202 kycUrl echoes the areaCode picked at purchase time so it can be passed here. | [optional] |
14
15
  | **end_user_first_name** | **String** | End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement. | [optional] |
15
16
  | **end_user_last_name** | **String** | End user's legal last name. Same condition as endUserFirstName. | [optional] |
16
17
  | **values** | **Hash<String, String>** | requirementId → textual value | [optional] |
@@ -30,6 +31,7 @@ instance = Zernio::SubmitWhatsAppNumberKycRequest.new(
30
31
  reuse: null,
31
32
  reuse_option_id: null,
32
33
  reuse_from: null,
34
+ area_code: null,
33
35
  end_user_first_name: null,
34
36
  end_user_last_name: null,
35
37
  values: null,
@@ -43,7 +43,8 @@ end
43
43
  api_instance = Zernio::WhatsAppPhoneNumbersApi.new
44
44
  country = 'country_example' # String | ISO-2 country code.
45
45
  opts = {
46
- number_type: 'local' # String | Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type.
46
+ number_type: 'local', # String | Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type.
47
+ sms: true # Boolean | Pass true when the buyer wants SMS: availability, areas, and areaOptions then describe the SMS-capable pool (an SMS purchase orders from it), not the wider voice-only pool.
47
48
  }
48
49
 
49
50
  begin
@@ -79,6 +80,7 @@ end
79
80
  | ---- | ---- | ----------- | ----- |
80
81
  | **country** | **String** | ISO-2 country code. | |
81
82
  | **number_type** | **String** | Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type. | [optional] |
83
+ | **sms** | **Boolean** | Pass true when the buyer wants SMS: availability, areas, and areaOptions then describe the SMS-capable pool (an SMS purchase orders from it), not the wider voice-only pool. | [optional] |
82
84
 
83
85
  ### Return type
84
86
 
@@ -87,6 +87,7 @@ module Zernio
87
87
  # @param country [String] ISO-2 country code.
88
88
  # @param [Hash] opts the optional parameters
89
89
  # @option opts [String] :number_type Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type.
90
+ # @option opts [Boolean] :sms Pass true when the buyer wants SMS: availability, areas, and areaOptions then describe the SMS-capable pool (an SMS purchase orders from it), not the wider voice-only pool.
90
91
  # @return [CheckPhoneNumberAvailability200Response]
91
92
  def check_phone_number_availability(country, opts = {})
92
93
  data, _status_code, _headers = check_phone_number_availability_with_http_info(country, opts)
@@ -98,6 +99,7 @@ module Zernio
98
99
  # @param country [String] ISO-2 country code.
99
100
  # @param [Hash] opts the optional parameters
100
101
  # @option opts [String] :number_type Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type.
102
+ # @option opts [Boolean] :sms Pass true when the buyer wants SMS: availability, areas, and areaOptions then describe the SMS-capable pool (an SMS purchase orders from it), not the wider voice-only pool.
101
103
  # @return [Array<(CheckPhoneNumberAvailability200Response, Integer, Hash)>] CheckPhoneNumberAvailability200Response data, response status code and response headers
102
104
  def check_phone_number_availability_with_http_info(country, opts = {})
103
105
  if @api_client.config.debugging
@@ -118,6 +120,7 @@ module Zernio
118
120
  query_params = opts[:query_params] || {}
119
121
  query_params[:'country'] = country
120
122
  query_params[:'numberType'] = opts[:'number_type'] if !opts[:'number_type'].nil?
123
+ query_params[:'sms'] = opts[:'sms'] if !opts[:'sms'].nil?
121
124
 
122
125
  # header parameters
123
126
  header_params = opts[:header_params] || {}
@@ -24,6 +24,7 @@ module Zernio
24
24
  # @param country [String] ISO-2 country code.
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @option opts [String] :number_type Check a specific offered type (stock and address constraints are per type). Omitted &#x3D; the country&#39;s default type.
27
+ # @option opts [Boolean] :sms Pass true when the buyer wants SMS: availability, areas, and areaOptions then describe the SMS-capable pool (an SMS purchase orders from it), not the wider voice-only pool.
27
28
  # @return [CheckPhoneNumberAvailability200Response]
28
29
  def check_whats_app_number_availability(country, opts = {})
29
30
  data, _status_code, _headers = check_whats_app_number_availability_with_http_info(country, opts)
@@ -35,6 +36,7 @@ module Zernio
35
36
  # @param country [String] ISO-2 country code.
36
37
  # @param [Hash] opts the optional parameters
37
38
  # @option opts [String] :number_type Check a specific offered type (stock and address constraints are per type). Omitted &#x3D; the country&#39;s default type.
39
+ # @option opts [Boolean] :sms Pass true when the buyer wants SMS: availability, areas, and areaOptions then describe the SMS-capable pool (an SMS purchase orders from it), not the wider voice-only pool.
38
40
  # @return [Array<(CheckPhoneNumberAvailability200Response, Integer, Hash)>] CheckPhoneNumberAvailability200Response data, response status code and response headers
39
41
  def check_whats_app_number_availability_with_http_info(country, opts = {})
40
42
  if @api_client.config.debugging
@@ -55,6 +57,7 @@ module Zernio
55
57
  query_params = opts[:query_params] || {}
56
58
  query_params[:'country'] = country
57
59
  query_params[:'numberType'] = opts[:'number_type'] if !opts[:'number_type'].nil?
60
+ query_params[:'sms'] = opts[:'sms'] if !opts[:'sms'].nil?
58
61
 
59
62
  # header parameters
60
63
  header_params = opts[:header_params] || {}
@@ -21,8 +21,15 @@ module Zernio
21
21
 
22
22
  attr_accessor :platform
23
23
 
24
+ # Delivery status. Derived from the platform `effective_status`, so it inherits ancestor pauses (an ACTIVE ad under a PAUSED campaign reads `paused`). For the ad's own on/off toggle use `configuredStatus`; for the review state use `reviewStatus`.
24
25
  attr_accessor :status
25
26
 
27
+ # The ad's own on/off toggle as configured on the platform (Meta `configured_status`: ACTIVE / PAUSED), unaffected by ancestor (ad set / campaign) pauses. Distinct from `status`, which is the ancestor-cascaded delivery status. Only present for Meta ads synced after this field was added.
28
+ attr_accessor :configured_status
29
+
30
+ # Platform review state of this ad, independent of delivery `status` / `configuredStatus`. Absent when the platform reports no review signal.
31
+ attr_accessor :review_status
32
+
26
33
  attr_accessor :ad_type
27
34
 
28
35
  # Available goals vary by platform. Meta (Facebook/Instagram) supports all 9 (incl. `lead_conversion` = website pixel lead optimization and `catalog_sales` = Advantage+ catalog ads). TikTok supports the 7 non-`lead_conversion` goals. LinkedIn supports all except app_promotion / lead_conversion. Twitter/X supports engagement, traffic, awareness, video_views, app_promotion. Pinterest and Google Ads support only engagement, traffic, awareness, video_views.
@@ -111,6 +118,8 @@ module Zernio
111
118
  :'name' => :'name',
112
119
  :'platform' => :'platform',
113
120
  :'status' => :'status',
121
+ :'configured_status' => :'configuredStatus',
122
+ :'review_status' => :'reviewStatus',
114
123
  :'ad_type' => :'adType',
115
124
  :'goal' => :'goal',
116
125
  :'is_external' => :'isExternal',
@@ -156,6 +165,8 @@ module Zernio
156
165
  :'name' => :'String',
157
166
  :'platform' => :'String',
158
167
  :'status' => :'AdStatus',
168
+ :'configured_status' => :'String',
169
+ :'review_status' => :'AdReviewStatus',
159
170
  :'ad_type' => :'String',
160
171
  :'goal' => :'String',
161
172
  :'is_external' => :'Boolean',
@@ -187,6 +198,7 @@ module Zernio
187
198
  # List of attributes with nullable: true
188
199
  def self.openapi_nullable
189
200
  Set.new([
201
+ :'configured_status',
190
202
  :'metrics',
191
203
  :'platform_objective',
192
204
  :'optimization_goal',
@@ -230,6 +242,14 @@ module Zernio
230
242
  self.status = attributes[:'status']
231
243
  end
232
244
 
245
+ if attributes.key?(:'configured_status')
246
+ self.configured_status = attributes[:'configured_status']
247
+ end
248
+
249
+ if attributes.key?(:'review_status')
250
+ self.review_status = attributes[:'review_status']
251
+ end
252
+
233
253
  if attributes.key?(:'ad_type')
234
254
  self.ad_type = attributes[:'ad_type']
235
255
  end
@@ -391,6 +411,8 @@ module Zernio
391
411
  name == o.name &&
392
412
  platform == o.platform &&
393
413
  status == o.status &&
414
+ configured_status == o.configured_status &&
415
+ review_status == o.review_status &&
394
416
  ad_type == o.ad_type &&
395
417
  goal == o.goal &&
396
418
  is_external == o.is_external &&
@@ -427,7 +449,7 @@ module Zernio
427
449
  # Calculates hash code according to all attributes.
428
450
  # @return [Integer] Hash code
429
451
  def hash
430
- [_id, name, platform, status, ad_type, goal, is_external, budget, metrics, platform_ad_id, platform_ad_account_id, platform_campaign_id, platform_ad_set_id, campaign_name, ad_set_name, platform_objective, optimization_goal, platform_ad_account_name, platform_created_at, bid_strategy, bid_amount, roas_average_floor, promoted_object, creative, targeting, schedule, rejection_reason, created_at, updated_at].hash
452
+ [_id, name, platform, status, configured_status, review_status, ad_type, goal, is_external, budget, metrics, platform_ad_id, platform_ad_account_id, platform_campaign_id, platform_ad_set_id, campaign_name, ad_set_name, platform_objective, optimization_goal, platform_ad_account_name, platform_created_at, bid_strategy, bid_amount, roas_average_floor, promoted_object, creative, targeting, schedule, rejection_reason, created_at, updated_at].hash
431
453
  end
432
454
 
433
455
  # Builds the object from hash
@@ -24,7 +24,6 @@ module Zernio
24
24
  # Delivery status derived from child ad statuses. Distinct from `reviewStatus`.
25
25
  attr_accessor :status
26
26
 
27
- # Platform-side review state of the campaign. See AdTreeCampaign.reviewStatus for the full description.
28
27
  attr_accessor :review_status
29
28
 
30
29
  # Raw platform-level campaign status (Meta `effective_status`).
@@ -154,7 +153,7 @@ module Zernio
154
153
  :'platform' => :'String',
155
154
  :'campaign_name' => :'String',
156
155
  :'status' => :'AdStatus',
157
- :'review_status' => :'String',
156
+ :'review_status' => :'AdReviewStatus',
158
157
  :'platform_campaign_status' => :'String',
159
158
  :'campaign_issues_info' => :'Array<Object>',
160
159
  :'ad_count' => :'Integer',
@@ -341,8 +340,6 @@ module Zernio
341
340
  warn '[DEPRECATED] the `valid?` method is obsolete'
342
341
  platform_validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
343
342
  return false unless platform_validator.valid?(@platform)
344
- review_status_validator = EnumAttributeValidator.new('String', ["in_review", "approved", "rejected", "with_issues"])
345
- return false unless review_status_validator.valid?(@review_status)
346
343
  budget_level_validator = EnumAttributeValidator.new('String', ["campaign", "adset"])
347
344
  return false unless budget_level_validator.valid?(@budget_level)
348
345
  true
@@ -358,16 +355,6 @@ module Zernio
358
355
  @platform = platform
359
356
  end
360
357
 
361
- # Custom attribute writer method checking allowed values (enum).
362
- # @param [Object] review_status Object to be assigned
363
- def review_status=(review_status)
364
- validator = EnumAttributeValidator.new('String', ["in_review", "approved", "rejected", "with_issues"])
365
- unless validator.valid?(review_status)
366
- fail ArgumentError, "invalid value for \"review_status\", must be one of #{validator.allowable_values}."
367
- end
368
- @review_status = review_status
369
- end
370
-
371
358
  # Custom attribute writer method checking allowed values (enum).
372
359
  # @param [Object] budget_level Object to be assigned
373
360
  def budget_level=(budget_level)
@@ -0,0 +1,42 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class AdReviewStatus
18
+ IN_REVIEW = "in_review".freeze
19
+ APPROVED = "approved".freeze
20
+ REJECTED = "rejected".freeze
21
+ WITH_ISSUES = "with_issues".freeze
22
+
23
+ def self.all_vars
24
+ @all_vars ||= [IN_REVIEW, APPROVED, REJECTED, WITH_ISSUES].freeze
25
+ end
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def self.build_from_hash(value)
31
+ new.build_from_hash(value)
32
+ end
33
+
34
+ # Builds the enum from string
35
+ # @param [String] The enum value in the form of the string
36
+ # @return [String] The enum value
37
+ def build_from_hash(value)
38
+ return value if AdReviewStatus.all_vars.include?(value)
39
+ raise "Invalid ENUM value #{value} for class #AdReviewStatus"
40
+ end
41
+ end
42
+ end
@@ -25,7 +25,6 @@ module Zernio
25
25
  # Delivery status derived from child ad statuses. Distinct from `reviewStatus`, which reflects the platform-side review state.
26
26
  attr_accessor :status
27
27
 
28
- # Platform-side review state of the campaign. Independent of the children-derived delivery `status`: a campaign can have ads already active (status=active) while the campaign itself is still being reviewed by the platform (reviewStatus=in_review). For Meta, derived from `effective_status` + `issues_info` on the Campaign, plus ad-level PENDING_REVIEW rollup.
29
28
  attr_accessor :review_status
30
29
 
31
30
  # Raw platform-level campaign status (Meta `effective_status`: ACTIVE, PAUSED, DELETED, ARCHIVED, IN_PROCESS, WITH_ISSUES). Distinct from per-ad `platformStatus`.
@@ -160,7 +159,7 @@ module Zernio
160
159
  :'platform' => :'String',
161
160
  :'campaign_name' => :'String',
162
161
  :'status' => :'AdStatus',
163
- :'review_status' => :'String',
162
+ :'review_status' => :'AdReviewStatus',
164
163
  :'platform_campaign_status' => :'String',
165
164
  :'campaign_issues_info' => :'Array<Object>',
166
165
  :'ad_count' => :'Integer',
@@ -356,8 +355,6 @@ module Zernio
356
355
  warn '[DEPRECATED] the `valid?` method is obsolete'
357
356
  platform_validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
358
357
  return false unless platform_validator.valid?(@platform)
359
- review_status_validator = EnumAttributeValidator.new('String', ["in_review", "approved", "rejected", "with_issues"])
360
- return false unless review_status_validator.valid?(@review_status)
361
358
  budget_level_validator = EnumAttributeValidator.new('String', ["campaign", "adset"])
362
359
  return false unless budget_level_validator.valid?(@budget_level)
363
360
  true
@@ -373,16 +370,6 @@ module Zernio
373
370
  @platform = platform
374
371
  end
375
372
 
376
- # Custom attribute writer method checking allowed values (enum).
377
- # @param [Object] review_status Object to be assigned
378
- def review_status=(review_status)
379
- validator = EnumAttributeValidator.new('String', ["in_review", "approved", "rejected", "with_issues"])
380
- unless validator.valid?(review_status)
381
- fail ArgumentError, "invalid value for \"review_status\", must be one of #{validator.allowable_values}."
382
- end
383
- @review_status = review_status
384
- end
385
-
386
373
  # Custom attribute writer method checking allowed values (enum).
387
374
  # @param [Object] budget_level Object to be assigned
388
375
  def budget_level=(budget_level)
@@ -27,6 +27,9 @@ module Zernio
27
27
  # For `geo` only — the area(s) the registered address must be in.
28
28
  attr_accessor :areas
29
29
 
30
+ # Live inventory grouped by area code, largest stock first. Empty when out of stock (or the area lookup failed). Pass a chosen `ndc` as `areaCode` on POST /v1/phone-numbers/purchase (or on the KYC submit for regulated countries) to require that area.
31
+ attr_accessor :area_options
32
+
30
33
  class EnumAttributeValidator
31
34
  attr_reader :datatype
32
35
  attr_reader :allowable_values
@@ -56,7 +59,8 @@ module Zernio
56
59
  :'number_type' => :'numberType',
57
60
  :'available' => :'available',
58
61
  :'address_constraint' => :'addressConstraint',
59
- :'areas' => :'areas'
62
+ :'areas' => :'areas',
63
+ :'area_options' => :'areaOptions'
60
64
  }
61
65
  end
62
66
 
@@ -77,7 +81,8 @@ module Zernio
77
81
  :'number_type' => :'String',
78
82
  :'available' => :'Boolean',
79
83
  :'address_constraint' => :'String',
80
- :'areas' => :'Array<String>'
84
+ :'areas' => :'Array<String>',
85
+ :'area_options' => :'Array<CheckPhoneNumberAvailability200ResponseAreaOptionsInner>'
81
86
  }
82
87
  end
83
88
 
@@ -124,6 +129,12 @@ module Zernio
124
129
  self.areas = value
125
130
  end
126
131
  end
132
+
133
+ if attributes.key?(:'area_options')
134
+ if (value = attributes[:'area_options']).is_a?(Array)
135
+ self.area_options = value
136
+ end
137
+ end
127
138
  end
128
139
 
129
140
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -162,7 +173,8 @@ module Zernio
162
173
  number_type == o.number_type &&
163
174
  available == o.available &&
164
175
  address_constraint == o.address_constraint &&
165
- areas == o.areas
176
+ areas == o.areas &&
177
+ area_options == o.area_options
166
178
  end
167
179
 
168
180
  # @see the `==` method
@@ -174,7 +186,7 @@ module Zernio
174
186
  # Calculates hash code according to all attributes.
175
187
  # @return [Integer] Hash code
176
188
  def hash
177
- [country, number_type, available, address_constraint, areas].hash
189
+ [country, number_type, available, address_constraint, areas, area_options].hash
178
190
  end
179
191
 
180
192
  # Builds the object from hash