Class v1.CssProductInputsServiceClient (0.7.0) Stay organized with collections Save and categorize content based on your preferences.
Service to use CssProductInput resource. This service helps to insert/update/delete CSS Products. v1
Package
@google-shopping/cssConstructors
(constructor)(opts, gaxInstance)
constructor(opts?:ClientOptions,gaxInstance?:typeofgax|typeofgax.fallback);Construct an instance of CssProductInputsServiceClient.
| Parameters | |
|---|---|
| Name | Description |
opts | ClientOptions |
gaxInstance | typeofgax | typeoffallback: loaded instance of |
Properties
apiEndpoint
getapiEndpoint():string;The DNS address for this API service.
apiEndpoint
staticgetapiEndpoint():string;The DNS address for this API service - same as servicePath.
auth
auth:gax.GoogleAuth;cssProductInputsServiceStub
cssProductInputsServiceStub?:Promise<{[name:string]:Function;}>;descriptors
descriptors:Descriptors;innerApiCalls
innerApiCalls:{[name:string]:Function;};pathTemplates
pathTemplates:{[name:string]:gax.PathTemplate;};port
staticgetport():number;The port for this API service.
scopes
staticgetscopes():string[];The scopes needed to make gRPC calls for every method defined in this service.
servicePath
staticgetservicePath():string;The DNS address for this API service.
universeDomain
getuniverseDomain():string;warn
warn:(code:string,message:string,warnType?:string)=>void;Methods
accountLabelPath(account, label)
accountLabelPath(account:string,label:string):string;Return a fully-qualified accountLabel resource name string.
| Parameters | |
|---|---|
| Name | Description |
account | string |
label | string |
| Returns | |
|---|---|
| Type | Description |
string | {string} Resource name string. |
accountPath(account)
accountPath(account:string):string;Return a fully-qualified account resource name string.
| Parameter | |
|---|---|
| Name | Description |
account | string |
| Returns | |
|---|---|
| Type | Description |
string | {string} Resource name string. |
close()
close():Promise<void>;Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
| Returns | |
|---|---|
| Type | Description |
Promise<void> | {Promise} A promise that resolves when the client is closed. |
cssProductInputPath(account, cssProductInput)
cssProductInputPath(account:string,cssProductInput:string):string;Return a fully-qualified cssProductInput resource name string.
| Parameters | |
|---|---|
| Name | Description |
account | string |
cssProductInput | string |
| Returns | |
|---|---|
| Type | Description |
string | {string} Resource name string. |
cssProductPath(account, cssProduct)
cssProductPath(account:string,cssProduct:string):string;Return a fully-qualified cssProduct resource name string.
| Parameters | |
|---|---|
| Name | Description |
account | string |
cssProduct | string |
| Returns | |
|---|---|
| Type | Description |
string | {string} Resource name string. |
deleteCssProductInput(request, options)
deleteCssProductInput(request?:protos.google.shopping.css.v1.IDeleteCssProductInputRequest,options?:CallOptions):Promise<[protos.google.protobuf.IEmpty,protos.google.shopping.css.v1.IDeleteCssProductInputRequest|undefined,{}|undefined]>;Deletes a CSS Product input from your CSS Center account.
After a delete it may take several minutes until the input is no longer available.
| Parameters | |
|---|---|
| Name | Description |
request | IDeleteCssProductInputRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[protos.google.protobuf.IEmpty,protos.google.shopping.css.v1.IDeleteCssProductInputRequest | undefined, {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representingEmpty. Please see thedocumentation for more details and examples. |
/** * This snippet has been automatically generated and should be regarded as a code template only. * It will require modifications to work. * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. *//** * Required. The name of the CSS product input resource to delete. * Format: accounts/{account}/cssProductInputs/{css_product_input} */// const name = 'abc123'/** * The Content API Supplemental Feed ID. * The field must not be set if the action applies to a primary feed. * If the field is set, then product action applies to a supplemental feed * instead of primary Content API feed. */// const supplementalFeedId = 1234// Imports the Css libraryconst{CssProductInputsServiceClient}=require('@google-shopping/css').v1;// Instantiates a clientconstcssClient=newCssProductInputsServiceClient();asyncfunctioncallDeleteCssProductInput(){// Construct requestconstrequest={name,};// Run requestconstresponse=awaitcssClient.deleteCssProductInput(request);console.log(response);}callDeleteCssProductInput();deleteCssProductInput(request, options, callback)
deleteCssProductInput(request:protos.google.shopping.css.v1.IDeleteCssProductInputRequest,options:CallOptions,callback:Callback<protos.google.protobuf.IEmpty,protos.google.shopping.css.v1.IDeleteCssProductInputRequest|null|undefined,{}|null|undefined>):void;| Parameters | |
|---|---|
| Name | Description |
request | IDeleteCssProductInputRequest |
options | CallOptions |
callback | Callback<protos.google.protobuf.IEmpty,protos.google.shopping.css.v1.IDeleteCssProductInputRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
void | |
deleteCssProductInput(request, callback)
deleteCssProductInput(request:protos.google.shopping.css.v1.IDeleteCssProductInputRequest,callback:Callback<protos.google.protobuf.IEmpty,protos.google.shopping.css.v1.IDeleteCssProductInputRequest|null|undefined,{}|null|undefined>):void;| Parameters | |
|---|---|
| Name | Description |
request | IDeleteCssProductInputRequest |
callback | Callback<protos.google.protobuf.IEmpty,protos.google.shopping.css.v1.IDeleteCssProductInputRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
void | |
getProjectId()
getProjectId():Promise<string>;| Returns | |
|---|---|
| Type | Description |
Promise<string> | |
getProjectId(callback)
getProjectId(callback:Callback<string,undefined,undefined>):void;| Parameter | |
|---|---|
| Name | Description |
callback | Callback<string, undefined, undefined> |
| Returns | |
|---|---|
| Type | Description |
void | |
initialize()
initialize():Promise<{[name:string]:Function;}>;Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
| Returns | |
|---|---|
| Type | Description |
Promise<{ [name: string]:Function; }> | {Promise} A promise that resolves to an authenticated service stub. |
insertCssProductInput(request, options)
insertCssProductInput(request?:protos.google.shopping.css.v1.IInsertCssProductInputRequest,options?:CallOptions):Promise<[protos.google.shopping.css.v1.ICssProductInput,protos.google.shopping.css.v1.IInsertCssProductInputRequest|undefined,{}|undefined]>;Uploads a CssProductInput to your CSS Center account. If an input with the same contentLanguage, identity, feedLabel and feedId already exists, this method replaces that entry.
After inserting, updating, or deleting a CSS Product input, it may take several minutes before the processed CSS Product can be retrieved.
| Parameters | |
|---|---|
| Name | Description |
request | IInsertCssProductInputRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[protos.google.shopping.css.v1.ICssProductInput,protos.google.shopping.css.v1.IInsertCssProductInputRequest | undefined, {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representingCssProductInput. Please see thedocumentation for more details and examples. |
/** * This snippet has been automatically generated and should be regarded as a code template only. * It will require modifications to work. * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. *//** * Required. The account where this CSS Product will be inserted. * Format: accounts/{account} */// const parent = 'abc123'/** * Required. The CSS Product Input to insert. */// const cssProductInput = {}/** * Optional. DEPRECATED. Feed id is not required for CSS Products. * The primary or supplemental feed id. If CSS Product already exists and * feed id provided is different, then the CSS Product will be moved to a * new feed. * Note: For now, CSSs do not need to provide feed ids as we create * feeds on the fly. * We do not have supplemental feed support for CSS Products yet. */// const feedId = 1234// Imports the Css libraryconst{CssProductInputsServiceClient}=require('@google-shopping/css').v1;// Instantiates a clientconstcssClient=newCssProductInputsServiceClient();asyncfunctioncallInsertCssProductInput(){// Construct requestconstrequest={parent,cssProductInput,};// Run requestconstresponse=awaitcssClient.insertCssProductInput(request);console.log(response);}callInsertCssProductInput();insertCssProductInput(request, options, callback)
insertCssProductInput(request:protos.google.shopping.css.v1.IInsertCssProductInputRequest,options:CallOptions,callback:Callback<protos.google.shopping.css.v1.ICssProductInput,protos.google.shopping.css.v1.IInsertCssProductInputRequest|null|undefined,{}|null|undefined>):void;| Parameters | |
|---|---|
| Name | Description |
request | IInsertCssProductInputRequest |
options | CallOptions |
callback | Callback<protos.google.shopping.css.v1.ICssProductInput,protos.google.shopping.css.v1.IInsertCssProductInputRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
void | |
insertCssProductInput(request, callback)
insertCssProductInput(request:protos.google.shopping.css.v1.IInsertCssProductInputRequest,callback:Callback<protos.google.shopping.css.v1.ICssProductInput,protos.google.shopping.css.v1.IInsertCssProductInputRequest|null|undefined,{}|null|undefined>):void;| Parameters | |
|---|---|
| Name | Description |
request | IInsertCssProductInputRequest |
callback | Callback<protos.google.shopping.css.v1.ICssProductInput,protos.google.shopping.css.v1.IInsertCssProductInputRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
void | |
matchAccountFromAccountLabelName(accountLabelName)
matchAccountFromAccountLabelName(accountLabelName:string):string|number;Parse the account from AccountLabel resource.
| Parameter | |
|---|---|
| Name | Description |
accountLabelName | stringA fully-qualified path representing AccountLabel resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the account. |
matchAccountFromAccountName(accountName)
matchAccountFromAccountName(accountName:string):string|number;Parse the account from Account resource.
| Parameter | |
|---|---|
| Name | Description |
accountName | stringA fully-qualified path representing Account resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the account. |
matchAccountFromCssProductInputName(cssProductInputName)
matchAccountFromCssProductInputName(cssProductInputName:string):string|number;Parse the account from CssProductInput resource.
| Parameter | |
|---|---|
| Name | Description |
cssProductInputName | stringA fully-qualified path representing CssProductInput resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the account. |
matchAccountFromCssProductName(cssProductName)
matchAccountFromCssProductName(cssProductName:string):string|number;Parse the account from CssProduct resource.
| Parameter | |
|---|---|
| Name | Description |
cssProductName | stringA fully-qualified path representing CssProduct resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the account. |
matchCssProductFromCssProductName(cssProductName)
matchCssProductFromCssProductName(cssProductName:string):string|number;Parse the css_product from CssProduct resource.
| Parameter | |
|---|---|
| Name | Description |
cssProductName | stringA fully-qualified path representing CssProduct resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the css_product. |
matchCssProductInputFromCssProductInputName(cssProductInputName)
matchCssProductInputFromCssProductInputName(cssProductInputName:string):string|number;Parse the css_product_input from CssProductInput resource.
| Parameter | |
|---|---|
| Name | Description |
cssProductInputName | stringA fully-qualified path representing CssProductInput resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the css_product_input. |
matchLabelFromAccountLabelName(accountLabelName)
matchLabelFromAccountLabelName(accountLabelName:string):string|number;Parse the label from AccountLabel resource.
| Parameter | |
|---|---|
| Name | Description |
accountLabelName | stringA fully-qualified path representing AccountLabel resource. |
| Returns | |
|---|---|
| Type | Description |
string | number | {string} A string representing the label. |
updateCssProductInput(request, options)
updateCssProductInput(request?:protos.google.shopping.css.v1.IUpdateCssProductInputRequest,options?:CallOptions):Promise<[protos.google.shopping.css.v1.ICssProductInput,protos.google.shopping.css.v1.IUpdateCssProductInputRequest|undefined,{}|undefined]>;Updates the existing Css Product input in your CSS Center account.
After inserting, updating, or deleting a CSS Product input, it may take several minutes before the processed Css Product can be retrieved.
| Parameters | |
|---|---|
| Name | Description |
request | IUpdateCssProductInputRequestThe request object that will be sent. |
options | CallOptionsCall options. SeeCallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[protos.google.shopping.css.v1.ICssProductInput,protos.google.shopping.css.v1.IUpdateCssProductInputRequest | undefined, {} | undefined ]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representingCssProductInput. Please see thedocumentation for more details and examples. |
/** * This snippet has been automatically generated and should be regarded as a code template only. * It will require modifications to work. * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. *//** * Required. The CSS product input resource to update. Information you submit * will be applied to the processed CSS product as well. */// const cssProductInput = {}/** * The list of CSS product attributes to be updated. * If the update mask is omitted, then it is treated as implied field mask * equivalent to all fields that are populated (have a non-empty value). * Attributes specified in the update mask without a value specified in the * body will be deleted from the CSS product. * Update mask can only be specified for top level fields in * attributes and custom attributes. * To specify the update mask for custom attributes you need to add the * `custom_attribute.` prefix. * Providing special "*" value for full CSS product replacement is not * supported. */// const updateMask = {}// Imports the Css libraryconst{CssProductInputsServiceClient}=require('@google-shopping/css').v1;// Instantiates a clientconstcssClient=newCssProductInputsServiceClient();asyncfunctioncallUpdateCssProductInput(){// Construct requestconstrequest={cssProductInput,};// Run requestconstresponse=awaitcssClient.updateCssProductInput(request);console.log(response);}callUpdateCssProductInput();updateCssProductInput(request, options, callback)
updateCssProductInput(request:protos.google.shopping.css.v1.IUpdateCssProductInputRequest,options:CallOptions,callback:Callback<protos.google.shopping.css.v1.ICssProductInput,protos.google.shopping.css.v1.IUpdateCssProductInputRequest|null|undefined,{}|null|undefined>):void;| Parameters | |
|---|---|
| Name | Description |
request | IUpdateCssProductInputRequest |
options | CallOptions |
callback | Callback<protos.google.shopping.css.v1.ICssProductInput,protos.google.shopping.css.v1.IUpdateCssProductInputRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
void | |
updateCssProductInput(request, callback)
updateCssProductInput(request:protos.google.shopping.css.v1.IUpdateCssProductInputRequest,callback:Callback<protos.google.shopping.css.v1.ICssProductInput,protos.google.shopping.css.v1.IUpdateCssProductInputRequest|null|undefined,{}|null|undefined>):void;| Parameters | |
|---|---|
| Name | Description |
request | IUpdateCssProductInputRequest |
callback | Callback<protos.google.shopping.css.v1.ICssProductInput,protos.google.shopping.css.v1.IUpdateCssProductInputRequest | null | undefined, {} | null | undefined> |
| Returns | |
|---|---|
| Type | Description |
void | |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 UTC.