Sha256: 255064a1aff48fb236e720d1570a33858aceee43ca10afd982d97dffe5ffb0bd

Contents?: true

Size: 474 Bytes

Versions: 1

Compression:

Stored size: 474 Bytes

Contents

# frozen_string_literal: true

require 'gladwords/commands/core'

module Gladwords
  module Commands
    # Delete command
    # This command uses the REMOVE operator to delete entities in AdWords
    # @api public
    class Delete < ROM::Commands::Delete
      include Core

      adapter :adwords
      adwords_operator :REMOVE
      operand_mapper ->(entity) { { id: entity[:id] } }

      def execute
        perform_operations(relation.to_a)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gladwords-1.0.1 lib/gladwords/commands/delete.rb