Class: PlatformAPI::AddonAttachment

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

Overview

An add-on attachment represents a connection between an app and an add-on that it has been given access to.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ AddonAttachment

Returns a new instance of AddonAttachment.



872
873
874
# File 'lib/platform-api/client.rb', line 872

def initialize(client)
  @client = client
end

Instance Method Details

#create(body = {}) ⇒ Object

Create a new add-on attachment.

Parameters:

  • body:

    the object to pass as the request payload



879
880
881
# File 'lib/platform-api/client.rb', line 879

def create(body = {})
  @client.addon_attachment.create(body)
end

#delete(addon_attachment_id) ⇒ Object

Delete an existing add-on attachment.

Parameters:

  • addon_attachment_id:

    unique identifier of this add-on attachment



886
887
888
# File 'lib/platform-api/client.rb', line 886

def delete(addon_attachment_id)
  @client.addon_attachment.delete(addon_attachment_id)
end

#info(addon_attachment_id) ⇒ Object

Info for existing add-on attachment.

Parameters:

  • addon_attachment_id:

    unique identifier of this add-on attachment



893
894
895
# File 'lib/platform-api/client.rb', line 893

def info(addon_attachment_id)
  @client.addon_attachment.info(addon_attachment_id)
end

#info_by_app(app_id_or_app_name, addon_attachment_id_or_addon_attachment_name) ⇒ Object

Info for existing add-on attachment for an app.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • addon_attachment_id_or_addon_attachment_name:

    unique identifier of this add-on attachment or unique name for this add-on attachment to this app



920
921
922
# File 'lib/platform-api/client.rb', line 920

def info_by_app(app_id_or_app_name, addon_attachment_id_or_addon_attachment_name)
  @client.addon_attachment.info_by_app(app_id_or_app_name, addon_attachment_id_or_addon_attachment_name)
end

#listObject

List existing add-on attachments.



898
899
900
# File 'lib/platform-api/client.rb', line 898

def list()
  @client.addon_attachment.list()
end

#list_by_addon(addon_id_or_addon_name) ⇒ Object

List existing add-on attachments for an add-on.

Parameters:

  • addon_id_or_addon_name:

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



905
906
907
# File 'lib/platform-api/client.rb', line 905

def list_by_addon(addon_id_or_addon_name)
  @client.addon_attachment.list_by_addon(addon_id_or_addon_name)
end

#list_by_app(app_id_or_app_name) ⇒ Object

List existing add-on attachments for an app.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app



912
913
914
# File 'lib/platform-api/client.rb', line 912

def list_by_app(app_id_or_app_name)
  @client.addon_attachment.list_by_app(app_id_or_app_name)
end

#resolution(body = {}) ⇒ Object

Resolve an add-on attachment from a name, optionally passing an app name. If there are matches it returns at least one add-on attachment (exact match) or many.

Parameters:

  • body:

    the object to pass as the request payload



927
928
929
# File 'lib/platform-api/client.rb', line 927

def resolution(body = {})
  @client.addon_attachment.resolution(body)
end