Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Automated regeneration of MyBusinessBusinessInformation client #10935

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions clients/my_business_business_information/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

My Business Business Information API client library.

The My Business Business Information API provides an interface for managing business information on Google.
The My Business Business Information API provides an interface for managing business information. Note - If you have a quota of 0 after enabling the API, please request for GBP API access.

## Installation

Expand All @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding

```elixir
def deps do
[{:google_api_my_business_business_information, "~> 0.3"}]
[{:google_api_my_business_business_information, "~> 0.4"}]
end
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,154 +25,6 @@ defmodule GoogleApi.MyBusinessBusinessInformation.V1.Api.Locations do

@library_version Mix.Project.config() |> Keyword.get(:version, "")

@doc """
Associates a location to a place ID. Any previous association is overwritten. This operation is only valid if the location is unverified. The association must be valid, that is, it appears in the list of `SearchGoogleLocations`.

## Parameters

* `connection` (*type:* `GoogleApi.MyBusinessBusinessInformation.V1.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Required. The resource name of the location to associate.
* `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.MyBusinessBusinessInformation.V1.Model.AssociateLocationRequest.t`) -
* `opts` (*type:* `keyword()`) - Call options

## Returns

* `{:ok, %GoogleApi.MyBusinessBusinessInformation.V1.Model.Empty{}}` on success
* `{:error, info}` on failure
"""
@spec mybusinessbusinessinformation_locations_associate(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok, GoogleApi.MyBusinessBusinessInformation.V1.Model.Empty.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def mybusinessbusinessinformation_locations_associate(
connection,
name,
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("/v1/{+name}:associate", %{
"name" => URI.encode(name, &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.MyBusinessBusinessInformation.V1.Model.Empty{}]
)
end

@doc """
Clears an association between a location and its place ID. This operation is only valid if the location is unverified.

## Parameters

* `connection` (*type:* `GoogleApi.MyBusinessBusinessInformation.V1.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - Required. The resource name of the location to disassociate.
* `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.MyBusinessBusinessInformation.V1.Model.ClearLocationAssociationRequest.t`) -
* `opts` (*type:* `keyword()`) - Call options

## Returns

* `{:ok, %GoogleApi.MyBusinessBusinessInformation.V1.Model.Empty{}}` on success
* `{:error, info}` on failure
"""
@spec mybusinessbusinessinformation_locations_clear_location_association(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok, GoogleApi.MyBusinessBusinessInformation.V1.Model.Empty.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def mybusinessbusinessinformation_locations_clear_location_association(
connection,
name,
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("/v1/{+name}:clearLocationAssociation", %{
"name" => URI.encode(name, &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.MyBusinessBusinessInformation.V1.Model.Empty{}]
)
end

@doc """
Deletes a location. If this location cannot be deleted using the API and it is marked so in the `google.mybusiness.businessinformation.v1.LocationState`, use the [Google Business Profile](https://business.google.com/manage/) website.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.MyBusinessBusinessInformation.V1 do
API client metadata for GoogleApi.MyBusinessBusinessInformation.V1.
"""

@discovery_revision "20220628"
@discovery_revision "20240310"

def discovery_revision(), do: @discovery_revision
end

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ defmodule GoogleApi.MyBusinessBusinessInformation.V1.Model.ListLocationsResponse

* `locations` (*type:* `list(GoogleApi.MyBusinessBusinessInformation.V1.Model.Location.t)`, *default:* `nil`) - The locations.
* `nextPageToken` (*type:* `String.t`, *default:* `nil`) - If the number of locations exceeded the requested page size, this field is populated with a token to fetch the next page of locations on a subsequent call to `ListLocations`. If there are no more locations, this field is not present in the response.
* `totalSize` (*type:* `integer()`, *default:* `nil`) - The approximate number of Locations in the list irrespective of pagination.
* `totalSize` (*type:* `integer()`, *default:* `nil`) - The approximate number of Locations in the list irrespective of pagination. This field will only be returned if `filter` is used as a query parameter.
"""

use GoogleApi.Gax.ModelBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ defmodule GoogleApi.MyBusinessBusinessInformation.V1.Model.Location do
* `serviceItems` (*type:* `list(GoogleApi.MyBusinessBusinessInformation.V1.Model.ServiceItem.t)`, *default:* `nil`) - Optional. List of services supported by merchants. A service can be haircut, install water heater, etc. Duplicated service items will be removed automatically.
* `specialHours` (*type:* `GoogleApi.MyBusinessBusinessInformation.V1.Model.SpecialHours.t`, *default:* `nil`) - Optional. Special hours for the business. This typically includes holiday hours, and other times outside of regular operating hours. These override regular business hours. This field cannot be set without regular hours.
* `storeCode` (*type:* `String.t`, *default:* `nil`) - Optional. External identifier for this location, which must be unique within a given account. This is a means of associating the location with your own records.
* `storefrontAddress` (*type:* `GoogleApi.MyBusinessBusinessInformation.V1.Model.PostalAddress.t`, *default:* `nil`) - Optional. A precise, accurate address to describe your business location. PO boxes or mailboxes located at remote locations are not acceptable. At this time, you can specify a maximum of five `address_lines` values in the address. This field should only be set for businesses that have a storefront. This field should not be set for locations of type `CUSTOMER_LOCATION_ONLY`.
* `storefrontAddress` (*type:* `GoogleApi.MyBusinessBusinessInformation.V1.Model.PostalAddress.t`, *default:* `nil`) - Optional. A precise, accurate address to describe your business location. PO boxes or mailboxes located at remote locations are not acceptable. At this time, you can specify a maximum of five `address_lines` values in the address. This field should only be set for businesses that have a storefront. This field should not be set for locations of type `CUSTOMER_LOCATION_ONLY` but if set, any value provided will be discarded.
* `title` (*type:* `String.t`, *default:* `nil`) - Required. Location name should reflect your business's real-world name, as used consistently on your storefront, website, and stationery, and as known to customers. Any additional information, when relevant, can be included in other fields of the resource (for example, `Address`, `Categories`). Don't add unnecessary information to your name (for example, prefer "Google" over "Google Inc. - Mountain View Corporate Headquarters"). Don't include marketing taglines, store codes, special characters, hours or closed/open status, phone numbers, website URLs, service/product information, location/address or directions, or containment information (for example, "Chase ATM in Duane Reade").
* `websiteUri` (*type:* `String.t`, *default:* `nil`) - Optional. A URL for this business. If possible, use a URL that represents this individual business location instead of a generic website/URL that represents all locations, or the brand.
"""
Expand Down
4 changes: 2 additions & 2 deletions clients/my_business_business_information/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
defmodule GoogleApi.MyBusinessBusinessInformation.Mixfile do
use Mix.Project

@version "0.3.3"
@version "0.4.0"

def project() do
[
Expand Down Expand Up @@ -48,7 +48,7 @@ defmodule GoogleApi.MyBusinessBusinessInformation.Mixfile do

defp description() do
"""
My Business Business Information API client library. The My Business Business Information API provides an interface for managing business information on Google.
My Business Business Information API client library. The My Business Business Information API provides an interface for managing business information. Note - If you have a quota of 0 after enabling the API, please request for GBP API access.
"""
end

Expand Down
Loading