Class: BrickFTP::RESTfulAPI::GetBundle

Inherits:
Object
  • Object
show all
Includes:
Command
Defined in:
lib/brick_ftp/restful_api/get_bundle.rb

Overview

Show a bundle

See Also:

Instance Method Summary collapse

Methods included from Command

included, #initialize

Instance Method Details

#call(id) ⇒ BrickFTP::Types::Bundle

Returns a single bundle.

Parameters:

  • id (Integer)

    Globally unique identifier of each bundle.

Returns:



18
19
20
21
22
23
# File 'lib/brick_ftp/restful_api/get_bundle.rb', line 18

def call(id)
  res = client.get("/api/rest/v1/bundles/#{id}.json")
  return nil if !res || res.empty?

  BrickFTP::Types::Bundle.new(**res.symbolize_keys)
end