Class: Sink::Resources::Names::ReservedNames::Methods

Inherits:
Object
  • Object
show all
Defined in:
lib/sink/resources/names/reserved_names/methods.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Methods

Returns a new instance of Methods.

Parameters:



9
10
11
# File 'lib/sink/resources/names/reserved_names/methods.rb', line 9

def initialize(client:)
  @client = client
end

Instance Method Details

#export(class_, params = {}, opts = {}) ⇒ Sink::Models::Export

Test reserved word in method name

Parameters:

  • class_ (String)

    Path param: test reserved word in path parameters

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

    Attributes to send in this request. @option params [String, nil] :let Query param: test reserved word in query parameter @option params [String, nil] :const Body param: test reserved word in body property

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

    Options to specify HTTP behaviour for this request.

Returns:



24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/sink/resources/names/reserved_names/methods.rb', line 24

def export(class_, params = {}, opts = {})
  query_params = [:let]
  req = {
    method: :post,
    path: "/names/reserved_names/methods/export/#{class_}",
    query: params.slice(*query_params),
    body: params.except(*query_params),
    headers: {"Content-Type" => "application/json"},
    model: Sink::Models::Export
  }
  @client.request(req, opts)
end