Class: Mediaflux::NamespaceCreateRequest

Inherits:
Request
  • Object
show all
Defined in:
app/models/mediaflux/namespace_create_request.rb

Instance Attribute Summary collapse

Attributes inherited from Request

#session_token

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Request

build_post_request, default_xml_namespace, default_xml_namespace_uri, #error?, find_or_create_http_client, format_date_for_mediaflux, request_path, #resolve, #resolved?, #response_body, #response_error, #response_xml, uri, #xml_payload, #xtoshell_xml

Constructor Details

#initialize(session_token:, namespace:, description: nil, store: nil) ⇒ NamespaceCreateRequest

Constructor

Parameters:

  • session_token (String)

    the API token for the authenticated session

  • namespace (String)

    name of namespace to be created

  • decsription (String)

    Optional description of the namespace

  • store (String) (defaults to: nil)

    Optional store name where the namespace will be attached



11
12
13
14
15
16
# File 'app/models/mediaflux/namespace_create_request.rb', line 11

def initialize(session_token:, namespace:, description: nil, store: nil)
  super(session_token: session_token)
  @namespace = namespace
  @description = description
  @store = store
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



4
5
6
# File 'app/models/mediaflux/namespace_create_request.rb', line 4

def description
  @description
end

#namespaceObject (readonly)

Returns the value of attribute namespace.



4
5
6
# File 'app/models/mediaflux/namespace_create_request.rb', line 4

def namespace
  @namespace
end

#storeObject (readonly)

Returns the value of attribute store.



4
5
6
# File 'app/models/mediaflux/namespace_create_request.rb', line 4

def store
  @store
end

Class Method Details

.serviceString

Specifies the Mediaflux service to use when creating assets

Returns:

  • (String)


20
21
22
# File 'app/models/mediaflux/namespace_create_request.rb', line 20

def self.service
  "asset.namespace.create"
end