Module: ShopifyClient::Resource::Delete

Defined in:
lib/shopify-client/resource/delete.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object

Parameters:

  • base (Class)


7
8
9
# File 'lib/shopify-client/resource/delete.rb', line 7

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

Instance Method Details

#delete(client, id) ⇒ Object

Parameters:

  • client (Client)
  • id (Integer)


13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/shopify-client/resource/delete.rb', line 13

def delete(client, id)
  client.delete("#{resource_name}/#{id}")

  ShopifyClient.config.logger({
    source: 'shopify-client',
    type: 'delete',
    info: {
      resource: resource_name,
      id: id,
    },
  }.to_json)

  nil
end