late-sdk 0.0.902 → 0.0.904

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 (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -0
  3. data/docs/CheckPhoneNumberAvailability200Response.md +2 -0
  4. data/docs/ListPhoneNumberCountries200ResponseCountriesInner.md +2 -0
  5. data/docs/ListPhoneNumberCountries200ResponseCountriesInnerTypesInner.md +6 -2
  6. data/docs/PhoneNumbersApi.md +1 -1
  7. data/docs/SubmitPhoneNumberKyc200Response.md +2 -0
  8. data/docs/WebhookPayloadMessageMetadata.md +2 -0
  9. data/docs/WebhookPayloadMessageMetadataLocation.md +24 -0
  10. data/docs/WebhookPayloadMessageSentMetadata.md +4 -0
  11. data/docs/WebhookPayloadMessageSentMetadataLocation.md +24 -0
  12. data/lib/zernio-sdk/api/phone_numbers_api.rb +2 -2
  13. data/lib/zernio-sdk/models/check_phone_number_availability200_response.rb +11 -1
  14. data/lib/zernio-sdk/models/list_phone_number_countries200_response_countries_inner.rb +11 -1
  15. data/lib/zernio-sdk/models/list_phone_number_countries200_response_countries_inner_types_inner.rb +38 -4
  16. data/lib/zernio-sdk/models/submit_phone_number_kyc200_response.rb +11 -1
  17. data/lib/zernio-sdk/models/webhook_payload_message_metadata.rb +10 -1
  18. data/lib/zernio-sdk/models/webhook_payload_message_metadata_location.rb +179 -0
  19. data/lib/zernio-sdk/models/webhook_payload_message_sent_metadata.rb +23 -2
  20. data/lib/zernio-sdk/models/webhook_payload_message_sent_metadata_location.rb +179 -0
  21. data/lib/zernio-sdk/version.rb +1 -1
  22. data/lib/zernio-sdk.rb +2 -0
  23. data/openapi.yaml +49 -5
  24. data/spec/api/phone_numbers_api_spec.rb +1 -1
  25. data/spec/models/check_phone_number_availability200_response_spec.rb +6 -0
  26. data/spec/models/list_phone_number_countries200_response_countries_inner_spec.rb +6 -0
  27. data/spec/models/list_phone_number_countries200_response_countries_inner_types_inner_spec.rb +16 -0
  28. data/spec/models/submit_phone_number_kyc200_response_spec.rb +6 -0
  29. data/spec/models/webhook_payload_message_metadata_location_spec.rb +54 -0
  30. data/spec/models/webhook_payload_message_metadata_spec.rb +6 -0
  31. data/spec/models/webhook_payload_message_sent_metadata_location_spec.rb +54 -0
  32. data/spec/models/webhook_payload_message_sent_metadata_spec.rb +12 -0
  33. data/zernio-sdk-0.0.904.gem +0 -0
  34. metadata +10 -2
  35. data/zernio-sdk-0.0.902.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c5d379a91345746ce9ab4bc3c22ecbbc977cc6e833cd8b9b7932c74e21f54fef
4
- data.tar.gz: 0e55c12372464eb96a56137b75275a5220f33b844ec9669db8069288d8d97b22
3
+ metadata.gz: c0e7e92a18a0b4ffef10dc9526ff7f50aef4136b4706e646cf50bd57757ec768
4
+ data.tar.gz: 9a416747623893629b1f70bd2e6bdc0929de2319b915cee948a4b4bf19e729ab
5
5
  SHA512:
6
- metadata.gz: ca4314c5de5fc549276e59842073bf1ee88b8a2ba1c18131af016e2592476b52550ac95e6586bbc65e2ba9c6a339fbd82edd748185c60cf54d04f26fb5e99550
7
- data.tar.gz: 3a5974028c63cb8ec3a1653c053bdbcfd843e2a9cee39601a807cb03150ebb3330ff7a19c03d7ee4c7b523f96814db91e11864a6e33a25a0a278008c73570c76
6
+ metadata.gz: 0d39b519f7cd61826546aaf7a9fa41fd4a7540d094da5c179af6448758e89c88bf1530255d1ff47496314957055e8ec80545c6ee60865418a433501e06030b24
7
+ data.tar.gz: 4133f345fc4e8efb6ea5fa6994d29470dd356371787993cb24d7cd19272df54c4fb0320694e585389d24037f83469f057cc94c27aac8a8c1ed4986f3f6513c58
data/README.md CHANGED
@@ -2681,6 +2681,7 @@ Class | Method | HTTP request | Description
2681
2681
  - [Zernio::WebhookPayloadMessageMessageSender](docs/WebhookPayloadMessageMessageSender.md)
2682
2682
  - [Zernio::WebhookPayloadMessageMessageSenderInstagramProfile](docs/WebhookPayloadMessageMessageSenderInstagramProfile.md)
2683
2683
  - [Zernio::WebhookPayloadMessageMetadata](docs/WebhookPayloadMessageMetadata.md)
2684
+ - [Zernio::WebhookPayloadMessageMetadataLocation](docs/WebhookPayloadMessageMetadataLocation.md)
2684
2685
  - [Zernio::WebhookPayloadMessageMetadataOrder](docs/WebhookPayloadMessageMetadataOrder.md)
2685
2686
  - [Zernio::WebhookPayloadMessageMetadataOrderProductItemsInner](docs/WebhookPayloadMessageMetadataOrderProductItemsInner.md)
2686
2687
  - [Zernio::WebhookPayloadMessageMetadataQuotedMessage](docs/WebhookPayloadMessageMetadataQuotedMessage.md)
@@ -2694,6 +2695,7 @@ Class | Method | HTTP request | Description
2694
2695
  - [Zernio::WebhookPayloadMessageSentMessageAttachmentsInner](docs/WebhookPayloadMessageSentMessageAttachmentsInner.md)
2695
2696
  - [Zernio::WebhookPayloadMessageSentMessageSender](docs/WebhookPayloadMessageSentMessageSender.md)
2696
2697
  - [Zernio::WebhookPayloadMessageSentMetadata](docs/WebhookPayloadMessageSentMetadata.md)
2698
+ - [Zernio::WebhookPayloadMessageSentMetadataLocation](docs/WebhookPayloadMessageSentMetadataLocation.md)
2697
2699
  - [Zernio::WebhookPayloadPhoneNumberStockAvailable](docs/WebhookPayloadPhoneNumberStockAvailable.md)
2698
2700
  - [Zernio::WebhookPayloadPhoneNumberStockAvailableStock](docs/WebhookPayloadPhoneNumberStockAvailableStock.md)
2699
2701
  - [Zernio::WebhookPayloadPhoneNumberStockAvailableStockTypesInner](docs/WebhookPayloadPhoneNumberStockAvailableStockTypesInner.md)
@@ -7,6 +7,7 @@
7
7
  | **country** | **String** | | [optional] |
8
8
  | **number_type** | **String** | | [optional] |
9
9
  | **available** | **Boolean** | Whether deliverable voice inventory exists right now. | [optional] |
10
+ | **pre_orderable** | **Boolean** | Nothing deliverable now, but this pair can be pre-ordered: submit KYC as usual and the carrier sources the number after review (usually about 3 weeks, never guaranteed). Only document tiers (3/4) qualify. | [optional] |
10
11
  | **address_constraint** | **String** | | [optional] |
11
12
  | **areas** | **Array<String>** | For `geo` only: the area(s) the registered address must be in. | [optional] |
12
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] |
@@ -20,6 +21,7 @@ instance = Zernio::CheckPhoneNumberAvailability200Response.new(
20
21
  country: null,
21
22
  number_type: null,
22
23
  available: null,
24
+ pre_orderable: null,
23
25
  address_constraint: null,
24
26
  areas: null,
25
27
  area_options: null
@@ -13,6 +13,7 @@
13
13
  | **sms_available** | **Boolean** | Whether this country's number type can do SMS. Use it to filter the picker when the buyer wants SMS (pair with `wantsSms` on purchase). | [optional] |
14
14
  | **outbound_calling_available** | **Boolean** | WhatsApp Business Calling (BIC) outbound availability, a Meta feature blocked in some countries. NOT the PSTN Calls feature (`callsAvailable`). | [optional] |
15
15
  | **in_stock** | **Boolean** | Live carrier-stock snapshot (refreshed every 6h + on availability checks): false when NO offered type currently has deliverable inventory, so a purchase would fail. Treat as advisory; the purchase itself re-checks. | [optional] |
16
+ | **pre_orderable** | **Boolean** | At least one out-of-stock type here can be pre-ordered (see `types[].preOrderable`). | [optional] |
16
17
  | **types** | [**Array<ListPhoneNumberCountries200ResponseCountriesInnerTypesInner>**](ListPhoneNumberCountries200ResponseCountriesInnerTypesInner.md) | Every number type offered in this country (default first). Capabilities, KYC tier, monthly price, and stock are per type. The country-level fields above mirror the first (default) entry. Pass the chosen `numberType` to POST /v1/phone-numbers/purchase. | [optional] |
17
18
 
18
19
  ## Example
@@ -30,6 +31,7 @@ instance = Zernio::ListPhoneNumberCountries200ResponseCountriesInner.new(
30
31
  sms_available: null,
31
32
  outbound_calling_available: null,
32
33
  in_stock: null,
34
+ pre_orderable: null,
33
35
  types: null
34
36
  )
35
37
  ```
@@ -5,13 +5,15 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **number_type** | **String** | | [optional] |
8
- | **tier** | **Integer** | | [optional] |
8
+ | **tier** | **Integer** | Null on a `fulfilment: request` type, whose document tier is only known once its requirements are read. | [optional] |
9
9
  | **needs_kyc** | **Boolean** | | [optional] |
10
10
  | **monthly_cents** | **Integer** | Price a NEW number of this type costs per month, in cents. | [optional] |
11
11
  | **whatsapp_available** | **Boolean** | Always false for toll_free (WhatsApp does not reliably register toll-free numbers). | [optional] |
12
12
  | **sms_available** | **Boolean** | | [optional] |
13
13
  | **calls_available** | **Boolean** | | [optional] |
14
14
  | **in_stock** | **Boolean** | | [optional] |
15
+ | **fulfilment** | **String** | `request`: the carrier stocks this type nowhere and only sources it to order, so it is always a pre-order. | [optional] |
16
+ | **pre_orderable** | **Boolean** | Out of stock but orderable anyway. Submit KYC as usual (POST /v1/phone-numbers/kyc) and the carrier sources the number after review, usually about 3 weeks and never guaranteed. Only document tiers (3/4) qualify, and nothing is billed until the number is active. | [optional] |
15
17
 
16
18
  ## Example
17
19
 
@@ -26,7 +28,9 @@ instance = Zernio::ListPhoneNumberCountries200ResponseCountriesInnerTypesInner.n
26
28
  whatsapp_available: null,
27
29
  sms_available: null,
28
30
  calls_available: null,
29
- in_stock: null
31
+ in_stock: null,
32
+ fulfilment: null,
33
+ pre_orderable: null
30
34
  )
31
35
  ```
32
36
 
@@ -391,7 +391,7 @@ end
391
391
 
392
392
  Watch an out-of-stock country
393
393
 
394
- Get notified the first time an out-of-stock country has deliverable numbers again: an email to the account holder plus the `phone_number.stock_available` webhook. Stock is re-checked every 6h. One watch per country and number type; a repeat request returns the existing watch (200). The watch is consumed when it fires, so re-create it if you miss the stock. Up to 20 watches at once. Countries and types marked `fulfilment: request` by GET /v1/phone-numbers/countries can also be watched. Those are sourced by a carrier request rather than held in stock, so a watch records interest and no date is implied.
394
+ Get notified the first time an out-of-stock country has deliverable numbers again: an email to the account holder plus the `phone_number.stock_available` webhook. Stock is re-checked every 6h. One watch per country and number type; a repeat request returns the existing watch (200). The watch is consumed when it fires, so re-create it if you miss the stock. Up to 20 watches at once. Countries and types marked `fulfilment: request` by GET /v1/phone-numbers/countries can also be watched, but anything with `preOrderable: true` does not need a watch: submit KYC and the carrier sources the number to order.
395
395
 
396
396
  ### Examples
397
397
 
@@ -5,6 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **status** | **String** | | [optional] |
8
+ | **pre_order** | **Boolean** | True when nothing was in stock and this submission placed a pre-order. The number stays `pending_regulatory` until the carrier sources it (usually about 3 weeks) and is not billed until active. A pre-order is one number: `quantity` above 1 is rejected with 400. | [optional] |
8
9
  | **phone_number** | [**SubmitPhoneNumberKyc200ResponsePhoneNumber**](SubmitPhoneNumberKyc200ResponsePhoneNumber.md) | | [optional] |
9
10
  | **numbers** | [**Array<SubmitPhoneNumberKyc200ResponseNumbersInner>**](SubmitPhoneNumberKyc200ResponseNumbersInner.md) | Every number provisioned from this submission. Length equals the requested `quantity` on full success (fewer if some orders failed; best-effort). The first element mirrors `phoneNumber`. | [optional] |
10
11
 
@@ -15,6 +16,7 @@ require 'zernio-sdk'
15
16
 
16
17
  instance = Zernio::SubmitPhoneNumberKyc200Response.new(
17
18
  status: null,
19
+ pre_order: null,
18
20
  phone_number: null,
19
21
  numbers: null
20
22
  )
@@ -19,6 +19,7 @@
19
19
  | **nfm_reply_name** | **String** | WhatsApp only. `nfm_reply.name` as Meta sent it, e.g. `flow` or `address_message`. Address submissions share the `nfm_reply` envelope with Flow submissions and are otherwise indistinguishable in `flowResponseData`; use this field to tell them apart. | [optional] |
20
20
  | **order** | [**WebhookPayloadMessageMetadataOrder**](WebhookPayloadMessageMetadataOrder.md) | | [optional] |
21
21
  | **referred_product** | [**WebhookPayloadMessageMetadataReferredProduct**](WebhookPayloadMessageMetadataReferredProduct.md) | | [optional] |
22
+ | **location** | [**WebhookPayloadMessageMetadataLocation**](WebhookPayloadMessageMetadataLocation.md) | | [optional] |
22
23
  | **contacts** | **Array<Hash<String, Object>>** | WhatsApp only. Contact cards the user shared, forwarded verbatim from Meta. Read `contactsOrigin` before treating any number here as the sender's own. | [optional] |
23
24
  | **contacts_origin** | **String** | WhatsApp only. How the contact card was shared. `contact_request` means the user tapped a `request_contact_info` button, so the number is their own and consented. `other` means they picked a card from their address book: it may be anyone's, and must NOT be stored as the sender's identity. Omitted when Meta sends no origin. | [optional] |
24
25
  | **story_reply** | [**WebhookPayloadMessageMetadataStoryReply**](WebhookPayloadMessageMetadataStoryReply.md) | | [optional] |
@@ -48,6 +49,7 @@ instance = Zernio::WebhookPayloadMessageMetadata.new(
48
49
  nfm_reply_name: null,
49
50
  order: null,
50
51
  referred_product: null,
52
+ location: null,
51
53
  contacts: null,
52
54
  contacts_origin: null,
53
55
  story_reply: null,
@@ -0,0 +1,24 @@
1
+ # Zernio::WebhookPayloadMessageMetadataLocation
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **latitude** | **Float** | Latitude in decimal degrees. | [optional] |
8
+ | **longitude** | **Float** | Longitude in decimal degrees. | [optional] |
9
+ | **name** | **String** | Location name, when the user shared a named place. | [optional] |
10
+ | **address** | **String** | Street address, when Meta sends one. | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zernio-sdk'
16
+
17
+ instance = Zernio::WebhookPayloadMessageMetadataLocation.new(
18
+ latitude: null,
19
+ longitude: null,
20
+ name: null,
21
+ address: null
22
+ )
23
+ ```
24
+
@@ -4,6 +4,8 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
+ | **location** | [**WebhookPayloadMessageSentMetadataLocation**](WebhookPayloadMessageSentMetadataLocation.md) | | [optional] |
8
+ | **contacts** | **Array<Hash<String, Object>>** | WhatsApp only. The contact cards this message carries. On API sends this is the `contacts` array exactly as given to the inbox send API (`name`, `phones[].phone` / `type`, `emails[]`); on Coexistence echoes of a card shared from the WhatsApp Business app it is Meta's shape (`phones[].wa_id`, `vcard`). The message `text` is only the emoji preview (`👤 <name>`); the cards live here. | [optional] |
7
9
  | **quoted_message_id** | **String** | `platformMessageId` of the message this send is a quote-reply to. Present when the reply was sent through Zernio with `replyTo` on the inbox send API (WhatsApp and Telegram). A WhatsApp API send fires its `message.sent` off the delivery status, and the quote reference is forwarded from the stored send there, so it arrives on the same `message.sent` as any other WhatsApp send. Not delivered on Instagram echoes. Zernio forwards `reply_to.mid` whenever Meta puts it on an echo, but on Instagram Meta does not send it, so a reply the operator quoted in the Instagram app arrives with no `quotedMessageId`. Facebook Messenger rides a separate subscription (`message_echoes`) and has not been measured, so treat it as unverified rather than supported. Absent on WhatsApp Coexistence echoes. Meta omits the quote context from `smb_message_echoes`, so a reply the operator sent from the WhatsApp Business app arrives with no `quotedMessageId` even though WhatsApp shows it as a quote-reply. Do not read the absence of this field as \"not a reply\". | [optional] |
8
10
  | **thread_ts** | **String** | Slack only. Parent thread ts of the sent message. Pass it back as `replyTo` on the inbox send API to keep replying inside the thread. | [optional] |
9
11
 
@@ -13,6 +15,8 @@
13
15
  require 'zernio-sdk'
14
16
 
15
17
  instance = Zernio::WebhookPayloadMessageSentMetadata.new(
18
+ location: null,
19
+ contacts: null,
16
20
  quoted_message_id: null,
17
21
  thread_ts: null
18
22
  )
@@ -0,0 +1,24 @@
1
+ # Zernio::WebhookPayloadMessageSentMetadataLocation
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **latitude** | **Float** | Latitude in decimal degrees. | [optional] |
8
+ | **longitude** | **Float** | Longitude in decimal degrees. | [optional] |
9
+ | **name** | **String** | Location name, when one was given. | [optional] |
10
+ | **address** | **String** | Street address, when one was given. | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zernio-sdk'
16
+
17
+ instance = Zernio::WebhookPayloadMessageSentMetadataLocation.new(
18
+ latitude: null,
19
+ longitude: null,
20
+ name: null,
21
+ address: null
22
+ )
23
+ ```
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. Those are sourced by a carrier request rather than held in stock, so a watch records interest and no date is implied.
364
+ # Get notified the first time an out-of-stock country has deliverable numbers again: an email to the account holder plus the `phone_number.stock_available` webhook. Stock is re-checked every 6h. One watch per country and number type; a repeat request returns the existing watch (200). The watch is consumed when it fires, so re-create it if you miss the stock. Up to 20 watches at once. Countries and types marked `fulfilment: request` by GET /v1/phone-numbers/countries can also be watched, but anything with `preOrderable: true` does not need a watch: submit KYC and the carrier sources the number to order.
365
365
  # @param create_phone_number_stock_watch_request [CreatePhoneNumberStockWatchRequest]
366
366
  # @param [Hash] opts the optional parameters
367
367
  # @return [PhoneNumberStockWatch]
@@ -371,7 +371,7 @@ module Zernio
371
371
  end
372
372
 
373
373
  # Watch an out-of-stock country
374
- # Get notified the first time an out-of-stock country has deliverable numbers again: an email to the account holder plus the `phone_number.stock_available` webhook. Stock is re-checked every 6h. One watch per country and number type; a repeat request returns the existing watch (200). The watch is consumed when it fires, so re-create it if you miss the stock. Up to 20 watches at once. Countries and types marked `fulfilment: request` by GET /v1/phone-numbers/countries can also be watched. Those are sourced by a carrier request rather than held in stock, so a watch records interest and no date is implied.
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.
375
375
  # @param create_phone_number_stock_watch_request [CreatePhoneNumberStockWatchRequest]
376
376
  # @param [Hash] opts the optional parameters
377
377
  # @return [Array<(PhoneNumberStockWatch, Integer, Hash)>] PhoneNumberStockWatch data, response status code and response headers
@@ -22,6 +22,9 @@ module Zernio
22
22
  # Whether deliverable voice inventory exists right now.
23
23
  attr_accessor :available
24
24
 
25
+ # Nothing deliverable now, but this pair can be pre-ordered: submit KYC as usual and the carrier sources the number after review (usually about 3 weeks, never guaranteed). Only document tiers (3/4) qualify.
26
+ attr_accessor :pre_orderable
27
+
25
28
  attr_accessor :address_constraint
26
29
 
27
30
  # For `geo` only: the area(s) the registered address must be in.
@@ -58,6 +61,7 @@ module Zernio
58
61
  :'country' => :'country',
59
62
  :'number_type' => :'numberType',
60
63
  :'available' => :'available',
64
+ :'pre_orderable' => :'preOrderable',
61
65
  :'address_constraint' => :'addressConstraint',
62
66
  :'areas' => :'areas',
63
67
  :'area_options' => :'areaOptions'
@@ -80,6 +84,7 @@ module Zernio
80
84
  :'country' => :'String',
81
85
  :'number_type' => :'String',
82
86
  :'available' => :'Boolean',
87
+ :'pre_orderable' => :'Boolean',
83
88
  :'address_constraint' => :'String',
84
89
  :'areas' => :'Array<String>',
85
90
  :'area_options' => :'Array<CheckPhoneNumberAvailability200ResponseAreaOptionsInner>'
@@ -120,6 +125,10 @@ module Zernio
120
125
  self.available = attributes[:'available']
121
126
  end
122
127
 
128
+ if attributes.key?(:'pre_orderable')
129
+ self.pre_orderable = attributes[:'pre_orderable']
130
+ end
131
+
123
132
  if attributes.key?(:'address_constraint')
124
133
  self.address_constraint = attributes[:'address_constraint']
125
134
  end
@@ -172,6 +181,7 @@ module Zernio
172
181
  country == o.country &&
173
182
  number_type == o.number_type &&
174
183
  available == o.available &&
184
+ pre_orderable == o.pre_orderable &&
175
185
  address_constraint == o.address_constraint &&
176
186
  areas == o.areas &&
177
187
  area_options == o.area_options
@@ -186,7 +196,7 @@ module Zernio
186
196
  # Calculates hash code according to all attributes.
187
197
  # @return [Integer] Hash code
188
198
  def hash
189
- [country, number_type, available, address_constraint, areas, area_options].hash
199
+ [country, number_type, available, pre_orderable, address_constraint, areas, area_options].hash
190
200
  end
191
201
 
192
202
  # Builds the object from hash
@@ -40,6 +40,9 @@ module Zernio
40
40
  # Live carrier-stock snapshot (refreshed every 6h + on availability checks): false when NO offered type currently has deliverable inventory, so a purchase would fail. Treat as advisory; the purchase itself re-checks.
41
41
  attr_accessor :in_stock
42
42
 
43
+ # At least one out-of-stock type here can be pre-ordered (see `types[].preOrderable`).
44
+ attr_accessor :pre_orderable
45
+
43
46
  # Every number type offered in this country (default first). Capabilities, KYC tier, monthly price, and stock are per type. The country-level fields above mirror the first (default) entry. Pass the chosen `numberType` to POST /v1/phone-numbers/purchase.
44
47
  attr_accessor :types
45
48
 
@@ -77,6 +80,7 @@ module Zernio
77
80
  :'sms_available' => :'smsAvailable',
78
81
  :'outbound_calling_available' => :'outboundCallingAvailable',
79
82
  :'in_stock' => :'inStock',
83
+ :'pre_orderable' => :'preOrderable',
80
84
  :'types' => :'types'
81
85
  }
82
86
  end
@@ -103,6 +107,7 @@ module Zernio
103
107
  :'sms_available' => :'Boolean',
104
108
  :'outbound_calling_available' => :'Boolean',
105
109
  :'in_stock' => :'Boolean',
110
+ :'pre_orderable' => :'Boolean',
106
111
  :'types' => :'Array<ListPhoneNumberCountries200ResponseCountriesInnerTypesInner>'
107
112
  }
