Class: Sink::Resources::Version1_30Names

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Version1_30Names

Returns a new instance of Version1_30Names.

Parameters:



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

def initialize(client:)
  @client = client
end

Instance Method Details

#create(version_1_15 = nil, params = {}, opts = {}) ⇒ Sink::Models::Version1_30NameCreateResponse

The ‘X-Client-Secret` header shouldn’t be included in params definitions as it

is already sent as a client argument.

Whereas the `X-Custom-Endpoint-Header` should be included as it is only used
here.

Parameters:

  • version_1_15 (String) (defaults to: nil)

    Path param:

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

    Attributes to send in this request. @option params [String, nil] :version_1_16 Query param: @option params [String, nil] :version_1_17 Body param: @option params [String, nil] :version_1_14 Header param:

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

    Options to specify HTTP behaviour for this request.

Returns:



27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/sink/resources/version_1_30_names.rb', line 27

def create(version_1_15 = nil, params = {}, opts = {})
  query_params = [:version_1_16]
  req = {
    method: :post,
    path: "/version_1_30_names/query/#{version_1_15}",
    query: params.slice(*query_params),
    body: params.except(*query_params),
    headers: {"Content-Type" => "application/json"},
    model: Sink::Models::Version1_30NameCreateResponse
  }
  @client.request(req, opts)
end