Class: PlatformAPI::AddonAction

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

Overview

Add-on Actions are lifecycle operations for add-on provisioning and deprovisioning. They allow whitelisted add-on providers to (de)provision add-ons in the background and then report back when (de)provisioning is complete.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ AddonAction

Returns a new instance of AddonAction.


651
652
653
# File 'lib/platform-api/client.rb', line 651

def initialize(client)
  @client = client
end

Instance Method Details

#create_deprovision(addon_id_or_addon_name) ⇒ Object

Mark an add-on as deprovisioned.

Parameters:

  • addon_id_or_addon_name:

    unique identifier of add-on or globally unique name of the add-on


665
666
667
# File 'lib/platform-api/client.rb', line 665

def create_deprovision(addon_id_or_addon_name)
  @client.addon_action.create_deprovision(addon_id_or_addon_name)
end

#create_provision(addon_id_or_addon_name) ⇒ Object

Mark an add-on as provisioned for use.

Parameters:

  • addon_id_or_addon_name:

    unique identifier of add-on or globally unique name of the add-on


658
659
660
# File 'lib/platform-api/client.rb', line 658

def create_provision(addon_id_or_addon_name)
  @client.addon_action.create_provision(addon_id_or_addon_name)
end