Class: Convoy::EventDelivery
- Inherits:
-
ApiResource
- Object
- ApiResource
- Convoy::EventDelivery
- Includes:
- ApiOperations::Get, ApiOperations::List
- Defined in:
- lib/convoy/resources/event_delivery.rb
Instance Attribute Summary
Attributes inherited from ApiResource
Instance Method Summary collapse
- #force_retry ⇒ Object
-
#initialize(event_id = nil, id = nil, config = Convoy.config, **kwargs) ⇒ EventDelivery
constructor
A new instance of EventDelivery.
- #resource_uri ⇒ Object
- #retry ⇒ Object
Methods included from ApiOperations::List
Methods included from ApiOperations::Get
Methods inherited from ApiResource
Methods included from ApiOperations::Request
Constructor Details
#initialize(event_id = nil, id = nil, config = Convoy.config, **kwargs) ⇒ EventDelivery
Returns a new instance of EventDelivery.
6 7 8 9 10 11 12 |
# File 'lib/convoy/resources/event_delivery.rb', line 6 def initialize(event_id = nil, id = nil, config = Convoy.config, **kwargs) @event_id = event_id @id = id @config = config super(**kwargs) end |
Instance Method Details
#force_retry ⇒ Object
27 28 29 30 |
# File 'lib/convoy/resources/event_delivery.rb', line 27 def force_retry force_retry_uri = "#{resource_uri}/forceresend" send_request(force_retry_uri, :post, data: @data, params: @params) end |
#resource_uri ⇒ Object
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}/eventdeliveries" end "#{project_base_uri}/eventdeliveries/#{@id}" end |
#retry ⇒ Object
22 23 24 25 |
# File 'lib/convoy/resources/event_delivery.rb', line 22 def retry retry_uri = "#{resource_uri}/resend" send_request(retry_uri, :put, data: @data, params: @params) end |