Class: Sink::Resources::DeeplyNested::LevelOne::LevelTwo::LevelThree

Inherits:
Object
  • Object
show all
Defined in:
lib/sink/resources/deeply_nested/level_one/level_two/level_three.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ LevelThree

Returns a new instance of LevelThree.

Parameters:

[View source]

10
11
12
# File 'lib/sink/resources/deeply_nested/level_one/level_two/level_three.rb', line 10

def initialize(client:)
  @client = client
end

Instance Method Details

#method_level_3(card_token, opts = {}) ⇒ Sink::Models::Card

Get card configuration such as spend limit and state.

Parameters:

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

    Options to specify HTTP behaviour for this request.

Returns:

[View source]

20
21
22
23
24
25
26
27
# File 'lib/sink/resources/deeply_nested/level_one/level_two/level_three.rb', line 20

def method_level_3(card_token, opts = {})
  req = {
    method: :get,
    path: "/cards/#{card_token}",
    model: Sink::Models::Card
  }
  @client.request(req, opts)
end