Class: Courier::Resources::Notifications::Checks
- Inherits:
-
Object
- Object
- Courier::Resources::Notifications::Checks
- Defined in:
- lib/courier/resources/notifications/checks.rb
Instance Method Summary collapse
-
#delete(submission_id, id:, request_options: {}) ⇒ nil
Cancel a notification template submission.
-
#initialize(client:) ⇒ Checks
constructor
private
A new instance of Checks.
-
#list(submission_id, id:, request_options: {}) ⇒ Courier::Models::Notifications::CheckListResponse
Retrieve the checks for a notification template submission.
-
#update(submission_id, id:, checks:, request_options: {}) ⇒ Courier::Models::Notifications::CheckUpdateResponse
Replace the checks for a notification template submission.
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.
94 95 96 |
# File 'lib/courier/resources/notifications/checks.rb', line 94 def initialize(client:) @client = client end |
Instance Method Details
#delete(submission_id, id:, request_options: {}) ⇒ nil
Cancel a notification template submission.
77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/courier/resources/notifications/checks.rb', line 77 def delete(submission_id, params) parsed, = Courier::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: ) end |
#list(submission_id, id:, request_options: {}) ⇒ Courier::Models::Notifications::CheckListResponse
Retrieve the checks for a notification template submission.
50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/courier/resources/notifications/checks.rb', line 50 def list(submission_id, params) parsed, = Courier::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: Courier::Models::Notifications::CheckListResponse, options: ) end |
#update(submission_id, id:, checks:, request_options: {}) ⇒ Courier::Models::Notifications::CheckUpdateResponse
Replace the checks for a notification template submission.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/courier/resources/notifications/checks.rb', line 22 def update(submission_id, params) parsed, = Courier::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: Courier::Models::Notifications::CheckUpdateResponse, options: ) end |