View Source GoogleApi.Content.V21.Api.Promotions (google_api_content v0.71.0)
API calls for all endpoints tagged Promotions.
Summary
Functions
Inserts a promotion for your Merchant Center account. If the promotion already exists, then it updates the promotion instead. To [end or delete] (https://developers.google.com/shopping-content/guides/promotions#end_a_promotion) a promotion update the time period of the promotion to a time that has already passed.
Retrieves a promotion from your Merchant Center account.
List all promotions from your Merchant Center account.
Functions
content_promotions_create(connection, merchant_id, optional_params \\ [], opts \\ [])
View Source@spec content_promotions_create(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Content.V21.Model.Promotion.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Inserts a promotion for your Merchant Center account. If the promotion already exists, then it updates the promotion instead. To [end or delete] (https://developers.google.com/shopping-content/guides/promotions#end_a_promotion) a promotion update the time period of the promotion to a time that has already passed.
Parameters
-
connection(type:GoogleApi.Content.V21.Connection.t) - Connection to server -
merchant_id(type:String.t) - Required. The ID of the account that contains the collection. -
optional_params(type:keyword()) - Optional parameters-
:"$.xgafv"(type:String.t) - V1 error format. -
:access_token(type:String.t) - OAuth access token. -
:alt(type:String.t) - Data format for response. -
:callback(type:String.t) - JSONP -
:fields(type:String.t) - Selector specifying which fields to include in a partial response. -
:key(type:String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
:oauth_token(type:String.t) - OAuth 2.0 token for the current user. -
:prettyPrint(type:boolean()) - Returns response with indentations and line breaks. -
:quotaUser(type:String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType(type:String.t) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol(type:String.t) - Upload protocol for media (e.g. "raw", "multipart"). -
:body(type:GoogleApi.Content.V21.Model.Promotion.t) -
-
-
opts(type:keyword()) - Call options
Returns
-
{:ok, %GoogleApi.Content.V21.Model.Promotion{}}on success -
{:error, info}on failure
content_promotions_get(connection, merchant_id, id, optional_params \\ [], opts \\ [])
View Source@spec content_promotions_get( Tesla.Env.client(), String.t(), String.t(), keyword(), keyword() ) :: {:ok, GoogleApi.Content.V21.Model.Promotion.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
Retrieves a promotion from your Merchant Center account.
Parameters
-
connection(type:GoogleApi.Content.V21.Connection.t) - Connection to server -
merchant_id(type:String.t) - Required. The ID of the account that contains the collection. -
id(type:String.t) - Required. REST ID of the promotion to retrieve. -
optional_params(type:keyword()) - Optional parameters-
:"$.xgafv"(type:String.t) - V1 error format. -
:access_token(type:String.t) - OAuth access token. -
:alt(type:String.t) - Data format for response. -
:callback(type:String.t) - JSONP -
:fields(type:String.t) - Selector specifying which fields to include in a partial response. -
:key(type:String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
:oauth_token(type:String.t) - OAuth 2.0 token for the current user. -
:prettyPrint(type:boolean()) - Returns response with indentations and line breaks. -
:quotaUser(type:String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType(type:String.t) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol(type:String.t) - Upload protocol for media (e.g. "raw", "multipart").
-
-
opts(type:keyword()) - Call options
Returns
-
{:ok, %GoogleApi.Content.V21.Model.Promotion{}}on success -
{:error, info}on failure
content_promotions_list(connection, merchant_id, optional_params \\ [], opts \\ [])
View Source@spec content_promotions_list(Tesla.Env.client(), String.t(), keyword(), keyword()) :: {:ok, GoogleApi.Content.V21.Model.ListPromotionResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
List all promotions from your Merchant Center account.
Parameters
-
connection(type:GoogleApi.Content.V21.Connection.t) - Connection to server -
merchant_id(type:String.t) - Required. The ID of the account that contains the collection. -
optional_params(type:keyword()) - Optional parameters-
:"$.xgafv"(type:String.t) - V1 error format. -
:access_token(type:String.t) - OAuth access token. -
:alt(type:String.t) - Data format for response. -
:callback(type:String.t) - JSONP -
:fields(type:String.t) - Selector specifying which fields to include in a partial response. -
:key(type:String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. -
:oauth_token(type:String.t) - OAuth 2.0 token for the current user. -
:prettyPrint(type:boolean()) - Returns response with indentations and line breaks. -
:quotaUser(type:String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. -
:uploadType(type:String.t) - Legacy upload protocol for media (e.g. "media", "multipart"). -
:upload_protocol(type:String.t) - Upload protocol for media (e.g. "raw", "multipart"). -
:countryCode(type:String.t) - CLDR country code (for example, "US"), used as a filter on promotions target country. -
:languageCode(type:String.t) - The two-letter ISO 639-1 language code associated with the promotions, used as a filter. -
:pageSize(type:integer()) - The maximum number of promotions to return. The service may return fewer than this value. If unspecified, at most 50 labels will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. -
:pageToken(type:String.t) - A page token, received from a previousListPromotioncall. Provide this to retrieve the subsequent page. When paginating, all other parameters provided toListPromotionmust match the call that provided the page token.
-
-
opts(type:keyword()) - Call options
Returns
-
{:ok, %GoogleApi.Content.V21.Model.ListPromotionResponse{}}on success -
{:error, info}on failure