Sha256: 9ebb89acecf616b6ee0f7b583142c35c227bb64ce8ba4aa4c5e9c93d85411510

Contents?: true

Size: 770 Bytes

Versions: 13

Compression:

Stored size: 770 Bytes

Contents

module Fog
  module Google
    class Pubsub
      class Real
        # Delete a subscription on the remote service.
        #
        # @param subscription_name [#to_s] name of subscription to delete
        # @see https://cloud.google.com/pubsub/reference/rest/v1/projects.subscriptions/delete
        def delete_subscription(subscription_name)
          api_method = @pubsub.projects.subscriptions.delete
          parameters = {
            "subscription" => subscription_name.to_s
          }

          request(api_method, parameters)
        end
      end

      class Mock
        def delete_subscription(subscription_name)
          data[:subscriptions].delete(subscription_name)

          build_excon_response(nil, 200)
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fog-google-0.6.0 lib/fog/google/requests/pubsub/delete_subscription.rb
fog-google-0.5.5 lib/fog/google/requests/pubsub/delete_subscription.rb
fog-google-0.5.4 lib/fog/google/requests/pubsub/delete_subscription.rb
fog-google-0.5.3 lib/fog/google/requests/pubsub/delete_subscription.rb
fog-google-0.5.2 lib/fog/google/requests/pubsub/delete_subscription.rb
fog-google-0.5.1 lib/fog/google/requests/pubsub/delete_subscription.rb
fog-google-0.5.0 lib/fog/google/requests/pubsub/delete_subscription.rb
fog-google-0.4.2 lib/fog/google/requests/pubsub/delete_subscription.rb
fog-google-0.4.1 lib/fog/google/requests/pubsub/delete_subscription.rb
fog-google-0.4.0 lib/fog/google/requests/pubsub/delete_subscription.rb
fog-google-0.3.2 lib/fog/google/requests/pubsub/delete_subscription.rb
fog-google-0.3.1 lib/fog/google/requests/pubsub/delete_subscription.rb
fog-google-0.3.0 lib/fog/google/requests/pubsub/delete_subscription.rb