Skip to content

Commit 64a5e68

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add OmnichannelSetingsService, LfpProvidersService and GbpAccountsService
PiperOrigin-RevId: 759329567
1 parent bce1678 commit 64a5e68

6 files changed

Lines changed: 713 additions & 0 deletions

File tree

google/shopping/merchant/accounts/v1beta/BUILD.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ proto_library(
3535
"businessinfo.proto",
3636
"customerservice.proto",
3737
"emailpreferences.proto",
38+
"gbpaccounts.proto",
3839
"homepage.proto",
40+
"lfpproviders.proto",
41+
"omnichannelsettings.proto",
3942
"online_return_policy.proto",
4043
"phoneverificationstate.proto",
4144
"programs.proto",
@@ -133,8 +136,14 @@ java_gapic_test(
133136
"com.google.shopping.merchant.accounts.v1beta.BusinessInfoServiceClientTest",
134137
"com.google.shopping.merchant.accounts.v1beta.EmailPreferencesServiceClientHttpJsonTest",
135138
"com.google.shopping.merchant.accounts.v1beta.EmailPreferencesServiceClientTest",
139+
"com.google.shopping.merchant.accounts.v1beta.GbpAccountsServiceClientHttpJsonTest",
140+
"com.google.shopping.merchant.accounts.v1beta.GbpAccountsServiceClientTest",
136141
"com.google.shopping.merchant.accounts.v1beta.HomepageServiceClientHttpJsonTest",
137142
"com.google.shopping.merchant.accounts.v1beta.HomepageServiceClientTest",
143+
"com.google.shopping.merchant.accounts.v1beta.LfpProvidersServiceClientHttpJsonTest",
144+
"com.google.shopping.merchant.accounts.v1beta.LfpProvidersServiceClientTest",
145+
"com.google.shopping.merchant.accounts.v1beta.OmnichannelSettingsServiceClientHttpJsonTest",
146+
"com.google.shopping.merchant.accounts.v1beta.OmnichannelSettingsServiceClientTest",
138147
"com.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyServiceClientHttpJsonTest",
139148
"com.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyServiceClientTest",
140149
"com.google.shopping.merchant.accounts.v1beta.ProgramsServiceClientHttpJsonTest",

google/shopping/merchant/accounts/v1beta/accounts_grpc_service_config.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,18 @@
2626
{
2727
"service": "google.shopping.merchant.accounts.v1beta.EmailPreferencesService"
2828
},
29+
{
30+
"service": "google.shopping.merchant.accounts.v1beta.GbpAccountsService"
31+
},
2932
{
3033
"service": "google.shopping.merchant.accounts.v1beta.HomepageService"
3134
},
35+
{
36+
"service": "google.shopping.merchant.accounts.v1beta.LfpProvidersService"
37+
},
38+
{
39+
"service": "google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService"
40+
},
3241
{
3342
"service": "google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService"
3443
},
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
// Copyright 2025 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.shopping.merchant.accounts.v1beta;
18+
19+
import "google/api/annotations.proto";
20+
import "google/api/client.proto";
21+
import "google/api/field_behavior.proto";
22+
import "google/api/resource.proto";
23+
import "google/protobuf/empty.proto";
24+
25+
option go_package = "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspb";
26+
option java_multiple_files = true;
27+
option java_outer_classname = "GbpAccountsProto";
28+
option java_package = "com.google.shopping.merchant.accounts.v1beta";
29+
30+
// The service facilitates the management of a merchant's Google Business
31+
// Profile (GBP) account settings. This API defines the following resource
32+
// model:
33+
// - [GbpAccount][google.shopping.merchant.accounts.v1.GbpAccount]
34+
service GbpAccountsService {
35+
option (google.api.default_host) = "merchantapi.googleapis.com";
36+
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/content";
37+
38+
// List the GBP accounts for a given merchant.
39+
rpc ListGbpAccounts(ListGbpAccountsRequest)
40+
returns (ListGbpAccountsResponse) {
41+
option (google.api.http) = {
42+
get: "/accounts/v1beta/{parent=accounts/*}/gbpAccounts"
43+
};
44+
option (google.api.method_signature) = "parent";
45+
}
46+
47+
// Link the specified merchant to a GBP account for all countries.
48+
rpc LinkGbpAccount(LinkGbpAccountRequest) returns (LinkGbpAccountResponse) {
49+
option (google.api.http) = {
50+
post: "/accounts/v1beta/{parent=accounts/*}/gbpAccounts:linkGbpAccount"
51+
body: "*"
52+
};
53+
option (google.api.method_signature) = "parent";
54+
}
55+
}
56+
57+
// Collection of information related to a Google Business Profile (GBP) account.
58+
message GbpAccount {
59+
option (google.api.resource) = {
60+
type: "merchantapi.googleapis.com/GbpAccount"
61+
pattern: "accounts/{account}/gbpAccounts/{gbp_account}"
62+
plural: "gbpAccounts"
63+
singular: "gbpAccount"
64+
};
65+
66+
// The type of the GBP account.
67+
enum Type {
68+
// Default value. This value is unused.
69+
TYPE_UNSPECIFIED = 0;
70+
71+
// The GBP account is a user account.
72+
USER = 1;
73+
74+
// The GBP account is a business account.
75+
BUSINESS_ACCOUNT = 2;
76+
}
77+
78+
// Identifier. The resource name of the GBP account. Format:
79+
// `accounts/{account}/gbpAccount/{gbp_account}`
80+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
81+
82+
// The id of the GBP account.
83+
string gbp_account_id = 2;
84+
85+
// The type of the Business Profile.
86+
Type type = 3;
87+
88+
// The name of the Business Profile.
89+
// For personal accounts: Email id of the owner.
90+
// For Business accounts: Name of the Business Account.
91+
string gbp_account_name = 5;
92+
93+
// Number of listings under this account.
94+
int64 listing_count = 6;
95+
}
96+
97+
// Request message for the ListGbpAccounts method.
98+
message ListGbpAccountsRequest {
99+
// Required. The name of the parent resource under which the GBP accounts are
100+
// listed. Format: `accounts/{account}`.
101+
string parent = 1 [
102+
(google.api.field_behavior) = REQUIRED,
103+
(google.api.resource_reference) = {
104+
type: "merchantapi.googleapis.com/Account"
105+
}
106+
];
107+
108+
// Optional. The maximum number of `GbpAccount` resources to return. The
109+
// service returns fewer than this value if the number of gbp accounts is less
110+
// that than the `pageSize`. The default value is 50. The maximum value is
111+
// 1000; If a value higher than the maximum is specified, then the `pageSize`
112+
// will default to the maximum.
113+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
114+
115+
// Optional. A page token, received from a previous `ListGbpAccounts` call.
116+
// Provide the page token to retrieve the subsequent page.
117+
//
118+
// When paginating, all other parameters provided to `ListGbpAccounts` must
119+
// match the call that provided the page token.
120+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
121+
}
122+
123+
// Response message for the ListGbpAccounts method.
124+
message ListGbpAccountsResponse {
125+
// The GBP accounts from the specified merchant in the specified country.
126+
repeated GbpAccount gbp_accounts = 1;
127+
128+
// A token, which can be sent as `page_token` to retrieve the next page.
129+
// If this field is omitted, there are no subsequent pages.
130+
string next_page_token = 2;
131+
}
132+
133+
// Request message for the LinkGbpAccount method.
134+
message LinkGbpAccountRequest {
135+
// Required. The name of the parent resource to which the GBP account is
136+
// linked. Format: `accounts/{account}`.
137+
string parent = 1 [
138+
(google.api.field_behavior) = REQUIRED,
139+
(google.api.resource_reference) = {
140+
type: "merchantapi.googleapis.com/Account"
141+
}
142+
];
143+
144+
// Required. The email address of the Business Profile account.
145+
string gbp_email = 2 [(google.api.field_behavior) = REQUIRED];
146+
}
147+
148+
// Response message for the LinkGbpAccount method.
149+
message LinkGbpAccountResponse {
150+
// Empty response.
151+
google.protobuf.Empty response = 1;
152+
}
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
// Copyright 2025 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.shopping.merchant.accounts.v1beta;
18+
19+
import "google/api/annotations.proto";
20+
import "google/api/client.proto";
21+
import "google/api/field_behavior.proto";
22+
import "google/api/resource.proto";
23+
import "google/protobuf/empty.proto";
24+
25+
option go_package = "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspb";
26+
option java_multiple_files = true;
27+
option java_outer_classname = "LfpProvidersProto";
28+
option java_package = "com.google.shopping.merchant.accounts.v1beta";
29+
30+
// The service facilitates the management of a merchant's LFP provider settings.
31+
// This API defines the following resource model:
32+
// - [LfpProvider][google.shopping.merchant.accounts.v1.LfpProvider]
33+
service LfpProvidersService {
34+
option (google.api.default_host) = "merchantapi.googleapis.com";
35+
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/content";
36+
37+
// Find the LFP provider candidates in a given country.
38+
rpc FindLfpProviders(FindLfpProvidersRequest)
39+
returns (FindLfpProvidersResponse) {
40+
option (google.api.http) = {
41+
get: "/accounts/v1beta/{parent=accounts/*/omnichannelSettings/*}/lfpProviders:find"
42+
};
43+
option (google.api.method_signature) = "parent";
44+
}
45+
46+
// Link the specified merchant to a LFP provider for the specified country.
47+
rpc LinkLfpProvider(LinkLfpProviderRequest)
48+
returns (LinkLfpProviderResponse) {
49+
option (google.api.http) = {
50+
post: "/accounts/v1beta/{name=accounts/*/omnichannelSettings/*/lfpProviders/*}:linkLfpProvider"
51+
body: "*"
52+
};
53+
option (google.api.method_signature) = "name";
54+
}
55+
}
56+
57+
// Collection of information related to a Local Feed Partnership (LFP) provider.
58+
message LfpProvider {
59+
option (google.api.resource) = {
60+
type: "merchantapi.googleapis.com/LfpProvider"
61+
pattern: "accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}"
62+
plural: "lfpProviders"
63+
singular: "lfpProvider"
64+
};
65+
66+
// Identifier. The resource name of the LFP provider.
67+
// Format:
68+
// `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`
69+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
70+
71+
// Output only. Region code defined by [CLDR](https://cldr.unicode.org/).
72+
string region_code = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
73+
74+
// The display name of the LFP provider.
75+
string display_name = 3;
76+
}
77+
78+
// Request message for the FindLfpProviders method.
79+
message FindLfpProvidersRequest {
80+
// Required. The name of the parent resource under which the LFP providers are
81+
// found. Format:
82+
// `accounts/{account}/omnichannelSettings/{omnichannel_setting}`.
83+
string parent = 1 [
84+
(google.api.field_behavior) = REQUIRED,
85+
(google.api.resource_reference) = {
86+
type: "merchantapi.googleapis.com/OmnichannelSetting"
87+
}
88+
];
89+
90+
// Optional. The maximum number of `LfpProvider` resources to return. The
91+
// service returns fewer than this value if the number of lfp providers is
92+
// less that than the `pageSize`. The default value is 50. The maximum value
93+
// is 1000; If a value higher than the maximum is specified, then the
94+
// `pageSize` will default to the maximum.
95+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
96+
97+
// Optional. A page token, received from a previous `FindLfpProviders` call.
98+
// Provide the page token to retrieve the subsequent page.
99+
//
100+
// When paginating, all other parameters provided to `FindLfpProviders` must
101+
// match the call that provided the page token.
102+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
103+
}
104+
105+
// Response message for the FindLfpProviders method.
106+
message FindLfpProvidersResponse {
107+
// The LFP providers from the specified merchant in the specified country.
108+
repeated LfpProvider lfp_providers = 1;
109+
110+
// A token, which can be sent as `page_token` to retrieve the next page.
111+
// If this field is omitted, there are no subsequent pages.
112+
string next_page_token = 2;
113+
}
114+
115+
// Request message for the LinkLfpProvider method.
116+
message LinkLfpProviderRequest {
117+
// Required. The name of the LFP provider resource to link.
118+
// Format:
119+
// `accounts/{account}/omnichannelSettings/{omnichannel_setting}/lfpProviders/{lfp_provider}`.
120+
// The `lfp_provider` is the LFP provider ID.
121+
string name = 1 [
122+
(google.api.field_behavior) = REQUIRED,
123+
(google.api.resource_reference) = {
124+
type: "merchantapi.googleapis.com/LfpProvider"
125+
}
126+
];
127+
128+
// Required. The external account ID by which this merchant is known to the
129+
// LFP provider.
130+
string external_account_id = 2 [(google.api.field_behavior) = REQUIRED];
131+
}
132+
133+
// Response message for the LinkLfpProvider method.
134+
message LinkLfpProviderResponse {
135+
// Empty response.
136+
google.protobuf.Empty response = 1;
137+
}

google/shopping/merchant/accounts/v1beta/merchantapi_v1beta.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ apis:
1111
- name: google.shopping.merchant.accounts.v1beta.BusinessIdentityService
1212
- name: google.shopping.merchant.accounts.v1beta.BusinessInfoService
1313
- name: google.shopping.merchant.accounts.v1beta.EmailPreferencesService
14+
- name: google.shopping.merchant.accounts.v1beta.GbpAccountsService
1415
- name: google.shopping.merchant.accounts.v1beta.HomepageService
16+
- name: google.shopping.merchant.accounts.v1beta.LfpProvidersService
17+
- name: google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService
1518
- name: google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService
1619
- name: google.shopping.merchant.accounts.v1beta.ProgramsService
1720
- name: google.shopping.merchant.accounts.v1beta.RegionsService
@@ -89,10 +92,30 @@ authentication:
8992
oauth:
9093
canonical_scopes: |-
9194
https://www.googleapis.com/auth/content
95+
- selector: google.shopping.merchant.accounts.v1beta.GbpAccountsService.LinkGbpAccount
96+
oauth:
97+
canonical_scopes: |-
98+
https://www.googleapis.com/auth/content
99+
- selector: google.shopping.merchant.accounts.v1beta.GbpAccountsService.ListGbpAccounts
100+
oauth:
101+
canonical_scopes: |-
102+
https://www.googleapis.com/auth/content
92103
- selector: 'google.shopping.merchant.accounts.v1beta.HomepageService.*'
93104
oauth:
94105
canonical_scopes: |-
95106
https://www.googleapis.com/auth/content
107+
- selector: google.shopping.merchant.accounts.v1beta.LfpProvidersService.FindLfpProviders
108+
oauth:
109+
canonical_scopes: |-
110+
https://www.googleapis.com/auth/content
111+
- selector: google.shopping.merchant.accounts.v1beta.LfpProvidersService.LinkLfpProvider
112+
oauth:
113+
canonical_scopes: |-
114+
https://www.googleapis.com/auth/content
115+
- selector: 'google.shopping.merchant.accounts.v1beta.OmnichannelSettingsService.*'
116+
oauth:
117+
canonical_scopes: |-
118+
https://www.googleapis.com/auth/content
96119
- selector: google.shopping.merchant.accounts.v1beta.OnlineReturnPolicyService.GetOnlineReturnPolicy
97120
oauth:
98121
canonical_scopes: |-

0 commit comments

Comments
 (0)