google-shopping-merchant-reviews-v1beta 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +154 -0
  6. data/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/client.rb +762 -0
  7. data/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/credentials.rb +49 -0
  8. data/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/paths.rb +66 -0
  9. data/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/client.rb +708 -0
  10. data/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest/service_stub.rb +328 -0
  11. data/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service/rest.rb +54 -0
  12. data/lib/google/shopping/merchant/reviews/v1beta/merchant_reviews_service.rb +57 -0
  13. data/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_common_pb.rb +54 -0
  14. data/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_pb.rb +59 -0
  15. data/lib/google/shopping/merchant/reviews/v1beta/merchantreviews_services_pb.rb +54 -0
  16. data/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/client.rb +757 -0
  17. data/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/credentials.rb +49 -0
  18. data/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/paths.rb +66 -0
  19. data/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/client.rb +703 -0
  20. data/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest/service_stub.rb +328 -0
  21. data/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/rest.rb +54 -0
  22. data/lib/google/shopping/merchant/reviews/v1beta/product_reviews_service.rb +57 -0
  23. data/lib/google/shopping/merchant/reviews/v1beta/productreviews_common_pb.rb +56 -0
  24. data/lib/google/shopping/merchant/reviews/v1beta/productreviews_pb.rb +59 -0
  25. data/lib/google/shopping/merchant/reviews/v1beta/productreviews_services_pb.rb +53 -0
  26. data/lib/google/shopping/merchant/reviews/v1beta/rest.rb +40 -0
  27. data/lib/google/shopping/merchant/reviews/v1beta/version.rb +30 -0
  28. data/lib/google/shopping/merchant/reviews/v1beta.rb +48 -0
  29. data/lib/google-shopping-merchant-reviews-v1beta.rb +21 -0
  30. data/proto_docs/README.md +4 -0
  31. data/proto_docs/google/api/client.rb +459 -0
  32. data/proto_docs/google/api/field_behavior.rb +85 -0
  33. data/proto_docs/google/api/launch_stage.rb +71 -0
  34. data/proto_docs/google/api/resource.rb +227 -0
  35. data/proto_docs/google/protobuf/duration.rb +98 -0
  36. data/proto_docs/google/protobuf/empty.rb +34 -0
  37. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  38. data/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews.rb +142 -0
  39. data/proto_docs/google/shopping/merchant/reviews/v1beta/merchantreviews_common.rb +187 -0
  40. data/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews.rb +129 -0
  41. data/proto_docs/google/shopping/merchant/reviews/v1beta/productreviews_common.rb +266 -0
  42. data/proto_docs/google/shopping/type/types.rb +210 -0
  43. metadata +152 -0
