File tree Expand file tree Collapse file tree 1 file changed +30
-4
lines changed Expand file tree Collapse file tree 1 file changed +30
-4
lines changed Original file line number Diff line number Diff line change @@ -35,16 +35,42 @@ Once we find one, we'll purchase it for our account.
3535 print " No numbers in 530 available"
3636
3737
38- Toll Free Numbers
39- ^^^^^^^^^^^^^^^^^^^^^^^^
38+ Local, Toll Free, and Mobile Numbers
39+ ------------------------------------
4040
41- By default, :meth: `PhoneNumbers.search ` looks for local phone numbers. Add a
42- :data: `type ` : ``tollfree `` parameter to search toll-free numbers instead.
41+ By default, :meth: `PhoneNumbers.search ` looks for local phone numbers. To
42+ search for numbers for a given type, include the desired type in the
43+ :attr: `type ` paramter.
44+
45+ Available types are:
46+ - `local `
47+ - `tollfree `
48+ - `mobile `
4349
4450.. code-block :: python
4551
52+ # Local
53+ numbers = client.phone_numbers.search(type = " local" )
54+
55+ # Toll Free
4656 numbers = client.phone_numbers.search(type = " tollfree" )
4757
58+ # Mobile
59+ numbers = client.phone_numbers.search(type = " mobile" )
60+
61+ Similarly, you can purchase numbers of a given type. You must still include
62+ the :attr: `phone_number ` or :attr: `area_code ` parameters.
63+
64+ .. code-block :: python
65+
66+ # Local
67+ numbers = client.phone_numbers.purchase(type = ' local' , phone_number' (919) 123-4567' )
68+
69+ # Toll Free
70+ numbers = client.phone_numbers.purchase(type = ' tollfree' , phone_number' (919) 123-4567' )
71+
72+ # Mobile
73+ numbers = client.phone_numbers.purchase(type = ' mobile' , phone_number' (919) 123-4567' )
4874
4975 Numbers Containing Words
5076^^^^^^^^^^^^^^^^^^^^^^^^^^
You can’t perform that action at this time.
0 commit comments