Class: PlatformAPI::PipelinePromotion

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

Overview

Promotions allow you to move code from an app in a pipeline to all targets

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ PipelinePromotion

Returns a new instance of PipelinePromotion.



2114
2115
2116
# File 'lib/platform-api/client.rb', line 2114

def initialize(client)
  @client = client
end

Instance Method Details

#create(body = {}) ⇒ Object

Create a new promotion.

Parameters:

  • body:

    the object to pass as the request payload



2121
2122
2123
# File 'lib/platform-api/client.rb', line 2121

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

#info(pipeline_promotion_id) ⇒ Object

Info for existing pipeline promotion.

Parameters:

  • pipeline_promotion_id:

    unique identifier of promotion



2128
2129
2130
# File 'lib/platform-api/client.rb', line 2128

def info(pipeline_promotion_id)
  @client.pipeline_promotion.info(pipeline_promotion_id)
end