108
113
  end
@@ -165,6 +170,10 @@ module Zernio
165
170
  self.in_stock = attributes[:'in_stock']
166
171
  end
167
172
 
173
+ if attributes.key?(:'pre_orderable')
174
+ self.pre_orderable = attributes[:'pre_orderable']
175
+ end
176
+
168
177
  if attributes.key?(:'types')
169
178
  if (value = attributes[:'types']).is_a?(Array)
170
179
  self.types = value
@@ -213,6 +222,7 @@ module Zernio
213
222
  sms_available == o.sms_available &&
214
223
  outbound_calling_available == o.outbound_calling_available &&
215
224
  in_stock == o.in_stock &&
225
+ pre_orderable == o.pre_orderable &&
216
226
  types == o.types
217
227
  end
218
228
 
@@ -225,7 +235,7 @@ module Zernio
225
235
  # Calculates hash code according to all attributes.
226
236
  # @return [Integer] Hash code
227
237
  def hash
228
- [code, tier, monthly_cents, needs_kyc, calls_available, whatsapp_available, sms_available, outbound_calling_available, in_stock, types].hash
238
+ [code, tier, monthly_cents, needs_kyc, calls_available, whatsapp_available, sms_available, outbound_calling_available, in_stock, pre_orderable, types].hash
229
239
  end
