Skip to content

GetRent

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

[<< go back]

Diagram

Diagram

Methods

const driver = new OnlineSimDriver('APIKEY').rent().{method}();

Example

const driver = new OnlineSimDriver('APIKEY');
const getter = driver.rent()

getter.tariffs().then((result) => {
  console.log(result);
})

getter.get().then((result) => {
  console.log(result);
})

getter.state().then((result) => {
  console.log(result);
})
// or 
getter.stateOne(res.tzid).then((result) => {
  console.log(result);
})
...
getter.close(res.tzid).then((result) => {
  console.log(result);
})

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