Class: Trycourier::Resources::Notifications::Checks
- Inherits:
-
Object
- Object
- Trycourier::Resources::Notifications::Checks
- Defined in:
- lib/trycourier/resources/notifications/checks.rb
Instance Method Summary collapse
- #delete(submission_id, id: , request_options: {}) ⇒ nil
-
#initialize(client:) ⇒ Checks
constructor
private
A new instance of Checks.
- #list(submission_id, id: , request_options: {}) ⇒ Trycourier::Models::Notifications::CheckListResponse
- #update(submission_id, id: , checks: , request_options: {}) ⇒ Trycourier::Models::Notifications::CheckUpdateResponse
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.
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
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, = 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: ) end |
#list(submission_id, id: , request_options: {}) ⇒ Trycourier::Models::Notifications::CheckListResponse
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, = 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: ) end |
#update(submission_id, id: , checks: , request_options: {}) ⇒ Trycourier::Models::Notifications::CheckUpdateResponse
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, = 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: ) end |