Class: Kloxo::API::Client::AddBandwidth

Inherits:
Request
  • Object
show all
Defined in:
lib/kloxo/api/client/add_bandwidth.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ AddBandwidth

Returns a new instance of AddBandwidth.



7
8
9
10
# File 'lib/kloxo/api/client/add_bandwidth.rb', line 7

def initialize params = {}
  self.name = params[:name]
  self.new_limit = params[:new_limit]
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/kloxo/api/client/add_bandwidth.rb', line 5

def name
  @name
end

#new_limitObject

Returns the value of attribute new_limit.



5
6
7
# File 'lib/kloxo/api/client/add_bandwidth.rb', line 5

def new_limit
  @new_limit
end

Instance Method Details

#paramObject



12
13
14
15
16
17
18
19
20
# File 'lib/kloxo/api/client/add_bandwidth.rb', line 12

def param
  {
    "action" => "update",
    "class" => "client",
    "name" => self.name,
    "subaction" => "limit",
    "v-priv-traffic_usage" => self.new_limit
  }.to_param
end