lib/ruby_lokalise_api/resources/branch.rb in ruby-lokalise-api-7.2.0 vs lib/ruby_lokalise_api/resources/branch.rb in ruby-lokalise-api-8.0.0.rc1
- old
+ new
@@ -1,30 +1,11 @@
# frozen_string_literal: true
module RubyLokaliseApi
module Resources
class Branch < Base
- ID_KEY = 'branch_id'
- supports :update, :destroy, [:reload_data, '', :find]
+ MAIN_PARAMS = %i[project_id branch_id].freeze
- def merge(params = {})
- klass = self.class
- klass.merge @client, klass.endpoint(project_id, branch_id, :merge), params
- end
-
- class << self
- def merge(client, path, params, *_args)
- post(path, client, params)['content']
- end
-
- def endpoint(project_id, branch_id = nil, action = nil)
- params = {projects: project_id,
- branches: branch_id}
-
- params[:merge] = '' if action == :merge
-
- path_from params
- end
- end
+ delegate_call :merge, :merge_branch
end
end
end