230
240
 
231
241
  # Builds the object from hash
@@ -17,6 +17,7 @@ module Zernio
17
17
  class ListPhoneNumberCountries200ResponseCountriesInnerTypesInner < ApiModelBase
18
18
  attr_accessor :number_type
19
19
 
20
+ # Null on a `fulfilment: request` type, whose document tier is only known once its requirements are read.
20
21
  attr_accessor :tier
21
22
 
22
23
  attr_accessor :needs_kyc
@@ -33,6 +34,12 @@ module Zernio
33
34
 
34
35
  attr_accessor :in_stock
35
36
 
37
+ # `request`: the carrier stocks this type nowhere and only sources it to order, so it is always a pre-order.
38
+ attr_accessor :fulfilment
39
+
40
+ # Out of stock but orderable anyway. Submit KYC as usual (POST /v1/phone-numbers/kyc) and the carrier sources the number after review, usually about 3 weeks and never guaranteed. Only document tiers (3/4) qualify, and nothing is billed until the number is active.
41
+ attr_accessor :pre_orderable
42
+
36
43
  class EnumAttributeValidator
37
44
  attr_reader :datatype
38
45
  attr_reader :allowable_values
@@ -65,7 +72,9 @@ module Zernio
65
72
  :'whatsapp_available' => :'whatsappAvailable',
