Skip to content

GetRent

Pavel Kuzmin edited this page Aug 10, 2020 · 6 revisions

[<< go back]

Diagram

Diagram

from onlinesimru import Driver
driver = Driver('YOUR_TOKEN').rent()

Example

from onlinesimru import Driver


def main():
    driver = Driver('YOUR_TOKEN').rent()
    tariffs = driver.tariffs()
    print(tariffs)

    get = driver.get()
    print(get)

    state = driver.state()
    print(state)
    # or 
    state = driver.stateOne(tzid)
    print(state)
    ...
    close = driver.close(tzid)
    close(state)

main()

Get new rent number

Params Default Description
$country 7 country
$days 1 count rent days
$extension false. auto extension

state [docs ru] [docs en]

Get numbers list


stateOne [docs ru] [docs en]

Get selected number

Params Default Description
$tzid no oreration tzid

extend [docs ru] [docs en]

Extend user number

Params Default Description
$tzid no operation tzid
$days 1 days count

portReload [docs ru] [docs en]

Reload selected port

Params Default Description
$tzid no operation tzid

tariffs [docs ru] [docs en]

Rent tariffs


close [docs ru] [docs en]

Close selected number

Params Default Description
$tzid no operation tzid
Clone this wiki locally