Class: Shipstation::Webhook

Inherits:
ApiResource show all
Defined in:
lib/shipstation/webhook.rb

Class Method Summary collapse

Methods inherited from ApiResource

class_name

Class Method Details

.subscribe(params = {}) ⇒ Object



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

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

  return response
end

.unsubscribe(object_id) ⇒ Object



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

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

  return response
end