Class: Sink::Resources::Types::Enums

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Enums

Returns a new instance of Enums.

Parameters:



8
9
10
# File 'lib/sink/resources/types/enums.rb', line 8

def initialize(client:)
  @client = client
end

Instance Method Details

#array_unique_values(params = {}, opts = {}) ⇒ nil

Endpoint that has an array of enum that should generate a valid test with

non-repeating values in the array.

Parameters:

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

    Attributes to send in this request. @option params [Array<Symbol, Body>] :body

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

    Options to specify HTTP behaviour for this request.

Returns:

  • (nil)


21
22
23
24
25
26
27
28
29
30
# File 'lib/sink/resources/types/enums.rb', line 21

def array_unique_values(params = {}, opts = {})
  req = {
    method: :post,
    path: "/types/enum_tests_array_unique_values",
    body: params[:body],
    headers: {"Content-Type" => "application/json"},
    model: NilClass
  }
  @client.request(req, opts)
end

#array_unique_values_2_values(params = {}, opts = {}) ⇒ nil

Endpoint that has an array of enum that should generate a valid test with 2

non-repeating values in the array.

Parameters:

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

    Attributes to send in this request. @option params [Array<Symbol, Body>] :body

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

    Options to specify HTTP behaviour for this request.

Returns:

  • (nil)


41
42
43
44
45
46
47
48
49
50
# File 'lib/sink/resources/types/enums.rb', line 41

def array_unique_values_2_values(params = {}, opts = {})
  req = {
    method: :post,
    path: "/types/enum_tests_array_unique_values_2_values",
    body: params[:body],
    headers: {"Content-Type" => "application/json"},
    model: NilClass
  }
  @client.request(req, opts)
end

#array_unique_values_numbers(params = {}, opts = {}) ⇒ nil

Endpoint that has an array of enum that should generate a valid test with 2

non-repeating values in the array.

Parameters:

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

    Attributes to send in this request. @option params [Array<Float>] :body

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

    Options to specify HTTP behaviour for this request.

Returns:

  • (nil)


61
62
63
64
65
66
67
68
69
70
# File 'lib/sink/resources/types/enums.rb', line 61

def array_unique_values_numbers(params = {}, opts = {})
  req = {
    method: :post,
    path: "/types/enum_tests_array_unique_values_numbers",
    body: params[:body],
    headers: {"Content-Type" => "application/json"},
    model: NilClass
  }
  @client.request(req, opts)
end

#basic(params = {}, opts = {}) ⇒ Sink::Models::EnumBasicResponse

Endpoint that has a ‘$ref`d enum type in the request body and the response body.

Parameters:

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

    Attributes to send in this request. @option params [Symbol, Sink::Models::Currency, nil] :input_currency This is my description for the Currency enum @option params [Symbol, ProblematicEnum, nil] :problematic_enum @option params [Symbol, UsesConst, nil] :uses_const

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

    Options to specify HTTP behaviour for this request.

Returns:



82
83
84
85
86
87
88
89
90
91
# File 'lib/sink/resources/types/enums.rb', line 82

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