Class: Mediaflux::AssetDestroyRequest

Inherits:
Request
  • Object
show all
Defined in:
app/models/mediaflux/asset_destroy_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:, collection:, members:) ⇒ AssetDestroyRequest

Constructor

Parameters:

  • session_token (String)

    the API token for the authenticated session

  • collection (Int)

    the identifier of the collection to be destroyed

  • members (Boolean)

    A true/false flag the can destroy all members of a collection



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

def initialize(session_token:, collection:, members:)
  super(session_token: session_token)
  @collection = collection
  @members = members
end

Instance Attribute Details

#collectionObject (readonly)

Returns the value of attribute collection.



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

def collection
  @collection
end

#membersObject (readonly)

Returns the value of attribute members.



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

def members
  @members
end

Class Method Details

.serviceString

Specifies the Mediaflux service to use when destroying assets

Returns:

  • (String)


19
20
21
# File 'app/models/mediaflux/asset_destroy_request.rb', line 19

def self.service
  "asset.destroy"
end