Class: Lithic::Resources::TransactionMonitoring::Cases::Comments
- Inherits:
-
Object
- Object
- Lithic::Resources::TransactionMonitoring::Cases::Comments
- Defined in:
- lib/lithic/resources/transaction_monitoring/cases/comments.rb
Instance Method Summary collapse
-
#create(case_token, comment:, actor_token: nil, request_options: {}) ⇒ Lithic::Models::TransactionMonitoring::CaseActivityEntry
Some parameter documentations has been truncated, see Models::TransactionMonitoring::Cases::CommentCreateParams for more details.
-
#delete(comment_token, case_token:, request_options: {}) ⇒ nil
Deletes a comment from a case.
-
#initialize(client:) ⇒ Comments
constructor
private
A new instance of Comments.
-
#update(comment_token, case_token:, comment:, actor_token: nil, request_options: {}) ⇒ Lithic::Models::TransactionMonitoring::CaseActivityEntry
Some parameter documentations has been truncated, see Models::TransactionMonitoring::Cases::CommentUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ Comments
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 Comments.
104 105 106 |
# File 'lib/lithic/resources/transaction_monitoring/cases/comments.rb', line 104 def initialize(client:) @client = client end |
Instance Method Details
#create(case_token, comment:, actor_token: nil, request_options: {}) ⇒ Lithic::Models::TransactionMonitoring::CaseActivityEntry
Some parameter documentations has been truncated, see Models::TransactionMonitoring::Cases::CommentCreateParams for more details.
Adds a comment to a case.
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/lithic/resources/transaction_monitoring/cases/comments.rb', line 27 def create(case_token, params) parsed, = Lithic::TransactionMonitoring::Cases::CommentCreateParams.dump_request(params) @client.request( method: :post, path: ["v1/transaction_monitoring/cases/%1$s/comments", case_token], body: parsed, model: Lithic::TransactionMonitoring::CaseActivityEntry, options: ) end |
#delete(comment_token, case_token:, request_options: {}) ⇒ nil
Deletes a comment from a case.
87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/lithic/resources/transaction_monitoring/cases/comments.rb', line 87 def delete(comment_token, params) parsed, = Lithic::TransactionMonitoring::Cases::CommentDeleteParams.dump_request(params) case_token = parsed.delete(:case_token) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :delete, path: ["v1/transaction_monitoring/cases/%1$s/comments/%2$s", case_token, comment_token], model: NilClass, options: ) end |
#update(comment_token, case_token:, comment:, actor_token: nil, request_options: {}) ⇒ Lithic::Models::TransactionMonitoring::CaseActivityEntry
Some parameter documentations has been truncated, see Models::TransactionMonitoring::Cases::CommentUpdateParams for more details.
Edits an existing comment on a case.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/lithic/resources/transaction_monitoring/cases/comments.rb', line 59 def update(comment_token, params) parsed, = Lithic::TransactionMonitoring::Cases::CommentUpdateParams.dump_request(params) case_token = parsed.delete(:case_token) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :patch, path: ["v1/transaction_monitoring/cases/%1$s/comments/%2$s", case_token, comment_token], body: parsed, model: Lithic::TransactionMonitoring::CaseActivityEntry, options: ) end |