66
73
  :'sms_available' => :'smsAvailable',
67
74
  :'calls_available' => :'callsAvailable',
68
- :'in_stock' => :'inStock'
75
+ :'in_stock' => :'inStock',
76
+ :'fulfilment' => :'fulfilment',
77
+ :'pre_orderable' => :'preOrderable'
69
78
  }
70
79
  end
71
80
 
@@ -89,13 +98,16 @@ module Zernio
89
98
  :'whatsapp_available' => :'Boolean',
90
99
  :'sms_available' => :'Boolean',
91
100
  :'calls_available' => :'Boolean',
92
- :'in_stock' => :'Boolean'
101
+ :'in_stock' => :'Boolean',
102
+ :'fulfilment' => :'String',
103
+ :'pre_orderable' => :'Boolean'
93
104
  }
94
105
  end
95
106
 
96
107
  # List of attributes with nullable: true
97
108
  def self.openapi_nullable
98
109
  Set.new([
110
+ :'tier',
99
111
  ])
100
112
  end
101
113
 
@@ -146,6 +158,14 @@ module Zernio
146
158
  if attributes.key?(:'in_stock')
147
159
  self.in_stock = attributes[:'in_stock']
148
160
  end
161
+
162
+ if attributes.key?(:'fulfilment')
163
+ self.fulfilment = attributes[:'fulfilment']
164
+ end
165
+
166
+ if attributes.key?(:'pre_orderable')
167
+ self.pre_orderable = attributes[:'pre_orderable']
168
+ end
149
169
  end
