[{"data":1,"prerenderedAt":942},["ShallowReactive",2],{"navigation":3,"\u002Fuser":43,"\u002Fuser-surround":937},[4,8,13,18,23,28,33,38],{"title":5,"path":6,"stem":7},"Getting started","\u002F","index",{"title":9,"path":10,"stem":11,"order":12},"Numbers","\u002Fnumbers","numbers",1,{"title":14,"path":15,"stem":16,"order":17},"Rent","\u002Frent","rent",2,{"title":19,"path":20,"stem":21,"order":22},"User","\u002Fuser","user",3,{"title":24,"path":25,"stem":26,"order":27},"Free numbers","\u002Ffree","free",4,{"title":29,"path":30,"stem":31,"order":32},"Webhooks","\u002Fwebhooks","webhooks",5,{"title":34,"path":35,"stem":36,"order":37},"Testing","\u002Ftesting","testing",6,{"title":39,"path":40,"stem":41,"order":42},"Changelog","\u002Fchangelog","changelog",7,{"id":44,"title":19,"body":45,"description":931,"extension":932,"meta":933,"navigation":934,"path":20,"seo":935,"stem":21,"__hash__":936},"docs\u002Fuser.md",{"type":46,"value":47,"toc":923},"minimark",[48,52,56,82,107,191,211,214,217,232,300,373,377,380,412,488,594,598,605,627,656,668,672,675,689,708,712,715,756,812,919],[49,50,51],"h2",{"id":51},"balance",[53,54,55],"p",{},"Balance in USD.",[57,58,63],"pre",{"className":59,"code":60,"language":61,"meta":62,"style":62},"language-java shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","Balance balance()\n","java","",[64,65,66],"code",{"__ignoreMap":62},[67,68,70,74,78],"span",{"class":69,"line":12},"line",[67,71,73],{"class":72},"spNyl","Balance",[67,75,77],{"class":76},"s2Zo4"," balance",[67,79,81],{"class":80},"sMK4o","()\n",[53,83,84,86,87,90,91,94,95,98,99,102,103,106],{},[64,85,73],{},": ",[64,88,89],{},"balance()"," includes the sum frozen by numbers and unconfirmed rents in progress (",[64,92,93],{},"zbalance()",", which may be negative): available = ",[64,96,97],{},"balance() − max(zbalance(), 0)",". ",[64,100,101],{},"income()"," is the partner income (",[64,104,105],{},"null"," when not sent). The server caches the answer for 60 s.",[57,108,110],{"className":59,"code":109,"language":61,"meta":62,"style":62},"Balance b = client.user().balance();\ndouble available = b.balance() - Math.max(b.zbalance(), 0);\n",[64,111,112,139],{"__ignoreMap":62},[67,113,114,116,120,123,126,129,131,134,136],{"class":69,"line":12},[67,115,73],{"class":72},[67,117,119],{"class":118},"sTEyZ"," b ",[67,121,122],{"class":80},"=",[67,124,125],{"class":118}," client",[67,127,128],{"class":80},".",[67,130,21],{"class":76},[67,132,133],{"class":80},"().",[67,135,51],{"class":76},[67,137,138],{"class":80},"();\n",[67,140,141,144,147,149,152,154,156,159,162,165,167,170,173,176,178,181,184,188],{"class":69,"line":17},[67,142,143],{"class":72},"double",[67,145,146],{"class":118}," available ",[67,148,122],{"class":80},[67,150,151],{"class":118}," b",[67,153,128],{"class":80},[67,155,51],{"class":76},[67,157,158],{"class":80},"()",[67,160,161],{"class":80}," -",[67,163,164],{"class":118}," Math",[67,166,128],{"class":80},[67,168,169],{"class":76},"max",[67,171,172],{"class":80},"(",[67,174,175],{"class":118},"b",[67,177,128],{"class":80},[67,179,180],{"class":76},"zbalance",[67,182,183],{"class":80},"(),",[67,185,187],{"class":186},"sbssI"," 0",[67,189,190],{"class":80},");\n",[53,192,193,194,197,198,201,202,201,205,201,208,128],{},"Errors: ",[64,195,196],{},"ApiException"," ",[64,199,200],{},"ERROR_WRONG_KEY",", ",[64,203,204],{},"ACCOUNT_BLOCKED",[64,206,207],{},"API_ACCESS_DISABLED",[64,209,210],{},"API_ACCESS_IP",[49,212,213],{"id":213},"profile",[53,215,216],{},"The account profile.",[57,218,220],{"className":59,"code":219,"language":61,"meta":62,"style":62},"Profile profile()\n",[64,221,222],{"__ignoreMap":62},[67,223,224,227,230],{"class":69,"line":12},[67,225,226],{"class":72},"Profile",[67,228,229],{"class":76}," profile",[67,231,81],{"class":80},[53,233,234,86,236,201,239,201,242,201,245,201,248,201,251,201,254,201,257,260,261,264,265,201,268,260,271,201,274,277,278,264,281,260,284,201,287,289,290,260,293,296,297,299],{},[64,235,226],{},[64,237,238],{},"id()",[64,240,241],{},"name()",[64,243,244],{},"username()",[64,246,247],{},"email()",[64,249,250],{},"locale()",[64,252,253],{},"currency()",[64,255,256],{},"numberCountry()",[64,258,259],{},"numberReject()"," (",[64,262,263],{},"List\u003CString>","), ",[64,266,267],{},"webhookUrl()",[64,269,270],{},"apiAccess()",[64,272,273],{},"true",[64,275,276],{},"false"," when API access is disabled in the profile, or a map of allowed IPs, as a Gson ",[64,279,280],{},"JsonElement",[64,282,283],{},"number()",[64,285,286],{},"Long",[64,288,105],{}," when no phone is linked), ",[64,291,292],{},"country()",[64,294,295],{},"String"," or ",[64,298,105],{},"), ….",[57,301,303],{"className":59,"code":302,"language":61,"meta":62,"style":62},"Profile p = client.user().profile();\nSystem.out.println(p.email() + \" \" + p.webhookUrl());\n",[64,304,305,326],{"__ignoreMap":62},[67,306,307,309,312,314,316,318,320,322,324],{"class":69,"line":12},[67,308,226],{"class":72},[67,310,311],{"class":118}," p ",[67,313,122],{"class":80},[67,315,125],{"class":118},[67,317,128],{"class":80},[67,319,21],{"class":76},[67,321,133],{"class":80},[67,323,213],{"class":76},[67,325,138],{"class":80},[67,327,328,331,333,336,338,341,343,345,347,350,352,355,358,360,362,365,367,370],{"class":69,"line":17},[67,329,330],{"class":118},"System",[67,332,128],{"class":80},[67,334,335],{"class":118},"out",[67,337,128],{"class":80},[67,339,340],{"class":76},"println",[67,342,172],{"class":80},[67,344,53],{"class":118},[67,346,128],{"class":80},[67,348,349],{"class":76},"email",[67,351,158],{"class":80},[67,353,354],{"class":80}," +",[67,356,357],{"class":80}," \"",[67,359,357],{"class":80},[67,361,354],{"class":80},[67,363,364],{"class":118}," p",[67,366,128],{"class":80},[67,368,369],{"class":76},"webhookUrl",[67,371,372],{"class":80},"());\n",[49,374,376],{"id":375},"paymenthistory","paymentHistory",[53,378,379],{},"Top-up orders (paginated, newest first) and the available payment methods.",[57,381,383],{"className":59,"code":382,"language":61,"meta":62,"style":62},"PaymentHistory paymentHistory()\nPaymentHistory paymentHistory(int page)\n",[64,384,385,395],{"__ignoreMap":62},[67,386,387,390,393],{"class":69,"line":12},[67,388,389],{"class":72},"PaymentHistory",[67,391,392],{"class":76}," paymentHistory",[67,394,81],{"class":80},[67,396,397,399,401,403,406,409],{"class":69,"line":17},[67,398,389],{"class":72},[67,400,392],{"class":76},[67,402,172],{"class":80},[67,404,405],{"class":72},"int",[67,407,408],{"class":118}," page",[67,410,411],{"class":80},")\n",[53,413,414,86,416,260,419,264,422,201,425,201,428,201,431,98,433,436,437,440,441,443,444,447,448,98,450,452,453,201,456,459,460,86,463,201,466,201,469,201,472,201,475,201,478,201,481,201,484,487],{},[64,415,389],{},[64,417,418],{},"orders()",[64,420,421],{},"Paginator\u003CPaymentOrder>",[64,423,424],{},"paylist()",[64,426,427],{},"domains()",[64,429,430],{},"forms()",[64,432,253],{},[64,434,435],{},"PaymentOrder.sum()"," stays a decimal string (",[64,438,439],{},"\"89.00\"","); ",[64,442,253],{}," and ",[64,445,446],{},"formText()"," may be ",[64,449,105],{},[64,451,424],{}," maps a group id to its payment methods; when the ids are 0, 1, 2… the server sends a JSON array, whose items are keyed ",[64,454,455],{},"\"0\"",[64,457,458],{},"\"1\"",", ….\n",[64,461,462],{},"Paginator\u003CT>",[64,464,465],{},"data()",[64,467,468],{},"currentPage()",[64,470,471],{},"lastPage()",[64,473,474],{},"perPage()",[64,476,477],{},"total()",[64,479,480],{},"from()",[64,482,483],{},"to()",[64,485,486],{},"nextPageUrl()",", ….",[57,489,491],{"className":59,"code":490,"language":61,"meta":62,"style":62},"Paginator\u003CPaymentOrder> orders = client.user().paymentHistory().orders();\nSystem.out.println(orders.total() + \" orders, page \" + orders.currentPage() + \"\u002F\" + orders.lastPage());\n",[64,492,493,529],{"__ignoreMap":62},[67,494,495,498,501,504,507,510,512,514,516,518,520,522,524,527],{"class":69,"line":12},[67,496,497],{"class":72},"Paginator",[67,499,500],{"class":80},"\u003C",[67,502,503],{"class":72},"PaymentOrder",[67,505,506],{"class":80},">",[67,508,509],{"class":118}," orders ",[67,511,122],{"class":80},[67,513,125],{"class":118},[67,515,128],{"class":80},[67,517,21],{"class":76},[67,519,133],{"class":80},[67,521,376],{"class":76},[67,523,133],{"class":80},[67,525,526],{"class":76},"orders",[67,528,138],{"class":80},[67,530,531,533,535,537,539,541,543,545,547,550,552,554,556,560,563,565,568,570,573,575,577,579,581,583,585,587,589,592],{"class":69,"line":17},[67,532,330],{"class":118},[67,534,128],{"class":80},[67,536,335],{"class":118},[67,538,128],{"class":80},[67,540,340],{"class":76},[67,542,172],{"class":80},[67,544,526],{"class":118},[67,546,128],{"class":80},[67,548,549],{"class":76},"total",[67,551,158],{"class":80},[67,553,354],{"class":80},[67,555,357],{"class":80},[67,557,559],{"class":558},"sfazB"," orders, page ",[67,561,562],{"class":80},"\"",[67,564,354],{"class":80},[67,566,567],{"class":118}," orders",[67,569,128],{"class":80},[67,571,572],{"class":76},"currentPage",[67,574,158],{"class":80},[67,576,354],{"class":80},[67,578,357],{"class":80},[67,580,6],{"class":558},[67,582,562],{"class":80},[67,584,354],{"class":80},[67,586,567],{"class":118},[67,588,128],{"class":80},[67,590,591],{"class":76},"lastPage",[67,593,372],{"class":80},[49,595,597],{"id":596},"setwebhookurl","setWebhookUrl",[53,599,600,601,604],{},"Set the URL that receives SMS webhooks (see ",[602,603,29],"a",{"href":30},").",[57,606,608],{"className":59,"code":607,"language":61,"meta":62,"style":62},"void setWebhookUrl(String url)\n",[64,609,610],{"__ignoreMap":62},[67,611,612,615,618,620,622,625],{"class":69,"line":12},[67,613,614],{"class":72},"void",[67,616,617],{"class":76}," setWebhookUrl",[67,619,172],{"class":80},[67,621,295],{"class":72},[67,623,624],{"class":118}," url",[67,626,411],{"class":80},[57,628,630],{"className":59,"code":629,"language":61,"meta":62,"style":62},"client.user().setWebhookUrl(\"https:\u002F\u002Fexample.com\u002Fonlinesim-hook\");\n",[64,631,632],{"__ignoreMap":62},[67,633,634,637,639,641,643,645,647,649,652,654],{"class":69,"line":12},[67,635,636],{"class":118},"client",[67,638,128],{"class":80},[67,640,21],{"class":76},[67,642,133],{"class":80},[67,644,597],{"class":76},[67,646,172],{"class":80},[67,648,562],{"class":80},[67,650,651],{"class":558},"https:\u002F\u002Fexample.com\u002Fonlinesim-hook",[67,653,562],{"class":80},[67,655,190],{"class":80},[53,657,193,658,197,660,663,664,667],{},[64,659,196],{},[64,661,662],{},"VALIDATION_ERROR"," for an invalid URL; ",[64,665,666],{},"getMessage()"," holds the server's field messages.",[49,669,671],{"id":670},"clearwebhookurl","clearWebhookUrl",[53,673,674],{},"Remove the webhook URL, also from operations in progress.",[57,676,678],{"className":59,"code":677,"language":61,"meta":62,"style":62},"void clearWebhookUrl()\n",[64,679,680],{"__ignoreMap":62},[67,681,682,684,687],{"class":69,"line":12},[67,683,614],{"class":72},[67,685,686],{"class":76}," clearWebhookUrl",[67,688,81],{"class":80},[57,690,692],{"className":59,"code":691,"language":61,"meta":62,"style":62},"client.user().clearWebhookUrl();\n",[64,693,694],{"__ignoreMap":62},[67,695,696,698,700,702,704,706],{"class":69,"line":12},[67,697,636],{"class":118},[67,699,128],{"class":80},[67,701,21],{"class":76},[67,703,133],{"class":80},[67,705,671],{"class":76},[67,707,138],{"class":80},[49,709,711],{"id":710},"webhooklogs","webhookLogs",[53,713,714],{},"Webhook delivery log, newest first, 10 per page.",[57,716,718],{"className":59,"code":717,"language":61,"meta":62,"style":62},"Paginator\u003CWebhookLog> webhookLogs()\nPaginator\u003CWebhookLog> webhookLogs(int page)\n",[64,719,720,736],{"__ignoreMap":62},[67,721,722,724,726,729,731,734],{"class":69,"line":12},[67,723,497],{"class":72},[67,725,500],{"class":80},[67,727,728],{"class":118},"WebhookLog",[67,730,506],{"class":80},[67,732,733],{"class":76}," webhookLogs",[67,735,81],{"class":80},[67,737,738,740,742,744,746,748,750,752,754],{"class":69,"line":17},[67,739,497],{"class":72},[67,741,500],{"class":80},[67,743,728],{"class":118},[67,745,506],{"class":80},[67,747,733],{"class":76},[67,749,172],{"class":80},[67,751,405],{"class":72},[67,753,408],{"class":118},[67,755,411],{"class":80},[53,757,758,86,760,201,762,201,765,201,767,201,770,201,773,201,776,201,779,201,782,785,786,788,789,296,792,201,795,788,797,201,800,296,803,201,806,808,809,604],{},[64,759,728],{},[64,761,238],{},[64,763,764],{},"userId()",[64,766,267],{},[64,768,769],{},"type()",[64,771,772],{},"params()",[64,774,775],{},"status()",[64,777,778],{},"error()",[64,780,781],{},"createdAt()",[64,783,784],{},"updatedAt()"," — ",[64,787,769],{}," is ",[64,790,791],{},"receiving_sms",[64,793,794],{},"rent_sms",[64,796,775],{},[64,798,799],{},"success",[64,801,802],{},"fail",[64,804,805],{},"pending",[64,807,772],{}," the payload that was sent (",[64,810,811],{},"WebhookPayload",[57,813,815],{"className":59,"code":814,"language":61,"meta":62,"style":62},"for (WebhookLog log : client.user().webhookLogs().data()) {\n  System.out.println(log.createdAt() + \" \" + log.status() + \" \" + log.error());\n}\n",[64,816,817,854,914],{"__ignoreMap":62},[67,818,819,823,825,827,830,833,835,837,839,841,843,845,848,851],{"class":69,"line":12},[67,820,822],{"class":821},"s7zQu","for",[67,824,260],{"class":80},[67,826,728],{"class":72},[67,828,829],{"class":118}," log ",[67,831,832],{"class":821},":",[67,834,125],{"class":118},[67,836,128],{"class":80},[67,838,21],{"class":76},[67,840,133],{"class":80},[67,842,711],{"class":76},[67,844,133],{"class":80},[67,846,847],{"class":76},"data",[67,849,850],{"class":80},"())",[67,852,853],{"class":80}," {\n",[67,855,856,859,861,863,865,867,869,872,874,877,879,881,883,885,887,890,892,895,897,899,901,903,905,907,909,912],{"class":69,"line":17},[67,857,858],{"class":118},"  System",[67,860,128],{"class":80},[67,862,335],{"class":118},[67,864,128],{"class":80},[67,866,340],{"class":76},[67,868,172],{"class":80},[67,870,871],{"class":118},"log",[67,873,128],{"class":80},[67,875,876],{"class":76},"createdAt",[67,878,158],{"class":80},[67,880,354],{"class":80},[67,882,357],{"class":80},[67,884,357],{"class":80},[67,886,354],{"class":80},[67,888,889],{"class":118}," log",[67,891,128],{"class":80},[67,893,894],{"class":76},"status",[67,896,158],{"class":80},[67,898,354],{"class":80},[67,900,357],{"class":80},[67,902,357],{"class":80},[67,904,354],{"class":80},[67,906,889],{"class":118},[67,908,128],{"class":80},[67,910,911],{"class":76},"error",[67,913,372],{"class":80},[67,915,916],{"class":69,"line":22},[67,917,918],{"class":80},"}\n",[920,921,922],"style",{},"html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}",{"title":62,"searchDepth":17,"depth":17,"links":924},[925,926,927,928,929,930],{"id":51,"depth":17,"text":51},{"id":213,"depth":17,"text":213},{"id":375,"depth":17,"text":376},{"id":596,"depth":17,"text":597},{"id":670,"depth":17,"text":671},{"id":710,"depth":17,"text":711},"Balance, profile, payments and the webhook URL — client.user().","md",{},{"order":22},{"title":19,"description":931},"KfbyUABQS-ceEgrm8UvtqCZSSzb_FHbGkoKtL_xV9fU",[938,940],{"title":34,"path":35,"stem":36,"description":939,"order":37},"Test your integration offline with MockOnlineSim — no network, key or money.",{"title":29,"path":30,"stem":31,"description":941,"order":32},"Receive SMS as HTTP callbacks and parse them with OnlineSim.parseWebhook.",1795164317215]