Class: Ultradns::Api::Account

Inherits:
ClientAccessor show all
Defined in:
lib/ultradns/api/account.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client, account_name) ⇒ Account

Returns a new instance of Account.



13
14
15
16
# File 'lib/ultradns/api/account.rb', line 13

def initialize(client, )
  super(client)
  @account_name = 
end

Instance Attribute Details

#account_nameObject (readonly)

Returns the value of attribute account_name.



11
12
13
# File 'lib/ultradns/api/account.rb', line 11

def 
  @account_name
end

Instance Method Details

#usersObject

List users for this account



48
49
50
# File 'lib/ultradns/api/account.rb', line 48

def users()
  client.with_auth_retry {|c| c.get "/accounts/#{@account_name}/users", request_options }
end

#zones(options = {}) ⇒ Object

List zones for this account

Optional Parameters

  • :q - The search parameters, in a hash. Valid keys are:

    name - substring match of the zone name
    zone_type - one of :
        PRIMARY
        SECONDARY
        ALIAS
    
  • :sort - The sort column used to order the list. Valid values for the sort field are:

    NAME
    ACCOUNT_NAME
    RECORD_COUNT
    ZONE_TYPE
    
  • :reverse - Whether the list is ascending(false) or descending(true). Defaults to true

  • :offset - The position in the list for the first returned element(0 based)

  • :limit - The maximum number of zones to be returned.

Examples

client.('myaccount').zones
client.('myaccount').zones(q: {name: 'foo', zone_type: 'PRIMARY'}, sort: 'NAME', reverse: true, offset:10, limit:50)


43
44
45
# File 'lib/ultradns/api/account.rb', line 43

def zones(options={})
  client.with_auth_retry {|c| c.get("/accounts/#{@account_name}/zones", request_options(options)) }
end