Class: Sink::Resources::Clients

Inherits:
Object
  • Object
show all
Defined in:
lib/sink/resources/clients.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Clients

Returns a new instance of Clients.

Parameters:



7
8
9
# File 'lib/sink/resources/clients.rb', line 7

def initialize(client:)
  @client = client
end

Instance Method Details

#create(params = {}, opts = {}) ⇒ Sink::Models::Client

Parameters:

  • params (Hash{Symbol => Object}) (defaults to: {})

    Attributes to send in this request. @option params [String] :account_token @option params [String] :name

  • opts (Hash, Sink::RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:



18
19
20
21
22
23
24
25
26
27
# File 'lib/sink/resources/clients.rb', line 18

def create(params = {}, opts = {})
  req = {
    method: :post,
    path: "/clients",
    body: params,
    headers: {"Content-Type" => "application/json"},
    model: Sink::Models::Client
  }
  @client.request(req, opts)
end