Vonage Numbers package
Project description
Vonage Numbers Package
This package contains the code to use Vonage's Numbers API in Python.
It includes methods for managing and buying numbers.
Usage
It is recommended to use this as part of the main vonage package. The examples below assume you've created an instance of the vonage.Vonage class called vonage_client.
List Numbers You Own
numbers, count, next_page = vonage_client.numbers.list_owned_numbers()
print(numbers)
print(count)
print(next_page)
# With filtering
from vonage_numbers import ListOwnedNumbersFilter
numbers, count, next_page = vonage_client.numbers.list_owned_numbers(
ListOwnedNumbersFilter(country='GB', size=3, index=2)
)
numbers, count, next_page_index = vonage_client.numbers.list_owned_numbers()
print(numbers)
print(count)
print(next_page_index)
Search for Available Numbers
from vonage_numbers import SearchAvailableNumbersFilter
numbers, count, next_page_index = vonage_client.numbers.search_available_numbers(
SearchAvailableNumbersFilter(
country='GB', size=10, pattern='44701', search_pattern=1
)
)
print(numbers)
print(count)
print(next_page_index)
Buy a Number
from vonage_numbers import NumberParams
status = vonage_client.numbers.buy_number(NumberParams(country='GB', msisdn='447007000000'))
print(status)
Cancel a number
from vonage_numbers import NumberParams
status = vonage_client.numbers.cancel_number(NumberParams(country='GB', msisdn='447007000000'))
print(status)
Update a Number
from vonage_numbers import UpdateNumberParams
status = vonage_client.numbers.update_number(
UpdateNumberParams(
country='GB',
msisdn='447007000000',
mo_http_url='https://example.com',
mo_smpp_sytem_type='inbound',
voice_callback_type='tel',
voice_callback_value='447008000000',
voice_status_callback='https://example.com',
)
)
print(status)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vonage_numbers-1.0.5.tar.gz.
File metadata
- Download URL: vonage_numbers-1.0.5.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5eaa360fdaaebc833759492732d8d11b16548ca799d2d93b9822b351836e519
|
|
| MD5 |
3381dfc99af7eb47e18e33a262860ed5
|
|
| BLAKE2b-256 |
6341fc363b49e317245b627b62ef7b14c2323f1d4ff973dad4b7336c3d8b0436
|
File details
Details for the file vonage_numbers-1.0.5-py3-none-any.whl.
File metadata
- Download URL: vonage_numbers-1.0.5-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca4232e80fc6bb1a273dece9a49a4aac3fed5110424091bf1702014aa537f401
|
|
| MD5 |
65cff46468615ace6607e00076fabc47
|
|
| BLAKE2b-256 |
fb053dabd059b309de4d277e8c07e1b0de9f9f17f96401d26514b68289fb383e
|