class AdvertisersLineItems extends Resource (View source)

The "lineItems" collection of methods.

Typical usage is:

 $displayvideoService = new Google\Service\DisplayVideo(...);
 $lineItems = $displayvideoService->advertisers_lineItems;

Methods

bulkEditAssignedTargetingOptions(string $advertiserId, BulkEditAssignedTargetingOptionsRequest $postBody, array $optParams = [])

Bulk edits targeting options under multiple line items. The operation will delete the assigned targeting options provided in BulkEditAssignedTargetingOptionsRequest.delete_requests and then create the assigned targeting options provided in BulkEditAssignedTargetingOptionsRequest.create_requests. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: lineItems.bulkUpdate lineItems.patch assignedTargetingOptions.create assignedTargetingOptions.delete YouTube & Partners line items cannot be created or updated using the API.

bulkListAssignedTargetingOptions(string $advertiserId, array $optParams = [])

Lists assigned targeting options for multiple line items across targeting types. (lineItems.bulkListAssignedTargetingOptions)

bulkUpdate(string $advertiserId, BulkUpdateLineItemsRequest $postBody, array $optParams = [])

Updates multiple line items. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: BulkEditAssignedTargetingOptions UpdateLineItem assignedTargetingOptions.create assignedTargetingOptions.delete YouTube & Partners line items cannot be created or updated using the API.

create(string $advertiserId, LineItem $postBody, array $optParams = [])

Creates a new line item. Returns the newly created line item if successful.

delete(string $advertiserId, string $lineItemId, array $optParams = [])

Deletes a line item. Returns error code NOT_FOUND if the line item does not exist. The line item should be archived first, i.e. set entity_status to ENTITY_STATUS_ARCHIVED, to be able to delete it. YouTube & Partners line items cannot be created or updated using the API. (lineItems.delete)

duplicate(string $advertiserId, string $lineItemId, DuplicateLineItemRequest $postBody, array $optParams = [])

Duplicates a line item. Returns the ID of the created line item if successful. YouTube & Partners line items cannot be created or updated using the API. This method regularly experiences high latency. We recommend increasing your default timeout to avoid errors.

generateDefault(string $advertiserId, GenerateDefaultLineItemRequest $postBody, array $optParams = [])

Creates a new line item with settings (including targeting) inherited from the insertion order and an ENTITY_STATUS_DRAFT entity_status. Returns the newly created line item if successful. There are default values based on the three fields: The insertion order's insertion_order_type The insertion order's automation_type * The given line_item_type YouTube & Partners line items cannot be created or updated using the API. (lineItems.generateDefault)

get(string $advertiserId, string $lineItemId, array $optParams = [])

Gets a line item. (lineItems.get)

listAdvertisersLineItems(string $advertiserId, array $optParams = [])

Lists line items in an advertiser. The order is defined by the order_by parameter. If a filter by entity_status is not specified, line items with ENTITY_STATUS_ARCHIVED will not be included in the results.

patch(string $advertiserId, string $lineItemId, LineItem $postBody, array $optParams = [])

Updates an existing line item. Returns the updated line item if successful.

Details

BulkEditAssignedTargetingOptionsResponse bulkEditAssignedTargetingOptions(string $advertiserId, BulkEditAssignedTargetingOptionsRequest $postBody, array $optParams = [])

Bulk edits targeting options under multiple line items. The operation will delete the assigned targeting options provided in BulkEditAssignedTargetingOptionsRequest.delete_requests and then create the assigned targeting options provided in BulkEditAssignedTargetingOptionsRequest.create_requests. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: lineItems.bulkUpdate lineItems.patch assignedTargetingOptions.create assignedTargetingOptions.delete YouTube & Partners line items cannot be created or updated using the API.

(lineItems.bulkEditAssignedTargetingOptions)

Parameters

string $advertiserId

Required. The ID of the advertiser the line items belong to.

BulkEditAssignedTargetingOptionsRequest $postBody
array $optParams

Optional parameters.

Return Value

BulkEditAssignedTargetingOptionsResponse

Exceptions

Exception

BulkListAssignedTargetingOptionsResponse bulkListAssignedTargetingOptions(string $advertiserId, array $optParams = [])

Lists assigned targeting options for multiple line items across targeting types. (lineItems.bulkListAssignedTargetingOptions)

Parameters

string $advertiserId

Required. The ID of the advertiser the line items belongs to.

array $optParams

Optional parameters.

Return Value

BulkListAssignedTargetingOptionsResponse

Exceptions

Exception

BulkUpdateLineItemsResponse bulkUpdate(string $advertiserId, BulkUpdateLineItemsRequest $postBody, array $optParams = [])

