late-sdk 0.0.957 → 0.0.959

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 +1 -0
  3. data/docs/CheckPhoneNumberAvailability200Response.md +3 -1
  4. data/docs/CheckPhoneNumberAvailability200ResponseSoldOutAreasInner.md +22 -0
  5. data/docs/CreatePhoneNumberStockWatchRequest.md +3 -1
  6. data/docs/PhoneNumberStockWatch.md +2 -0
  7. data/docs/PhoneNumbersApi.md +1 -1
  8. data/docs/SubmitPhoneNumberKycRequest.md +2 -0
  9. data/docs/SubmitWhatsAppNumberKycRequest.md +2 -0
  10. data/docs/WebhookPayloadPhoneNumberStockAvailableStock.md +5 -1
  11. data/lib/zernio-sdk/api/phone_numbers_api.rb +2 -2
  12. data/lib/zernio-sdk/models/check_phone_number_availability200_response.rb +16 -4
  13. data/lib/zernio-sdk/models/check_phone_number_availability200_response_sold_out_areas_inner.rb +168 -0
  14. data/lib/zernio-sdk/models/create_phone_number_stock_watch_request.rb +35 -4
  15. data/lib/zernio-sdk/models/phone_number_stock_watch.rb +12 -1
  16. data/lib/zernio-sdk/models/submit_phone_number_kyc_request.rb +11 -1
  17. data/lib/zernio-sdk/models/submit_whats_app_number_kyc_request.rb +11 -1
  18. data/lib/zernio-sdk/models/webhook_payload_phone_number_stock_available_stock.rb +24 -4
  19. data/lib/zernio-sdk/version.rb +1 -1
  20. data/lib/zernio-sdk.rb +1 -0
  21. data/openapi.yaml +45 -1
  22. data/spec/api/phone_numbers_api_spec.rb +1 -1
  23. data/spec/models/check_phone_number_availability200_response_sold_out_areas_inner_spec.rb +48 -0
  24. data/spec/models/check_phone_number_availability200_response_spec.rb +6 -0
  25. data/spec/models/create_phone_number_stock_watch_request_spec.rb +6 -0
  26. data/spec/models/phone_number_stock_watch_spec.rb +6 -0
  27. data/spec/models/submit_phone_number_kyc_request_spec.rb +6 -0
  28. data/spec/models/submit_whats_app_number_kyc_request_spec.rb +6 -0
  29. data/spec/models/webhook_payload_phone_number_stock_available_stock_spec.rb +12 -0
  30. data/zernio-sdk-0.0.959.gem +0 -0
  31. metadata +6 -2
  32. data/zernio-sdk-0.0.957.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 494a9a210a70196a61241eaf20b25a3ee2bab55283f282d82ea1fc1ac944f7cc
4
- data.tar.gz: 9f58a6c39fa59b5981135b3e6125bbcf06513ca83533b13e6b0f8cd1e34fb32d
3
+ metadata.gz: 7c36aecfa4d211f3f26f5c61d8ea13974516afb1d6f95dac5afb0f80a6b9f7e8
4
+ data.tar.gz: 6d905bf0ecc74efcab36c94f1b8a7b8c74554c21b3619acd6e1ad2a4948d4097
5
5
  SHA512:
6
- metadata.gz: 057d2ebfb19915ae484cdbb65b59c46f30eefa4e90f3815bdbec483291046d9847ac3a659f208552bbcc00f7f86b3ece8066299218f81c564e361f84dd1f4ece
7
- data.tar.gz: fd730c249a2c6122f99b489165b308eb572c31488ed9c1c12e6c39d9240bf71167f7fcce097e34a7288c0e82d5cfcd8df10efe1d9f43af13f74492cdb5bd834e
6
+ metadata.gz: 858ea02cdb583e193986cda9a5b956aacafb4a4e0b5266e09bb20ee12ed108badd2120594e1db5d80e4245616b32cd421f8144d74a7f0075ba6af2bb0dfbae62
7
+ data.tar.gz: bd440a25d8e6e10df6df288fc0d860b75e546e35d45810b8c97b6aeae0496e5611189dbeca9df5f90d2a43ae266a36eace22dc8ea89df09a83e5f485707e777b
data/README.md CHANGED
@@ -1002,6 +1002,7 @@ Class | Method | HTTP request | Description
1002
1002
  - [Zernio::ChannelPickerTeam](docs/ChannelPickerTeam.md)
1003
1003
  - [Zernio::CheckPhoneNumberAvailability200Response](docs/CheckPhoneNumberAvailability200Response.md)
1004
1004
  - [Zernio::CheckPhoneNumberAvailability200ResponseAreaOptionsInner](docs/CheckPhoneNumberAvailability200ResponseAreaOptionsInner.md)
1005
+ - [Zernio::CheckPhoneNumberAvailability200ResponseSoldOutAreasInner](docs/CheckPhoneNumberAvailability200ResponseSoldOutAreasInner.md)
1005
1006
  - [Zernio::CheckPhoneNumberPortability200Response](docs/CheckPhoneNumberPortability200Response.md)
1006
1007
  - [Zernio::CheckPhoneNumberPortability200ResponseResultsInner](docs/CheckPhoneNumberPortability200ResponseResultsInner.md)
1007
1008
  - [Zernio::CheckPhoneNumberPortabilityRequest](docs/CheckPhoneNumberPortabilityRequest.md)
@@ -11,6 +11,7 @@
11
11
  | **address_constraint** | **String** | | [optional] |
12
12
  | **areas** | **Array<String>** | For `geo` only: the area(s) the registered address must be in. | [optional] |
