Class: Amocrm::Resources::CustomersMode

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ CustomersMode

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

Parameters:



31
32
33
# File 'lib/amocrm/resources/customers_mode.rb', line 31

def initialize(client:)
  @client = client
end

Instance Method Details

#set_mode(is_enabled:, mode:, request_options: {}) ⇒ Amocrm::Models::CustomersModeSetModeResponse::CustomerModeResponse, Amocrm::Models::CustomersModeSetModeResponse::Problem

Enable or switch customers mode.



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

def set_mode(params)
  parsed, options = Amocrm::CustomersModeSetModeParams.dump_request(params)
  @client.request(
    method: :patch,
    path: "api/v4/customers/mode",
    body: parsed,
    model: Amocrm::Models::CustomersModeSetModeResponse,
    options: options
  )
end