Skip to main content

Class: ProductMessage

Defined in: WAProto/index.d.ts:32187

Represents a ProductMessage.

Implements

Constructors

new ProductMessage()

new ProductMessage(properties?): ProductMessage

Defined in: WAProto/index.d.ts:32193

Constructs a new ProductMessage.

Parameters

properties?

IProductMessage

Properties to set

Returns

ProductMessage

Properties

body?

optional body: null | string

Defined in: WAProto/index.d.ts:32205

ProductMessage body.

Implementation of

IProductMessage.body


businessOwnerJid?

optional businessOwnerJid: null | string

Defined in: WAProto/index.d.ts:32199

ProductMessage businessOwnerJid.

Implementation of

IProductMessage.businessOwnerJid


catalog?

optional catalog: null | ICatalogSnapshot

Defined in: WAProto/index.d.ts:32202

ProductMessage catalog.

Implementation of

IProductMessage.catalog


contextInfo?

optional contextInfo: null | IContextInfo

Defined in: WAProto/index.d.ts:32211

ProductMessage contextInfo.

Implementation of

IProductMessage.contextInfo


optional footer: null | string

Defined in: WAProto/index.d.ts:32208

ProductMessage footer.

Implementation of

IProductMessage.footer


product?

optional product: null | IProductSnapshot

Defined in: WAProto/index.d.ts:32196

ProductMessage product.

Implementation of

IProductMessage.product

Methods

toJSON()

toJSON(): object

Defined in: WAProto/index.d.ts:32281

Converts this ProductMessage to JSON.

Returns

object

JSON object


create()

static create(properties?): ProductMessage

Defined in: WAProto/index.d.ts:32218

Creates a new ProductMessage instance using the specified properties.

Parameters

properties?

IProductMessage

Properties to set

Returns

ProductMessage

ProductMessage instance


decode()

static decode(reader, length?): ProductMessage

Defined in: WAProto/index.d.ts:32244

Decodes a ProductMessage message from the specified reader or buffer.

Parameters

reader

Reader or buffer to decode from

Uint8Array<ArrayBufferLike> | Reader

length?

number

Message length if known beforehand

Returns

ProductMessage

ProductMessage

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited()

static decodeDelimited(reader): ProductMessage

Defined in: WAProto/index.d.ts:32253

Decodes a ProductMessage message from the specified reader or buffer, length delimited.

Parameters

reader

Reader or buffer to decode from

Uint8Array<ArrayBufferLike> | Reader

Returns

ProductMessage

ProductMessage

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


encode()

static encode(message, writer?): Writer

Defined in: WAProto/index.d.ts:32226

Encodes the specified ProductMessage message. Does not implicitly verify messages.

Parameters

message

IProductMessage

ProductMessage message or plain object to encode

writer?

Writer

Writer to encode to

Returns

Writer

Writer


encodeDelimited()

static encodeDelimited(message, writer?): Writer

Defined in: WAProto/index.d.ts:32234

Encodes the specified ProductMessage message, length delimited. Does not implicitly verify messages.

Parameters

message

IProductMessage

ProductMessage message or plain object to encode

writer?

Writer

Writer to encode to

Returns

Writer

Writer


fromObject()

static fromObject(object): ProductMessage

Defined in: WAProto/index.d.ts:32267

Creates a ProductMessage message from a plain object. Also converts values to their respective internal types.

Parameters

object

Plain object

Returns

ProductMessage

ProductMessage


getTypeUrl()

static getTypeUrl(typeUrlPrefix?): string

Defined in: WAProto/index.d.ts:32288

Gets the default type url for ProductMessage

Parameters

typeUrlPrefix?

string

your custom typeUrlPrefix(default "type.googleapis.com")

Returns

string

The default type url


toObject()

static toObject(message, options?): object

Defined in: WAProto/index.d.ts:32275

Creates a plain object from a ProductMessage message. Also converts values to other types if specified.

Parameters

message

ProductMessage

ProductMessage

options?

IConversionOptions

Conversion options

Returns

object

Plain object


verify()

static verify(message): null | string

Defined in: WAProto/index.d.ts:32260

Verifies a ProductMessage message.

Parameters

message

Plain object to verify

Returns

null | string

null if valid, otherwise the reason why it is not