Class: AddonsApi::Client::AddonService

Inherits:
Object
  • Object
show all
Defined in:
lib/addons-api/client.rb

Defined Under Namespace

Classes: AddonServiceField, AddonServicePlan

Constant Summary collapse

BASE_PATH =
"addon-services"

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ AddonService

Returns a new instance of AddonService.



159
160
161
# File 'lib/addons-api/client.rb', line 159

def initialize(client)
  @client = client
end

Instance Method Details

#fieldObject



175
176
177
# File 'lib/addons-api/client.rb', line 175

def field
  @field_resource ||= AddonServiceField.new(@client)
end

#info(addon_service_id) ⇒ Object



167
168
169
# File 'lib/addons-api/client.rb', line 167

def info(addon_service_id)
  @client.request(:get, "#{BASE_PATH}/#{addon_service_id}")
end

#listObject



163
164
165
# File 'lib/addons-api/client.rb', line 163

def list()
 @client.request(:get, "#{BASE_PATH}")
end

#planObject



171
172
173
# File 'lib/addons-api/client.rb', line 171

def plan
  @plan_resource ||= AddonServicePlan.new(@client)
end