150
170
 
151
171
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -164,6 +184,8 @@ module Zernio
164
184
  return false unless number_type_validator.valid?(@number_type)
165
185
  tier_validator = EnumAttributeValidator.new('Integer', [1, 2, 3, 4])
166
186
  return false unless tier_validator.valid?(@tier)
187
+ fulfilment_validator = EnumAttributeValidator.new('String', ["instant", "request"])
188
+ return false unless fulfilment_validator.valid?(@fulfilment)
167
189
  true
168
190
  end
169
191
 
@@ -187,6 +209,16 @@ module Zernio
187
209
  @tier = tier
188
210
  end
189
211
 
212
+ # Custom attribute writer method checking allowed values (enum).
213
+ # @param [Object] fulfilment Object to be assigned
214
+ def fulfilment=(fulfilment)
215
+ validator = EnumAttributeValidator.new('String', ["instant", "request"])
216
+ unless validator.valid?(fulfilment)
217
+ fail ArgumentError, "invalid value for \"fulfilment\", must be one of #{validator.allowable_values}."
218
+ end
219
+ @fulfilment = fulfilment
220
+ end
221
+
190
222
  # Checks equality by comparing each attribute.
191
223
  # @param [Object] Object to be compared
192
224
  def ==(o)
@@ -199,7 +231,9 @@ module Zernio
199
231
  whatsapp_available == o.whatsapp_available &&
