Class: Amocrm::Resources::Talks
- Inherits:
-
Object
- Object
- Amocrm::Resources::Talks
- Defined in:
- lib/amocrm/resources/talks.rb
Instance Method Summary collapse
-
#close(id, force_close: nil, request_options: {}) ⇒ Amocrm::Models::TalkCloseResponse::EmptyResponse, Amocrm::Models::TalkCloseResponse::Problem
Close talk by id (optionally force without NPS bot).
-
#get_by_id(id, request_options: {}) ⇒ Amocrm::Models::TalkGetByIDResponse::Talk, Amocrm::Models::TalkGetByIDResponse::Problem
Get talk by id.
-
#initialize(client:) ⇒ Talks
constructor
private
A new instance of Talks.
Constructor Details
#initialize(client:) ⇒ Talks
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 Talks.
52 53 54 |
# File 'lib/amocrm/resources/talks.rb', line 52 def initialize(client:) @client = client end |
Instance Method Details
#close(id, force_close: nil, request_options: {}) ⇒ Amocrm::Models::TalkCloseResponse::EmptyResponse, Amocrm::Models::TalkCloseResponse::Problem
Close talk by id (optionally force without NPS bot).
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/amocrm/resources/talks.rb', line 19 def close(id, params = {}) parsed, = Amocrm::TalkCloseParams.dump_request(params) @client.request( method: :post, path: ["api/v4/talks/%1$s/close", id], body: parsed, model: Amocrm::Models::TalkCloseResponse, options: ) end |
#get_by_id(id, request_options: {}) ⇒ Amocrm::Models::TalkGetByIDResponse::Talk, Amocrm::Models::TalkGetByIDResponse::Problem
Get talk by id.
40 41 42 43 44 45 46 47 |
# File 'lib/amocrm/resources/talks.rb', line 40 def get_by_id(id, params = {}) @client.request( method: :get, path: ["api/v4/talks/%1$s", id], model: Amocrm::Models::TalkGetByIDResponse, options: params[:request_options] ) end |