13
13
  | **area_options** | [**Array<CheckPhoneNumberAvailability200ResponseAreaOptionsInner>**](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 `ndc` as `areaCode` on POST /v1/phone-numbers/purchase (or on the KYC submit for regulated countries) to require that area. | [optional] |
14
+ | **sold_out_areas** | [**Array<CheckPhoneNumberAvailability200ResponseSoldOutAreasInner>**](CheckPhoneNumberAvailability200ResponseSoldOutAreasInner.md) | Areas that had stock in the last 90 days and have none now. Pass one as `areaCode` with `preOrder: true` on the KYC submit when `preOrderable` is true, or watch it with POST /v1/phone-numbers/stock-watches. | [optional] |
14
15
 
15
16
  ## Example
16
17
 
@@ -24,7 +25,8 @@ instance = Zernio::CheckPhoneNumberAvailability200Response.new(
24
25
  pre_orderable: null,
25
26
  address_constraint: null,
26
27
  areas: null,
27
- area_options: null
28
+ area_options: null,
29
+ sold_out_areas: null
28
30
  )
29
31
  ```
30
32
 
@@ -0,0 +1,22 @@
1
+ # Zernio::CheckPhoneNumberAvailability200ResponseSoldOutAreasInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ndc** | **String** | Area code (national destination code). | [optional] |
8
+ | **name** | **String** | Area name. | [optional] |
9
+ | **pre_orderable** | **Boolean** | Whether this area can be pre-ordered: the carrier sources a number in it (usually 2 to 4 weeks, never guaranteed). | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::CheckPhoneNumberAvailability200ResponseSoldOutAreasInner.new(
17
+ ndc: null,
18
+ name: null,
19
+ pre_orderable: null
20
+ )
21
+ ```
22
+
@@ -6,6 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **country** | **String** | ISO 3166-1 alpha-2 code of a country listed by GET /v1/phone-numbers/countries. | |
8
8
  | **number_type** | **String** | Narrow the watch to one number type. Omit to be notified when any type in the country is back. | [optional] |
9
+ | **area_code** | **String** | Narrow the watch to one area code (NDC). Requires numberType. | [optional] |
9
10
 
10
11
  ## Example
11
12
 
@@ -14,7 +15,8 @@ require 'zernio-sdk'
14
15
 
15
16
  instance = Zernio::CreatePhoneNumberStockWatchRequest.new(
16
17
  country: null,
17
- number_type: null
18
+ number_type: null,
19
+ area_code: null
18
20
  )
19
21
  ```
20
22
 
@@ -8,6 +8,7 @@
8
8
  | **country** | **String** | ISO 3166-1 alpha-2. | |
9
9
  | **country_name** | **String** | | |
10
10
  | **number_type** | **String** | The watched number type, or null when the watch covers every type in the country. | |
11
+ | **area_code** | **String** | The watched area code (NDC), or null when the watch covers every area. | [optional] |
11
12
  | **created_at** | **Time** | | |
12
13
 
13
14
  ## Example
@@ -20,6 +21,7 @@ instance = Zernio::PhoneNumberStockWatch.new(
20
21
  country: null,
21
22
  country_name: null,
22
23
  number_type: null,
24
+ area_code: null,
23
25
  created_at: null
24
26
  )
25
27
  ```
@@ -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, but anything with `preOrderable: true` does not need a watch: submit KYC and the carrier sources the number to order.
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. Pass `areaCode` (with `numberType`) to watch one sold-out area, for example an entry of `soldOutAreas` from GET /v1/phone-numbers/availability. Area stock is checked live on the same 6h cadence.
395
395
 
396
396
  ### Examples
397
397
 
@@ -12,6 +12,7 @@
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, so prefer `reuseOptionId`. Omitted = the approved default. No match = 409. | [optional] |
14
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] |
15
+ | **pre_order** | **Boolean** | With areaCode: pre-order that area when it has no stock (an area listed in soldOutAreas with preOrderable true) instead of failing with AREA_CODE_UNAVAILABLE. The carrier sources a number in that area. | [optional] |
15
16
  | **end_user_first_name** | **String** | End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement. | [optional] |
16
17
  | **end_user_last_name** | **String** | End user's legal last name. Same condition as endUserFirstName. | [optional] |
17
18
  | **values** | **Hash<String, String>** | requirementId → textual value | [optional] |
@@ -32,6 +33,7 @@ instance = Zernio::SubmitPhoneNumberKycRequest.new(
32
33
  reuse_option_id: null,
33
34
  reuse_from: null,
34
35
  area_code: null,
36
+ pre_order: null,
35
37
  end_user_first_name: null,
36
38
  end_user_last_name: null,
37
39
  values: null,
@@ -12,6 +12,7 @@
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, so prefer `reuseOptionId`. Omitted = the approved default. No match = 409. | [optional] |
14
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] |
15
+ | **pre_order** | **Boolean** | With areaCode: pre-order that area when it has no stock (an area listed in soldOutAreas with preOrderable true) instead of failing with AREA_CODE_UNAVAILABLE. The carrier sources a number in that area. | [optional] |
15
16
  | **end_user_first_name** | **String** | End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement. | [optional] |
16
17
  | **end_user_last_name** | **String** | End user's legal last name. Same condition as endUserFirstName. | [optional] |
17
18
  | **values** | **Hash<String, String>** | requirementId → textual value | [optional] |
