Class: Amocrm::Resources::Salesbot

Inherits:
Object
  • Object
show all
Defined in:
lib/amocrm/resources/salesbot.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Salesbot

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 Salesbot.

Parameters:



30
31
32
# File 'lib/amocrm/resources/salesbot.rb', line 30

def initialize(client:)
  @client = client
end

Instance Method Details

#run(body:, request_options: {}) ⇒ Amocrm::Models::SalesbotRunResponse::SalesbotRunResponse, Amocrm::Models::SalesbotRunResponse::Problem

Run salesbot (batch, up to 100 tasks).



16
17
18
19
20
21
22
23
24
25
# File 'lib/amocrm/resources/salesbot.rb', line 16

def run(params)
  parsed, options = Amocrm::SalesbotRunParams.dump_request(params)
  @client.request(
    method: :post,
    path: "api/v2/salesbot/run",
    body: parsed[:body],
    model: Amocrm::Models::SalesbotRunResponse,
    options: options
  )
end