zernio-sdk 0.0.782 → 0.0.784

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 (58) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +15 -0
  3. data/docs/CreatePhoneNumberStockWatchRequest.md +18 -0
  4. data/docs/ListPhoneNumberStockWatches200Response.md +18 -0
  5. data/docs/PhoneNumberStockWatch.md +24 -0
  6. data/docs/PhoneNumbersApi.md +203 -0
  7. data/docs/UsageApi.md +8 -2
  8. data/docs/UsageAttributionGroup.md +22 -0
  9. data/docs/UsageAttributionSlice.md +20 -0
  10. data/docs/UsageAttributionSliceByProduct.md +34 -0
  11. data/docs/UsageMetering.md +5 -1
  12. data/docs/UsageMeteringAttribution.md +26 -0
  13. data/docs/UsageMeteringScope.md +49 -0
  14. data/docs/UsageMeteringScopeOneOf.md +18 -0
  15. data/docs/WebhookEventsApi.md +69 -0
  16. data/docs/WebhookPayloadPhoneNumberStockAvailable.md +24 -0
  17. data/docs/WebhookPayloadPhoneNumberStockAvailableStock.md +20 -0
  18. data/docs/WebhookPayloadPhoneNumberStockAvailableStockTypesInner.md +20 -0
  19. data/lib/zernio-sdk/api/phone_numbers_api.rb +184 -0
  20. data/lib/zernio-sdk/api/usage_api.rb +15 -2
  21. data/lib/zernio-sdk/api/webhook_events_api.rb +66 -0
  22. data/lib/zernio-sdk/models/create_phone_number_stock_watch_request.rb +183 -0
  23. data/lib/zernio-sdk/models/list_phone_number_stock_watches200_response.rb +149 -0
  24. data/lib/zernio-sdk/models/phone_number_stock_watch.rb +243 -0
  25. data/lib/zernio-sdk/models/usage_attribution_group.rb +190 -0
  26. data/lib/zernio-sdk/models/usage_attribution_slice.rb +156 -0
  27. data/lib/zernio-sdk/models/usage_attribution_slice_by_product.rb +220 -0
  28. data/lib/zernio-sdk/models/usage_metering.rb +22 -4
  29. data/lib/zernio-sdk/models/usage_metering_attribution.rb +223 -0
  30. data/lib/zernio-sdk/models/usage_metering_call_usage.rb +1 -1
  31. data/lib/zernio-sdk/models/usage_metering_peaks.rb +1 -1
  32. data/lib/zernio-sdk/models/usage_metering_scope.rb +105 -0
  33. data/lib/zernio-sdk/models/usage_metering_scope_one_of.rb +164 -0
  34. data/lib/zernio-sdk/models/webhook_payload_phone_number_stock_available.rb +269 -0
  35. data/lib/zernio-sdk/models/webhook_payload_phone_number_stock_available_stock.rb +194 -0
  36. data/lib/zernio-sdk/models/webhook_payload_phone_number_stock_available_stock_types_inner.rb +192 -0
  37. data/lib/zernio-sdk/version.rb +1 -1
  38. data/lib/zernio-sdk.rb +12 -0
  39. data/openapi.yaml +236 -8
  40. data/spec/api/phone_numbers_api_spec.rb +33 -0
  41. data/spec/api/usage_api_spec.rb +4 -1
  42. data/spec/models/create_phone_number_stock_watch_request_spec.rb +36 -0
  43. data/spec/models/create_webhook_settings_request_spec.rb +1 -1
  44. data/spec/models/list_phone_number_stock_watches200_response_spec.rb +36 -0
  45. data/spec/models/phone_number_stock_watch_spec.rb +54 -0
  46. data/spec/models/update_webhook_settings_request_spec.rb +1 -1
  47. data/spec/models/usage_attribution_group_spec.rb +48 -0
  48. data/spec/models/usage_attribution_slice_by_product_spec.rb +84 -0
  49. data/spec/models/usage_attribution_slice_spec.rb +42 -0
  50. data/spec/models/usage_metering_attribution_spec.rb +64 -0
  51. data/spec/models/usage_metering_scope_one_of_spec.rb +36 -0
  52. data/spec/models/usage_metering_scope_spec.rb +32 -0
  53. data/spec/models/usage_metering_spec.rb +12 -0
  54. data/spec/models/webhook_payload_phone_number_stock_available_spec.rb +58 -0
  55. data/spec/models/webhook_payload_phone_number_stock_available_stock_spec.rb +42 -0
  56. data/spec/models/webhook_payload_phone_number_stock_available_stock_types_inner_spec.rb +42 -0
  57. data/spec/models/webhook_spec.rb +1 -1
  58. metadata +49 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f6cf84a34aa57877a9f48a6addfa1625b2f9e5d3438d8bc88063134ae060f818
4
- data.tar.gz: 6fcdb8f1265c28c062e6c43ca994486514622ab15e1b6f71b2059ea8aab019d8
3
+ metadata.gz: 4470ecb712494d1056ef762bcf0a85305c48e1928372196591115eac3d02cd67
4
+ data.tar.gz: ba8ea05c5a462624a1f286c6cbff5c34d1a9537c48c00017be06d6a02ef05f00
5
5
  SHA512:
