Class: Convoy::DeliveryAttempt

Inherits:
ApiResource show all
Includes:
ApiOperations::Get, ApiOperations::List
Defined in:
lib/convoy/resources/delivery_attempt.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

#project_base_uri

Methods included from ApiOperations::Request

#send_request

Constructor Details

#initialize(eventId = nil, id = nil, config = Convoy.config, **kwargs) ⇒ DeliveryAttempt

Returns a new instance of DeliveryAttempt.



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

def initialize(eventId = nil, id = nil, config = Convoy.config, **kwargs)
  @id = id
  @eventId = eventId
  @config = config
  
  super(**kwargs)
end

Instance Method Details

#resource_uriObject



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

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

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