Class: PactBroker::Client::Branches::DeleteBranch
- Inherits:
-
PactBroker::Client::BaseCommand
- Object
- PactBroker::Client::BaseCommand
- PactBroker::Client::Branches::DeleteBranch
- Defined in:
- lib/pact_broker/client/branches/delete_branch.rb
Constant Summary collapse
- NOT_SUPPORTED_MESSAGE_PACT_BROKER =
"This version of the Pact Broker does not support deleting branches. Please upgrade to version 2.108.0 or later."
- NOT_SUPPORTED_MESSAGE_PACTFLOW =
"This version of PactFlow does not support deleting branches. Please upgrade to the latest version."
Instance Method Summary collapse
- #do_call ⇒ Object
-
#initialize(params, options, pact_broker_client_options) ⇒ DeleteBranch
constructor
A new instance of DeleteBranch.
Methods inherited from PactBroker::Client::BaseCommand
Methods included from HalClientMethods
#create_entry_point, #create_http_client, #create_index_entry_point, #index_entry_point, #index_resource, #is_pactflow?, #pact_broker_name
Constructor Details
#initialize(params, options, pact_broker_client_options) ⇒ DeleteBranch
Returns a new instance of DeleteBranch.
11 12 13 14 15 16 |
# File 'lib/pact_broker/client/branches/delete_branch.rb', line 11 def initialize(params, , ) super @pacticipant_name = params.fetch(:pacticipant) @branch_name = params.fetch(:branch) @error_when_not_found = params.fetch(:error_when_not_found) end |
Instance Method Details
#do_call ⇒ Object
18 19 20 21 22 |
# File 'lib/pact_broker/client/branches/delete_branch.rb', line 18 def do_call check_if_command_supported @deleted_resource = branch_link.delete PactBroker::Client::CommandResult.new(success?, ) end |