6
- metadata.gz: 33a39723db63a41bf840c6bfab608f628bed84979b9c703565d595dc1ae7ab8b092696de700c33732949ff30d150696caf617635661487271b45ddfa96c89f3f
7
- data.tar.gz: bf8c0f80e48a9d9028a6aa09690f4b9e22d9da3ed2d288f4574d58e7b68f3191009a2dc232b3b8a72a2416051495b7d9e70aca7266e849fb9d2771f577b67f1b
6
+ metadata.gz: aa3229a577409d0ac61c2a204dac8bc7bf75a2267a8ccd70cbda1d87180de3a0328364a65e5cab8f8152e7b85df2fe58efcd00aba440b0dff17da0bcd1bb2066
7
+ data.tar.gz: ab3be7790e719007d42e18a7bbb09ecdeb1a0522559880a3d22202ac640ef0030196d5caee86536226d522ed056d4111a74e9bf8643a62a1d8177bd2a8d61766
data/README.md CHANGED
@@ -426,6 +426,8 @@ Class | Method | HTTP request | Description
426
426
  *Zernio::PhoneNumbersApi* | [**check_phone_number_portability**](docs/PhoneNumbersApi.md#check_phone_number_portability) | **POST** /v1/phone-numbers/port-in/check | Check portability
427
427
  *Zernio::PhoneNumbersApi* | [**create_phone_number_kyc_link**](docs/PhoneNumbersApi.md#create_phone_number_kyc_link) | **POST** /v1/phone-numbers/kyc/share | Create a hosted KYC link
428
428
  *Zernio::PhoneNumbersApi* | [**create_phone_number_port_in**](docs/PhoneNumbersApi.md#create_phone_number_port_in) | **POST** /v1/phone-numbers/port-in | Port numbers in
429
+ *Zernio::PhoneNumbersApi* | [**create_phone_number_stock_watch**](docs/PhoneNumbersApi.md#create_phone_number_stock_watch) | **POST** /v1/phone-numbers/stock-watches | Watch an out-of-stock country
430
+ *Zernio::PhoneNumbersApi* | [**delete_phone_number_stock_watch**](docs/PhoneNumbersApi.md#delete_phone_number_stock_watch) | **DELETE** /v1/phone-numbers/stock-watches/{id} | Stop watching a country
429
431
  *Zernio::PhoneNumbersApi* | [**get_phone_number**](docs/PhoneNumbersApi.md#get_phone_number) | **GET** /v1/phone-numbers/{id} | Get phone number
430
432
  *Zernio::PhoneNumbersApi* | [**get_phone_number_kyc_form**](docs/PhoneNumbersApi.md#get_phone_number_kyc_form) | **GET** /v1/phone-numbers/kyc | Get KYC form spec
431
433
  *Zernio::PhoneNumbersApi* | [**get_phone_number_port_in_order_requirements**](docs/PhoneNumbersApi.md#get_phone_number_port_in_order_requirements) | **GET** /v1/phone-numbers/port-in/{id}/requirements | A port-in order's pending requirements
@@ -433,6 +435,7 @@ Class | Method | HTTP request | Description
433
435
  *Zernio::PhoneNumbersApi* | [**get_phone_number_remediation**](docs/PhoneNumbersApi.md#get_phone_number_remediation) | **GET** /v1/phone-numbers/{id}/remediate | Get declined requirements
434
436
  *Zernio::PhoneNumbersApi* | [**list_phone_number_countries**](docs/PhoneNumbersApi.md#list_phone_number_countries) | **GET** /v1/phone-numbers/countries | List offerable number countries
435
437
  *Zernio::PhoneNumbersApi* | [**list_phone_number_port_ins**](docs/PhoneNumbersApi.md#list_phone_number_port_ins) | **GET** /v1/phone-numbers/port-in | List port-in orders
438
+ *Zernio::PhoneNumbersApi* | [**list_phone_number_stock_watches**](docs/PhoneNumbersApi.md#list_phone_number_stock_watches) | **GET** /v1/phone-numbers/stock-watches | List stock watches
436
439
  *Zernio::PhoneNumbersApi* | [**list_phone_numbers**](docs/PhoneNumbersApi.md#list_phone_numbers) | **GET** /v1/phone-numbers | List phone numbers
437
440
  *Zernio::PhoneNumbersApi* | [**purchase_phone_number**](docs/PhoneNumbersApi.md#purchase_phone_number) | **POST** /v1/phone-numbers/purchase | Purchase phone number
438
441
  *Zernio::PhoneNumbersApi* | [**release_phone_number**](docs/PhoneNumbersApi.md#release_phone_number) | **DELETE** /v1/phone-numbers/{id} | Release phone number
@@ -929,6 +932,7 @@ Class | Method | HTTP request | Description
929
932
  - [Zernio::CreatePhoneNumberPortInRequest](docs/CreatePhoneNumberPortInRequest.md)
930
933
  - [Zernio::CreatePhoneNumberPortInRequestEndUser](docs/CreatePhoneNumberPortInRequestEndUser.md)
931
934
  - [Zernio::CreatePhoneNumberPortInRequestRequirementsInner](docs/CreatePhoneNumberPortInRequestRequirementsInner.md)
935
+ - [Zernio::CreatePhoneNumberStockWatchRequest](docs/CreatePhoneNumberStockWatchRequest.md)
932
936
  - [Zernio::CreatePinterestBoard201Response](docs/CreatePinterestBoard201Response.md)
933
937
  - [Zernio::CreatePinterestBoard201ResponseBoard](docs/CreatePinterestBoard201ResponseBoard.md)
934
938
  - [Zernio::CreatePinterestBoardRequest](docs/CreatePinterestBoardRequest.md)
@@ -1656,6 +1660,7 @@ Class | Method | HTTP request | Description
1656
1660
  - [Zernio::ListPhoneNumberCountries200ResponseCountriesInnerTypesInner](docs/ListPhoneNumberCountries200ResponseCountriesInnerTypesInner.md)
1657
1661
  - [Zernio::ListPhoneNumberPortIns200Response](docs/ListPhoneNumberPortIns200Response.md)
1658
1662
  - [Zernio::ListPhoneNumberPortIns200ResponseOrdersInner](docs/ListPhoneNumberPortIns200ResponseOrdersInner.md)
1663
+ - [Zernio::ListPhoneNumberStockWatches200Response](docs/ListPhoneNumberStockWatches200Response.md)
1659
1664
  - [Zernio::ListPhoneNumbers200Response](docs/ListPhoneNumbers200Response.md)
1660
1665
  - [Zernio::ListPhoneNumbers200ResponseConnectedInner](docs/ListPhoneNumbers200ResponseConnectedInner.md)
1661
1666
  - [Zernio::ListPhoneNumbers200ResponseNumbersInner](docs/ListPhoneNumbers200ResponseNumbersInner.md)
@@ -1758,6 +1763,7 @@ Class | Method | HTTP request | Description
1758
1763
  - [Zernio::Pagination](docs/Pagination.md)
1759
1764
  - [Zernio::PauseWorkflow200Response](docs/PauseWorkflow200Response.md)
1760
1765
  - [Zernio::Pending](docs/Pending.md)
1766
+ - [Zernio::PhoneNumberStockWatch](docs/PhoneNumberStockWatch.md)
1761
1767
  - [Zernio::PinDiscordMessage200Response](docs/PinDiscordMessage200Response.md)
1762
1768
  - [Zernio::PinterestPlatformData](docs/PinterestPlatformData.md)
1763
1769
  - [Zernio::PlatformAnalytics](docs/PlatformAnalytics.md)
@@ -2208,13 +2214,19 @@ Class | Method | HTTP request | Description
2208
2214
  - [Zernio::UploadedOrDerivedAudience](docs/UploadedOrDerivedAudience.md)
2209
2215
  - [Zernio::UploadedOrDerivedAudienceCompaniesInner](docs/UploadedOrDerivedAudienceCompaniesInner.md)
2210
2216
  - [Zernio::UploadedOrDerivedAudienceMatchRulesInner](docs/UploadedOrDerivedAudienceMatchRulesInner.md)
2217
+ - [Zernio::UsageAttributionGroup](docs/UsageAttributionGroup.md)
2218
+ - [Zernio::UsageAttributionSlice](docs/UsageAttributionSlice.md)
2219
+ - [Zernio::UsageAttributionSliceByProduct](docs/UsageAttributionSliceByProduct.md)
2211
2220
  - [Zernio::UsageMetering](docs/UsageMetering.md)
2221
+ - [Zernio::UsageMeteringAttribution](docs/UsageMeteringAttribution.md)
2212
2222
  - [Zernio::UsageMeteringCallUsage](docs/UsageMeteringCallUsage.md)
2213
2223
  - [Zernio::UsageMeteringCallUsageWhatsapp](docs/UsageMeteringCallUsageWhatsapp.md)
2214
2224
  - [Zernio::UsageMeteringDaysInner](docs/UsageMeteringDaysInner.md)
2215
2225
  - [Zernio::UsageMeteringLineItemsInner](docs/UsageMeteringLineItemsInner.md)
2216
2226
  - [Zernio::UsageMeteringPeaks](docs/UsageMeteringPeaks.md)
2217
2227
  - [Zernio::UsageMeteringPeriod](docs/UsageMeteringPeriod.md)
2228
+ - [Zernio::UsageMeteringScope](docs/UsageMeteringScope.md)
2229
+ - [Zernio::UsageMeteringScopeOneOf](docs/UsageMeteringScopeOneOf.md)
2218
2230
  - [Zernio::UsageMeteringTax](docs/UsageMeteringTax.md)
2219
2231
  - [Zernio::UsageMeteringTotals](docs/UsageMeteringTotals.md)
2220
2232
  - [Zernio::UsageStats](docs/UsageStats.md)
@@ -2315,6 +2327,9 @@ Class | Method | HTTP request | Description
2315
2327
  - [Zernio::WebhookPayloadMessageSentMessageAttachmentsInner](docs/WebhookPayloadMessageSentMessageAttachmentsInner.md)
2316
2328
  - [Zernio::WebhookPayloadMessageSentMessageSender](docs/WebhookPayloadMessageSentMessageSender.md)
2317
2329
  - [Zernio::WebhookPayloadMessageSentMetadata](docs/WebhookPayloadMessageSentMetadata.md)
2330
+ - [Zernio::WebhookPayloadPhoneNumberStockAvailable](docs/WebhookPayloadPhoneNumberStockAvailable.md)
2331
+ - [Zernio::WebhookPayloadPhoneNumberStockAvailableStock](docs/WebhookPayloadPhoneNumberStockAvailableStock.md)
2332
+ - [Zernio::WebhookPayloadPhoneNumberStockAvailableStockTypesInner](docs/WebhookPayloadPhoneNumberStockAvailableStockTypesInner.md)
2318
2333
  - [Zernio::WebhookPayloadPost](docs/WebhookPayloadPost.md)
2319
2334
  - [Zernio::WebhookPayloadPostPlatform](docs/WebhookPayloadPostPlatform.md)
2320
2335
  - [Zernio::WebhookPayloadPostPlatformAccount](docs/WebhookPayloadPostPlatformAccount.md)
@@ -0,0 +1,18 @@
1
+ # Zernio::CreatePhoneNumberStockWatchRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **country** | **String** | ISO 3166-1 alpha-2 code of a country listed by GET /v1/phone-numbers/countries. | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'zernio-sdk'
13
+
14
+ instance = Zernio::CreatePhoneNumberStockWatchRequest.new(
15
+ country: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # Zernio::ListPhoneNumberStockWatches200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **watches** | [**Array<PhoneNumberStockWatch>**](PhoneNumberStockWatch.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'zernio-sdk'
13
+
14
+ instance = Zernio::ListPhoneNumberStockWatches200Response.new(
15
+ watches: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,24 @@
1
+ # Zernio::PhoneNumberStockWatch
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | |
8
+ | **country** | **String** | ISO 3166-1 alpha-2. | |
9
+ | **country_name** | **String** | | |
10
+ | **created_at** | **Time** | | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zernio-sdk'
16
+
17
+ instance = Zernio::PhoneNumberStockWatch.new(
18
+ id: null,
19
+ country: null,
20
+ country_name: null,
21
+ created_at: null
22
+ )
23
+ ```
24
+
@@ -9,6 +9,8 @@ All URIs are relative to *https://zernio.com/api*
9
9
  | [**check_phone_number_portability**](PhoneNumbersApi.md#check_phone_number_portability) | **POST** /v1/phone-numbers/port-in/check | Check portability |
10
10
  | [**create_phone_number_kyc_link**](PhoneNumbersApi.md#create_phone_number_kyc_link) | **POST** /v1/phone-numbers/kyc/share | Create a hosted KYC link |
11
11
  | [**create_phone_number_port_in**](PhoneNumbersApi.md#create_phone_number_port_in) | **POST** /v1/phone-numbers/port-in | Port numbers in |
12
+ | [**create_phone_number_stock_watch**](PhoneNumbersApi.md#create_phone_number_stock_watch) | **POST** /v1/phone-numbers/stock-watches | Watch an out-of-stock country |
13
+ | [**delete_phone_number_stock_watch**](PhoneNumbersApi.md#delete_phone_number_stock_watch) | **DELETE** /v1/phone-numbers/stock-watches/{id} | Stop watching a country |
12
14
  | [**get_phone_number**](PhoneNumbersApi.md#get_phone_number) | **GET** /v1/phone-numbers/{id} | Get phone number |
13
15
  | [**get_phone_number_kyc_form**](PhoneNumbersApi.md#get_phone_number_kyc_form) | **GET** /v1/phone-numbers/kyc | Get KYC form spec |
14
16
  | [**get_phone_number_port_in_order_requirements**](PhoneNumbersApi.md#get_phone_number_port_in_order_requirements) | **GET** /v1/phone-numbers/port-in/{id}/requirements | A port-in order's pending requirements |
@@ -16,6 +18,7 @@ All URIs are relative to *https://zernio.com/api*
16
18
  | [**get_phone_number_remediation**](PhoneNumbersApi.md#get_phone_number_remediation) | **GET** /v1/phone-numbers/{id}/remediate | Get declined requirements |
17
19
  | [**list_phone_number_countries**](PhoneNumbersApi.md#list_phone_number_countries) | **GET** /v1/phone-numbers/countries | List offerable number countries |
18
20
  | [**list_phone_number_port_ins**](PhoneNumbersApi.md#list_phone_number_port_ins) | **GET** /v1/phone-numbers/port-in | List port-in orders |
21
+ | [**list_phone_number_stock_watches**](PhoneNumbersApi.md#list_phone_number_stock_watches) | **GET** /v1/phone-numbers/stock-watches | List stock watches |
19
22
  | [**list_phone_numbers**](PhoneNumbersApi.md#list_phone_numbers) | **GET** /v1/phone-numbers | List phone numbers |
20
23
  | [**purchase_phone_number**](PhoneNumbersApi.md#purchase_phone_number) | **POST** /v1/phone-numbers/purchase | Purchase phone number |
21
24
  | [**release_phone_number**](PhoneNumbersApi.md#release_phone_number) | **DELETE** /v1/phone-numbers/{id} | Release phone number |
@@ -382,6 +385,142 @@ end
382
385
  - **Accept**: application/json
383
386
 
384
387
 
388
+ ## create_phone_number_stock_watch
389
+
390
+ > <PhoneNumberStockWatch> create_phone_number_stock_watch(create_phone_number_stock_watch_request)
391
+
392
+ Watch an out-of-stock country
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; 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 countries can be watched at once.
395
+
396
+ ### Examples
397
+
398
+ ```ruby
399
+ require 'time'
400
+ require 'zernio-sdk'
401
+ # setup authorization
402
+ Zernio.configure do |config|
403
+ # Configure Bearer authorization (JWT): bearerAuth
404
+ config.access_token = 'YOUR_BEARER_TOKEN'
405
+ end
406
+
407
+ api_instance = Zernio::PhoneNumbersApi.new
408
+ create_phone_number_stock_watch_request = Zernio::CreatePhoneNumberStockWatchRequest.new({country: 'country_example'}) # CreatePhoneNumberStockWatchRequest |
409
+
410
+ begin
411
+ # Watch an out-of-stock country
412
+ result = api_instance.create_phone_number_stock_watch(create_phone_number_stock_watch_request)
413
+ p result
414
+ rescue Zernio::ApiError => e
415
+ puts "Error when calling PhoneNumbersApi->create_phone_number_stock_watch: #{e}"
416
+ end
417
+ ```
418
+
419
+ #### Using the create_phone_number_stock_watch_with_http_info variant
420
+
421
+ This returns an Array which contains the response data, status code and headers.
422
+
423
+ > <Array(<PhoneNumberStockWatch>, Integer, Hash)> create_phone_number_stock_watch_with_http_info(create_phone_number_stock_watch_request)
424
+
425
+ ```ruby
426
+ begin
427
+ # Watch an out-of-stock country
428
+ data, status_code, headers = api_instance.create_phone_number_stock_watch_with_http_info(create_phone_number_stock_watch_request)
429
+ p status_code # => 2xx
430
+ p headers # => { ... }
431
+ p data # => <PhoneNumberStockWatch>
432
+ rescue Zernio::ApiError => e
433
+ puts "Error when calling PhoneNumbersApi->create_phone_number_stock_watch_with_http_info: #{e}"
434
+ end
435
+ ```
436
+
437
+ ### Parameters
438
+
439
+ | Name | Type | Description | Notes |
440
+ | ---- | ---- | ----------- | ----- |
441
+ | **create_phone_number_stock_watch_request** | [**CreatePhoneNumberStockWatchRequest**](CreatePhoneNumberStockWatchRequest.md) | | |
442
+
443
+ ### Return type
444
+
445
+ [**PhoneNumberStockWatch**](PhoneNumberStockWatch.md)
446
+
447
+ ### Authorization
448
+
449
+ [bearerAuth](../README.md#bearerAuth)
450
+
451
+ ### HTTP request headers
452
+
453
+ - **Content-Type**: application/json
454
+ - **Accept**: application/json
455
+
456
+
457
+ ## delete_phone_number_stock_watch
458
+
459
+ > <DeleteSmsSenderId200Response> delete_phone_number_stock_watch(id)
460
+
461
+ Stop watching a country
462
+
463
+ ### Examples
464
+
465
+ ```ruby
466
+ require 'time'
467
+ require 'zernio-sdk'
468
+ # setup authorization
469
+ Zernio.configure do |config|
470
+ # Configure Bearer authorization (JWT): bearerAuth
471
+ config.access_token = 'YOUR_BEARER_TOKEN'
472
+ end
473
+
474
+ api_instance = Zernio::PhoneNumbersApi.new
475
+ id = 'id_example' # String |
476
+
477
+ begin
478
+ # Stop watching a country
479
+ result = api_instance.delete_phone_number_stock_watch(id)
480
+ p result
481
+ rescue Zernio::ApiError => e
482
+ puts "Error when calling PhoneNumbersApi->delete_phone_number_stock_watch: #{e}"
483
+ end
484
+ ```
485
+
486
+ #### Using the delete_phone_number_stock_watch_with_http_info variant
487
+
488
+ This returns an Array which contains the response data, status code and headers.
489
+
490
+ > <Array(<DeleteSmsSenderId200Response>, Integer, Hash)> delete_phone_number_stock_watch_with_http_info(id)
491
+
492
+ ```ruby
493
+ begin
494
+ # Stop watching a country
495
+ data, status_code, headers = api_instance.delete_phone_number_stock_watch_with_http_info(id)
496
+ p status_code # => 2xx
497
+ p headers # => { ... }
498
+ p data # => <DeleteSmsSenderId200Response>
499
+ rescue Zernio::ApiError => e
500
+ puts "Error when calling PhoneNumbersApi->delete_phone_number_stock_watch_with_http_info: #{e}"
501
+ end
502
+ ```
503
+
504
+ ### Parameters
505
+
506
+ | Name | Type | Description | Notes |
507
+ | ---- | ---- | ----------- | ----- |
508
+ | **id** | **String** | | |
509
+
510
+ ### Return type
511
+
512
+ [**DeleteSmsSenderId200Response**](DeleteSmsSenderId200Response.md)
513
+
514
+ ### Authorization
515
+
516
+ [bearerAuth](../README.md#bearerAuth)
517
+
518
+ ### HTTP request headers
519
+
520
+ - **Content-Type**: Not defined
521
+ - **Accept**: application/json
522
+
523
+
385
524
  ## get_phone_number
386
525
 
387
526
  > <GetPhoneNumber200Response> get_phone_number(id)
@@ -867,6 +1006,70 @@ This endpoint does not need any parameter.
867
1006
  - **Accept**: application/json
868
1007
 
869
1008
 
1009
+ ## list_phone_number_stock_watches
1010
+
1011
+ > <ListPhoneNumberStockWatches200Response> list_phone_number_stock_watches
1012
+
1013
+ List stock watches
1014
+
1015
+ ### Examples
1016
+
1017
+ ```ruby
1018
+ require 'time'
1019
+ require 'zernio-sdk'
1020
+ # setup authorization
1021
+ Zernio.configure do |config|
1022
+ # Configure Bearer authorization (JWT): bearerAuth
1023
+ config.access_token = 'YOUR_BEARER_TOKEN'
1024
+ end
1025
+
1026
+ api_instance = Zernio::PhoneNumbersApi.new
1027
+
1028
+ begin
1029
+ # List stock watches
1030
+ result = api_instance.list_phone_number_stock_watches
1031
+ p result
1032
+ rescue Zernio::ApiError => e
1033
+ puts "Error when calling PhoneNumbersApi->list_phone_number_stock_watches: #{e}"
1034
+ end
1035
+ ```
1036
+
1037
+ #### Using the list_phone_number_stock_watches_with_http_info variant
1038
+
1039
+ This returns an Array which contains the response data, status code and headers.
1040
+
1041
+ > <Array(<ListPhoneNumberStockWatches200Response>, Integer, Hash)> list_phone_number_stock_watches_with_http_info
1042
+
1043
+ ```ruby
1044
+ begin
1045
+ # List stock watches
1046
+ data, status_code, headers = api_instance.list_phone_number_stock_watches_with_http_info
1047
+ p status_code # => 2xx
1048
+ p headers # => { ... }
1049
+ p data # => <ListPhoneNumberStockWatches200Response>
1050
+ rescue Zernio::ApiError => e
1051
+ puts "Error when calling PhoneNumbersApi->list_phone_number_stock_watches_with_http_info: #{e}"
1052
+ end
1053
+ ```
1054
+
1055
+ ### Parameters
1056
+
1057
+ This endpoint does not need any parameter.
1058
+
1059
+ ### Return type
1060
+
1061
+ [**ListPhoneNumberStockWatches200Response**](ListPhoneNumberStockWatches200Response.md)
1062
+
1063
+ ### Authorization
1064
+
1065
+ [bearerAuth](../README.md#bearerAuth)
1066
+
1067
+ ### HTTP request headers
1068
+
1069
+ - **Content-Type**: Not defined
1070
+ - **Accept**: application/json
1071
+
1072
+
870
1073
  ## list_phone_numbers
871
1074
 
872
1075
  > <ListPhoneNumbers200Response> list_phone_numbers(opts)
data/docs/UsageApi.md CHANGED
@@ -240,7 +240,7 @@ end
240
240
 
241
241
  Usage snapshot (default) or billed-spend metering (with params)
242
242
 
243
- Dual-mode endpoint, selected by query params — fully backward compatible: **Without metering params (the default):** the plan / quota / usage snapshot — plan name, billing period, limits, usage counts, access state. Identical to `GET /v1/usage-stats`. Existing integrations keep working unchanged. **With `range`, `granularity`, `from`, or `to`:** usage METERING — billed spend (USD) by product family (`accounts`, `numbers`, `calls`, `sms`, `dlc`, `xApi`, `credits`, `other`) over the window, at `day` / `month` / `total` granularity, from Metronome's invoice breakdown (the CHARGE view — always reconciles with what gets billed). Also served at `GET /v1/usage/daily`. Usage-based accounts only — legacy Stripe accounts get `{ \"supported\": false, \"days\": [] }`. For per-domain consumption *volumes* use `GET /v1/usage/calls` and `GET /v1/usage/sms`. For the billing statement (balance, credits, caps, payment status) use `GET /v1/billing`.
243
+ Dual-mode endpoint, selected by query params — fully backward compatible: **Without metering params (the default):** the plan / quota / usage snapshot — plan name, billing period, limits, usage counts, access state. Identical to `GET /v1/usage-stats`. Existing integrations keep working unchanged. **With `range`, `granularity`, `from`, or `to`:** usage METERING — billed spend (USD) by product family (`accounts`, `numbers`, `calls`, `sms`, `dlc`, `xApi`, `credits`, `other`) over the window, at `day` / `month` / `total` granularity, from Metronome's invoice breakdown (the CHARGE view — always reconciles with what gets billed). Also served at `GET /v1/usage/daily`. Usage-based accounts only — legacy Stripe accounts get `{ \"supported\": false, \"days\": [] }`. **Attribution (metering mode):** `groupBy=profile|account` adds an `attribution` breakdown of the window's spend per profile or account, assembled from your own records and pro-rated against the invoice so `sum(groups) + unattributed` equals `totals` exactly. `profileId` / `accountId` instead project the whole payload (`days`, `totals`, `lineItems`) onto that one group; `peaks`, `callUsage` and `tax` are then `null` (workspace-level facts). Projected `days` spread the group's period share over each day (usage is attributed per period, not per day). Profile-scoped API keys and members only see their profiles' groups (`attribution.restricted: true`, with `totals` summing the visible groups). Credits, 10DLC fees and Verify are always unattributed. `profileId` / `accountId` on their own do not select metering mode: pair them with `range`. For per-domain consumption *volumes* use `GET /v1/usage/calls` and `GET /v1/usage/sms`. For the billing statement (balance, credits, caps, payment status) use `GET /v1/billing`.
244
244
 
245
245
  ### Examples
246
246
 
@@ -259,7 +259,10 @@ opts = {
259
259
  range: 'cycle', # String | Window to report. `cycle` / `prev-cycle` resolve to the customer's real billing-period bounds (falling back to a trailing 30 days when no invoice exists yet); `7d`…`12mo` are trailing windows; `custom` uses `from` / `to`.
260
260
  from: Date.parse('2013-10-20'), # Date | Inclusive start (UTC date). Required when `range=custom`.
261
261
  to: Date.parse('2013-10-20'), # Date | Inclusive end (UTC date). Required when `range=custom`. Max span 366 days.
262
- granularity: 'day' # String | Bucketing of the `days` series: `day` (one row per UTC day), `month` (one row per calendar month, dated to the 1st), or `total` (no series — read `totals`). Does not affect `totals`.
262
+ granularity: 'day', # String | Bucketing of the `days` series: `day` (one row per UTC day), `month` (one row per calendar month, dated to the 1st), or `total` (no series — read `totals`). Does not affect `totals`.
263
+ group_by: 'profile', # String | Metering mode. Adds `attribution`: the window's spend split per profile or per account (keys are ids; resolve names via `GET /v1/profiles` / `GET /v1/accounts`).
264
+ profile_id: 'profile_id_example', # String | Metering mode (pair with `range`). Project the payload onto this profile's attributed share. Mutually exclusive with `accountId`, and `groupBy` (if given) must be `profile`; 404 when the profile is not in your workspace (or outside a scoped key's profiles).
265
+ account_id: 'account_id_example' # String | Metering mode (pair with `range`). Project the payload onto this account's attributed share. Mutually exclusive with `profileId`, and `groupBy` (if given) must be `account`; 404 when the account is not visible to the caller.
263
266
  }
264
267
 
265
268
  begin
@@ -298,6 +301,9 @@ end
298
301
  | **from** | **Date** | Inclusive start (UTC date). Required when &#x60;range&#x3D;custom&#x60;. | [optional] |
299
302
  | **to** | **Date** | Inclusive end (UTC date). Required when &#x60;range&#x3D;custom&#x60;. Max span 366 days. | [optional] |
300
303
  | **granularity** | **String** | Bucketing of the &#x60;days&#x60; series: &#x60;day&#x60; (one row per UTC day), &#x60;month&#x60; (one row per calendar month, dated to the 1st), or &#x60;total&#x60; (no series — read &#x60;totals&#x60;). Does not affect &#x60;totals&#x60;. | [optional][default to &#39;day&#39;] |
304
+ | **group_by** | **String** | Metering mode. Adds &#x60;attribution&#x60;: the window&#39;s spend split per profile or per account (keys are ids; resolve names via &#x60;GET /v1/profiles&#x60; / &#x60;GET /v1/accounts&#x60;). | [optional] |
305
+ | **profile_id** | **String** | Metering mode (pair with &#x60;range&#x60;). Project the payload onto this profile&#39;s attributed share. Mutually exclusive with &#x60;accountId&#x60;, and &#x60;groupBy&#x60; (if given) must be &#x60;profile&#x60;; 404 when the profile is not in your workspace (or outside a scoped key&#39;s profiles). | [optional] |
306
+ | **account_id** | **String** | Metering mode (pair with &#x60;range&#x60;). Project the payload onto this account&#39;s attributed share. Mutually exclusive with &#x60;profileId&#x60;, and &#x60;groupBy&#x60; (if given) must be &#x60;account&#x60;; 404 when the account is not visible to the caller. | [optional] |
301
307
 
302
308
  ### Return type
303
309
 
@@ -0,0 +1,22 @@
1
+ # Zernio::UsageAttributionGroup
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **by_product** | [**UsageAttributionSliceByProduct**](UsageAttributionSliceByProduct.md) | | [optional] |
8
+ | **total_usd** | **Float** | | [optional] |
9
+ | **key** | **String** | Profile id or account id, per &#x60;groupBy&#x60;. | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::UsageAttributionGroup.new(
17
+ by_product: null,
18
+ total_usd: null,
19
+ key: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,20 @@
1
+ # Zernio::UsageAttributionSlice
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **by_product** | [**UsageAttributionSliceByProduct**](UsageAttributionSliceByProduct.md) | | [optional] |
8
+ | **total_usd** | **Float** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::UsageAttributionSlice.new(
16
+ by_product: null,
17
+ total_usd: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,34 @@
1
+ # Zernio::UsageAttributionSliceByProduct
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **accounts** | **Float** | | [optional] |
8
+ | **numbers** | **Float** | | [optional] |
9
+ | **calls** | **Float** | | [optional] |
10
+ | **sms** | **Float** | | [optional] |
11
+ | **verify** | **Float** | | [optional] |
12
+ | **dlc** | **Float** | | [optional] |
13
+ | **x_api** | **Float** | | [optional] |
14
+ | **credits** | **Float** | | [optional] |
15
+ | **other** | **Float** | | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'zernio-sdk'
21
+
22
+ instance = Zernio::UsageAttributionSliceByProduct.new(
23
+ accounts: null,
24
+ numbers: null,
25
+ calls: null,
26
+ sms: null,
27
+ verify: null,
28
+ dlc: null,
29
+ x_api: null,
30
+ credits: null,
31
+ other: null
32
+ )
33
+ ```
34
+
@@ -13,6 +13,8 @@
13
13
  | **call_usage** | [**UsageMeteringCallUsage**](UsageMeteringCallUsage.md) | | [optional] |
14
14
  | **period** | [**UsageMeteringPeriod**](UsageMeteringPeriod.md) | | [optional] |
15
15
  | **tax** | [**UsageMeteringTax**](UsageMeteringTax.md) | | [optional] |
16
+ | **attribution** | [**UsageMeteringAttribution**](UsageMeteringAttribution.md) | | [optional] |
17
+ | **scope** | [**UsageMeteringScope**](UsageMeteringScope.md) | | [optional] |
16
18
 
17
19
  ## Example
18
20
 
@@ -28,7 +30,9 @@ instance = Zernio::UsageMetering.new(
28
30
  peaks: null,
29
31
  call_usage: null,
30
32
  period: null,
31
- tax: null
33
+ tax: null,
34
+ attribution: null,
35
+ scope: null
32
36
  )
33
37
  ```
34
38
 
@@ -0,0 +1,26 @@
1
+ # Zernio::UsageMeteringAttribution
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **group_by** | **String** | | [optional] |
8
+ | **groups** | [**Array&lt;UsageAttributionGroup&gt;**](UsageAttributionGroup.md) | | [optional] |
9
+ | **unattributed** | [**UsageAttributionSlice**](UsageAttributionSlice.md) | Spend no profile/account can claim: credits, 10DLC fees, Verify, and usage whose record no longer resolves to an account. Zero for a restricted principal. | [optional] |
10
+ | **totals** | [**UsageAttributionSlice**](UsageAttributionSlice.md) | The window totals; for a restricted principal, the sum of the visible groups. | [optional] |
11
+ | **restricted** | **Boolean** | True when the caller (profile-scoped API key or member) cannot see every profile: &#x60;groups&#x60; are filtered, &#x60;totals&#x60; sum them, &#x60;unattributed&#x60; is zero, and the top-level &#x60;days&#x60; / &#x60;totals&#x60; / &#x60;lineItems&#x60; are projected onto the visible groups with &#x60;peaks&#x60;, &#x60;callUsage&#x60; and &#x60;tax&#x60; null. | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'zernio-sdk'
17
+
18
+ instance = Zernio::UsageMeteringAttribution.new(
19
+ group_by: null,
20
+ groups: null,
21
+ unattributed: null,
22
+ totals: null,
23
+ restricted: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,49 @@
1
+ # Zernio::UsageMeteringScope
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'zernio-sdk'
13
+
14
+ Zernio::UsageMeteringScope.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'DeleteInboxReviewReplyRequest',
18
+ # :'UsageMeteringScopeOneOf'
19
+ # ]
20
+ ```
21
+
22
+ ### build
23
+
24
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
25
+
26
+ #### Example
27
+
28
+ ```ruby
29
+ require 'zernio-sdk'
30
+
31
+ Zernio::UsageMeteringScope.build(data)
32
+ # => #<DeleteInboxReviewReplyRequest:0x00007fdd4aab02a0>
33
+
34
+ Zernio::UsageMeteringScope.build(data_that_doesnt_match)
35
+ # => nil
36
+ ```
37
+
38
+ #### Parameters
39
+
40
+ | Name | Type | Description |
41
+ | ---- | ---- | ----------- |
42
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
43
+
44
+ #### Return type
45
+
46
+ - `DeleteInboxReviewReplyRequest`
47
+ - `UsageMeteringScopeOneOf`
48
+ - `nil` (if no type matches)
49
+
@@ -0,0 +1,18 @@
1
+ # Zernio::UsageMeteringScopeOneOf
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **profile_id** | **String** | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'zernio-sdk'
13
+
14
+ instance = Zernio::UsageMeteringScopeOneOf.new(
15
+ profile_id: null
16
+ )
17
+ ```
18
+