Class: Shipit::Hook::DeliverySpec

Inherits:
Object
  • Object
show all
Defined in:
app/models/shipit/hook.rb

Instance Method Summary collapse

Constructor Details

#initialize(event:, url:, content_type:, payload:, secret:) ⇒ DeliverySpec

Returns a new instance of DeliverySpec.



21
22
23
24
25
26
27
# File 'app/models/shipit/hook.rb', line 21

def initialize(event:, url:, content_type:, payload:, secret:)
  @event = event
  @url = url
  @content_type = content_type
  @payload = payload
  @secret = secret
end

Instance Method Details

#send!Object



29
30
31
# File 'app/models/shipit/hook.rb', line 29

def send!
  http.post(url, payload)
end