Sha256: 99795a931b3985d64b50ff56c3784109b972436a9d9f67d746f5a04707b592eb

Contents?: true

Size: 622 Bytes

Versions: 1

Compression:

Stored size: 622 Bytes

Contents

class TreasureData::API
module Account

  ####
  ## Account API
  ##

  # @return [Array]
  def show_account
    code, body, res = get("/v3/account/show")
    if code != "200"
      raise_error("Show account failed", res)
    end
    js = checked_json(body, %w[account])
    a = js["account"]
    account_id = a['id'].to_i
    plan = a['plan'].to_i
    storage_size = a['storage_size'].to_i
    guaranteed_cores = a['guaranteed_cores'].to_i
    maximum_cores = a['maximum_cores'].to_i
    created_at = a['created_at']
    return [account_id, plan, storage_size, guaranteed_cores, maximum_cores, created_at]
  end

end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
td-client-2.0.0 lib/td/client/api/account.rb