Class: Convoy::EventDelivery

Inherits:
ApiResource show all
Includes:
ApiOperations::Get, ApiOperations::List
Defined in:
lib/convoy/resources/event_delivery.rb

Instance Attribute Summary

Attributes inherited from ApiResource

#response

Instance Method Summary collapse

Methods included from ApiOperations::List

included, #list

Methods included from ApiOperations::Get

#get, included

Methods inherited from ApiResource

#initialize, #project_base_uri

Methods included from ApiOperations::Request

#send_request

Constructor Details

This class inherits a constructor from Convoy::ApiResource

Instance Method Details

#force_retryObject



28
29
30
31
# File 'lib/convoy/resources/event_delivery.rb', line 28

def force_retry
  force_retry_uri = "#{resource_uri}/forceresend"
  send_request(force_retry_uri, :post, data: @data, params: @params)
end

#intialize(eventId = nil, id = nil, config = Convoy.config, **kwargs) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/convoy/resources/event_delivery.rb', line 6

def intialize(eventId = nil, id = nil, config = Convoy.config, **kwargs)
  @id = id
  @eventId = eventId
  @config = config

  super(**kwargs)
end

#resource_uriObject



14
15
16
17
18
19
20
# File 'lib/convoy/resources/event_delivery.rb', line 14

def resource_uri
  if @id.nil?
    return "#{project_base_uri}/events/#{@eventId}/eventdelivery"
  end

  "#{project_base_uri}/events/#{@eventId}/eventdelivery/#{@id}"
end

#retryObject



23
24
25
26
# File 'lib/convoy/resources/event_delivery.rb', line 23

def retry
  retry_uri = "#{resource_uri}/resend"
  send_request(retry_uri, :put, data: @data, params: @params)
end