Module: Lucid::Shopify::Resource::Delete

Defined in:
lib/lucid/shopify/resource/delete.rb

Overview

Examples:

class OrderRepository
  include Lucid::Shopify::Resource::Delete

  resource :orders

  # ...
end

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object

Parameters:

  • base (Class, Module)


18
19
20
# File 'lib/lucid/shopify/resource/delete.rb', line 18

def self.included(base)
  base.include(Base)
end

Instance Method Details

#delete(credentials, id) ⇒ Object

Parameters:

  • credentials (Credentials)
  • id (Integer)


24
25
26
27
28
# File 'lib/lucid/shopify/resource/delete.rb', line 24

def delete(credentials, id)
  client.delete(credentials, "#{resource}/#{id}").tap do
    logger.info("Deleted #{resource_singular} id=#{id}")
  end
end