@@ -32,6 +33,7 @@ instance = Zernio::SubmitWhatsAppNumberKycRequest.new(
32
33
  reuse_option_id: null,
33
34
  reuse_from: null,
34
35
  area_code: null,
36
+ pre_order: null,
35
37
  end_user_first_name: null,
36
38
  end_user_last_name: null,
37
39
  values: null,
@@ -6,6 +6,8 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **country** | **String** | ISO 3166-1 alpha-2 country code of the watched country. | |
8
8
  | **types** | [**Array<WebhookPayloadPhoneNumberStockAvailableStockTypesInner>**](WebhookPayloadPhoneNumberStockAvailableStockTypesInner.md) | Number types deliverable at sweep time. Only types with stock are listed. | |
9
+ | **area_code** | **String** | Set when the watch named an area: the area code (NDC) that is back in stock. | [optional] |
10
+ | **area_name** | **String** | The name of that area, when known. | [optional] |
9
11
 
10
12
  ## Example
11
13
 
@@ -14,7 +16,9 @@ require 'zernio-sdk'
14
16
 
15
17
  instance = Zernio::WebhookPayloadPhoneNumberStockAvailableStock.new(
16
18
  country: null,
17
- types: null
19
+ types: null,
20
+ area_code: null,
21
+ area_name: null
18
22
  )
19
23
  ```
20
24
 
@@ -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, but anything with `preOrderable: true` does not need a watch: submit KYC and the carrier sources the number to order.
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. Pass `areaCode` (with `numberType`) to watch one sold-out area, for example an entry of `soldOutAreas` from GET /v1/phone-numbers/availability. Area stock is checked live on the same 6h cadence.
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 `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.
374
+ # 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. Pass `areaCode` (with `numberType`) to watch one sold-out area, for example an entry of `soldOutAreas` from GET /v1/phone-numbers/availability. Area stock is checked live on the same 6h cadence.
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
@@ -33,6 +33,9 @@ module Zernio
33
33
  # 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 `ndc` as `areaCode` on POST /v1/phone-numbers/purchase (or on the KYC submit for regulated countries) to require that area.
34
34
  attr_accessor :area_options
35
35
 
36
+ # Areas that had stock in the last 90 days and have none now. Pass one as `areaCode` with `preOrder: true` on the KYC submit when `preOrderable` is true, or watch it with POST /v1/phone-numbers/stock-watches.
37
+ attr_accessor :sold_out_areas
38
+
36
39
  class EnumAttributeValidator
37
40
  attr_reader :datatype
38
41
  attr_reader :allowable_values
@@ -64,7 +67,8 @@ module Zernio
64
67
  :'pre_orderable' => :'preOrderable',
65
68
  :'address_constraint' => :'addressConstraint',
66
69
  :'areas' => :'areas',
67
- :'area_options' => :'areaOptions'
70
+ :'area_options' => :'areaOptions',
71
+ :'sold_out_areas' => :'soldOutAreas'
68
72
  }
69
73
  end
70
74
 
@@ -87,7 +91,8 @@ module Zernio
87
91
  :'pre_orderable' => :'Boolean',
88
92
  :'address_constraint' => :'String',
89
93
  :'areas' => :'Array<String>',
90
- :'area_options' => :'Array<CheckPhoneNumberAvailability200ResponseAreaOptionsInner>'
94
+ :'area_options' => :'Array<CheckPhoneNumberAvailability200ResponseAreaOptionsInner>',
95
+ :'sold_out_areas' => :'Array<CheckPhoneNumberAvailability200ResponseSoldOutAreasInner>'
91
96
  }
92
97
  end
93
98
 
@@ -144,6 +149,12 @@ module Zernio
144
149
  self.area_options = value
145
150
  end
146
151
  end
152
+
153
+ if attributes.key?(:'sold_out_areas')
154
+ if (value = attributes[:'sold_out_areas']).is_a?(Array)
155
+ self.sold_out_areas = value
156
+ end
157
+ end
147
158
  end
148
159
 
149
160
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -184,7 +195,8 @@ module Zernio
184
195
  pre_orderable == o.pre_orderable &&
185
196
  address_constraint == o.address_constraint &&
186
197
  areas == o.areas &&
187
- area_options == o.area_options
198
+ area_options == o.area_options &&
199
+ sold_out_areas == o.sold_out_areas
188
200
  end
189
201
 
190
202
  # @see the `==` method
@@ -196,7 +208,7 @@ module Zernio
196
208
  # Calculates hash code according to all attributes.
197
209
  # @return [Integer] Hash code
198
210
  def hash
199
- [country, number_type, available, pre_orderable, address_constraint, areas, area_options].hash
211
+ [country, number_type, available, pre_orderable, address_constraint, areas, area_options, sold_out_areas].hash
200
212
  end
201
213
 
202
214
  # Builds the object from hash
