Class: Trycourier::Resources::Notifications::Checks

Inherits:
Object
  • Object
show all
Defined in:
lib/trycourier/resources/notifications/checks.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Checks

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Checks.

Parameters:



84
85
86
# File 'lib/trycourier/resources/notifications/checks.rb', line 84

def initialize(client:)
  @client = client
end

Instance Method Details

#delete(submission_id, id: , request_options: {}) ⇒ nil

Parameters:

Returns:

  • (nil)

See Also:



67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/trycourier/resources/notifications/checks.rb', line 67

def delete(submission_id, params)
  parsed, options = Trycourier::Notifications::CheckDeleteParams.dump_request(params)
  id =
    parsed.delete(:id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :delete,
    path: ["notifications/%1$s/%2$s/checks", id, submission_id],
    model: NilClass,
    options: options
  )
end

#list(submission_id, id: , request_options: {}) ⇒ Trycourier::Models::Notifications::CheckListResponse

Parameters:

Returns:

See Also:



44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/trycourier/resources/notifications/checks.rb', line 44

def list(submission_id, params)
  parsed, options = Trycourier::Notifications::CheckListParams.dump_request(params)
  id =
    parsed.delete(:id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: ["notifications/%1$s/%2$s/checks", id, submission_id],
    model: Trycourier::Models::Notifications::CheckListResponse,
    options: options
  )
end

#update(submission_id, id: , checks: , request_options: {}) ⇒ Trycourier::Models::Notifications::CheckUpdateResponse

Parameters:

Returns:

See Also:



20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/trycourier/resources/notifications/checks.rb', line 20

def update(submission_id, params)
  parsed, options = Trycourier::Notifications::CheckUpdateParams.dump_request(params)
  id =
    parsed.delete(:id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :put,
    path: ["notifications/%1$s/%2$s/checks", id, submission_id],
    body: parsed,
    model: Trycourier::Models::Notifications::CheckUpdateResponse,
    options: options
  )
end