Skip to content

Commit 24219fc

Browse files
Google APIscopybara-github
authored andcommitted
feat: A new message SeasonalOverride is added
feat: A new field `seasonal_overrides` is added to message .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy fix!: An existing optional field `type` is converted to required field in message .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy fix!: An existing optional field `label` is converted to required field in message .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy fix!: An existing optional field `countries` is converted to required field in message .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy fix!: An existing optional field `return_policy_uri` is converted to required field in message .google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy docs: The documentation for method `GetOnlineReturnPolicy` in service `OnlineReturnPolicyService` is improved docs: The documentation for method `ListOnlineReturnPolicies` in service `OnlineReturnPolicyService` is improved docs: The documentation for field `parent` in message `.google.shopping.merchant.accounts.v1beta.ListOnlineReturnPoliciesRequest` is improved docs: The documentation for field `type` in message `.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy` is improved docs: The documentation for field `label` in message `.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy` is improved docs: The documentation for field `countries` in message `.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy` is improved docs: The documentation for field `return_policy_uri` in message `.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy` is improved PiperOrigin-RevId: 733372649
1 parent 9ee9082 commit 24219fc

1 file changed

Lines changed: 55 additions & 18 deletions

File tree

google/shopping/merchant/accounts/v1beta/online_return_policy.proto

Lines changed: 55 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import "google/api/client.proto";
2121
import "google/api/field_behavior.proto";
2222
import "google/api/resource.proto";
2323
import "google/shopping/type/types.proto";
24+
import "google/type/date.proto";
2425

2526
option go_package = "cloud.google.com/go/shopping/merchant/accounts/apiv1beta/accountspb;accountspb";
2627
option java_multiple_files = true;
@@ -36,7 +37,7 @@ service OnlineReturnPolicyService {
3637
option (google.api.default_host) = "merchantapi.googleapis.com";
3738
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/content";
3839

39-
// Gets an existing return policy.
40+
// Gets an existing return policy for a given business.
4041
rpc GetOnlineReturnPolicy(GetOnlineReturnPolicyRequest)
4142
returns (OnlineReturnPolicy) {
4243
option (google.api.http) = {
@@ -45,7 +46,7 @@ service OnlineReturnPolicyService {
4546
option (google.api.method_signature) = "name";
4647
}
4748

48-
// Lists all existing return policies.
49+
// Lists all existing return policies for a given business.
4950
rpc ListOnlineReturnPolicies(ListOnlineReturnPoliciesRequest)
5051
returns (ListOnlineReturnPoliciesResponse) {
5152
option (google.api.http) = {
@@ -69,7 +70,7 @@ message GetOnlineReturnPolicyRequest {
6970

7071
// Request message for the `ListOnlineReturnPolicies` method.
7172
message ListOnlineReturnPoliciesRequest {
72-
// Required. The merchant account for which to list return policies.
73+
// Required. The business account for which to list return policies.
7374
// Format: `accounts/{account}`
7475
string parent = 1 [
7576
(google.api.field_behavior) = REQUIRED,
@@ -132,8 +133,8 @@ message OnlineReturnPolicy {
132133
CUSTOMER_PAYING_ACTUAL_FEE = 2;
133134
}
134135

135-
// Type of return shipping fee.
136-
Type type = 1;
136+
// Required. Type of return shipping fee.
137+
Type type = 1 [(google.api.field_behavior) = REQUIRED];
137138

138139
// Fixed return shipping fee amount. This value is only applicable when type
139140
// is `FIXED`. We will treat the return shipping fee as free if type is
@@ -179,6 +180,31 @@ message OnlineReturnPolicy {
179180
int64 days = 2;
180181
}
181182

183+
message SeasonalOverride {
184+
// ReturnWindow: Specifies either a fixed return date or the number of
185+
// days (from the delivery date) until which a product can be returned.
186+
// [Merchant Return Days](https://schema.org/merchantReturnDays)
187+
oneof return_window {
188+
// Number of days (from the delivery date) that the product can be
189+
// returned.
190+
int32 return_days = 5;
191+
192+
// Fixed end date until which the product can be returned.
193+
google.type.Date return_until_date = 6;
194+
}
195+
196+
// Required. Display name of this seasonal override in Merchant Center.
197+
string label = 1 [(google.api.field_behavior) = REQUIRED];
198+
199+
// Required. Defines the date range when this seasonal override applies.
200+
// Both start_date and end_date are inclusive.
201+
// The dates of the seasonal overrides should not overlap.
202+
google.type.Date start_date = 2 [(google.api.field_behavior) = REQUIRED];
203+
204+
// Required. seasonal override end date (inclusive).
205+
google.type.Date end_date = 3 [(google.api.field_behavior) = REQUIRED];
206+
}
207+
182208
// The available return methods.
183209
enum ReturnMethod {
184210
// Default value. This value is unused.
@@ -213,23 +239,34 @@ message OnlineReturnPolicy {
213239
// Output only. Return policy ID generated by Google.
214240
string return_policy_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
215241

216-
// This field represents the unique user-defined label of the return policy.
217-
// It is important to note that the same label cannot be used in different
218-
// return policies for the same country. Unless a product specifies a specific
219-
// label attribute, policies will be automatically labeled as 'default'.
220-
// To assign a custom return policy to certain product groups, follow the
221-
// instructions provided in the [Return policy label]
242+
// Required. Immutable. This field represents the unique user-defined label of
243+
// the return policy. It is important to note that the same label cannot be
244+
// used in different return policies for the same country. Unless a product
245+
// specifies a specific label attribute, policies will be automatically
246+
// labeled as 'default'. To assign a custom return policy to certain product
247+
// groups, follow the instructions provided in the [Return policy label]
222248
// (https://support.google.com/merchants/answer/9445425).
223249
// The label can contain up to 50 characters.
224-
string label = 3;
250+
string label = 3 [
251+
(google.api.field_behavior) = REQUIRED,
252+
(google.api.field_behavior) = IMMUTABLE
253+
];
225254

226-
// The countries of sale where the return policy applies. The values
227-
// must be a valid 2 letter ISO 3166 code.
228-
repeated string countries = 4;
255+
// Required. Immutable. The countries of sale where the return policy applies.
256+
// The values must be a valid 2 letter ISO 3166 code.
257+
repeated string countries = 4 [
258+
(google.api.field_behavior) = REQUIRED,
259+
(google.api.field_behavior) = IMMUTABLE
260+
];
229261

230262
// The return policy.
231263
Policy policy = 5;
232264

265+
// Optional. Overrides to the general policy for orders placed during a
266+
// specific set of time intervals.
267+
repeated SeasonalOverride seasonal_overrides = 14
268+
[(google.api.field_behavior) = OPTIONAL];
269+
233270
// The restocking fee that applies to all return reason categories. This would
234271
// be treated as a free restocking fee if the value is not set.
235272
RestockingFee restocking_fee = 6;
@@ -246,9 +283,9 @@ message OnlineReturnPolicy {
246283
// and print the return label.
247284
ReturnShippingFee return_shipping_fee = 9;
248285

249-
// The return policy uri. This can used by Google to do a sanity check for the
250-
// policy. It must be a valid URL.
251-
string return_policy_uri = 10;
286+
// Required. The return policy uri. This can used by Google to do a sanity
287+
// check for the policy. It must be a valid URL.
288+
string return_policy_uri = 10 [(google.api.field_behavior) = REQUIRED];
252289

253290
// This field specifies if merchant only accepts defective products for
254291
// returns, and this field is required.

0 commit comments

Comments
 (0)