@@ -0,0 +1,142 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Shopping
22
+ module Merchant
23
+ module Reviews
24
+ module V1beta
25
+ # Request message for the `GetMerchantReview` method.
26
+ # @!attribute [rw] name
27
+ # @return [::String]
28
+ # Required. The ID of the merchant review.
29
+ # Format: accounts/\\{account}/merchantReviews/\\{merchantReview}
30
+ class GetMerchantReviewRequest
31
+ include ::Google::Protobuf::MessageExts
32
+ extend ::Google::Protobuf::MessageExts::ClassMethods
33
+ end
34
+
35
+ # Request message for the `DeleteMerchantReview` method.
36
+ # @!attribute [rw] name
37
+ # @return [::String]
38
+ # Required. The ID of the merchant review.
39
+ # Format: accounts/\\{account}/merchantReviews/\\{merchantReview}
40
+ class DeleteMerchantReviewRequest
41
+ include ::Google::Protobuf::MessageExts
42
+ extend ::Google::Protobuf::MessageExts::ClassMethods
43
+ end
44
+
45
+ # Request message for the `ListMerchantsReview` method.
46
+ # @!attribute [rw] parent
47
+ # @return [::String]
48
+ # Required. The account to list merchant reviews for.
49
+ # Format: accounts/\\{account}
50
+ # @!attribute [rw] page_size
51
+ # @return [::Integer]
52
+ # Optional. The maximum number of merchant reviews to return. The service can
53
+ # return fewer than this value. The maximum value is 1000; values above 1000
54
+ # are coerced to 1000. If unspecified, the maximum number of reviews is
55
+ # returned.
56
+ # @!attribute [rw] page_token
57
+ # @return [::String]
58
+ # Optional. A page token, received from a previous `ListMerchantReviews`
59
+ # call. Provide this to retrieve the subsequent page.
60
+ #
61
+ # When paginating, all other parameters provided to `ListMerchantReviews`
62
+ # must match the call that provided the page token.
63
+ class ListMerchantReviewsRequest
64
+ include ::Google::Protobuf::MessageExts
65
+ extend ::Google::Protobuf::MessageExts::ClassMethods
66
+ end
67
+
68
+ # Request message for the `InsertMerchantReview` method.
69
+ # @!attribute [rw] parent
70
+ # @return [::String]
71
+ # Required. The account where the merchant review will be inserted.
72
+ # Format: accounts/\\{account}
73
+ # @!attribute [rw] merchant_review
74
+ # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview]
75
+ # Required. The merchant review to insert.
76
+ # @!attribute [rw] data_source
77
+ # @return [::String]
78
+ # Required. The data source of the
79
+ # [merchantreview](https://support.google.com/merchants/answer/7045996?sjid=5253581244217581976-EU)
80
+ # Format:
81
+ # `accounts/{account}/dataSources/{datasource}`.
82
+ class InsertMerchantReviewRequest
83
+ include ::Google::Protobuf::MessageExts
84
+ extend ::Google::Protobuf::MessageExts::ClassMethods
85
+ end
86
+
87
+ # Response message for the `ListMerchantsReview` method.
88
+ # @!attribute [rw] merchant_reviews
89
+ # @return [::Array<::Google::Shopping::Merchant::Reviews::V1beta::MerchantReview>]
90
+ # The merchant review.
91
+ # @!attribute [rw] next_page_token
92
+ # @return [::String]
93
+ # The token to retrieve the next page of results.
94
+ class ListMerchantReviewsResponse
95
+ include ::Google::Protobuf::MessageExts
96
+ extend ::Google::Protobuf::MessageExts::ClassMethods
97
+ end
98
+
99
+ # A review for a merchant. For more information, see
100
+ # [Introduction to Merchant Review
101
+ # Feeds](https://developers.google.com/merchant-review-feeds)
102
+ # @!attribute [rw] name
103
+ # @return [::String]
104
+ # Identifier. The name of the merchant review.
105
+ # Format:
106
+ # `"{merchantreview.name=accounts/{account}/merchantReviews/{merchantReview}}"`
107
+ # @!attribute [rw] merchant_review_id
108
+ # @return [::String]
109
+ # Required. The user provided merchant review ID to uniquely identify the
110
+ # merchant review.
111
+ # @!attribute [rw] attributes
112
+ # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewAttributes]
113
+ # Optional. A list of merchant review attributes.
114
+ # @!attribute [rw] custom_attributes
115
+ # @return [::Array<::Google::Shopping::Type::CustomAttribute>]
116
+ # Required. A list of custom (merchant-provided) attributes. It can also be
117
+ # used for submitting any attribute of the data specification in its generic
118
+ # form (for example,
119
+ # `{ "name": "size type", "value": "regular" }`).
120
+ # This is useful for submitting attributes not explicitly exposed by the
121
+ # API, such as experimental attributes.
122
+ # Maximum allowed number of characters for each
123
+ # custom attribute is 10240 (represents sum of characters for name and
124
+ # value). Maximum 2500 custom attributes can be set per product, with total
125
+ # size of 102.4kB. Underscores in custom attribute names are replaced by
126
+ # spaces upon insertion.
127
+ # @!attribute [r] data_source
128
+ # @return [::String]
129
+ # Output only. The primary data source of the merchant review.
130
+ # @!attribute [r] merchant_review_status
131
+ # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewStatus]
132
+ # Output only. The status of a merchant review, data validation issues, that
133
+ # is, information about a merchant review computed asynchronously.
134
+ class MerchantReview
135
+ include ::Google::Protobuf::MessageExts
136
+ extend ::Google::Protobuf::MessageExts::ClassMethods
137
+ end
138
+ end
139
+ end
140
+ end
141
+ end
142
+ end
@@ -0,0 +1,187 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Shopping
22
+ module Merchant
23
+ module Reviews
24
+ module V1beta
25
+ # Attributes.
26
+ # @!attribute [rw] merchant_id
27
+ # @return [::String]
28
+ # Required. Must be unique and stable across all requests. In other words, if
29
+ # a request today and another 90 days ago refer to the same merchant, they
30
+ # must have the same id.
31
+ # @!attribute [rw] merchant_display_name
32
+ # @return [::String]
33
+ # Optional. Human-readable display name for the merchant.
34
+ # @!attribute [rw] merchant_link
35
+ # @return [::String]
36
+ # Optional. URL to the merchant's main website. Do not use a redirect URL for
37
+ # this value. In other words, the value should point directly to the
38
+ # merchant's site.
39
+ # @!attribute [rw] merchant_rating_link
40
+ # @return [::String]
41
+ # Optional. URL to the landing page that hosts the reviews for this merchant.
42
+ # Do not use a redirect URL.
43
+ # @!attribute [rw] min_rating
44
+ # @return [::Integer]
45
+ # Optional. The minimum possible number for the rating. This should be the
46
+ # worst possible rating and should not be a value for no rating.
47
+ # @!attribute [rw] max_rating
48
+ # @return [::Integer]
49
+ # Optional. The maximum possible number for the rating. The value of the max
50
+ # rating must be greater than the value of the min rating.
51
+ # @!attribute [rw] rating
52
+ # @return [::Float]
53
+ # Optional. The reviewer's overall rating of the merchant.
54
+ # @!attribute [rw] title
55
+ # @return [::String]
56
+ # Optional. The title of the review.
57
+ # @!attribute [rw] content
58
+ # @return [::String]
59
+ # Required. This should be any freeform text provided by the user and should
60
+ # not be truncated. If multiple responses to different questions are
61
+ # provided, all responses should be included, with the minimal context for
62
+ # the responses to make sense. Context should not be provided if questions
63
+ # were left unanswered.
64
+ # @!attribute [rw] reviewer_id
65
+ # @return [::String]
66
+ # Optional. A permanent, unique identifier for the author of the review in
67
+ # the publisher's system.
68
+ # @!attribute [rw] reviewer_username
69
+ # @return [::String]
70
+ # Optional. Display name of the review author.
71
+ # @!attribute [rw] is_anonymous
72
+ # @return [::Boolean]
73
+ # Optional. Set to true if the reviewer should remain anonymous.
74
+ # @!attribute [rw] collection_method
75
+ # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewAttributes::CollectionMethod]
76
+ # Optional. The method used to collect the review.
77
+ # @!attribute [rw] review_time
78
+ # @return [::Google::Protobuf::Timestamp]
79
+ # Required. The timestamp indicating when the review was written.
80
+ # @!attribute [rw] review_language
81
+ # @return [::String]
82
+ # Required. The language of the review defined by BCP-47 language code.
83
+ # @!attribute [rw] review_country
84
+ # @return [::String]
85
+ # Optional. The country where the reviewer made the order defined by ISO
86
+ # 3166-1 Alpha-2 Country Code.
87
+ class MerchantReviewAttributes
88
+ include ::Google::Protobuf::MessageExts
89
+ extend ::Google::Protobuf::MessageExts::ClassMethods
90
+
91
+ # The method used to collect the review.
92
+ module CollectionMethod
93
+ # Collection method unspecified.
94
+ COLLECTION_METHOD_UNSPECIFIED = 0
95
+
96
+ # The user was not responding to a specific solicitation when they
97
+ # submitted the review.
98
+ MERCHANT_UNSOLICITED = 1
99
+
100
+ # The user submitted the review in response to a solicitation when the
101
+ # user placed an order.
102
+ POINT_OF_SALE = 2
103
+
104
+ # The user submitted the review in response to a solicitation after
105
+ # fulfillment of the user's order.
106
+ AFTER_FULFILLMENT = 3
107
+ end
108
+ end
109
+
110
+ # The status of a merchant review, data validation issues, that is, information
111
+ # about a merchant review computed asynchronously.
112
+ # @!attribute [r] destination_statuses
113
+ # @return [::Array<::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewStatus::MerchantReviewDestinationStatus>]
114
+ # Output only. The intended destinations for the merchant review.
115
+ # @!attribute [r] item_level_issues
116
+ # @return [::Array<::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewStatus::MerchantReviewItemLevelIssue>]
117
+ # Output only. A list of all issues associated with the merchant review.
118
+ # @!attribute [r] create_time
119
+ # @return [::Google::Protobuf::Timestamp]
120
+ # Output only. Date on which the item has been created, in [ISO
121
+ # 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
122
+ # @!attribute [r] last_update_time
123
+ # @return [::Google::Protobuf::Timestamp]
124
+ # Output only. Date on which the item has been last updated, in [ISO
125
+ # 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
126
+ class MerchantReviewStatus
127
+ include ::Google::Protobuf::MessageExts
128
+ extend ::Google::Protobuf::MessageExts::ClassMethods
129
+
130
+ # The destination status of the merchant review status.
131
+ # @!attribute [r] reporting_context
132
+ # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum]
133
+ # Output only. The name of the reporting context.
134
+ class MerchantReviewDestinationStatus
135
+ include ::Google::Protobuf::MessageExts
136
+ extend ::Google::Protobuf::MessageExts::ClassMethods
137
+ end
138
+
139
+ # The ItemLevelIssue of the merchant review status.
140
+ # @!attribute [r] code
141
+ # @return [::String]
142
+ # Output only. The error code of the issue.
143
+ # @!attribute [r] severity
144
+ # @return [::Google::Shopping::Merchant::Reviews::V1beta::MerchantReviewStatus::MerchantReviewItemLevelIssue::Severity]
145
+ # Output only. How this issue affects serving of the merchant review.
146
+ # @!attribute [r] resolution
147
+ # @return [::String]
148
+ # Output only. Whether the issue can be resolved by the merchant.
149
+ # @!attribute [r] attribute
150
+ # @return [::String]
151
+ # Output only. The attribute's name, if the issue is caused by a single
152
+ # attribute.
153
+ # @!attribute [r] reporting_context
154
+ # @return [::Google::Shopping::Type::ReportingContext::ReportingContextEnum]
155
+ # Output only. The reporting context the issue applies to.
156
+ # @!attribute [r] description
157
+ # @return [::String]
158
+ # Output only. A short issue description in English.
159
+ # @!attribute [r] detail
160
+ # @return [::String]
161
+ # Output only. A detailed issue description in English.
162
+ # @!attribute [r] documentation
163
+ # @return [::String]
164
+ # Output only. The URL of a web page to help with resolving this issue.
165
+ class MerchantReviewItemLevelIssue
166
+ include ::Google::Protobuf::MessageExts
167
+ extend ::Google::Protobuf::MessageExts::ClassMethods
168
+
169
+ # How the issue affects the serving of the merchant review.
170
+ module Severity
171
+ # Not specified.
172
+ SEVERITY_UNSPECIFIED = 0
173
+
174
+ # This issue represents a warning and does not have a direct affect
175
+ # on the merchant review.
176
+ NOT_IMPACTED = 1
177
+
178
+ # Issue disapproves the merchant review.
179
+ DISAPPROVED = 2
180
+ end
181
+ end
182
+ end
183
+ end
184
+ end
185
+ end
186
+ end
187
+ end
@@ -0,0 +1,129 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Shopping
22
+ module Merchant
23
+ module Reviews
24
+ module V1beta
25
+ # Request message for the GetProductReview method.
26
+ # @!attribute [rw] name
27
+ # @return [::String]
28
+ # Required. The ID of the merchant review.
29
+ # Format: accounts/\\{account}/productReviews/\\{productReview}
30
+ class GetProductReviewRequest
31
+ include ::Google::Protobuf::MessageExts
32
+ extend ::Google::Protobuf::MessageExts::ClassMethods
33
+ end
34
+
35
+ # Request message for the `DeleteProductReview` method.
36
+ # @!attribute [rw] name
37
+ # @return [::String]
38
+ # Required. The ID of the Product review.
39
+ # Format: accounts/\\{account}/productReviews/\\{productReview}
40
+ class DeleteProductReviewRequest
41
+ include ::Google::Protobuf::MessageExts
42
+ extend ::Google::Protobuf::MessageExts::ClassMethods
43
+ end
44
+
45
+ # Request message for the ListProductReviews method.
46
+ # @!attribute [rw] parent
47
+ # @return [::String]
48
+ # Required. The account to list product reviews for.
49
+ # Format: accounts/\\{account}
50
+ # @!attribute [rw] page_size
51
+ # @return [::Integer]
52
+ # Optional. The maximum number of products to return. The service may return
53
+ # fewer than this value.
54
+ # @!attribute [rw] page_token
55
+ # @return [::String]
56
+ # Optional. A page token, received from a previous `ListProductReviews` call.
57
+ # Provide this to retrieve the subsequent page.
58
+ #
59
+ # When paginating, all other parameters provided to `ListProductReviews`
60
+ # must match the call that provided the page token.
61
+ class ListProductReviewsRequest
62
+ include ::Google::Protobuf::MessageExts
63
+ extend ::Google::Protobuf::MessageExts::ClassMethods
64
+ end
65
+
66
+ # Request message for the `InsertProductReview` method.
67
+ # @!attribute [rw] parent
68
+ # @return [::String]
69
+ # Required. The account where the product review will be inserted.
70
+ # Format: accounts/\\{account}
71
+ # @!attribute [rw] product_review
72
+ # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReview]
73
+ # Required. The product review to insert.
74
+ # @!attribute [rw] data_source
75
+ # @return [::String]
76
+ # Required. Format:
77
+ # `accounts/{account}/dataSources/{datasource}`.
78
+ class InsertProductReviewRequest
79
+ include ::Google::Protobuf::MessageExts
80
+ extend ::Google::Protobuf::MessageExts::ClassMethods
81
+ end
82
+
83
+ # response message for the ListProductReviews method.
84
+ # @!attribute [rw] product_reviews
85
+ # @return [::Array<::Google::Shopping::Merchant::Reviews::V1beta::ProductReview>]
86
+ # The product review.
87
+ # @!attribute [rw] next_page_token
88
+ # @return [::String]
89
+ # A token, which can be sent as `page_token` to retrieve the next page.
90
+ # If this field is omitted, there are no subsequent pages.
91
+ class ListProductReviewsResponse
92
+ include ::Google::Protobuf::MessageExts
93
+ extend ::Google::Protobuf::MessageExts::ClassMethods
94
+ end
95
+
96
+ # A review for a product. For more information, see
97
+ # [Introduction to Product Review
98
+ # Feeds](https://developers.google.com/product-review-feeds)
99
+ # @!attribute [rw] name
100
+ # @return [::String]
101
+ # Identifier. The name of the product review.
102
+ # Format:
103
+ # `"{productreview.name=accounts/{account}/productReviews/{productReview}}"`
104
+ # @!attribute [rw] product_review_id
105
+ # @return [::String]
106
+ # Required. The permanent, unique identifier for the product review in the
107
+ # publisher’s system.
108
+ # @!attribute [rw] attributes
109
+ # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewAttributes]
110
+ # Optional. A list of product review attributes.
111
+ # @!attribute [rw] custom_attributes
112
+ # @return [::Array<::Google::Shopping::Type::CustomAttribute>]
113
+ # Optional. A list of custom (merchant-provided) attributes.
114
+ # @!attribute [r] data_source
115
+ # @return [::String]
116
+ # Output only. The primary data source of the product review.
117
+ # @!attribute [r] product_review_status
118
+ # @return [::Google::Shopping::Merchant::Reviews::V1beta::ProductReviewStatus]
119
+ # Output only. The status of a product review, data validation issues, that
120
+ # is, information about a product review computed asynchronously.
121
+ class ProductReview
122
+ include ::Google::Protobuf::MessageExts
123
+ extend ::Google::Protobuf::MessageExts::ClassMethods
124
+ end
125
+ end
126
+ end
127
+ end
128
+ end
129
+ end