Skip to content

Commit

Permalink
feat: Automated regeneration of Content client
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation committed Mar 12, 2024
1 parent 9f57fc1 commit cc3065a
Show file tree
Hide file tree
Showing 100 changed files with 3,267 additions and 928 deletions.
2 changes: 1 addition & 1 deletion clients/content/lib/google_api/content/v21/api/accounts.ex
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ defmodule GoogleApi.Content.V21.Api.Accounts do
end

@doc """
Claims the website of a Merchant Center sub-account.
Claims the website of a Merchant Center sub-account. Merchant accounts with approved third-party CSSs aren't required to claim a website.
## Parameters
Expand Down

Large diffs are not rendered by default.

210 changes: 209 additions & 1 deletion clients/content/lib/google_api/content/v21/api/freelistingsprogram.ex
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ defmodule GoogleApi.Content.V21.Api.Freelistingsprogram do
end

@doc """
Requests a review of free listings in a specific region. This method is only available to selected merchants.
Requests a review of free listings in a specific region. This method deprecated. Use the `MerchantSupportService` to view product and account issues and request a review.
## Parameters
Expand Down Expand Up @@ -152,4 +152,212 @@ defmodule GoogleApi.Content.V21.Api.Freelistingsprogram do
|> Connection.execute(request)
|> Response.decode(opts ++ [decode: false])
end

@doc """
Deletes `Checkout` settings and unenrolls merchant from `Checkout` program.
## Parameters
* `connection` (*type:* `GoogleApi.Content.V21.Connection.t`) - Connection to server
* `merchant_id` (*type:* `String.t`) - Required. The ID of the account.
* `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, %{}}` on success
* `{:error, info}` on failure
"""
@spec content_freelistingsprogram_checkoutsettings_delete(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) :: {:ok, nil} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()}
def content_freelistingsprogram_checkoutsettings_delete(
connection,
merchant_id,
optional_params \\ [],
opts \\ []
) do
optional_params_config = %{
:"$.xgafv" => :query,
:access_token => :query,
:alt => :query,
:callback => :query,
:fields => :query,
:key => :query,
:oauth_token => :query,
:prettyPrint => :query,
:quotaUser => :query,
:uploadType => :query,
:upload_protocol => :query
}

request =
Request.new()
|> Request.method(:delete)
|> Request.url("/{merchantId}/freelistingsprogram/checkoutsettings", %{
"merchantId" => URI.encode(merchant_id, &URI.char_unreserved?/1)
})
|> Request.add_optional_params(optional_params_config, optional_params)
|> Request.library_version(@library_version)

connection
|> Connection.execute(request)
|> Response.decode(opts ++ [decode: false])
end

