Skip to content

Commit c3203b3

Browse files
Google APIscopybara-github
authored andcommitted
feat: A new method_signature parent,online_return_policy is added to method CreateOnlineReturnPolicy in service OnlineReturnPolicyService
docs: A comment for method `DeleteOnlineReturnPolicy` in service `OnlineReturnPolicyService` is changed docs: A comment for field `parent` in message `.google.shopping.merchant.accounts.v1beta.CreateOnlineReturnPolicyRequest` is changed docs: A comment for field `online_return_policy` in message `.google.shopping.merchant.accounts.v1beta.CreateOnlineReturnPolicyRequest` is changed docs: A comment for message `UpdateOnlineReturnPolicyRequest` is changed docs: A comment for field `online_return_policy` in message `.google.shopping.merchant.accounts.v1beta.UpdateOnlineReturnPolicyRequest` is changed docs: A comment for field `update_mask` in message `.google.shopping.merchant.accounts.v1beta.UpdateOnlineReturnPolicyRequest` is changed docs: A comment for field `accept_defective_only` in message `.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy` is changed docs: A comment for field `process_refund_days` in message `.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy` is changed docs: A comment for field `accept_exchange` in message `.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy` is changed docs: A comment for field `return_label_source` in message `.google.shopping.merchant.accounts.v1beta.OnlineReturnPolicy` is changed PiperOrigin-RevId: 761191869
1 parent d1c1b12 commit c3203b3

1 file changed

Lines changed: 70 additions & 47 deletions

File tree

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

Lines changed: 70 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ service OnlineReturnPolicyService {
6565
body: "online_return_policy"
6666
};
6767
option (google.api.method_signature) = "parent";
68+
option (google.api.method_signature) = "parent,online_return_policy";
6869
}
6970

7071
// Updates an existing return policy for a given merchant.
@@ -77,7 +78,7 @@ service OnlineReturnPolicyService {
7778
option (google.api.method_signature) = "online_return_policy,update_mask";
7879
}
7980

80-
// Deletes an existing return policy for a given merchant.
81+
// Deletes an existing return policy.
8182
rpc DeleteOnlineReturnPolicy(DeleteOnlineReturnPolicyRequest)
8283
returns (google.protobuf.Empty) {
8384
option (google.api.http) = {
@@ -99,38 +100,9 @@ message GetOnlineReturnPolicyRequest {
99100
];
100101
}
101102

102-
// Request message for the `ListOnlineReturnPolicies` method.
103-
message ListOnlineReturnPoliciesRequest {
104-
// Required. The merchant account for which to list return policies.
105-
// Format: `accounts/{account}`
106-
string parent = 1 [
107-
(google.api.field_behavior) = REQUIRED,
108-
(google.api.resource_reference) = {
109-
child_type: "merchantapi.googleapis.com/OnlineReturnPolicy"
110-
}
111-
];
112-
113-
// Optional. The maximum number of `OnlineReturnPolicy` resources to return.
114-
// The service returns fewer than this value if the number of return policies
115-
// for the given merchant is less that than the `pageSize`. The default value
116-
// is 10. The maximum value is 100; If a value higher than the maximum is
117-
// specified, then the `pageSize` will default to the maximum
118-
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
119-
120-
// Optional. A page token, received from a previous `ListOnlineReturnPolicies`
121-
// call. Provide the page token to retrieve the subsequent page.
122-
//
123-
// When paginating, all other parameters provided to
124-
// `ListOnlineReturnPolicies` must match the call that provided the page
125-
// token. The token returned as
126-
// [nextPageToken][google.shopping.merchant.accounts.v1beta.ListOnlineReturnPoliciesResponse.next_page_token]
127-
// in the response to the previous request.
128-
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
129-
}
130-
131103
// Request message for the `CreateOnlineReturnPolicy` method.
132104
message CreateOnlineReturnPolicyRequest {
133-
// Required. The merchant account for which to create a return policy.
105+
// Required. The merchant account for which the return policy will be created.
134106
// Format: `accounts/{account}`
135107
string parent = 1 [
136108
(google.api.field_behavior) = REQUIRED,
@@ -139,18 +111,37 @@ message CreateOnlineReturnPolicyRequest {
139111
}
140112
];
141113

142-
// Required. The return policy to create.
114+
// Required. The return policy object to create.
143115
OnlineReturnPolicy online_return_policy = 2
144116
[(google.api.field_behavior) = REQUIRED];
145117
}
146118

147-
// Request message for the `UpdateOnlineReturnPolicy` method.
119+
// Request message for the `UpdateOnlineReturnPolicy` method. The method
120+
// supports field masks and when the mask is provided, only the fields specified
121+
// in the mask are updated.
148122
message UpdateOnlineReturnPolicyRequest {
149-
// Required. The return policy to update.
123+
// Required. The online return policy to update.
124+
// The online return policy's `name` field is used to identify the
125+
// online return policy to be updated.
150126
OnlineReturnPolicy online_return_policy = 1
151127
[(google.api.field_behavior) = REQUIRED];
152128

153-
google.protobuf.FieldMask update_mask = 2;
129+
// Optional. List of fields being updated.
130+
//
131+
// The following fields are supported (in both `snake_case` and
132+
// `lowerCamelCase`):
133+
//
134+
// - `accept_defective_only`
135+
// - `accept_exchange`
136+
// - `item_conditions`
137+
// - `policy`
138+
// - `process_refund_days`
139+
// - `restocking_fee`
140+
// - `return_methods`
141+
// - `return_policy_uri`
142+
// - `return_shipping_fee`
143+
google.protobuf.FieldMask update_mask = 2
144+
[(google.api.field_behavior) = OPTIONAL];
154145
}
155146

156147
// Request message for the `DeleteOnlineReturnPolicy` method.
@@ -165,6 +156,35 @@ message DeleteOnlineReturnPolicyRequest {
165156
];
166157
}
167158

