Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DeleteRequestBuilder<EntityT>

Create OData query to delete an entity.

Type parameters

  • EntityT: Entity

    Type of the entity to be deleted

Hierarchy

Implements

  • EntityIdentifiable<EntityT>

Index

Constructors

constructor

  • Creates an instance of DeleteRequestBuilder.

    Parameters

    • entityConstructor: Constructable<EntityT>

      Constructor type of the entity to be deleted

    • keys: MapType<FieldType>

      Key-value pairs where the key is the name of a key property of the given entity and the value is the respective value

    Returns DeleteRequestBuilder

Properties

entityConstructor

entityConstructor: Constructable<EntityT>

Constructor type of the entity to be deleted

Protected requestConfig

requestConfig: ODataDeleteRequestConfig<EntityT>

Request configuration to initialize with

Methods

build

execute

  • Execute query.

    Parameters

    Returns Promise<void>

    A promise resolving once the entity was deleted

setVersionIdentifier

  • setVersionIdentifier(etag: string): this
  • Add ETag version identifier in the delete request header.

    Parameters

    • etag: string

      The version identifier of the entity

    Returns this

    The builder itself, to facilitate method chaining

url

  • Create the url based on configuration of the given builder.

    Parameters

    Returns Promise<string>

    Promise resolving to the url for the request

withCustomHeaders

  • withCustomHeaders(headers: MapType<string>): this
  • Add custom headers to the request.

    Parameters

    • headers: MapType<string>

      Key-value pairs denoting additional custom headers

    Returns this

    The request builder itself, to facilitate method chaining

withCustomServicePath

  • withCustomServicePath(servicePath: string): this
  • Replace the default service path with the given custom path. In case of the S/4HANA apis the servicePath defaults to '/sap/opu/odata/sap/' and can be overwritten here.

    Parameters

    • servicePath: string

      Path to override the default with

    Returns this

    The request builder itself, to facilitate method chaining