Class: GovDelivery::TMS::Webhook

Inherits:
Object
  • Object
show all
Includes:
InstanceResource
Defined in:
lib/govdelivery/tms/resource/webhook.rb

Overview

A Webhook gets invoked when a recipient enters a queued or final state

Examples:

webhook = client.webhooks.build(:url => 'http://your.url', :event_type => 'failed')
webhook.post
webhook.get

Instance Attribute Summary collapse

Attributes included from InstanceResource

#response

Method Summary

Methods included from InstanceResource

included

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



1
2
3
# File 'lib/govdelivery/tms/resource/webhook.rb', line 1

def created_at
  @created_at
end

#event_typeObject

Returns the value of attribute event_type.



1
2
3
# File 'lib/govdelivery/tms/resource/webhook.rb', line 1

def event_type
  @event_type
end

#event_type,,,,,or'sending''inconclusive''blacklisted''sent''canceled''failed'

vent_type ‘sending’, ‘inconclusive’, ‘blacklisted’, ‘sent’, ‘canceled’, or ‘failed’

Returns:

  • ('sending''inconclusive''blacklisted''sent''canceled''failed')

    the current value of event_type,,,,,or



11
12
13
# File 'lib/govdelivery/tms/resource/webhook.rb', line 11

def event_type,,,,,or
  @event_type,,,,,or
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



1
2
3
# File 'lib/govdelivery/tms/resource/webhook.rb', line 1

def updated_at
  @updated_at
end

#urlString

The URL to POST webhooks to

Returns:

  • (String)

    the current value of url



11
12
13
# File 'lib/govdelivery/tms/resource/webhook.rb', line 11

def url
  @url
end