200
232
  sms_available == o.sms_available &&
201
233
  calls_available == o.calls_available &&
202
- in_stock == o.in_stock
234
+ in_stock == o.in_stock &&
235
+ fulfilment == o.fulfilment &&
236
+ pre_orderable == o.pre_orderable
203
237
  end
204
238
 
205
239
  # @see the `==` method
@@ -211,7 +245,7 @@ module Zernio
211
245
  # Calculates hash code according to all attributes.
212
246
  # @return [Integer] Hash code
213
247
  def hash
214
- [number_type, tier, needs_kyc, monthly_cents, whatsapp_available, sms_available, calls_available, in_stock].hash
248
+ [number_type, tier, needs_kyc, monthly_cents, whatsapp_available, sms_available, calls_available, in_stock, fulfilment, pre_orderable].hash
215
249
  end
216
250
 
217
251
  # Builds the object from hash
@@ -17,6 +17,9 @@ module Zernio
17
17
  class SubmitPhoneNumberKyc200Response < ApiModelBase
18
18
  attr_accessor :status
19
19
 
20
+ # True when nothing was in stock and this submission placed a pre-order. The number stays `pending_regulatory` until the carrier sources it (usually about 3 weeks) and is not billed until active. A pre-order is one number: `quantity` above 1 is rejected with 400.
21
+ attr_accessor :pre_order
22
+
20
23
  attr_accessor :phone_number