159+
// Request message for the `ListOnlineReturnPolicies` method.
160+
message ListOnlineReturnPoliciesRequest {
161+
// Required. The merchant account for which to list return policies.
162+
// Format: `accounts/{account}`
163+
string parent = 1 [
164+
(google.api.field_behavior) = REQUIRED,
165+
(google.api.resource_reference) = {
166+
child_type: "merchantapi.googleapis.com/OnlineReturnPolicy"
167+
}
168+
];
169+
170+
// Optional. The maximum number of `OnlineReturnPolicy` resources to return.
171+
// The service returns fewer than this value if the number of return policies
172+
// for the given merchant is less that than the `pageSize`. The default value
173+
// is 10. The maximum value is 100; If a value higher than the maximum is
174+
// specified, then the `pageSize` will default to the maximum
175+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
176+
177+
// Optional. A page token, received from a previous `ListOnlineReturnPolicies`
178+
// call. Provide the page token to retrieve the subsequent page.
179+
//
180+
// When paginating, all other parameters provided to
181+
// `ListOnlineReturnPolicies` must match the call that provided the page
182+
// token. The token returned as
183+
// [nextPageToken][google.shopping.merchant.accounts.v1beta.ListOnlineReturnPoliciesResponse.next_page_token]
184+
// in the response to the previous request.
185+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
186+
}
187+
168188
// Response message for the `ListOnlineReturnPolicies` method.
169189
message ListOnlineReturnPoliciesResponse {
170190
// The retrieved return policies.
@@ -374,19 +394,22 @@ message OnlineReturnPolicy {
374394
// check for the policy. It must be a valid URL.
375395
string return_policy_uri = 10 [(google.api.field_behavior) = REQUIRED];
376396

377-
// This field specifies if merchant only accepts defective products for
378-
// returns, and this field is required.
379-
optional bool accept_defective_only = 11;
397+
// Optional. This field specifies if merchant
398+
// only accepts defective products for returns.
399+
optional bool accept_defective_only = 11
400+
[(google.api.field_behavior) = OPTIONAL];
380401

381-
// The field specifies the number of days it takes for merchants to process
382-
// refunds, field is optional.
383-
optional int32 process_refund_days = 12;
402+
// Optional. The field specifies the number of
403+
// days it takes for merchants to process refunds.
404+
optional int32 process_refund_days = 12
405+
[(google.api.field_behavior) = OPTIONAL];
384406

385-
// This field specifies if merchant allows customers to exchange products,
386-
// this field is required.
387-
optional bool accept_exchange = 13;
407+
// Optional. This field specifies if merchant
408+
// allows customers to exchange products.
409+
optional bool accept_exchange = 13 [(google.api.field_behavior) = OPTIONAL];
388410

389-
// The field specifies the return label source. This field is required when
390-
// return method is BY_MAIL.
391-
optional ReturnLabelSource return_label_source = 15;
411+
// Optional. The field specifies the return
412+
// label source.
413+
optional ReturnLabelSource return_label_source = 15
414+
[(google.api.field_behavior) = OPTIONAL];
392415
}

0 commit comments

Comments
 (0)