Represents an Attributes.
Package
@google-shopping/promotionsConstructors
(constructor)(properties)
constructor(properties?: google.shopping.merchant.promotions.v1beta.IAttributes);Constructs a new Attributes.
| Parameter | |
|---|---|
| Name | Description |
properties |
IAttributes
Properties to set |
Properties
brandExclusion
public brandExclusion: string[];Attributes brandExclusion.
brandInclusion
public brandInclusion: string[];Attributes brandInclusion.
couponValueType
public couponValueType: (google.shopping.merchant.promotions.v1beta.CouponValueType|keyof typeof google.shopping.merchant.promotions.v1beta.CouponValueType);Attributes couponValueType.
freeGiftDescription
public freeGiftDescription: string;Attributes freeGiftDescription.
freeGiftItemId
public freeGiftItemId: string;Attributes freeGiftItemId.
freeGiftValue
public freeGiftValue?: (google.shopping.type.IPrice|null);Attributes freeGiftValue.
genericRedemptionCode
public genericRedemptionCode: string;Attributes genericRedemptionCode.
getThisQuantityDiscounted
public getThisQuantityDiscounted: (number|Long|string);Attributes getThisQuantityDiscounted.
itemGroupIdExclusion
public itemGroupIdExclusion: string[];Attributes itemGroupIdExclusion.
itemGroupIdInclusion
public itemGroupIdInclusion: string[];Attributes itemGroupIdInclusion.
itemIdExclusion
public itemIdExclusion: string[];Attributes itemIdExclusion.
itemIdInclusion
public itemIdInclusion: string[];Attributes itemIdInclusion.
limitQuantity
public limitQuantity: (number|Long|string);Attributes limitQuantity.
limitValue
public limitValue?: (google.shopping.type.IPrice|null);Attributes limitValue.
longTitle
public longTitle: string;Attributes longTitle.
minimumPurchaseAmount
public minimumPurchaseAmount?: (google.shopping.type.IPrice|null);Attributes minimumPurchaseAmount.
minimumPurchaseQuantity
public minimumPurchaseQuantity: (number|Long|string);Attributes minimumPurchaseQuantity.
moneyOffAmount
public moneyOffAmount?: (google.shopping.type.IPrice|null);Attributes moneyOffAmount.
offerType
public offerType: (google.shopping.merchant.promotions.v1beta.OfferType|keyof typeof google.shopping.merchant.promotions.v1beta.OfferType);Attributes offerType.
percentOff
public percentOff: (number|Long|string);Attributes percentOff.
productApplicability
public productApplicability: (google.shopping.merchant.promotions.v1beta.ProductApplicability|keyof typeof google.shopping.merchant.promotions.v1beta.ProductApplicability);Attributes productApplicability.
productTypeExclusion
public productTypeExclusion: string[];Attributes productTypeExclusion.
productTypeInclusion
public productTypeInclusion: string[];Attributes productTypeInclusion.
promotionDestinations
public promotionDestinations: google.shopping.type.Destination.DestinationEnum[];Attributes promotionDestinations.
promotionDisplayTimePeriod
public promotionDisplayTimePeriod?: (google.type.IInterval|null);Attributes promotionDisplayTimePeriod.
promotionEffectiveTimePeriod
public promotionEffectiveTimePeriod?: (google.type.IInterval|null);Attributes promotionEffectiveTimePeriod.
promotionUrl
public promotionUrl: string;Attributes promotionUrl.
storeApplicability
public storeApplicability: (google.shopping.merchant.promotions.v1beta.StoreApplicability|keyof typeof google.shopping.merchant.promotions.v1beta.StoreApplicability);Attributes storeApplicability.
storeCodesExclusion
public storeCodesExclusion: string[];Attributes storeCodesExclusion.
storeCodesInclusion
public storeCodesInclusion: string[];Attributes storeCodesInclusion.
Methods
create(properties)
public static create(properties?: google.shopping.merchant.promotions.v1beta.IAttributes): google.shopping.merchant.promotions.v1beta.Attributes;Creates a new Attributes instance using the specified properties.
| Parameter | |
|---|---|
| Name | Description |
properties |
IAttributes
Properties to set |
| Returns | |
|---|---|
| Type | Description |
Attributes |
Attributes instance |
decode(reader, length)
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.shopping.merchant.promotions.v1beta.Attributes;Decodes an Attributes message from the specified reader or buffer.
| Parameters | |
|---|---|
| Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
length |
number
Message length if known beforehand |
| Returns | |
|---|---|
| Type | Description |
Attributes |
Attributes |
decodeDelimited(reader)
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.shopping.merchant.promotions.v1beta.Attributes;Decodes an Attributes message from the specified reader or buffer, length delimited.
| Parameter | |
|---|---|
| Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
| Returns | |
|---|---|
| Type | Description |
Attributes |
Attributes |
encode(message, writer)
public static encode(message: google.shopping.merchant.promotions.v1beta.IAttributes, writer?: $protobuf.Writer): $protobuf.Writer;Encodes the specified Attributes message. Does not implicitly messages.
| Parameters | |
|---|---|
| Name | Description |
message |
IAttributes
Attributes message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
| Returns | |
|---|---|
| Type | Description |
$protobuf.Writer |
Writer |
encodeDelimited(message, writer)
public static encodeDelimited(message: google.shopping.merchant.promotions.v1beta.IAttributes, writer?: $protobuf.Writer): $protobuf.Writer;Encodes the specified Attributes message, length delimited. Does not implicitly messages.
| Parameters | |
|---|---|
| Name | Description |
message |
IAttributes
Attributes message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
| Returns | |
|---|---|
| Type | Description |
$protobuf.Writer |
Writer |
fromObject(object)
public static fromObject(object: { [k: string]: any }): google.shopping.merchant.promotions.v1beta.Attributes;Creates an Attributes message from a plain object. Also converts values to their respective internal types.
| Parameter | |
|---|---|
| Name | Description |
object |
{ [k: string]: any }
Plain object |
| Returns | |
|---|---|
| Type | Description |
Attributes |
Attributes |
getTypeUrl(typeUrlPrefix)
public static getTypeUrl(typeUrlPrefix?: string): string;Gets the default type url for Attributes
| Parameter | |
|---|---|
| Name | Description |
typeUrlPrefix |
string
your custom typeUrlPrefix(default "type.googleapis.com") |
| Returns | |
|---|---|
| Type | Description |
string |
The default type url |
toJSON()
public toJSON(): { [k: string]: any };Converts this Attributes to JSON.
| Returns | |
|---|---|
| Type | Description |
{ [k: string]: any } |
JSON object |
toObject(message, options)
public static toObject(message: google.shopping.merchant.promotions.v1beta.Attributes, options?: $protobuf.IConversionOptions): { [k: string]: any };Creates a plain object from an Attributes message. Also converts values to other types if specified.
| Parameters | |
|---|---|
| Name | Description |
message |
Attributes
Attributes |
options |
$protobuf.IConversionOptions
Conversion options |
| Returns | |
|---|---|
| Type | Description |
{ [k: string]: any } |
Plain object |
verify(message)
public static verify(message: { [k: string]: any }): (string|null);Verifies an Attributes message.
| Parameter | |
|---|---|
| Name | Description |
message |
{ [k: string]: any }
Plain object to verify |
| Returns | |
|---|---|
| Type | Description |
(string|null) |
|