21
24
 
22
25
  # Every number provisioned from this submission. Length equals the requested `quantity` on full success (fewer if some orders failed; best-effort). The first element mirrors `phoneNumber`.
@@ -48,6 +51,7 @@ module Zernio
48
51
  def self.attribute_map
49
52
  {
50
53
  :'status' => :'status',
54
+ :'pre_order' => :'preOrder',
51
55
  :'phone_number' => :'phoneNumber',
52
56
  :'numbers' => :'numbers'
53
57
  }
@@ -67,6 +71,7 @@ module Zernio
67
71
  def self.openapi_types
68
72
  {
69
73
  :'status' => :'String',
74
+ :'pre_order' => :'Boolean',
70
75
  :'phone_number' => :'SubmitPhoneNumberKyc200ResponsePhoneNumber',
71
76
  :'numbers' => :'Array<SubmitPhoneNumberKyc200ResponseNumbersInner>'
72
77
  }
@@ -98,6 +103,10 @@ module Zernio
98
103
  self.status = attributes[:'status']
99
104
  end
100
105
 
106
+ if attributes.key?(:'pre_order')
107
+ self.pre_order = attributes[:'pre_order']
108
+ end
109
+
101
110
  if attributes.key?(:'phone_number')
102
111
  self.phone_number = attributes[:'phone_number']
