Class: Shipstation::Webhook

Inherits:
ApiResource show all
Extended by:
APIOperations::List
Defined in:
lib/shipstation/webhook.rb

Class Method Summary collapse

Methods included from APIOperations::List

list

Methods inherited from ApiResource

class_name

Class Method Details

.subscribe(params = {}) ⇒ Object



6
7
8
9
10
# File 'lib/shipstation/webhook.rb', line 6

def subscribe(params={})
  response = Shipstation.request(:post, 'webhooks/subscribe', params)

  return response
end

.unsubscribe(object_id, params = {}) ⇒ Object



12
13
14
15
16
# File 'lib/shipstation/webhook.rb', line 12

def unsubscribe(object_id, params={})
  response = Shipstation.request(:delete, "webhooks/#{object_id}", params)

  return response
end