Class: Mediaflux::NamespaceDestroyRequest
- Defined in:
- app/models/mediaflux/namespace_destroy_request.rb
Overview
Destroy a MediaFlux namespace and everything in it
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#store ⇒ Object
readonly
Returns the value of attribute store.
Attributes inherited from Request
Class Method Summary collapse
-
.service ⇒ String
Specifies the Mediaflux service to use when destroying namespaces.
Instance Method Summary collapse
- #destroy ⇒ Object
-
#initialize(session_token:, namespace:) ⇒ NamespaceDestroyRequest
constructor
Constructor.
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:) ⇒ NamespaceDestroyRequest
Constructor
13 14 15 16 |
# File 'app/models/mediaflux/namespace_destroy_request.rb', line 13 def initialize(session_token:, namespace:) super(session_token: session_token) @namespace = namespace end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
8 9 10 |
# File 'app/models/mediaflux/namespace_destroy_request.rb', line 8 def description @description end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
8 9 10 |
# File 'app/models/mediaflux/namespace_destroy_request.rb', line 8 def namespace @namespace end |
#store ⇒ Object (readonly)
Returns the value of attribute store.
8 9 10 |
# File 'app/models/mediaflux/namespace_destroy_request.rb', line 8 def store @store end |
Class Method Details
.service ⇒ String
Specifies the Mediaflux service to use when destroying namespaces
28 29 30 |
# File 'app/models/mediaflux/namespace_destroy_request.rb', line 28 def self.service "asset.namespace.hard.destroy" end |
Instance Method Details
#destroy ⇒ Object
18 19 20 21 22 23 24 |
# File 'app/models/mediaflux/namespace_destroy_request.rb', line 18 def destroy resolve if error? response_error raise(StandardError, "call to service 'asset.namespace.hard.destroy' failed: The namespace #{namespace} does not exist or is not accessible") end end |