Class: BrickFTP::RESTfulAPI::CreateBundle

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

Overview

Create a bundle

Params

PARAMETER TYPE DESCRIPTION
paths array List of the paths associated with the bundle.
password string Optional password to password-protect the bundle. This property is write-only. It cannot be retrieved via the API.

See Also:

Defined Under Namespace

Classes: Params

Instance Method Summary collapse

Methods included from Command

included, #initialize

Instance Method Details

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

Creates a new group on the current site.

Parameters:

Returns:



33
34
35
36
37
# File 'lib/brick_ftp/restful_api/create_bundle.rb', line 33

def call(params)
  res = client.post('/api/rest/v1/bundles.json', params.to_h.compact)

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