Updates multiple line items. Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: BulkEditAssignedTargetingOptions UpdateLineItem assignedTargetingOptions.create assignedTargetingOptions.delete YouTube & Partners line items cannot be created or updated using the API.

(lineItems.bulkUpdate)

Parameters

string $advertiserId

Required. The ID of the advertiser this line item belongs to.

BulkUpdateLineItemsRequest $postBody
array $optParams

Optional parameters.

Return Value

BulkUpdateLineItemsResponse

Exceptions

Exception

LineItem create(string $advertiserId, LineItem $postBody, array $optParams = [])

Creates a new line item. Returns the newly created line item if successful.

YouTube & Partners line items cannot be created or updated using the API. (lineItems.create)

Parameters

string $advertiserId

Output only. The unique ID of the advertiser the line item belongs to.

LineItem $postBody
array $optParams

Optional parameters.

Return Value

LineItem

Exceptions

Exception

DisplayvideoEmpty delete(string $advertiserId, string $lineItemId, array $optParams = [])

Deletes a line item. Returns error code NOT_FOUND if the line item does not exist. The line item should be archived first, i.e. set entity_status to ENTITY_STATUS_ARCHIVED, to be able to delete it. YouTube & Partners line items cannot be created or updated using the API. (lineItems.delete)

Parameters

string $advertiserId

The ID of the advertiser this line item belongs to.

string $lineItemId

The ID of the line item to delete.

array $optParams

Optional parameters.

Return Value

DisplayvideoEmpty

Exceptions

Exception

DuplicateLineItemResponse duplicate(string $advertiserId, string $lineItemId, DuplicateLineItemRequest $postBody, array $optParams = [])

Duplicates a line item. Returns the ID of the created line item if successful. YouTube & Partners line items cannot be created or updated using the API. This method regularly experiences high latency. We recommend increasing your default timeout to avoid errors.

(lineItems.duplicate)

Parameters

string $advertiserId

Required. The ID of the advertiser this line item belongs to.

string $lineItemId

Required. The ID of the line item to duplicate.

DuplicateLineItemRequest $postBody
array $optParams

Optional parameters.

Return Value

DuplicateLineItemResponse

Exceptions

Exception

LineItem generateDefault(string $advertiserId, GenerateDefaultLineItemRequest $postBody, array $optParams = [])

Creates a new line item with settings (including targeting) inherited from the insertion order and an ENTITY_STATUS_DRAFT entity_status. Returns the newly created line item if successful. There are default values based on the three fields: The insertion order's insertion_order_type The insertion order's automation_type * The given line_item_type YouTube & Partners line items cannot be created or updated using the API. (lineItems.generateDefault)

Parameters

string $advertiserId

Required. The ID of the advertiser this line item belongs to.

GenerateDefaultLineItemRequest $postBody
array $optParams

Optional parameters.

Return Value

LineItem

Exceptions

Exception

LineItem get(string $advertiserId, string $lineItemId, array $optParams = [])

Gets a line item. (lineItems.get)

Parameters

string $advertiserId

Required. The ID of the advertiser this line item belongs to.

string $lineItemId

Required. The ID of the line item to fetch.

array $optParams

Optional parameters.

Return Value

LineItem

Exceptions

Exception

ListLineItemsResponse listAdvertisersLineItems(string $advertiserId, array $optParams = [])

Lists line items in an advertiser. The order is defined by the order_by parameter. If a filter by entity_status is not specified, line items with ENTITY_STATUS_ARCHIVED will not be included in the results.

(lineItems.listAdvertisersLineItems)

Parameters

string $advertiserId

Required. The ID of the advertiser to list line items for.

array $optParams

Optional parameters.

Return Value

ListLineItemsResponse

Exceptions

Exception

LineItem patch(string $advertiserId, string $lineItemId, LineItem $postBody, array $optParams = [])

Updates an existing line item. Returns the updated line item if successful.

Requests to this endpoint cannot be made concurrently with the following requests updating the same line item: BulkEditAssignedTargetingOptions BulkUpdateLineItems assignedTargetingOptions.create assignedTargetingOptions.delete YouTube & Partners line items cannot be created or updated using the API. This method regularly experiences high latency. We recommend increasing your default timeout to avoid errors. (lineItems.patch)

Parameters

string $advertiserId

Output only. The unique ID of the advertiser the line item belongs to.

string $lineItemId

Output only. The unique ID of the line item. Assigned by the system.

LineItem $postBody
array $optParams

Optional parameters.

Return Value

LineItem

Exceptions

Exception