Method: SDM::Accounts#get
- Defined in:
- lib/svc.rb
#get(id, deadline: nil) ⇒ Object
Get reads one Account by ID.
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 |
# File 'lib/svc.rb', line 363 def get( id, deadline: nil ) req = V1::AccountGetRequest.new() req.id = (id) tries = 0 plumbing_response = nil loop do begin plumbing_response = @stub.get(req, metadata: @parent.("Accounts.Get", req), deadline: deadline) rescue => exception if (@parent.shouldRetry(tries, exception)) tries + +@parent.jitterSleep(tries) next end raise Plumbing::convert_error_to_porcelain(exception) end break end resp = AccountGetResponse.new() resp.account = Plumbing::convert_account_to_porcelain(plumbing_response.account) resp. = Plumbing::(plumbing_response.) resp.rate_limit = Plumbing::(plumbing_response.rate_limit) resp end |