[{"data":1,"prerenderedAt":839},["ShallowReactive",2],{"navigation":3,"\u002Fchangelog":43,"\u002Fchangelog-surround":835},[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":39,"body":45,"description":829,"extension":830,"meta":831,"navigation":832,"path":40,"seo":833,"stem":41,"__hash__":834},"docs\u002Fchangelog.md",{"type":46,"value":47,"toc":822},"minimark",[48,60,65,68,170,174,262,266,273,356,360,363],[49,50,51,52,59],"p",{},"The full history is in ",[53,54,58],"a",{"href":55,"rel":56},"https:\u002F\u002Fgithub.com\u002Fs00d\u002Fonlinesim-go-api\u002Fblob\u002Fmaster\u002FCHANGELOG.md",[57],"nofollow","CHANGELOG.md",".",[61,62,64],"h2",{"id":63},"_311","3.1.1",[49,66,67],{},"Aligned with the regenerated backend API spec.",[69,70,71,115,133,158],"ul",{},[72,73,74,75,79,80,83,84,79,87,90,91,94,95,98,99,102,103,106,107,110,111,114],"li",{},"Decoding fixes: ",[76,77,78],"code",{},"Profile.Number"," (",[76,81,82],{},"int64",") and ",[76,85,86],{},"Profile.Country",[76,88,89],{},"string",") were swapped; ",[76,92,93],{},"RentSMS.Code"," accepts the integer ",[76,96,97],{},"0"," of a ",[76,100,101],{},"notify"," SMS (as ",[76,104,105],{},"\"0\"","); rent ",[76,108,109],{},"Sum"," from a number or a decimal string; ",[76,112,113],{},"PaymentHistory.Paylist"," sent as a JSON array is kept (keyed by index).",[72,116,117,120,121,124,125,128,129,132],{},[76,118,119],{},"WaitCode"," retries ",[76,122,123],{},"TRY_AGAIN_LATER"," (HTTP 429), ",[76,126,127],{},"ERROR_UNDEFINED"," and ",[76,130,131],{},"INTERVAL_CONCURRENT_REQUESTS_ERROR"," until its timeout.",[72,134,135,136,138,139,138,142,138,145,138,147,150,151,154,155,59],{},"Error messages: ",[76,137,105],{},", ",[76,140,141],{},"ACCOUNT_CLEANED",[76,143,144],{},"USER_NOT_ACTIVATED",[76,146,127],{},[76,148,149],{},"FORWARD_NOT_SUPPORTED"," added; dead codes removed; ",[76,152,153],{},"*NoNumberError"," only for ",[76,156,157],{},"NO_NUMBER",[72,159,160,161,163,164,167,168,59],{},"The mock follows the backend: rent reservation and confirmation by the first non-",[76,162,101],{}," SMS, extend\u002Fclose rules, ",[76,165,166],{},"setOperationRevise"," answers, missing vs wrong key, webhook-log params, free list and payment history shapes. See ",[53,169,34],{"href":35},[61,171,173],{"id":172},"_310","3.1.0",[69,175,176,197,231],{},[72,177,178,179,182,183,186,187,190,191,194,195,59],{},"New in-process mock: ",[76,180,181],{},"mock.New(opts...)"," is an ",[76,184,185],{},"http.RoundTripper"," that answers like the real API; ",[76,188,189],{},"m.Client()"," returns a normal client wired to it — no listener, network, key, money or clock. ",[76,192,193],{},"mock.Start(opts...)"," serves the same mock over HTTP. See ",[53,196,34],{"href":35},[72,198,199,200,138,203,138,206,138,209,138,212,138,215,138,218,138,221,138,224,138,227,230],{},"Mock control API aligned with the other OnlineSim SDKs: ",[76,201,202],{},"AddSMS",[76,204,205],{},"AddSMSAfter",[76,207,208],{},"FailNext",[76,210,211],{},"FailNextTransport",[76,213,214],{},"SetBalance",[76,216,217],{},"Balance",[76,219,220],{},"Operations",[76,222,223],{},"Rents",[76,225,226],{},"Requests",[76,228,229],{},"Reset",". It keeps a real balance (price frozen on order, spent on close after an SMS, refunded without one), derives tariffs from its prices and records webhook deliveries.",[72,232,233,234,138,237,138,240,138,243,138,246,249,250,138,252,6,255,258,259,59],{},"The old mock helpers (",[76,235,236],{},"ScriptSMS",[76,238,239],{},"SmsScript",[76,241,242],{},"FailNoNumber",[76,244,245],{},"FailBalance",[76,247,248],{},"AddRentSMS",", the 3-argument ",[76,251,214],{},[76,253,254],{},"NewBuilder",[76,256,257],{},"StatePath"," persistence) are gone; the mock key is now ",[76,260,261],{},"mock-key",[61,263,265],{"id":264},"_300","3.0.0",[49,267,268,269,272],{},"Module path ",[76,270,271],{},"github.com\u002Fs00d\u002Fonlinesim-go-api\u002Fv3",". The API follows the shared OnlineSim SDK contract; v2 code does not compile unchanged.",[69,274,275,282,299,310,316,329],{},[72,276,277,278,281],{},"The key is sent as ",[76,279,280],{},"Authorization: Bearer \u003Ckey>",", never in the URL.",[72,283,284,285,138,288,138,290,138,293,296,297,59],{},"Typed errors: ",[76,286,287],{},"*APIError",[76,289,153],{},[76,291,292],{},"*TransportError",[76,294,295],{},"ErrTimeout","; a wrong key (HTTP 456) is an ",[76,298,287],{},[72,300,301,303,304,6,307,59],{},[76,302,119],{}," polls every 5 s for up to 10 min, stops at once on a finished operation, retries network errors, takes an injectable ",[76,305,306],{},"Sleep",[76,308,309],{},"Now",[72,311,312,313,315],{},"No client-side pacing or retries; ",[76,314,131],{}," reaches the caller.",[72,317,318,319,322,323,138,326,328],{},"New: ",[76,320,321],{},"Free().List"," options, ",[76,324,325],{},"ParseWebhook",[76,327,248],{}," in the mock; the mock checks paths and the key.",[72,330,331,332,335,336,335,339,138,342,138,345,138,348,335,351,335,353,59],{},"Removed: ",[76,333,334],{},"Numbers().Repeat"," \u002F ",[76,337,338],{},"Service",[76,340,341],{},"ServiceNumber",[76,343,344],{},"Rent().PortReload",[76,346,347],{},"User().CreateEmpty",[76,349,350],{},"Free().Countries",[76,352,9],{},[76,354,355],{},"Messages",[61,357,359],{"id":358},"migrating-from-v2","Migrating from v2",[49,361,362],{},"Replace the import path, then:",[364,365,366,379],"table",{},[367,368,369],"thead",{},[370,371,372,376],"tr",{},[373,374,375],"th",{},"v2",[373,377,378],{},"v3",[380,381,382,394,410,429,441,469,485,507,525,537,551,578,593,611,633,651,663,680,700,721,737,759,780,800],"tbody",{},[370,383,384,390],{},[385,386,387],"td",{},[76,388,389],{},"github.com\u002Fs00d\u002Fonlinesim-go-api\u002Fv2",[385,391,392],{},[76,393,271],{},[370,395,396,401],{},[385,397,398],{},[76,399,400],{},"Numbers().Get(ctx, GetNumberParams{Service, Country, Reject})",[385,402,403,79,406,409],{},[76,404,405],{},"Numbers().Get(ctx, service, country, reject...)",[76,407,408],{},"reject"," are strings)",[370,411,412,421],{},[385,413,414,417,418],{},[76,415,416],{},"GetWithNumber(ctx, GetNumberParams{…})"," → ",[76,419,420],{},"NumberWithTz",[385,422,423,417,426],{},[76,424,425],{},"GetWithNumber(ctx, service, country, reject...)",[76,427,428],{},"NumberOrder",[370,430,431,436],{},[385,432,433],{},[76,434,435],{},"State(ctx, StateParams{MessageToCode: IntPtr(0), OrderBy: \"ASC\", …})",[385,437,438],{},[76,439,440],{},"State(ctx, StateOptions{FullMessage: true, OrderBy: OrderAsc})",[370,442,443,452],{},[385,444,445,448,449],{},[76,446,447],{},"StateOne"," type, ",[76,450,451],{},"st.MsgString()",[385,453,454,138,457,460,461,464,465,468],{},[76,455,456],{},"Operation",[76,458,459],{},"op.Msg.Text"," (or ",[76,462,463],{},"op.Msg.List"," with ",[76,466,467],{},"MsgList",")",[370,470,471,479],{},[385,472,473,138,476],{},[76,474,475],{},"WaitCode(ctx, tzid, WaitCodeOptions{Interval, MaxAttempts, NotEnd})",[76,477,478],{},"DefaultWaitCodeOptions()",[385,480,481,484],{},[76,482,483],{},"WaitCode(ctx, tzid, WaitCodeOptions{Interval, Timeout, KeepOpen, Since})","; zero = 5 s \u002F 600 s",[370,486,487,492],{},[385,488,489],{},[76,490,491],{},"ErrNoOperations",[385,493,494,497,498,500,501,503,504],{},[76,495,496],{},"State"," returns an empty slice; ",[76,499,447],{}," returns ",[76,502,287],{}," ",[76,505,506],{},"ERROR_NO_OPERATIONS",[370,508,509,517],{},[385,510,511,138,514],{},[76,512,513],{},"TariffCountryOne",[76,515,516],{},"TariffService",[385,518,519,138,522],{},[76,520,521],{},"CountryStat",[76,523,524],{},"ServiceStat",[370,526,527,532],{},[385,528,529],{},[76,530,531],{},"Rent().Get(ctx, GetRentParams{Country, Days, Extension: BoolPtr(false)})",[385,533,534],{},[76,535,536],{},"Rent().Get(ctx, country, days, extension)",[370,538,539,545],{},[385,540,541,544],{},[76,542,543],{},"Rent().Extend(ctx, tzid, 0)"," (defaulted to 1)",[385,546,547,550],{},[76,548,549],{},"Rent().Extend(ctx, tzid, days)","; pass the days",[370,552,553,568],{},[385,554,555,138,558,138,561,564,565],{},[76,556,557],{},"RentItem.Sum",[76,559,560],{},"Extend",[76,562,563],{},"DayExtend"," as ",[76,566,567],{},"any",[385,569,570,138,573,138,576],{},[76,571,572],{},"float64",[76,574,575],{},"map[string]float64",[76,577,572],{},[370,579,580,587],{},[385,581,582,417,585],{},[76,583,584],{},"User().Profile",[76,586,19],{},[385,588,589,590],{},"→ ",[76,591,592],{},"Profile",[370,594,595,603],{},[385,596,597,417,600],{},[76,598,599],{},"User().PaymentHistory(ctx)",[76,601,602],{},"PayList",[385,604,605,417,608],{},[76,606,607],{},"User().PaymentHistory(ctx, page)",[76,609,610],{},"PaymentHistory",[370,612,613,621],{},[385,614,615,335,618],{},[76,616,617],{},"User().SetWebhookURL(ctx, &url)",[76,619,620],{},"(ctx, nil)",[385,622,623,335,626,629,630,468],{},[76,624,625],{},"SetWebhookURL(ctx, url)",[76,627,628],{},"ClearWebhookURL(ctx)"," (sends ",[76,631,632],{},"null",[370,634,635,643],{},[385,636,637,417,640],{},[76,638,639],{},"User().WebhookLogs(ctx, int64)",[76,641,642],{},"WebhookLogsPage",[385,644,645,417,648],{},[76,646,647],{},"WebhookLogs(ctx, int)",[76,649,650],{},"Paginator[WebhookLog]",[370,652,653,658],{},[385,654,655],{},[76,656,657],{},"Free().FreeList(ctx)",[385,659,660],{},[76,661,662],{},"Free().List(ctx, FreeListOptions{})",[370,664,665,670],{},[385,666,667],{},[76,668,669],{},"ParseWebhookJSON(b)",[385,671,672,675,676,679],{},[76,673,674],{},"ParseWebhook(b)","; no ",[76,677,678],{},"{\"data\":…}"," wrapper, missing fields are zero values, not errors",[370,681,682,687],{},[385,683,684],{},[76,685,686],{},"NoNumberError{Code}",[385,688,689,691,692,695,696,699],{},[76,690,153],{}," embeds ",[76,693,694],{},"APIError","; ",[76,697,698],{},"errors.As"," matches both",[370,701,702,708],{},[385,703,704,705],{},"HTTP errors as plain ",[76,706,707],{},"error",[385,709,710,464,712,138,715,138,718],{},[76,711,292],{},[76,713,714],{},"Status",[76,716,717],{},"Body",[76,719,720],{},"Err",[370,722,723,734],{},[385,724,725,138,728,138,731],{},[76,726,727],{},"WithOAuth",[76,729,730],{},"WithUserAgent",[76,732,733],{},"WithRateLimit",[385,735,736],{},"removed (Bearer key; wrap the transport for throttling)",[370,738,739,756],{},[385,740,741,138,744,138,747,138,750,138,753],{},[76,742,743],{},"WithDevID",[76,745,746],{},"WithLang",[76,748,749],{},"WithBaseURL",[76,751,752],{},"WithHTTPClient",[76,754,755],{},"WithTimeout",[385,757,758],{},"same; the timeout now applies per request, also to an injected client",[370,760,761,770],{},[385,762,763,766,767,769],{},[76,764,765],{},"DefaultCountry",", country ",[76,768,97],{}," → default",[385,771,772,773,138,776,779],{},"removed: pass the country (",[76,774,775],{},"7",[76,777,778],{},"44",", …)",[370,781,782,793],{},[385,783,784,138,787,138,790],{},[76,785,786],{},"RequestErrorMessage",[76,788,789],{},"ErrorFromAPICode",[76,791,792],{},"APIError.Temporary",[385,794,795,796,799],{},"removed; ",[76,797,798],{},"APIError.Message"," carries the text",[370,801,802,808],{},[385,803,804,807],{},[76,805,806],{},"mock.SmsScript.Price"," (string)",[385,809,810,695,812,695,815,818,819],{},[76,811,572],{},[76,813,814],{},"mock.APIKey",[76,816,817],{},"BaseURL()"," ends with ",[76,820,821],{},"\u002Fapi\u002F",{"title":823,"searchDepth":17,"depth":17,"links":824},"",[825,826,827,828],{"id":63,"depth":17,"text":64},{"id":172,"depth":17,"text":173},{"id":264,"depth":17,"text":265},{"id":358,"depth":17,"text":359},"Release notes of onlinesim-go-api and the v2 → v3 migration.","md",{},{"order":42},{"title":39,"description":829},"Xam55QRXmbBHis_bT5Cgb2tcoQ7TCtkua-OqQIWLv68",[836,837],null,{"title":24,"path":25,"stem":26,"description":838,"order":27},"Public numbers and their SMS — client.Free(). No API key needed.",1795164111719]