@@ -0,0 +1,168 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class CheckPhoneNumberAvailability200ResponseSoldOutAreasInner < ApiModelBase
18
+ # Area code (national destination code).
19
+ attr_accessor :ndc
20
+
21
+ # Area name.
22
+ attr_accessor :name
23
+
24
+ # Whether this area can be pre-ordered: the carrier sources a number in it (usually 2 to 4 weeks, never guaranteed).
25
+ attr_accessor :pre_orderable
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'ndc' => :'ndc',
31
+ :'name' => :'name',
32
+ :'pre_orderable' => :'preOrderable'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'ndc' => :'String',
50
+ :'name' => :'String',
51
+ :'pre_orderable' => :'Boolean'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CheckPhoneNumberAvailability200ResponseSoldOutAreasInner` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ acceptable_attribute_map = self.class.acceptable_attribute_map
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!acceptable_attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CheckPhoneNumberAvailability200ResponseSoldOutAreasInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'ndc')
78
+ self.ndc = attributes[:'ndc']
79
+ end
80
+
81
+ if attributes.key?(:'name')
82
+ self.name = attributes[:'name']
83
+ end
84
+
85
+ if attributes.key?(:'pre_orderable')
86
+ self.pre_orderable = attributes[:'pre_orderable']
87
+ end
88
+ end
89
+
90
+ # Show invalid properties with the reasons. Usually used together with valid?
91
+ # @return Array for valid properties with the reasons
92
+ def list_invalid_properties
93
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
94
+ invalid_properties = Array.new
95
+ invalid_properties
96
+ end
97
+
98
+ # Check to see if the all the properties in the model are valid
99
+ # @return true if the model is valid
100
+ def valid?
101
+ warn '[DEPRECATED] the `valid?` method is obsolete'
102
+ true
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ ndc == o.ndc &&
111
+ name == o.name &&
112
+ pre_orderable == o.pre_orderable
113
+ end
114
+
115
+ # @see the `==` method
116
+ # @param [Object] Object to be compared
117
+ def eql?(o)
118
+ self == o
119
+ end
120
+
121
+ # Calculates hash code according to all attributes.
122
+ # @return [Integer] Hash code
123
+ def hash
124
+ [ndc, name, pre_orderable].hash
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def self.build_from_hash(attributes)
131
+ return nil unless attributes.is_a?(Hash)
132
+ attributes = attributes.transform_keys(&:to_sym)
133
+ transformed_hash = {}
134
+ openapi_types.each_pair do |key, type|
135
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
136
+ transformed_hash["#{key}"] = nil
137
+ elsif type =~ /\AArray<(.*)>/i
138
+ # check to ensure the input is an array given that the attribute
139
+ # is documented as an array but the input is not
140
+ if attributes[attribute_map[key]].is_a?(Array)
141
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
142
+ end
143
+ elsif !attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
145
+ end
146
+ end
147
+ new(transformed_hash)
148
+ end
149
+
150
+ # Returns the object in the form of hash
151
+ # @return [Hash] Returns the object in the form of hash
152
+ def to_hash
153
+ hash = {}
154
+ self.class.attribute_map.each_pair do |attr, param|
155
+ value = self.send(attr)
156
+ if value.nil?
157
+ is_nullable = self.class.openapi_nullable.include?(attr)
158
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
159
+ end
160
+
161
+ hash[param] = _to_hash(value)
162
+ end
163
+ hash
164
+ end
165
+
166
+ end
167
+
168
+ end
@@ -21,6 +21,9 @@ module Zernio
21
21
  # Narrow the watch to one number type. Omit to be notified when any type in the country is back.
22
22
  attr_accessor :number_type
23
23
 
24
+ # Narrow the watch to one area code (NDC). Requires numberType.
25
+ attr_accessor :area_code
26
+
24
27
  class EnumAttributeValidator
25
28
  attr_reader :datatype
26
29
  attr_reader :allowable_values
@@ -47,7 +50,8 @@ module Zernio
47
50
  def self.attribute_map
48
51
  {
49
52
  :'country' => :'country',
50
- :'number_type' => :'numberType'
53
+ :'number_type' => :'numberType',
54
+ :'area_code' => :'areaCode'
51
55
  }
52
56
  end
53
57
 
@@ -65,7 +69,8 @@ module Zernio
65
69
  def self.openapi_types
66
70
  {
67
71
  :'country' => :'String',
68
- :'number_type' => :'String'
72
+ :'number_type' => :'String',
73
+ :'area_code' => :'String'
69
74
  }
70
75
  end
71
76
 
@@ -100,6 +105,10 @@ module Zernio
100
105
  if attributes.key?(:'number_type')
101
106
  self.number_type = attributes[:'number_type']
102
107
  end
108
+
109
+ if attributes.key?(:'area_code')
110
+ self.area_code = attributes[:'area_code']
111
+ end
103
112
  end
104
113
 
105
114
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -119,6 +128,11 @@ module Zernio
119
128
  invalid_properties.push('invalid value for "country", the character length must be greater than or equal to 2.')
120
129
  end
121
130
 
131
+ pattern = Regexp.new(/^\d{1,4}$/)
132
+ if !@area_code.nil? && @area_code !~ pattern
133
+ invalid_properties.push("invalid value for \"area_code\", must conform to the pattern #{pattern}.")
134
+ end
135
+
122
136
  invalid_properties
123
137
  end
124
138
 
@@ -131,6 +145,7 @@ module Zernio
131
145
  return false if @country.to_s.length < 2
132
146
  number_type_validator = EnumAttributeValidator.new('String', ["local", "mobile", "national", "toll_free"])
133
147
  return false unless number_type_validator.valid?(@number_type)
148
+ return false if !@area_code.nil? && @area_code !~ Regexp.new(/^\d{1,4}$/)
134
149
  true
135
150
  end
136
151
 
@@ -162,13 +177,29 @@ module Zernio
162
177
  @number_type = number_type
163
178
  end
164
179
 
180
+ # Custom attribute writer method with validation
181
+ # @param [Object] area_code Value to be assigned
182
+ def area_code=(area_code)
183
+ if area_code.nil?
184
+ fail ArgumentError, 'area_code cannot be nil'
185
+ end
186
+
187
+ pattern = Regexp.new(/^\d{1,4}$/)
188
+ if area_code !~ pattern
189
+ fail ArgumentError, "invalid value for \"area_code\", must conform to the pattern #{pattern}."
190
+ end
191
+
192
+ @area_code = area_code
193
+ end
194
+
165
195
  # Checks equality by comparing each attribute.
166
196
  # @param [Object] Object to be compared
167
197
  def ==(o)
168
198
  return true if self.equal?(o)
169
199
  self.class == o.class &&
170
200
  country == o.country &&
171
- number_type == o.number_type
201
+ number_type == o.number_type &&
202
+ area_code == o.area_code
172
203
  end
173
204
 
174
205
  # @see the `==` method
@@ -180,7 +211,7 @@ module Zernio
180
211
  # Calculates hash code according to all attributes.
181
212
  # @return [Integer] Hash code
182
213
  def hash
183
- [country, number_type].hash
214
+ [country, number_type, area_code].hash
184
215
  end
185
216
 
186
217
  # Builds the object from hash
@@ -25,6 +25,9 @@ module Zernio
25
25
  # The watched number type, or null when the watch covers every type in the country.
26
26
  attr_accessor :number_type
27
27
 
28
+ # The watched area code (NDC), or null when the watch covers every area.
29
+ attr_accessor :area_code
30
+
28
31
  attr_accessor :created_at
29
32
 
30
33
  class EnumAttributeValidator
@@ -56,6 +59,7 @@ module Zernio
56
59
  :'country' => :'country',
57
60
  :'country_name' => :'countryName',
58
61
  :'number_type' => :'numberType',
62
+ :'area_code' => :'areaCode',
59
63
  :'created_at' => :'createdAt'
60
64
  }
61
65
  end
@@ -77,6 +81,7 @@ module Zernio
77
81
  :'country' => :'String',
78
82
  :'country_name' => :'String',
79
83
  :'number_type' => :'String',
84
+ :'area_code' => :'String',
80
85
  :'created_at' => :'Time'
81
86
  }
82
87
  end
@@ -85,6 +90,7 @@ module Zernio
85
90
  def self.openapi_nullable
86
91
  Set.new([
87
92
  :'number_type',
93
+ :'area_code',
88
94
  ])
89
95
  end
90
96
 
@@ -128,6 +134,10 @@ module Zernio
128
134
  self.number_type = nil
129
135
  end
130
136
 
137
+ if attributes.key?(:'area_code')
138
+ self.area_code = attributes[:'area_code']
139
+ end
140
+
131
141
  if attributes.key?(:'created_at')
132
142
  self.created_at = attributes[:'created_at']
133
143
  else
@@ -231,6 +241,7 @@ module Zernio
231
241
  country == o.country &&
232
242
  country_name == o.country_name &&
233
243
  number_type == o.number_type &&
244
+ area_code == o.area_code &&
234
245
  created_at == o.created_at
235
246
  end
236
247
 
@@ -243,7 +254,7 @@ module Zernio
243
254
  # Calculates hash code according to all attributes.
244
255
  # @return [Integer] Hash code
245
256
  def hash
246
- [id, country, country_name, number_type, created_at].hash
257
+ [id, country, country_name, number_type, area_code, created_at].hash
247
258
  end
248
259
 
249
260
  # Builds the object from hash
@@ -37,6 +37,9 @@ module Zernio
37
37
  # 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.
38
38
  attr_accessor :area_code
39
39
 
40
+ # With areaCode: pre-order that area when it has no stock (an area listed in soldOutAreas with preOrderable true) instead of failing with AREA_CODE_UNAVAILABLE. The carrier sources a number in that area.
41
+ attr_accessor :pre_order
42
+
40
43
  # End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement.
41
44
  attr_accessor :end_user_first_name
42
45
 
@@ -62,6 +65,7 @@ module Zernio
62
65
  :'reuse_option_id' => :'reuseOptionId',
63
66
  :'reuse_from' => :'reuseFrom',
64
67
  :'area_code' => :'areaCode',
68
+ :'pre_order' => :'preOrder',
65
69
  :'end_user_first_name' => :'endUserFirstName',
66
70
  :'end_user_last_name' => :'endUserLastName',
67
71
  :'values' => :'values',
@@ -91,6 +95,7 @@ module Zernio
91
95
  :'reuse_option_id' => :'String',
92
96
  :'reuse_from' => :'String',
93
97
  :'area_code' => :'String',
98
+ :'pre_order' => :'Boolean',
94
99
  :'end_user_first_name' => :'String',
95
100
  :'end_user_last_name' => :'String',
96
101
  :'values' => :'Hash<String, String>',
@@ -159,6 +164,10 @@ module Zernio
159
164
  self.area_code = attributes[:'area_code']
160
165
  end
161
166
 
167
+ if attributes.key?(:'pre_order')
168
+ self.pre_order = attributes[:'pre_order']
169
+ end
170
+
162
171
  if attributes.key?(:'end_user_first_name')
163
172
  self.end_user_first_name = attributes[:'end_user_first_name']
164
173
  end
@@ -291,6 +300,7 @@ module Zernio
291
300
  reuse_option_id == o.reuse_option_id &&
292
301
  reuse_from == o.reuse_from &&
293
302
  area_code == o.area_code &&
303
+ pre_order == o.pre_order &&
294
304
  end_user_first_name == o.end_user_first_name &&
295
305
  end_user_last_name == o.end_user_last_name &&
296
306
  values == o.values &&
@@ -307,7 +317,7 @@ module Zernio
307
317
  # Calculates hash code according to all attributes.
308
318
  # @return [Integer] Hash code
309
319
  def hash
310
- [profile_id, country, submission_id, quantity, reuse, reuse_option_id, reuse_from, area_code, end_user_first_name, end_user_last_name, values, documents, address].hash
320
+ [profile_id, country, submission_id, quantity, reuse, reuse_option_id, reuse_from, area_code, pre_order, end_user_first_name, end_user_last_name, values, documents, address].hash
311
321
  end
312
322
 
313
323
  # Builds the object from hash
@@ -37,6 +37,9 @@ module Zernio
37
37
  # 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.
38
38
  attr_accessor :area_code
39
39
 
40
+ # With areaCode: pre-order that area when it has no stock (an area listed in soldOutAreas with preOrderable true) instead of failing with AREA_CODE_UNAVAILABLE. The carrier sources a number in that area.
41
+ attr_accessor :pre_order
42
+
40
43
  # End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement.
41
44
  attr_accessor :end_user_first_name
42
45
 
@@ -62,6 +65,7 @@ module Zernio
62
65
  :'reuse_option_id' => :'reuseOptionId',
63
66
  :'reuse_from' => :'reuseFrom',
64
67
  :'area_code' => :'areaCode',
68
+ :'pre_order' => :'preOrder',
65
69
  :'end_user_first_name' => :'endUserFirstName',
66
70
  :'end_user_last_name' => :'endUserLastName',
67
71
  :'values' => :'values',
@@ -91,6 +95,7 @@ module Zernio
91
95
  :'reuse_option_id' => :'String',
92
96
  :'reuse_from' => :'String',
93
97
  :'area_code' => :'String',
98
+ :'pre_order' => :'Boolean',
94
99
  :'end_user_first_name' => :'String',
95
100
  :'end_user_last_name' => :'String',
96
101
  :'values' => :'Hash<String, String>',
@@ -159,6 +164,10 @@ module Zernio
159
164
  self.area_code = attributes[:'area_code']
160
165
  end
161
166
 
167
+ if attributes.key?(:'pre_order')
168
+ self.pre_order = attributes[:'pre_order']
169
+ end
170
+
162
171
  if attributes.key?(:'end_user_first_name')
163
172
  self.end_user_first_name = attributes[:'end_user_first_name']
164
173
  end
@@ -291,6 +300,7 @@ module Zernio
291
300
  reuse_option_id == o.reuse_option_id &&
292
301
  reuse_from == o.reuse_from &&
293
302
  area_code == o.area_code &&
303
+ pre_order == o.pre_order &&
294
304
  end_user_first_name == o.end_user_first_name &&
295
305
  end_user_last_name == o.end_user_last_name &&
296
306
  values == o.values &&
@@ -307,7 +317,7 @@ module Zernio
307
317
  # Calculates hash code according to all attributes.
308
318
  # @return [Integer] Hash code
309
319
  def hash
310
- [profile_id, country, submission_id, quantity, reuse, reuse_option_id, reuse_from, area_code, end_user_first_name, end_user_last_name, values, documents, address].hash
320
+ [profile_id, country, submission_id, quantity, reuse, reuse_option_id, reuse_from, area_code, pre_order, end_user_first_name, end_user_last_name, values, documents, address].hash
311
321
  end
312
322
 
313
323
  # Builds the object from hash
@@ -21,11 +21,19 @@ module Zernio
21
21
  # Number types deliverable at sweep time. Only types with stock are listed.
22
22
  attr_accessor :types
23
23
 
24
+ # Set when the watch named an area: the area code (NDC) that is back in stock.
25
+ attr_accessor :area_code
26
+
27
+ # The name of that area, when known.
28
+ attr_accessor :area_name
29
+
24
30
  # Attribute mapping from ruby-style variable name to JSON key.
25
31
  def self.attribute_map
26
32
  {
27
33
  :'country' => :'country',
28
- :'types' => :'types'
34
+ :'types' => :'types',
35
+ :'area_code' => :'areaCode',
36
+ :'area_name' => :'areaName'
29
37
  }
30
38
  end
31
39
 
@@ -43,7 +51,9 @@ module Zernio
43
51
  def self.openapi_types
44
52
  {
45
53
  :'country' => :'String',
46
- :'types' => :'Array<WebhookPayloadPhoneNumberStockAvailableStockTypesInner>'
54
+ :'types' => :'Array<WebhookPayloadPhoneNumberStockAvailableStockTypesInner>',
55
+ :'area_code' => :'String',
56
+ :'area_name' => :'String'
47
57
  }
48
58
  end
49
59
 
@@ -82,6 +92,14 @@ module Zernio
82
92
  else
83
93
  self.types = nil
84
94
  end
95
+
96
+ if attributes.key?(:'area_code')
97
+ self.area_code = attributes[:'area_code']
98
+ end
99
+
100
+ if attributes.key?(:'area_name')
101
+ self.area_name = attributes[:'area_name']
102
+ end
85
103
  end
86
104
 
87
105
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -135,7 +153,9 @@ module Zernio
135
153
  return true if self.equal?(o)
136
154
  self.class == o.class &&
137
155
  country == o.country &&
138
- types == o.types
156
+ types == o.types &&
157
+ area_code == o.area_code &&
158
+ area_name == o.area_name
139
159
  end
140
160
 
141
161
  # @see the `==` method
@@ -147,7 +167,7 @@ module Zernio
147
167
  # Calculates hash code according to all attributes.
148
168
  # @return [Integer] Hash code
149
169
  def hash
150
- [country, types].hash
170
+ [country, types, area_code, area_name].hash
151
171
  end
152
172
 
153
173
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Zernio
14
- VERSION = '0.0.957'
14
+ VERSION = '0.0.959'
15
15
  end
data/lib/zernio-sdk.rb CHANGED
@@ -213,6 +213,7 @@ require 'zernio-sdk/models/channel_picker_channels_inner'
213
213
  require 'zernio-sdk/models/channel_picker_team'
214
214
  require 'zernio-sdk/models/check_phone_number_availability200_response'
215
215
  require 'zernio-sdk/models/check_phone_number_availability200_response_area_options_inner'
216
+ require 'zernio-sdk/models/check_phone_number_availability200_response_sold_out_areas_inner'
216
217
  require 'zernio-sdk/models/check_phone_number_portability200_response'
217
218
  require 'zernio-sdk/models/check_phone_number_portability200_response_results_inner'
218
219
  require 'zernio-sdk/models/check_phone_number_portability_request'
data/openapi.yaml CHANGED
@@ -3044,6 +3044,9 @@ components:
3044
3044
  type: [string, "null"]
3045
3045
  enum: [local, mobile, national, toll_free, null]
3046
3046
  description: 'The watched number type, or null when the watch covers every type in the country.'
3047
+ areaCode:
3048
+ type: [string, "null"]
3049
+ description: 'The watched area code (NDC), or null when the watch covers every area.'
3047
3050
  createdAt: { type: string, format: date-time }
3048
3051
  WebhookPayloadPhoneNumberStockAvailable:
3049
3052
  type: object
@@ -3072,6 +3075,8 @@ components:
3072
3075
  properties:
3073
3076
  numberType: { type: string, description: 'local, mobile, national or toll_free.' }
3074
3077
  availableCount: { type: integer, description: 'Deliverable numbers at sweep time; first come, first served.' }
3078
+ areaCode: { type: string, description: 'Set when the watch named an area: the area code (NDC) that is back in stock.' }
3079
+ areaName: { type: string, description: 'The name of that area, when known.' }
3075
3080
  timestamp:
3076
3081
  type: string
3077
3082
  format: date-time
@@ -33502,6 +33507,11 @@ paths:
33502
33507
  text: { type: string }
33503
33508
  created: { type: string, format: date-time }
33504
33509
  platform: { type: string }
33510
+ '400':
33511
+ description: "Facebook refused the reply for this review (code platform_api_error, platform facebook, Meta error 12 echoed in platformError). Permanent for that review: Graph cannot address its underlying post, and it usually already carries a reply from the Page, which the review listing reports under hasReply. Do not retry."
33512
+ content:
33513
+ application/json:
33514
+ schema: { $ref: '#/components/schemas/ErrorResponse' }
33505
33515
  '401': { $ref: '#/components/responses/Unauthorized' }
33506
33516
  '403':
33507
33517
  description: Inbox addon required
@@ -37352,6 +37362,19 @@ paths:
37352
37362
  ndc: { type: string, description: 'Area code (national destination code), e.g. "11".' }
37353
37363
  name: { type: string, description: 'Area name: "City, ST" for US/CA (e.g. "Miami, FL"), city otherwise (e.g. "Sao Paulo").' }
37354
37364
  count: { type: integer, description: 'Numbers available in this area: country-wide count for US/CA, numbers seen on the latest inventory page otherwise.' }
37365
+ soldOutAreas:
37366
+ type: array
37367
+ description: >
37368
+ Areas that had stock in the last 90 days and have none
37369
+ now. Pass one as `areaCode` with `preOrder: true` on the
37370
+ KYC submit when `preOrderable` is true, or watch it with
37371
+ POST /v1/phone-numbers/stock-watches.
37372
+ items:
37373
+ type: object
37374
+ properties:
37375
+ ndc: { type: string, description: 'Area code (national destination code).' }
37376
+ name: { type: string, description: 'Area name.' }
37377
+ preOrderable: { type: boolean, description: 'Whether this area can be pre-ordered: the carrier sources a number in it (usually 2 to 4 weeks, never guaranteed).' }
37355
37378
  '400': { description: 'Country not offerable, or the inventory provider rejected the lookup (its 4xx status is forwarded as-is).' }
37356
37379
  '401': { $ref: '#/components/responses/Unauthorized' }
37357
37380
  '502': { description: 'The inventory provider was unreachable or returned an unclassified error.' }
@@ -37748,6 +37771,19 @@ paths:
37748
37771
  ndc: { type: string, description: 'Area code (national destination code), e.g. "11".' }
37749
37772
  name: { type: string, description: 'Area name: "City, ST" for US/CA (e.g. "Miami, FL"), city otherwise (e.g. "Sao Paulo").' }
37750
37773
  count: { type: integer, description: 'Numbers available in this area: country-wide count for US/CA, numbers seen on the latest inventory page otherwise.' }
37774
+ soldOutAreas:
37775
+ type: array
37776
+ description: >
37777
+ Areas that had stock in the last 90 days and have none
37778
+ now. Pass one as `areaCode` with `preOrder: true` on the
37779
+ KYC submit when `preOrderable` is true, or watch it with
37780
+ POST /v1/phone-numbers/stock-watches.
37781
+ items:
37782
+ type: object
37783
+ properties:
37784
+ ndc: { type: string, description: 'Area code (national destination code).' }
37785
+ name: { type: string, description: 'Area name.' }
37786
+ preOrderable: { type: boolean, description: 'Whether this area can be pre-ordered: the carrier sources a number in it (usually 2 to 4 weeks, never guaranteed).' }
37751
37787
  '400': { description: 'Country not offerable, or the inventory provider rejected the lookup (its 4xx status is forwarded as-is).' }
37752
37788
  '401': { $ref: '#/components/responses/Unauthorized' }
37753
37789
  '502': { description: 'The inventory provider was unreachable or returned an unclassified error.' }
@@ -37863,6 +37899,7 @@ paths:
37863
37899
  reuseOptionId: { type: string, description: 'Which reusable verification to use (GET reusable.options[].id). The unambiguous selection key. Omitted = the approved default. No match = 409.' }
37864
37900
  reuseFrom: { type: string, description: 'Legacy fallback for `reuseOptionId`: the source phone number (GET reusable.options[].fromPhoneNumber). Ambiguous when a number labels two verifications, so prefer `reuseOptionId`. Omitted = the approved default. No match = 409.' }
37865
37901
  areaCode: { type: string, pattern: '^\d{1,4}$', description: '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.' }
37902
+ preOrder: { type: boolean, description: 'With areaCode: pre-order that area when it has no stock (an area listed in soldOutAreas with preOrderable true) instead of failing with AREA_CODE_UNAVAILABLE. The carrier sources a number in that area.' }
37866
37903
  endUserFirstName: { type: string, description: End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement. }
37867
37904
  endUserLastName: { type: string, description: End user's legal last name. Same condition as endUserFirstName. }
37868
37905
  values:
@@ -38857,6 +38894,7 @@ paths:
38857
38894
  reuseOptionId: { type: string, description: 'Which reusable verification to use (GET reusable.options[].id). The unambiguous selection key. Omitted = the approved default. No match = 409.' }
38858
38895
  reuseFrom: { type: string, description: 'Legacy fallback for `reuseOptionId`: the source phone number (GET reusable.options[].fromPhoneNumber). Ambiguous when a number labels two verifications, so prefer `reuseOptionId`. Omitted = the approved default. No match = 409.' }
38859
38896
  areaCode: { type: string, pattern: '^\d{1,4}$', description: '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.' }
38897
+ preOrder: { type: boolean, description: 'With areaCode: pre-order that area when it has no stock (an area listed in soldOutAreas with preOrderable true) instead of failing with AREA_CODE_UNAVAILABLE. The carrier sources a number in that area.' }
38860
38898
  endUserFirstName: { type: string, description: End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement. }
38861
38899
  endUserLastName: { type: string, description: End user's legal last name. Same condition as endUserFirstName. }
38862
38900
  values:
@@ -39377,6 +39415,11 @@ paths:
39377
39415
  GET /v1/phone-numbers/countries can also be watched, but anything with
39378
39416
  `preOrderable: true` does not need a watch: submit KYC and the carrier
39379
39417
  sources the number to order.
39418
+
39419
+ Pass `areaCode` (with `numberType`) to watch one sold-out area, for
39420
+ example an entry of `soldOutAreas` from
39421
+ GET /v1/phone-numbers/availability. Area stock is checked live on the
39422
+ same 6h cadence.
39380
39423
  security:
39381
39424
  - bearerAuth: []
39382
39425
  requestBody:
@@ -39392,6 +39435,7 @@ paths:
39392
39435
  type: string
39393
39436
  enum: [local, mobile, national, toll_free]
39394
39437
  description: 'Narrow the watch to one number type. Omit to be notified when any type in the country is back.'
39438
+ areaCode: { type: string, pattern: '^\d{1,4}$', description: 'Narrow the watch to one area code (NDC). Requires numberType.' }
39395
39439
  responses:
39396
39440
  '201':
39397
39441
  description: Watch created.
@@ -39407,7 +39451,7 @@ paths:
39407
39451
  $ref: '#/components/schemas/PhoneNumberStockWatch'
39408
39452
  '400': { $ref: '#/components/responses/BadRequest' }
39409
39453
  '401': { $ref: '#/components/responses/Unauthorized' }
39410
- '409': { description: 'The country is in stock right now (buy instead of watching), or the 20-country watch limit is reached (code invalid_resource_state).' }
39454
+ '409': { description: 'The country (or the watched area) is in stock right now (buy instead of watching), or the 20-watch limit is reached (code invalid_resource_state).' }
39411
39455
  get:
39412
39456
  x-resource-group: "telephony"
39413
39457
  operationId: listPhoneNumberStockWatches
@@ -96,7 +96,7 @@ describe 'PhoneNumbersApi' do
96
96
 
97
97
  # unit tests for create_phone_number_stock_watch
98
98
  # Watch an out-of-stock country
99
- # Get notified the first time an out-of-stock country has deliverable numbers again: an email to the account holder plus the &#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.
99
+ # 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. Pass &#x60;areaCode&#x60; (with &#x60;numberType&#x60;) to watch one sold-out area, for example an entry of &#x60;soldOutAreas&#x60; from GET /v1/phone-numbers/availability. Area stock is checked live on the same 6h cadence.
100
100
  # @param create_phone_number_stock_watch_request
101
101
  # @param [Hash] opts the optional parameters
102
102
  # @return [PhoneNumberStockWatch]
@@ -0,0 +1,48 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Zernio::CheckPhoneNumberAvailability200ResponseSoldOutAreasInner
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zernio::CheckPhoneNumberAvailability200ResponseSoldOutAreasInner do
21
+ #let(:instance) { Zernio::CheckPhoneNumberAvailability200ResponseSoldOutAreasInner.new }
22
+
23
+ describe 'test an instance of CheckPhoneNumberAvailability200ResponseSoldOutAreasInner' do
24
+ it 'should create an instance of CheckPhoneNumberAvailability200ResponseSoldOutAreasInner' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zernio::CheckPhoneNumberAvailability200ResponseSoldOutAreasInner)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "ndc"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "name"' 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 "pre_orderable"' 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
+ end
@@ -73,4 +73,10 @@ describe Zernio::CheckPhoneNumberAvailability200Response do
73
73
  end
74
74
  end
75
75
 
76
+ describe 'test attribute "sold_out_areas"' do
77
+ it 'should work' do
78
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
79
+ end
80
+ end
81
+
76
82
  end
@@ -43,4 +43,10 @@ describe Zernio::CreatePhoneNumberStockWatchRequest do
43
43
  end
44
44
  end
45
45
 
46
+ describe 'test attribute "area_code"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
49
+ end
50
+ end
51
+
46
52
  end
@@ -55,6 +55,12 @@ describe Zernio::PhoneNumberStockWatch do
55
55
  end
56
56
  end
57
57
 
58
+ describe 'test attribute "area_code"' 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 "created_at"' do
59
65
  it 'should work' do
60
66
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -75,6 +75,12 @@ describe Zernio::SubmitPhoneNumberKycRequest do
75
75
  end
76
76
  end
77
77
 
78
+ describe 'test attribute "pre_order"' do
79
+ it 'should work' do
80
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
81
+ end
82
+ end
83
+
78
84
  describe 'test attribute "end_user_first_name"' do
79
85
  it 'should work' do
80
86
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -75,6 +75,12 @@ describe Zernio::SubmitWhatsAppNumberKycRequest do
75
75
  end
76
76
  end
77
77
 
78
+ describe 'test attribute "pre_order"' do
79
+ it 'should work' do
80
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
81
+ end
82
+ end
83
+
78
84
  describe 'test attribute "end_user_first_name"' do
79
85
  it 'should work' do
80
86
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -39,4 +39,16 @@ describe Zernio::WebhookPayloadPhoneNumberStockAvailableStock do
39
39
  end
40
40
  end
41
41
 
42
+ describe 'test attribute "area_code"' 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 "area_name"' 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
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.957
4
+ version: 0.0.959
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
@@ -279,6 +279,7 @@ files:
279
279
  - docs/ChannelPickerTeam.md
280
280
  - docs/CheckPhoneNumberAvailability200Response.md
281
281
  - docs/CheckPhoneNumberAvailability200ResponseAreaOptionsInner.md
282
+ - docs/CheckPhoneNumberAvailability200ResponseSoldOutAreasInner.md
282
283
  - docs/CheckPhoneNumberPortability200Response.md
283
284
  - docs/CheckPhoneNumberPortability200ResponseResultsInner.md
284
285
  - docs/CheckPhoneNumberPortabilityRequest.md
@@ -2475,6 +2476,7 @@ files:
2475
2476
  - lib/zernio-sdk/models/channel_picker_team.rb
2476
2477
  - lib/zernio-sdk/models/check_phone_number_availability200_response.rb
2477
2478
  - lib/zernio-sdk/models/check_phone_number_availability200_response_area_options_inner.rb
2479
+ - lib/zernio-sdk/models/check_phone_number_availability200_response_sold_out_areas_inner.rb
2478
2480
  - lib/zernio-sdk/models/check_phone_number_portability200_response.rb
2479
2481
  - lib/zernio-sdk/models/check_phone_number_portability200_response_results_inner.rb
2480
2482
  - lib/zernio-sdk/models/check_phone_number_portability_request.rb
@@ -4611,6 +4613,7 @@ files:
4611
4613
  - spec/models/channel_picker_spec.rb
4612
4614
  - spec/models/channel_picker_team_spec.rb
4613
4615
  - spec/models/check_phone_number_availability200_response_area_options_inner_spec.rb
4616
+ - spec/models/check_phone_number_availability200_response_sold_out_areas_inner_spec.rb
4614
4617
  - spec/models/check_phone_number_availability200_response_spec.rb
4615
4618
  - spec/models/check_phone_number_portability200_response_results_inner_spec.rb
4616
4619
  - spec/models/check_phone_number_portability200_response_spec.rb
@@ -6484,7 +6487,7 @@ files:
6484
6487
  - spec/models/you_tube_video_retention_response_retention_curve_inner_spec.rb
6485
6488
  - spec/models/you_tube_video_retention_response_spec.rb
6486
6489
  - spec/spec_helper.rb
6487
- - zernio-sdk-0.0.957.gem
6490
+ - zernio-sdk-0.0.959.gem
6488
6491
  - zernio-sdk.gemspec
6489
6492
  homepage: https://openapi-generator.tech
6490
6493
  licenses:
@@ -7243,6 +7246,7 @@ test_files:
7243
7246
  - spec/models/list_local_services_lead_conversations200_response_data_inner_spec.rb
7244
7247
  - spec/models/upload_phone_number_port_in_document200_response_spec.rb
7245
7248
  - spec/models/analytics_delta_entry_spec.rb
7249
+ - spec/models/check_phone_number_availability200_response_sold_out_areas_inner_spec.rb
7246
7250
  - spec/models/list_partnership_ad_permissions200_response_permissions_inner_spec.rb
7247
7251
  - spec/models/update_google_business_location_details_request_regular_hours_spec.rb
7248
7252
  - spec/models/get_campaign_ad_schedule200_response_spec.rb
Binary file