@doc """
Gets Checkout settings for the given merchant. This includes information about review state, enrollment state and URL settings.
## Parameters
* `connection` (*type:* `GoogleApi.Content.V21.Connection.t`) - Connection to server
* `merchant_id` (*type:* `String.t`) - Required. The ID of the account.
* `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.CheckoutSettings{}}` on success
* `{:error, info}` on failure
"""
@spec content_freelistingsprogram_checkoutsettings_get(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok, GoogleApi.Content.V21.Model.CheckoutSettings.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def content_freelistingsprogram_checkoutsettings_get(
connection,
merchant_id,
optional_params \\ [],
opts \\ []
) do
optional_params_config = %{
:"$.xgafv" => :query,
:access_token => :query,
:alt => :query,
:callback => :query,
:fields => :query,
:key => :query,
:oauth_token => :query,
:prettyPrint => :query,
:quotaUser => :query,
:uploadType => :query,
:upload_protocol => :query
}

request =
Request.new()
|> Request.method(:get)
|> Request.url("/{merchantId}/freelistingsprogram/checkoutsettings", %{
"merchantId" => URI.encode(merchant_id, &URI.char_unreserved?/1)
})
|> Request.add_optional_params(optional_params_config, optional_params)
|> Request.library_version(@library_version)

connection
|> Connection.execute(request)
|> Response.decode(opts ++ [struct: %GoogleApi.Content.V21.Model.CheckoutSettings{}])
end

@doc """
Enrolls merchant in `Checkout` program.
## Parameters
* `connection` (*type:* `GoogleApi.Content.V21.Connection.t`) - Connection to server
* `merchant_id` (*type:* `String.t`) - Required. The ID of the account.
* `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.InsertCheckoutSettingsRequest.t`) -
* `opts` (*type:* `keyword()`) - Call options
## Returns
* `{:ok, %GoogleApi.Content.V21.Model.CheckoutSettings{}}` on success
* `{:error, info}` on failure
"""
@spec content_freelistingsprogram_checkoutsettings_insert(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok, GoogleApi.Content.V21.Model.CheckoutSettings.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def content_freelistingsprogram_checkoutsettings_insert(
connection,
merchant_id,
optional_params \\ [],
opts \\ []
) do
optional_params_config = %{
:"$.xgafv" => :query,
:access_token => :query,
:alt => :query,
:callback => :query,
:fields => :query,
:key => :query,
:oauth_token => :query,
:prettyPrint => :query,
:quotaUser => :query,
:uploadType => :query,
:upload_protocol => :query,
:body => :body
}

request =
Request.new()
|> Request.method(:post)
|> Request.url("/{merchantId}/freelistingsprogram/checkoutsettings", %{
"merchantId" => URI.encode(merchant_id, &URI.char_unreserved?/1)
})
|> Request.add_optional_params(optional_params_config, optional_params)
|> Request.library_version(@library_version)

connection
|> Connection.execute(request)
|> Response.decode(opts ++ [struct: %GoogleApi.Content.V21.Model.CheckoutSettings{}])
end
end
80 changes: 80 additions & 0 deletions clients/content/lib/google_api/content/v21/api/liasettings.ex
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,86 @@ defmodule GoogleApi.Content.V21.Api.Liasettings do
)
end

@doc """
Sets the omnichannel experience for the specified country. Only supported for merchants whose POS data provider is trusted to enable the corresponding experience. For more context, see these help articles [about LFP](https://support.google.com/merchants/answer/7676652) and [how to get started](https://support.google.com/merchants/answer/7676578) with it.
## Parameters
* `connection` (*type:* `GoogleApi.Content.V21.Connection.t`) - Connection to server
* `merchant_id` (*type:* `String.t`) - The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and `accountId` must be the ID of a sub-account of this account.
* `account_id` (*type:* `String.t`) - The ID of the account for which to retrieve accessible Business Profiles.
* `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").
* `:country` (*type:* `String.t`) - The CLDR country code (for example, "US") for which the omnichannel experience is selected.
* `:lsfType` (*type:* `String.t`) - The Local Store Front (LSF) type for this country. Acceptable values are: - "`ghlsf`" (Google-Hosted Local Store Front) - "`mhlsfBasic`" (Merchant-Hosted Local Store Front Basic) - "`mhlsfFull`" (Merchant-Hosted Local Store Front Full) More details about these types can be found here.
* `:pickupTypes` (*type:* `list(String.t)`) - The Pickup types for this country. Acceptable values are: - "`pickupToday`" - "`pickupLater`"
* `opts` (*type:* `keyword()`) - Call options
## Returns
* `{:ok, %GoogleApi.Content.V21.Model.LiaOmnichannelExperience{}}` on success
* `{:error, info}` on failure
"""
@spec content_liasettings_setomnichannelexperience(
Tesla.Env.client(),
String.t(),
String.t(),
keyword(),
keyword()
) ::
{:ok, GoogleApi.Content.V21.Model.LiaOmnichannelExperience.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def content_liasettings_setomnichannelexperience(
connection,
merchant_id,
account_id,
optional_params \\ [],
opts \\ []
) do
optional_params_config = %{
:"$.xgafv" => :query,
:access_token => :query,
:alt => :query,
:callback => :query,
:fields => :query,
:key => :query,
:oauth_token => :query,
:prettyPrint => :query,
:quotaUser => :query,
:uploadType => :query,
:upload_protocol => :query,
:country => :query,
:lsfType => :query,
:pickupTypes => :query
}

request =
Request.new()
|> Request.method(:post)
|> Request.url("/{merchantId}/liasettings/{accountId}/setomnichannelexperience", %{
"merchantId" => URI.encode(merchant_id, &URI.char_unreserved?/1),
"accountId" => URI.encode(account_id, &URI.char_unreserved?/1)
})
|> Request.add_optional_params(optional_params_config, optional_params)
|> Request.library_version(@library_version)

connection
|> Connection.execute(request)
|> Response.decode(opts ++ [struct: %GoogleApi.Content.V21.Model.LiaOmnichannelExperience{}])
end

@doc """
Sets the POS data provider for the specified country.
Expand Down
Loading

0 comments on commit cc3065a

Please sign in to comment.