Class: Sink::Resources::PaginationTests::SchemaTypes

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ SchemaTypes

Returns a new instance of SchemaTypes.

Parameters:



8
9
10
# File 'lib/sink/resources/pagination_tests/schema_types.rb', line 8

def initialize(client:)
  @client = client
end

Instance Method Details

#allofs(params = {}, opts = {}) ⇒ Sink::PageCursor<Sink::Models::MyModel>

Test case for a cursor endpoint that defines properties using allOf

Parameters:

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

    Attributes to send in this request. @option params [String, nil] :cursor @option params [Integer, nil] :limit

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

    Options to specify HTTP behaviour for this request.

Returns:



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

def allofs(params = {}, opts = {})
  req = {
    method: :get,
    path: "/paginated/schema_types/allofs",
    query: params,
    page: Sink::PageCursor,
    model: Sink::Models::MyModel
  }
  @client.request(req, opts)
end

#unions(params = {}, opts = {}) ⇒ Sink::PageCursor<Sink::Models::MyModel>

Test case for a cursor endpoint that returns an anyOf

Parameters:

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

    Attributes to send in this request. @option params [String, nil] :cursor @option params [Integer, nil] :limit

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

    Options to specify HTTP behaviour for this request.

Returns:



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

def unions(params = {}, opts = {})
  req = {
    method: :get,
    path: "/paginated/schema_types/unions",
    query: params,
    page: Sink::PageCursor,
    model: Sink::Models::MyModel
  }
  @client.request(req, opts)
end