103
112
  end
@@ -142,6 +151,7 @@ module Zernio
142
151
  return true if self.equal?(o)
143
152
  self.class == o.class &&
144
153
  status == o.status &&
154
+ pre_order == o.pre_order &&
145
155
  phone_number == o.phone_number &&
146
156
  numbers == o.numbers
147
157
  end
@@ -155,7 +165,7 @@ module Zernio
155
165
  # Calculates hash code according to all attributes.
156
166
  # @return [Integer] Hash code
157
167
  def hash
158
- [status, phone_number, numbers].hash
168
+ [status, pre_order, phone_number, numbers].hash
159
169
  end
160
170
 
161
171
  # Builds the object from hash
@@ -58,6 +58,8 @@ module Zernio
58
58
 
59
59
  attr_accessor :referred_product
60
60
 
61
+ attr_accessor :location
62
+
61
63
  # WhatsApp only. Contact cards the user shared, forwarded verbatim from Meta. Read `contactsOrigin` before treating any number here as the sender's own.
62
64
  attr_accessor :contacts
63
65
 
@@ -116,6 +118,7 @@ module Zernio
116
118
  :'nfm_reply_name' => :'nfmReplyName',
117
119
  :'order' => :'order',
118
120
  :'referred_product' => :'referredProduct',
121
+ :'location' => :'location',
119
122
  :'contacts' => :'contacts',
120
123
  :'contacts_origin' => :'contactsOrigin',
121
124
  :'story_reply' => :'storyReply',
@@ -154,6 +157,7 @@ module Zernio
154
157
  :'nfm_reply_name' => :'String',
155
158
  :'order' => :'WebhookPayloadMessageMetadataOrder',
156
159
  :'referred_product' => :'WebhookPayloadMessageMetadataReferredProduct',
160
+ :'location' => :'WebhookPayloadMessageMetadataLocation',
157
161
  :'contacts' => :'Array<Hash<String, Object>>',
158
162
  :'contacts_origin' => :'String',
159
163
  :'story_reply' => :'WebhookPayloadMessageMetadataStoryReply',
@@ -248,6 +252,10 @@ module Zernio
248
252
  self.referred_product = attributes[:'referred_product']
249
253
  end
250
254
 
255
+ if attributes.key?(:'location')
256
+ self.location = attributes[:'location']
257
+ end
258
+
251
259
  if attributes.key?(:'contacts')
252
260
  if (value = attributes[:'contacts']).is_a?(Array)
253
261
  self.contacts = value
@@ -338,6 +346,7 @@ module Zernio
338
346
  nfm_reply_name == o.nfm_reply_name &&
339
347
  order == o.order &&
340
348
  referred_product == o.referred_product &&
349
+ location == o.location &&
341
350
  contacts == o.contacts &&
342
351
  contacts_origin == o.contacts_origin &&
343
352
  story_reply == o.story_reply &&
@@ -356,7 +365,7 @@ module Zernio
356
365
  # Calculates hash code according to all attributes.
357
366
  # @return [Integer] Hash code
358
367
  def hash
359
- [standby, quoted_message_id, quoted_message, quick_reply_payload, postback_payload, postback_title, callback_data, interactive_type, interactive_id, button_payload, flow_response_json, flow_response_data, nfm_reply_name, order, referred_product, contacts, contacts_origin, story_reply, is_story_mention, referral, unsupported, no_renderable_content].hash
368
+ [standby, quoted_message_id, quoted_message, quick_reply_payload, postback_payload, postback_title, callback_data, interactive_type, interactive_id, button_payload, flow_response_json, flow_response_data, nfm_reply_name, order, referred_product, location, contacts, contacts_origin, story_reply, is_story_mention, referral, unsupported, no_renderable_content].hash
360
369
  end
361
370
 
362
371
  # Builds the object from hash