Class protos.google.shopping.merchant.promotions.v1beta.PromotionsService (0.1.0)

Represents a PromotionsService

Inheritance

$protobuf.rpc.Service > protos.google.shopping.merchant.promotions.v1beta.PromotionsService

Package

@google-shopping/promotions

Constructors

(constructor)(rpcImpl, requestDelimited, responseDelimited)

constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);

Constructs a new PromotionsService service.

Parameters
Name Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Methods

create(rpcImpl, requestDelimited, responseDelimited)

public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): PromotionsService;

Creates new PromotionsService service using the specified rpc implementation.

Parameters
Name Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Returns
Type Description
PromotionsService

RPC service. Useful where requests and/or responses are streamed.

getPromotion(request, callback)

public getPromotion(request: google.shopping.merchant.promotions.v1beta.IGetPromotionRequest, callback: google.shopping.merchant.promotions.v1beta.PromotionsService.GetPromotionCallback): void;

Calls GetPromotion.

Parameters
Name Description
request IGetPromotionRequest

GetPromotionRequest message or plain object

callback GetPromotionCallback

Node-style callback called with the error, if any, and Promotion

Returns
Type Description
void

getPromotion(request)

public getPromotion(request: google.shopping.merchant.promotions.v1beta.IGetPromotionRequest): Promise<google.shopping.merchant.promotions.v1beta.Promotion>;

Calls GetPromotion.

Parameter
Name Description
request IGetPromotionRequest

GetPromotionRequest message or plain object

Returns
Type Description
Promise<google.shopping.merchant.promotions.v1beta.Promotion>

Promise

insertPromotion(request, callback)

public insertPromotion(request: google.shopping.merchant.promotions.v1beta.IInsertPromotionRequest, callback: google.shopping.merchant.promotions.v1beta.PromotionsService.InsertPromotionCallback): void;

Calls InsertPromotion.

Parameters
Name Description
request IInsertPromotionRequest

InsertPromotionRequest message or plain object

callback InsertPromotionCallback

Node-style callback called with the error, if any, and Promotion

Returns
Type Description
void

insertPromotion(request)

public insertPromotion(request: google.shopping.merchant.promotions.v1beta.IInsertPromotionRequest): Promise<google.shopping.merchant.promotions.v1beta.Promotion>;

Calls InsertPromotion.

Parameter
Name Description
request IInsertPromotionRequest

InsertPromotionRequest message or plain object

Returns
Type Description
Promise<google.shopping.merchant.promotions.v1beta.Promotion>

Promise

listPromotions(request, callback)

public listPromotions(request: google.shopping.merchant.promotions.v1beta.IListPromotionsRequest, callback: google.shopping.merchant.promotions.v1beta.PromotionsService.ListPromotionsCallback): void;

Calls ListPromotions.

Parameters
Name Description
request IListPromotionsRequest

ListPromotionsRequest message or plain object

callback ListPromotionsCallback

Node-style callback called with the error, if any, and ListPromotionsResponse

Returns
Type Description
void

listPromotions(request)

public listPromotions(request: google.shopping.merchant.promotions.v1beta.IListPromotionsRequest): Promise<google.shopping.merchant.promotions.v1beta.ListPromotionsResponse>;

Calls ListPromotions.

Parameter
Name Description
request IListPromotionsRequest

ListPromotionsRequest message or plain object

Returns
Type Description
Promise<google.shopping.merchant.promotions.v1beta.ListPromotionsResponse>

Promise