From 70ef5a3a449e562611fc83b618687132eec8737f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 20 Oct 2024 09:40:09 +0000 Subject: [PATCH] feat: Automated regeneration of merchantapi reviews_v1beta client --- api_names_out.yaml | 165 +++ .../.repo-metadata.json | 7 + .../.rspec | 2 + .../.yardopts | 13 + .../CHANGELOG.md | 7 + .../Gemfile | 23 + .../LICENSE.md | 202 ++++ .../OVERVIEW.md | 96 ++ .../Rakefile | 28 + ...le-apis-merchantapi_reviews_v1beta.gemspec | 33 + .../google-apis-merchantapi_reviews_v1beta.rb | 15 + .../google/apis/merchantapi_reviews_v1beta.rb | 36 + .../merchantapi_reviews_v1beta/classes.rb | 938 ++++++++++++++++++ .../merchantapi_reviews_v1beta/gem_version.rb | 28 + .../representations.rb | 348 +++++++ .../merchantapi_reviews_v1beta/service.rb | 345 +++++++ .../spec/generated_spec.rb | 27 + 17 files changed, 2313 insertions(+) create mode 100644 generated/google-apis-merchantapi_reviews_v1beta/.repo-metadata.json create mode 100644 generated/google-apis-merchantapi_reviews_v1beta/.rspec create mode 100644 generated/google-apis-merchantapi_reviews_v1beta/.yardopts create mode 100644 generated/google-apis-merchantapi_reviews_v1beta/CHANGELOG.md create mode 100644 generated/google-apis-merchantapi_reviews_v1beta/Gemfile create mode 100644 generated/google-apis-merchantapi_reviews_v1beta/LICENSE.md create mode 100644 generated/google-apis-merchantapi_reviews_v1beta/OVERVIEW.md create mode 100644 generated/google-apis-merchantapi_reviews_v1beta/Rakefile create mode 100644 generated/google-apis-merchantapi_reviews_v1beta/google-apis-merchantapi_reviews_v1beta.gemspec create mode 100644 generated/google-apis-merchantapi_reviews_v1beta/lib/google-apis-merchantapi_reviews_v1beta.rb create mode 100644 generated/google-apis-merchantapi_reviews_v1beta/lib/google/apis/merchantapi_reviews_v1beta.rb create mode 100644 generated/google-apis-merchantapi_reviews_v1beta/lib/google/apis/merchantapi_reviews_v1beta/classes.rb create mode 100644 generated/google-apis-merchantapi_reviews_v1beta/lib/google/apis/merchantapi_reviews_v1beta/gem_version.rb create mode 100644 generated/google-apis-merchantapi_reviews_v1beta/lib/google/apis/merchantapi_reviews_v1beta/representations.rb create mode 100644 generated/google-apis-merchantapi_reviews_v1beta/lib/google/apis/merchantapi_reviews_v1beta/service.rb create mode 100644 generated/google-apis-merchantapi_reviews_v1beta/spec/generated_spec.rb diff --git a/api_names_out.yaml b/api_names_out.yaml index 60331bbeb2b..d5d0da6249b 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -251682,6 +251682,171 @@ "/merchantapi:reports_v1beta/merchantapi.accounts.reports.search": search_report "/merchantapi:reports_v1beta/merchantapi.accounts.reports.search/parent": parent "/merchantapi:reports_v1beta/quotaUser": quota_user +"/merchantapi:reviews_v1beta/CustomAttribute": custom_attribute +"/merchantapi:reviews_v1beta/CustomAttribute/groupValues": group_values +"/merchantapi:reviews_v1beta/CustomAttribute/groupValues/group_value": group_value +"/merchantapi:reviews_v1beta/CustomAttribute/name": name +"/merchantapi:reviews_v1beta/CustomAttribute/value": value +"/merchantapi:reviews_v1beta/Empty": empty +"/merchantapi:reviews_v1beta/ListMerchantReviewsResponse": list_merchant_reviews_response +"/merchantapi:reviews_v1beta/ListMerchantReviewsResponse/merchantReviews": merchant_reviews +"/merchantapi:reviews_v1beta/ListMerchantReviewsResponse/merchantReviews/merchant_review": merchant_review +"/merchantapi:reviews_v1beta/ListMerchantReviewsResponse/nextPageToken": next_page_token +"/merchantapi:reviews_v1beta/ListProductReviewsResponse": list_product_reviews_response +"/merchantapi:reviews_v1beta/ListProductReviewsResponse/nextPageToken": next_page_token +"/merchantapi:reviews_v1beta/ListProductReviewsResponse/productReviews": product_reviews +"/merchantapi:reviews_v1beta/ListProductReviewsResponse/productReviews/product_review": product_review +"/merchantapi:reviews_v1beta/MerchantReview": merchant_review +"/merchantapi:reviews_v1beta/MerchantReview/attributes": attributes +"/merchantapi:reviews_v1beta/MerchantReview/customAttributes": custom_attributes +"/merchantapi:reviews_v1beta/MerchantReview/customAttributes/custom_attribute": custom_attribute +"/merchantapi:reviews_v1beta/MerchantReview/dataSource": data_source +"/merchantapi:reviews_v1beta/MerchantReview/merchantReviewId": merchant_review_id +"/merchantapi:reviews_v1beta/MerchantReview/merchantReviewStatus": merchant_review_status +"/merchantapi:reviews_v1beta/MerchantReview/name": name +"/merchantapi:reviews_v1beta/MerchantReviewAttributes": merchant_review_attributes +"/merchantapi:reviews_v1beta/MerchantReviewAttributes/collectionMethod": collection_method +"/merchantapi:reviews_v1beta/MerchantReviewAttributes/content": content +"/merchantapi:reviews_v1beta/MerchantReviewAttributes/isAnonymous": is_anonymous +"/merchantapi:reviews_v1beta/MerchantReviewAttributes/maxRating": max_rating +"/merchantapi:reviews_v1beta/MerchantReviewAttributes/merchantDisplayName": merchant_display_name +"/merchantapi:reviews_v1beta/MerchantReviewAttributes/merchantId": merchant_id +"/merchantapi:reviews_v1beta/MerchantReviewAttributes/merchantLink": merchant_link +"/merchantapi:reviews_v1beta/MerchantReviewAttributes/merchantRatingLink": merchant_rating_link +"/merchantapi:reviews_v1beta/MerchantReviewAttributes/minRating": min_rating +"/merchantapi:reviews_v1beta/MerchantReviewAttributes/rating": rating +"/merchantapi:reviews_v1beta/MerchantReviewAttributes/reviewCountry": review_country +"/merchantapi:reviews_v1beta/MerchantReviewAttributes/reviewLanguage": review_language +"/merchantapi:reviews_v1beta/MerchantReviewAttributes/reviewTime": review_time +"/merchantapi:reviews_v1beta/MerchantReviewAttributes/reviewerId": reviewer_id +"/merchantapi:reviews_v1beta/MerchantReviewAttributes/reviewerUsername": reviewer_username +"/merchantapi:reviews_v1beta/MerchantReviewAttributes/title": title +"/merchantapi:reviews_v1beta/MerchantReviewDestinationStatus": merchant_review_destination_status +"/merchantapi:reviews_v1beta/MerchantReviewDestinationStatus/reportingContext": reporting_context +"/merchantapi:reviews_v1beta/MerchantReviewItemLevelIssue": merchant_review_item_level_issue +"/merchantapi:reviews_v1beta/MerchantReviewItemLevelIssue/attribute": attribute +"/merchantapi:reviews_v1beta/MerchantReviewItemLevelIssue/code": code +"/merchantapi:reviews_v1beta/MerchantReviewItemLevelIssue/description": description +"/merchantapi:reviews_v1beta/MerchantReviewItemLevelIssue/detail": detail +"/merchantapi:reviews_v1beta/MerchantReviewItemLevelIssue/documentation": documentation +"/merchantapi:reviews_v1beta/MerchantReviewItemLevelIssue/reportingContext": reporting_context +"/merchantapi:reviews_v1beta/MerchantReviewItemLevelIssue/resolution": resolution +"/merchantapi:reviews_v1beta/MerchantReviewItemLevelIssue/severity": severity +"/merchantapi:reviews_v1beta/MerchantReviewStatus": merchant_review_status +"/merchantapi:reviews_v1beta/MerchantReviewStatus/createTime": create_time +"/merchantapi:reviews_v1beta/MerchantReviewStatus/destinationStatuses": destination_statuses +"/merchantapi:reviews_v1beta/MerchantReviewStatus/destinationStatuses/destination_status": destination_status +"/merchantapi:reviews_v1beta/MerchantReviewStatus/itemLevelIssues": item_level_issues +"/merchantapi:reviews_v1beta/MerchantReviewStatus/itemLevelIssues/item_level_issue": item_level_issue +"/merchantapi:reviews_v1beta/MerchantReviewStatus/lastUpdateTime": last_update_time +"/merchantapi:reviews_v1beta/ProductChange": product_change +"/merchantapi:reviews_v1beta/ProductChange/newValue": new_value +"/merchantapi:reviews_v1beta/ProductChange/oldValue": old_value +"/merchantapi:reviews_v1beta/ProductChange/regionCode": region_code +"/merchantapi:reviews_v1beta/ProductChange/reportingContext": reporting_context +"/merchantapi:reviews_v1beta/ProductReview": product_review +"/merchantapi:reviews_v1beta/ProductReview/attributes": attributes +"/merchantapi:reviews_v1beta/ProductReview/customAttributes": custom_attributes +"/merchantapi:reviews_v1beta/ProductReview/customAttributes/custom_attribute": custom_attribute +"/merchantapi:reviews_v1beta/ProductReview/dataSource": data_source +"/merchantapi:reviews_v1beta/ProductReview/name": name +"/merchantapi:reviews_v1beta/ProductReview/productReviewId": product_review_id +"/merchantapi:reviews_v1beta/ProductReview/productReviewStatus": product_review_status +"/merchantapi:reviews_v1beta/ProductReviewAttributes": product_review_attributes +"/merchantapi:reviews_v1beta/ProductReviewAttributes/aggregatorName": aggregator_name +"/merchantapi:reviews_v1beta/ProductReviewAttributes/asins": asins +"/merchantapi:reviews_v1beta/ProductReviewAttributes/asins/asin": asin +"/merchantapi:reviews_v1beta/ProductReviewAttributes/brands": brands +"/merchantapi:reviews_v1beta/ProductReviewAttributes/brands/brand": brand +"/merchantapi:reviews_v1beta/ProductReviewAttributes/collectionMethod": collection_method +"/merchantapi:reviews_v1beta/ProductReviewAttributes/cons": cons +"/merchantapi:reviews_v1beta/ProductReviewAttributes/cons/con": con +"/merchantapi:reviews_v1beta/ProductReviewAttributes/content": content +"/merchantapi:reviews_v1beta/ProductReviewAttributes/gtins": gtins +"/merchantapi:reviews_v1beta/ProductReviewAttributes/gtins/gtin": gtin +"/merchantapi:reviews_v1beta/ProductReviewAttributes/isSpam": is_spam +"/merchantapi:reviews_v1beta/ProductReviewAttributes/maxRating": max_rating +"/merchantapi:reviews_v1beta/ProductReviewAttributes/minRating": min_rating +"/merchantapi:reviews_v1beta/ProductReviewAttributes/mpns": mpns +"/merchantapi:reviews_v1beta/ProductReviewAttributes/mpns/mpn": mpn +"/merchantapi:reviews_v1beta/ProductReviewAttributes/productLinks": product_links +"/merchantapi:reviews_v1beta/ProductReviewAttributes/productLinks/product_link": product_link +"/merchantapi:reviews_v1beta/ProductReviewAttributes/productNames": product_names +"/merchantapi:reviews_v1beta/ProductReviewAttributes/productNames/product_name": product_name +"/merchantapi:reviews_v1beta/ProductReviewAttributes/pros": pros +"/merchantapi:reviews_v1beta/ProductReviewAttributes/pros/pro": pro +"/merchantapi:reviews_v1beta/ProductReviewAttributes/publisherFavicon": publisher_favicon +"/merchantapi:reviews_v1beta/ProductReviewAttributes/publisherName": publisher_name +"/merchantapi:reviews_v1beta/ProductReviewAttributes/rating": rating +"/merchantapi:reviews_v1beta/ProductReviewAttributes/reviewCountry": review_country +"/merchantapi:reviews_v1beta/ProductReviewAttributes/reviewLanguage": review_language +"/merchantapi:reviews_v1beta/ProductReviewAttributes/reviewLink": review_link +"/merchantapi:reviews_v1beta/ProductReviewAttributes/reviewTime": review_time +"/merchantapi:reviews_v1beta/ProductReviewAttributes/reviewerId": reviewer_id +"/merchantapi:reviews_v1beta/ProductReviewAttributes/reviewerImageLinks": reviewer_image_links +"/merchantapi:reviews_v1beta/ProductReviewAttributes/reviewerImageLinks/reviewer_image_link": reviewer_image_link +"/merchantapi:reviews_v1beta/ProductReviewAttributes/reviewerIsAnonymous": reviewer_is_anonymous +"/merchantapi:reviews_v1beta/ProductReviewAttributes/reviewerUsername": reviewer_username +"/merchantapi:reviews_v1beta/ProductReviewAttributes/skus": skus +"/merchantapi:reviews_v1beta/ProductReviewAttributes/skus/sku": sku +"/merchantapi:reviews_v1beta/ProductReviewAttributes/subclientName": subclient_name +"/merchantapi:reviews_v1beta/ProductReviewAttributes/title": title +"/merchantapi:reviews_v1beta/ProductReviewAttributes/transactionId": transaction_id +"/merchantapi:reviews_v1beta/ProductReviewDestinationStatus": product_review_destination_status +"/merchantapi:reviews_v1beta/ProductReviewDestinationStatus/reportingContext": reporting_context +"/merchantapi:reviews_v1beta/ProductReviewItemLevelIssue": product_review_item_level_issue +"/merchantapi:reviews_v1beta/ProductReviewItemLevelIssue/attribute": attribute +"/merchantapi:reviews_v1beta/ProductReviewItemLevelIssue/code": code +"/merchantapi:reviews_v1beta/ProductReviewItemLevelIssue/description": description +"/merchantapi:reviews_v1beta/ProductReviewItemLevelIssue/detail": detail +"/merchantapi:reviews_v1beta/ProductReviewItemLevelIssue/documentation": documentation +"/merchantapi:reviews_v1beta/ProductReviewItemLevelIssue/reportingContext": reporting_context +"/merchantapi:reviews_v1beta/ProductReviewItemLevelIssue/resolution": resolution +"/merchantapi:reviews_v1beta/ProductReviewItemLevelIssue/severity": severity +"/merchantapi:reviews_v1beta/ProductReviewStatus": product_review_status +"/merchantapi:reviews_v1beta/ProductReviewStatus/createTime": create_time +"/merchantapi:reviews_v1beta/ProductReviewStatus/destinationStatuses": destination_statuses +"/merchantapi:reviews_v1beta/ProductReviewStatus/destinationStatuses/destination_status": destination_status +"/merchantapi:reviews_v1beta/ProductReviewStatus/itemLevelIssues": item_level_issues +"/merchantapi:reviews_v1beta/ProductReviewStatus/itemLevelIssues/item_level_issue": item_level_issue +"/merchantapi:reviews_v1beta/ProductReviewStatus/lastUpdateTime": last_update_time +"/merchantapi:reviews_v1beta/ProductStatusChangeMessage": product_status_change_message +"/merchantapi:reviews_v1beta/ProductStatusChangeMessage/account": account +"/merchantapi:reviews_v1beta/ProductStatusChangeMessage/attribute": attribute +"/merchantapi:reviews_v1beta/ProductStatusChangeMessage/changes": changes +"/merchantapi:reviews_v1beta/ProductStatusChangeMessage/changes/change": change +"/merchantapi:reviews_v1beta/ProductStatusChangeMessage/managingAccount": managing_account +"/merchantapi:reviews_v1beta/ProductStatusChangeMessage/resource": resource +"/merchantapi:reviews_v1beta/ProductStatusChangeMessage/resourceId": resource_id +"/merchantapi:reviews_v1beta/ProductStatusChangeMessage/resourceType": resource_type +"/merchantapi:reviews_v1beta/ReviewLink": review_link +"/merchantapi:reviews_v1beta/ReviewLink/link": link +"/merchantapi:reviews_v1beta/ReviewLink/type": type +"/merchantapi:reviews_v1beta/fields": fields +"/merchantapi:reviews_v1beta/key": key +"/merchantapi:reviews_v1beta/merchantapi.accounts.merchantReviews.delete": delete_account_merchant_review +"/merchantapi:reviews_v1beta/merchantapi.accounts.merchantReviews.delete/name": name +"/merchantapi:reviews_v1beta/merchantapi.accounts.merchantReviews.get": get_account_merchant_review +"/merchantapi:reviews_v1beta/merchantapi.accounts.merchantReviews.get/name": name +"/merchantapi:reviews_v1beta/merchantapi.accounts.merchantReviews.insert": insert_account_merchant_review +"/merchantapi:reviews_v1beta/merchantapi.accounts.merchantReviews.insert/dataSource": data_source +"/merchantapi:reviews_v1beta/merchantapi.accounts.merchantReviews.insert/parent": parent +"/merchantapi:reviews_v1beta/merchantapi.accounts.merchantReviews.list": list_account_merchant_reviews +"/merchantapi:reviews_v1beta/merchantapi.accounts.merchantReviews.list/pageSize": page_size +"/merchantapi:reviews_v1beta/merchantapi.accounts.merchantReviews.list/pageToken": page_token +"/merchantapi:reviews_v1beta/merchantapi.accounts.merchantReviews.list/parent": parent +"/merchantapi:reviews_v1beta/merchantapi.accounts.productReviews.delete": delete_account_product_review +"/merchantapi:reviews_v1beta/merchantapi.accounts.productReviews.delete/name": name +"/merchantapi:reviews_v1beta/merchantapi.accounts.productReviews.get": get_account_product_review +"/merchantapi:reviews_v1beta/merchantapi.accounts.productReviews.get/name": name +"/merchantapi:reviews_v1beta/merchantapi.accounts.productReviews.insert": insert_account_product_review +"/merchantapi:reviews_v1beta/merchantapi.accounts.productReviews.insert/dataSource": data_source +"/merchantapi:reviews_v1beta/merchantapi.accounts.productReviews.insert/parent": parent +"/merchantapi:reviews_v1beta/merchantapi.accounts.productReviews.list": list_account_product_reviews +"/merchantapi:reviews_v1beta/merchantapi.accounts.productReviews.list/pageSize": page_size +"/merchantapi:reviews_v1beta/merchantapi.accounts.productReviews.list/pageToken": page_token +"/merchantapi:reviews_v1beta/merchantapi.accounts.productReviews.list/parent": parent +"/merchantapi:reviews_v1beta/quotaUser": quota_user "/metastore:v1/AlterMetadataResourceLocationRequest": alter_metadata_resource_location_request "/metastore:v1/AlterMetadataResourceLocationRequest/locationUri": location_uri "/metastore:v1/AlterMetadataResourceLocationRequest/resourceName": resource_name diff --git a/generated/google-apis-merchantapi_reviews_v1beta/.repo-metadata.json b/generated/google-apis-merchantapi_reviews_v1beta/.repo-metadata.json new file mode 100644 index 00000000000..83ed95e76d7 --- /dev/null +++ b/generated/google-apis-merchantapi_reviews_v1beta/.repo-metadata.json @@ -0,0 +1,7 @@ +{ + "api_id": "merchantapi:reviews_v1beta", + "name_pretty": "Merchant API", + "distribution_name": "google-apis-merchantapi_reviews_v1beta", + "language": "ruby", + "library_type": "REST" +} diff --git a/generated/google-apis-merchantapi_reviews_v1beta/.rspec b/generated/google-apis-merchantapi_reviews_v1beta/.rspec new file mode 100644 index 00000000000..16f9cdb0135 --- /dev/null +++ b/generated/google-apis-merchantapi_reviews_v1beta/.rspec @@ -0,0 +1,2 @@ +--color +--format documentation diff --git a/generated/google-apis-merchantapi_reviews_v1beta/.yardopts b/generated/google-apis-merchantapi_reviews_v1beta/.yardopts new file mode 100644 index 00000000000..4d5e0f7ad5e --- /dev/null +++ b/generated/google-apis-merchantapi_reviews_v1beta/.yardopts @@ -0,0 +1,13 @@ +--hide-void-return +--no-private +--verbose +--title=google-apis-merchantapi_reviews_v1beta +--markup-provider=redcarpet +--markup=markdown +--main OVERVIEW.md +lib/google/apis/merchantapi_reviews_v1beta/*.rb +lib/google/apis/merchantapi_reviews_v1beta.rb +- +OVERVIEW.md +CHANGELOG.md +LICENSE.md diff --git a/generated/google-apis-merchantapi_reviews_v1beta/CHANGELOG.md b/generated/google-apis-merchantapi_reviews_v1beta/CHANGELOG.md new file mode 100644 index 00000000000..3cfaff376ed --- /dev/null +++ b/generated/google-apis-merchantapi_reviews_v1beta/CHANGELOG.md @@ -0,0 +1,7 @@ +# Release history for google-apis-merchantapi_reviews_v1beta + +### v0.1.0 (2024-10-20) + +* Regenerated from discovery document revision 20241015 +* Regenerated using generator version 0.15.1 + diff --git a/generated/google-apis-merchantapi_reviews_v1beta/Gemfile b/generated/google-apis-merchantapi_reviews_v1beta/Gemfile new file mode 100644 index 00000000000..6fa8bb627a6 --- /dev/null +++ b/generated/google-apis-merchantapi_reviews_v1beta/Gemfile @@ -0,0 +1,23 @@ +source 'https://rubygems.org' + +gemspec + +group :development do + gem "bundler", ">= 1.17" + gem "rake", ">= 12.0" + gem "rspec", "~> 3.9" + gem "opencensus", "~> 0.5" +end + +platforms :jruby do + group :development do + gem "jruby-openssl" + end +end + +platforms :ruby do + group :development do + gem "yard", "~> 0.9", ">= 0.9.25" + gem "redcarpet", "~> 3.5" + end +end diff --git a/generated/google-apis-merchantapi_reviews_v1beta/LICENSE.md b/generated/google-apis-merchantapi_reviews_v1beta/LICENSE.md new file mode 100644 index 00000000000..32916804156 --- /dev/null +++ b/generated/google-apis-merchantapi_reviews_v1beta/LICENSE.md @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/generated/google-apis-merchantapi_reviews_v1beta/OVERVIEW.md b/generated/google-apis-merchantapi_reviews_v1beta/OVERVIEW.md new file mode 100644 index 00000000000..83765d164b9 --- /dev/null +++ b/generated/google-apis-merchantapi_reviews_v1beta/OVERVIEW.md @@ -0,0 +1,96 @@ +# Simple REST client for version ReviewsV1beta of the Merchant API + +This is a simple client library for version ReviewsV1beta of the Merchant API. It provides: + +* A client object that connects to the HTTP/JSON REST endpoint for the service. +* Ruby objects for data structures related to the service. +* Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts. +* Control of retry, pagination, and timeouts. + +Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information. + +## Getting started + +### Before you begin + +There are a few setup steps you need to complete before you can use this library: + + 1. If you don't already have a Google account, [sign up](https://www.google.com/accounts). + 2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/). + 3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/merchantapi.googleapis.com) in the console. + +### Installation + +Add this line to your application's Gemfile: + +```ruby +gem 'google-apis-merchantapi_reviews_v1beta', '~> 0.1' +``` + +And then execute: + +``` +$ bundle +``` + +Or install it yourself as: + +``` +$ gem install google-apis-merchantapi_reviews_v1beta +``` + +### Creating a client object + +Once the gem is installed, you can load the client code and instantiate a client. + +```ruby +# Load the client +require "google/apis/merchantapi_reviews_v1beta" + +# Create a client object +client = Google::Apis::MerchantapiReviewsV1beta::MerchantService.new + +# Authenticate calls +client.authorization = # ... use the googleauth gem to create credentials +``` + +See the class reference docs for information on the methods you can call from a client. + +## Documentation + +More detailed descriptions of the Google simple REST clients are available in two documents. + + * The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging. + * The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables. + +(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Merchantapi service in particular.) + +For reference information on specific calls in the Merchant API, see the {Google::Apis::MerchantapiReviewsV1beta::MerchantService class reference docs}. + +## Which client should I use? + +Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**. + +This library, `google-apis-merchantapi_reviews_v1beta`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-_`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward. + +Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients. + +Gem names for modern clients are often of the form `google-cloud-`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud--`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended. + +**For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure. + +The [product documentation](https://developers.devsite.corp.google.com/merchant/api) may provide guidance regarding the preferred client library to use. + +## Supported Ruby versions + +This library is supported on Ruby 2.7+. + +Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule. + +## License + +This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}. + +## Support + +Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com). diff --git a/generated/google-apis-merchantapi_reviews_v1beta/Rakefile b/generated/google-apis-merchantapi_reviews_v1beta/Rakefile new file mode 100644 index 00000000000..defbde59776 --- /dev/null +++ b/generated/google-apis-merchantapi_reviews_v1beta/Rakefile @@ -0,0 +1,28 @@ +require "bundler/gem_tasks" +task :release_gem do + Rake::Task["build"].invoke + Rake::Task["release:rubygem_push"].invoke +end + +require 'rake/clean' +CLOBBER.include('coverage', 'doc') +CLEAN.include('.yardoc') + +require 'rspec/core/rake_task' +RSpec::Core::RakeTask.new(:spec) + +begin + require 'yard' + require 'yard/rake/yardoc_task' + YARD::Rake::YardocTask.new do |t| + t.files = ['lib/**/*.rb', 'generated/**/*.rb'] + t.options = ['--verbose', '--markup', 'markdown'] + end +rescue LoadError + task :yard + puts "YARD not available" +end + +task :ci => [:spec, :yard, :build] + +task :default => :ci diff --git a/generated/google-apis-merchantapi_reviews_v1beta/google-apis-merchantapi_reviews_v1beta.gemspec b/generated/google-apis-merchantapi_reviews_v1beta/google-apis-merchantapi_reviews_v1beta.gemspec new file mode 100644 index 00000000000..fd75a30c382 --- /dev/null +++ b/generated/google-apis-merchantapi_reviews_v1beta/google-apis-merchantapi_reviews_v1beta.gemspec @@ -0,0 +1,33 @@ +require File.expand_path("lib/google/apis/merchantapi_reviews_v1beta/gem_version", __dir__) +gem_version = Google::Apis::MerchantapiReviewsV1beta::GEM_VERSION + +Gem::Specification.new do |gem| + gem.name = "google-apis-merchantapi_reviews_v1beta" + gem.version = gem_version + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.summary = "Simple REST client for Merchant API ReviewsV1beta" + gem.description = + "This is the simple REST client for Merchant API ReviewsV1beta." \ + " Simple REST clients are Ruby client libraries that provide access to" \ + " Google services via their HTTP REST API endpoints. These libraries are" \ + " generated and updated automatically based on the discovery documents" \ + " published by the service, and they handle most concerns such as" \ + " authentication, pagination, retry, timeouts, and logging. You can use" \ + " this client to access the Merchant API, but note that some" \ + " services may provide a separate modern client that is easier to use." + gem.homepage = "https://github.com/google/google-api-ruby-client" + gem.license = "Apache-2.0" + gem.metadata = { + "bug_tracker_uri" => "https://github.com/googleapis/google-api-ruby-client/issues", + "changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-merchantapi_reviews_v1beta/CHANGELOG.md", + "documentation_uri" => "https://googleapis.dev/ruby/google-apis-merchantapi_reviews_v1beta/v#{gem_version}", + "source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-merchantapi_reviews_v1beta" + } + + gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = '>= 2.7' + gem.add_runtime_dependency "google-apis-core", ">= 0.15.0", "< 2.a" +end diff --git a/generated/google-apis-merchantapi_reviews_v1beta/lib/google-apis-merchantapi_reviews_v1beta.rb b/generated/google-apis-merchantapi_reviews_v1beta/lib/google-apis-merchantapi_reviews_v1beta.rb new file mode 100644 index 00000000000..43e53529909 --- /dev/null +++ b/generated/google-apis-merchantapi_reviews_v1beta/lib/google-apis-merchantapi_reviews_v1beta.rb @@ -0,0 +1,15 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require "google/apis/merchantapi_reviews_v1beta" diff --git a/generated/google-apis-merchantapi_reviews_v1beta/lib/google/apis/merchantapi_reviews_v1beta.rb b/generated/google-apis-merchantapi_reviews_v1beta/lib/google/apis/merchantapi_reviews_v1beta.rb new file mode 100644 index 00000000000..764d8556825 --- /dev/null +++ b/generated/google-apis-merchantapi_reviews_v1beta/lib/google/apis/merchantapi_reviews_v1beta.rb @@ -0,0 +1,36 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/merchantapi_reviews_v1beta/service.rb' +require 'google/apis/merchantapi_reviews_v1beta/classes.rb' +require 'google/apis/merchantapi_reviews_v1beta/representations.rb' +require 'google/apis/merchantapi_reviews_v1beta/gem_version.rb' + +module Google + module Apis + # Merchant API + # + # Programmatically manage your Merchant Center Accounts. + # + # @see https://developers.devsite.corp.google.com/merchant/api + module MerchantapiReviewsV1beta + # Version of the Merchant API this client connects to. + # This is NOT the gem version. + VERSION = 'ReviewsV1beta' + + # Manage your product listings and accounts for Google Shopping + AUTH_CONTENT = 'https://www.googleapis.com/auth/content' + end + end +end diff --git a/generated/google-apis-merchantapi_reviews_v1beta/lib/google/apis/merchantapi_reviews_v1beta/classes.rb b/generated/google-apis-merchantapi_reviews_v1beta/lib/google/apis/merchantapi_reviews_v1beta/classes.rb new file mode 100644 index 00000000000..6232de6c743 --- /dev/null +++ b/generated/google-apis-merchantapi_reviews_v1beta/lib/google/apis/merchantapi_reviews_v1beta/classes.rb @@ -0,0 +1,938 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module MerchantapiReviewsV1beta + + # A message that represents custom attributes. Exactly one of `value` or ` + # group_values` must not be empty. + class CustomAttribute + include Google::Apis::Core::Hashable + + # Subattributes within this attribute group. If `group_values` is not empty, ` + # value` must be empty. + # Corresponds to the JSON property `groupValues` + # @return [Array] + attr_accessor :group_values + + # The name of the attribute. + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # The value of the attribute. If `value` is not empty, `group_values` must be + # empty. + # Corresponds to the JSON property `value` + # @return [String] + attr_accessor :value + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @group_values = args[:group_values] if args.key?(:group_values) + @name = args[:name] if args.key?(:name) + @value = args[:value] if args.key?(:value) + end + end + + # A generic empty message that you can re-use to avoid defining duplicated empty + # messages in your APIs. A typical example is to use it as the request or the + # response type of an API method. For instance: service Foo ` rpc Bar(google. + # protobuf.Empty) returns (google.protobuf.Empty); ` + class Empty + include Google::Apis::Core::Hashable + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + end + end + + # Response message for the `ListMerchantsReview` method. + class ListMerchantReviewsResponse + include Google::Apis::Core::Hashable + + # The merchant review. + # Corresponds to the JSON property `merchantReviews` + # @return [Array] + attr_accessor :merchant_reviews + + # The token to retrieve the next page of results. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @merchant_reviews = args[:merchant_reviews] if args.key?(:merchant_reviews) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + end + end + + # response message for the ListProductReviews method. + class ListProductReviewsResponse + include Google::Apis::Core::Hashable + + # A token, which can be sent as `page_token` to retrieve the next page. If this + # field is omitted, there are no subsequent pages. + # Corresponds to the JSON property `nextPageToken` + # @return [String] + attr_accessor :next_page_token + + # The product review. + # Corresponds to the JSON property `productReviews` + # @return [Array] + attr_accessor :product_reviews + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @next_page_token = args[:next_page_token] if args.key?(:next_page_token) + @product_reviews = args[:product_reviews] if args.key?(:product_reviews) + end + end + + # A review for a merchant. For more information, see [Introduction to Merchant + # Review Feeds](https://developers.google.com/merchant-review-feeds) + class MerchantReview + include Google::Apis::Core::Hashable + + # Attributes. + # Corresponds to the JSON property `attributes` + # @return [Google::Apis::MerchantapiReviewsV1beta::MerchantReviewAttributes] + attr_accessor :attributes + + # Required. A list of custom (merchant-provided) attributes. It can also be used + # for submitting any attribute of the data specification in its generic form ( + # for example, `` "name": "size type", "value": "regular" ``). This is useful + # for submitting attributes not explicitly exposed by the API, such as + # experimental attributes. Maximum allowed number of characters for each custom + # attribute is 10240 (represents sum of characters for name and value). Maximum + # 2500 custom attributes can be set per product, with total size of 102.4kB. + # Underscores in custom attribute names are replaced by spaces upon insertion. + # Corresponds to the JSON property `customAttributes` + # @return [Array] + attr_accessor :custom_attributes + + # Output only. The primary data source of the merchant review. + # Corresponds to the JSON property `dataSource` + # @return [String] + attr_accessor :data_source + + # Required. The user provided merchant review ID to uniquely identify the + # merchant review. + # Corresponds to the JSON property `merchantReviewId` + # @return [String] + attr_accessor :merchant_review_id + + # The status of a merchant review, data validation issues, that is, information + # about a merchant review computed asynchronously. + # Corresponds to the JSON property `merchantReviewStatus` + # @return [Google::Apis::MerchantapiReviewsV1beta::MerchantReviewStatus] + attr_accessor :merchant_review_status + + # Identifier. The name of the merchant review. Format: `"`merchantreview.name= + # accounts/`account`/merchantReviews/`merchantReview``"` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @attributes = args[:attributes] if args.key?(:attributes) + @custom_attributes = args[:custom_attributes] if args.key?(:custom_attributes) + @data_source = args[:data_source] if args.key?(:data_source) + @merchant_review_id = args[:merchant_review_id] if args.key?(:merchant_review_id) + @merchant_review_status = args[:merchant_review_status] if args.key?(:merchant_review_status) + @name = args[:name] if args.key?(:name) + end + end + + # Attributes. + class MerchantReviewAttributes + include Google::Apis::Core::Hashable + + # Optional. The method used to collect the review. + # Corresponds to the JSON property `collectionMethod` + # @return [String] + attr_accessor :collection_method + + # Required. This should be any freeform text provided by the user and should not + # be truncated. If multiple responses to different questions are provided, all + # responses should be included, with the minimal context for the responses to + # make sense. Context should not be provided if questions were left unanswered. + # Corresponds to the JSON property `content` + # @return [String] + attr_accessor :content + + # Optional. Set to true if the reviewer should remain anonymous. + # Corresponds to the JSON property `isAnonymous` + # @return [Boolean] + attr_accessor :is_anonymous + alias_method :is_anonymous?, :is_anonymous + + # Optional. The maximum possible number for the rating. The value of the max + # rating must be greater than the value of the min rating. + # Corresponds to the JSON property `maxRating` + # @return [Fixnum] + attr_accessor :max_rating + + # Optional. Human-readable display name for the merchant. + # Corresponds to the JSON property `merchantDisplayName` + # @return [String] + attr_accessor :merchant_display_name + + # Required. Must be unique and stable across all requests. In other words, if a + # request today and another 90 days ago refer to the same merchant, they must + # have the same id. + # Corresponds to the JSON property `merchantId` + # @return [String] + attr_accessor :merchant_id + + # Optional. URL to the merchant's main website. Do not use a redirect URL for + # this value. In other words, the value should point directly to the merchant's + # site. + # Corresponds to the JSON property `merchantLink` + # @return [String] + attr_accessor :merchant_link + + # Optional. URL to the landing page that hosts the reviews for this merchant. Do + # not use a redirect URL. + # Corresponds to the JSON property `merchantRatingLink` + # @return [String] + attr_accessor :merchant_rating_link + + # Optional. The minimum possible number for the rating. This should be the worst + # possible rating and should not be a value for no rating. + # Corresponds to the JSON property `minRating` + # @return [Fixnum] + attr_accessor :min_rating + + # Optional. The reviewer's overall rating of the merchant. + # Corresponds to the JSON property `rating` + # @return [Float] + attr_accessor :rating + + # Optional. The country where the reviewer made the order defined by ISO 3166-1 + # Alpha-2 Country Code. + # Corresponds to the JSON property `reviewCountry` + # @return [String] + attr_accessor :review_country + + # Required. The language of the review defined by BCP-47 language code. + # Corresponds to the JSON property `reviewLanguage` + # @return [String] + attr_accessor :review_language + + # Required. The timestamp indicating when the review was written. + # Corresponds to the JSON property `reviewTime` + # @return [String] + attr_accessor :review_time + + # Optional. A permanent, unique identifier for the author of the review in the + # publisher's system. + # Corresponds to the JSON property `reviewerId` + # @return [String] + attr_accessor :reviewer_id + + # Optional. Display name of the review author. + # Corresponds to the JSON property `reviewerUsername` + # @return [String] + attr_accessor :reviewer_username + + # Optional. The title of the review. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @collection_method = args[:collection_method] if args.key?(:collection_method) + @content = args[:content] if args.key?(:content) + @is_anonymous = args[:is_anonymous] if args.key?(:is_anonymous) + @max_rating = args[:max_rating] if args.key?(:max_rating) + @merchant_display_name = args[:merchant_display_name] if args.key?(:merchant_display_name) + @merchant_id = args[:merchant_id] if args.key?(:merchant_id) + @merchant_link = args[:merchant_link] if args.key?(:merchant_link) + @merchant_rating_link = args[:merchant_rating_link] if args.key?(:merchant_rating_link) + @min_rating = args[:min_rating] if args.key?(:min_rating) + @rating = args[:rating] if args.key?(:rating) + @review_country = args[:review_country] if args.key?(:review_country) + @review_language = args[:review_language] if args.key?(:review_language) + @review_time = args[:review_time] if args.key?(:review_time) + @reviewer_id = args[:reviewer_id] if args.key?(:reviewer_id) + @reviewer_username = args[:reviewer_username] if args.key?(:reviewer_username) + @title = args[:title] if args.key?(:title) + end + end + + # The destination status of the merchant review status. + class MerchantReviewDestinationStatus + include Google::Apis::Core::Hashable + + # Output only. The name of the reporting context. + # Corresponds to the JSON property `reportingContext` + # @return [String] + attr_accessor :reporting_context + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @reporting_context = args[:reporting_context] if args.key?(:reporting_context) + end + end + + # The ItemLevelIssue of the merchant review status. + class MerchantReviewItemLevelIssue + include Google::Apis::Core::Hashable + + # Output only. The attribute's name, if the issue is caused by a single + # attribute. + # Corresponds to the JSON property `attribute` + # @return [String] + attr_accessor :attribute + + # Output only. The error code of the issue. + # Corresponds to the JSON property `code` + # @return [String] + attr_accessor :code + + # Output only. A short issue description in English. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Output only. A detailed issue description in English. + # Corresponds to the JSON property `detail` + # @return [String] + attr_accessor :detail + + # Output only. The URL of a web page to help with resolving this issue. + # Corresponds to the JSON property `documentation` + # @return [String] + attr_accessor :documentation + + # Output only. The reporting context the issue applies to. + # Corresponds to the JSON property `reportingContext` + # @return [String] + attr_accessor :reporting_context + + # Output only. Whether the issue can be resolved by the merchant. + # Corresponds to the JSON property `resolution` + # @return [String] + attr_accessor :resolution + + # Output only. How this issue affects serving of the merchant review. + # Corresponds to the JSON property `severity` + # @return [String] + attr_accessor :severity + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @attribute = args[:attribute] if args.key?(:attribute) + @code = args[:code] if args.key?(:code) + @description = args[:description] if args.key?(:description) + @detail = args[:detail] if args.key?(:detail) + @documentation = args[:documentation] if args.key?(:documentation) + @reporting_context = args[:reporting_context] if args.key?(:reporting_context) + @resolution = args[:resolution] if args.key?(:resolution) + @severity = args[:severity] if args.key?(:severity) + end + end + + # The status of a merchant review, data validation issues, that is, information + # about a merchant review computed asynchronously. + class MerchantReviewStatus + include Google::Apis::Core::Hashable + + # Output only. Date on which the item has been created, in [ISO 8601](http://en. + # wikipedia.org/wiki/ISO_8601) format. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Output only. The intended destinations for the merchant review. + # Corresponds to the JSON property `destinationStatuses` + # @return [Array] + attr_accessor :destination_statuses + + # Output only. A list of all issues associated with the merchant review. + # Corresponds to the JSON property `itemLevelIssues` + # @return [Array] + attr_accessor :item_level_issues + + # Output only. Date on which the item has been last updated, in [ISO 8601](http:/ + # /en.wikipedia.org/wiki/ISO_8601) format. + # Corresponds to the JSON property `lastUpdateTime` + # @return [String] + attr_accessor :last_update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @destination_statuses = args[:destination_statuses] if args.key?(:destination_statuses) + @item_level_issues = args[:item_level_issues] if args.key?(:item_level_issues) + @last_update_time = args[:last_update_time] if args.key?(:last_update_time) + end + end + + # The change that happened to the product including old value, new value, + # country code as the region code and reporting context. + class ProductChange + include Google::Apis::Core::Hashable + + # The new value of the changed resource or attribute. + # Corresponds to the JSON property `newValue` + # @return [String] + attr_accessor :new_value + + # The old value of the changed resource or attribute. + # Corresponds to the JSON property `oldValue` + # @return [String] + attr_accessor :old_value + + # Countries that have the change (if applicable) + # Corresponds to the JSON property `regionCode` + # @return [String] + attr_accessor :region_code + + # Reporting contexts that have the change (if applicable) + # Corresponds to the JSON property `reportingContext` + # @return [String] + attr_accessor :reporting_context + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @new_value = args[:new_value] if args.key?(:new_value) + @old_value = args[:old_value] if args.key?(:old_value) + @region_code = args[:region_code] if args.key?(:region_code) + @reporting_context = args[:reporting_context] if args.key?(:reporting_context) + end + end + + # A review for a product. For more information, see [Introduction to Product + # Review Feeds](https://developers.google.com/product-review-feeds) + class ProductReview + include Google::Apis::Core::Hashable + + # Attributes. + # Corresponds to the JSON property `attributes` + # @return [Google::Apis::MerchantapiReviewsV1beta::ProductReviewAttributes] + attr_accessor :attributes + + # Optional. A list of custom (merchant-provided) attributes. + # Corresponds to the JSON property `customAttributes` + # @return [Array] + attr_accessor :custom_attributes + + # Output only. The primary data source of the product review. + # Corresponds to the JSON property `dataSource` + # @return [String] + attr_accessor :data_source + + # Identifier. The name of the product review. Format: `"`productreview.name= + # accounts/`account`/productReviews/`productReview``"` + # Corresponds to the JSON property `name` + # @return [String] + attr_accessor :name + + # Required. The permanent, unique identifier for the product review in the + # publisher’s system. + # Corresponds to the JSON property `productReviewId` + # @return [String] + attr_accessor :product_review_id + + # Product review status. + # Corresponds to the JSON property `productReviewStatus` + # @return [Google::Apis::MerchantapiReviewsV1beta::ProductReviewStatus] + attr_accessor :product_review_status + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @attributes = args[:attributes] if args.key?(:attributes) + @custom_attributes = args[:custom_attributes] if args.key?(:custom_attributes) + @data_source = args[:data_source] if args.key?(:data_source) + @name = args[:name] if args.key?(:name) + @product_review_id = args[:product_review_id] if args.key?(:product_review_id) + @product_review_status = args[:product_review_status] if args.key?(:product_review_status) + end + end + + # Attributes. + class ProductReviewAttributes + include Google::Apis::Core::Hashable + + # Optional. The name of the aggregator of the product reviews. A publisher may + # use a reviews aggregator to manage reviews and provide the feeds. This element + # indicates the use of an aggregator and contains information about the + # aggregator. + # Corresponds to the JSON property `aggregatorName` + # @return [String] + attr_accessor :aggregator_name + + # Optional. Contains ASINs (Amazon Standard Identification Numbers) associated + # with a product. + # Corresponds to the JSON property `asins` + # @return [Array] + attr_accessor :asins + + # Optional. Contains brand names associated with a product. + # Corresponds to the JSON property `brands` + # @return [Array] + attr_accessor :brands + + # Optional. The method used to collect the review. + # Corresponds to the JSON property `collectionMethod` + # @return [String] + attr_accessor :collection_method + + # Optional. Contains the disadvantages based on the opinion of the reviewer. + # Omit boilerplate text like "con:" unless it was written by the reviewer. + # Corresponds to the JSON property `cons` + # @return [Array] + attr_accessor :cons + + # Required. The content of the review. + # Corresponds to the JSON property `content` + # @return [String] + attr_accessor :content + + # Optional. Contains GTINs (global trade item numbers) associated with a product. + # Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported. + # Corresponds to the JSON property `gtins` + # @return [Array] + attr_accessor :gtins + + # Optional. Indicates whether the review is marked as spam in the publisher's + # system. + # Corresponds to the JSON property `isSpam` + # @return [Boolean] + attr_accessor :is_spam + alias_method :is_spam?, :is_spam + + # Optional. The maximum possible number for the rating. The value of the max + # rating must be greater than the value of the min attribute. + # Corresponds to the JSON property `maxRating` + # @return [Fixnum] + attr_accessor :max_rating + + # Optional. Contains the ratings associated with the review. The minimum + # possible number for the rating. This should be the worst possible rating and + # should not be a value for no rating. + # Corresponds to the JSON property `minRating` + # @return [Fixnum] + attr_accessor :min_rating + + # Optional. Contains MPNs (manufacturer part numbers) associated with a product. + # Corresponds to the JSON property `mpns` + # @return [Array] + attr_accessor :mpns + + # Optional. The URI of the product. This URI can have the same value as the ` + # review_link` element, if the review URI and the product URI are the same. + # Corresponds to the JSON property `productLinks` + # @return [Array] + attr_accessor :product_links + + # Optional. Descriptive name of a product. + # Corresponds to the JSON property `productNames` + # @return [Array] + attr_accessor :product_names + + # Optional. Contains the advantages based on the opinion of the reviewer. Omit + # boilerplate text like "pro:" unless it was written by the reviewer. + # Corresponds to the JSON property `pros` + # @return [Array] + attr_accessor :pros + + # Optional. A link to the company favicon of the publisher. The image dimensions + # should be favicon size: 16x16 pixels. The image format should be GIF, JPG or + # PNG. + # Corresponds to the JSON property `publisherFavicon` + # @return [String] + attr_accessor :publisher_favicon + + # Optional. The name of the publisher of the product reviews. The information + # about the publisher, which may be a retailer, manufacturer, reviews service + # company, or any entity that publishes product reviews. + # Corresponds to the JSON property `publisherName` + # @return [String] + attr_accessor :publisher_name + + # Optional. The reviewer's overall rating of the product. + # Corresponds to the JSON property `rating` + # @return [Float] + attr_accessor :rating + + # Optional. The country of the review defined by ISO 3166-1 Alpha-2 Country Code. + # Corresponds to the JSON property `reviewCountry` + # @return [String] + attr_accessor :review_country + + # Optional. The language of the review defined by BCP-47 language code. + # Corresponds to the JSON property `reviewLanguage` + # @return [String] + attr_accessor :review_language + + # The URI of the review landing page. + # Corresponds to the JSON property `reviewLink` + # @return [Google::Apis::MerchantapiReviewsV1beta::ReviewLink] + attr_accessor :review_link + + # Required. The timestamp indicating when the review was written. + # Corresponds to the JSON property `reviewTime` + # @return [String] + attr_accessor :review_time + + # Optional. The author of the product review. A permanent, unique identifier for + # the author of the review in the publisher's system. + # Corresponds to the JSON property `reviewerId` + # @return [String] + attr_accessor :reviewer_id + + # Optional. A URI to an image of the reviewed product created by the review + # author. The URI does not have to end with an image file extension. + # Corresponds to the JSON property `reviewerImageLinks` + # @return [Array] + attr_accessor :reviewer_image_links + + # Optional. Set to true if the reviewer should remain anonymous. + # Corresponds to the JSON property `reviewerIsAnonymous` + # @return [Boolean] + attr_accessor :reviewer_is_anonymous + alias_method :reviewer_is_anonymous?, :reviewer_is_anonymous + + # Optional. The name of the reviewer of the product review. + # Corresponds to the JSON property `reviewerUsername` + # @return [String] + attr_accessor :reviewer_username + + # Optional. Contains SKUs (stock keeping units) associated with a product. Often + # this matches the product Offer Id in the product feed. + # Corresponds to the JSON property `skus` + # @return [Array] + attr_accessor :skus + + # Optional. The name of the subclient of the product reviews. The subclient is + # an identifier of the product review source. It should be equivalent to the + # directory provided in the file data source path. + # Corresponds to the JSON property `subclientName` + # @return [String] + attr_accessor :subclient_name + + # Optional. The title of the review. + # Corresponds to the JSON property `title` + # @return [String] + attr_accessor :title + + # Optional. A permanent, unique identifier for the transaction associated with + # the review in the publisher's system. This ID can be used to indicate that + # multiple reviews are associated with the same transaction. + # Corresponds to the JSON property `transactionId` + # @return [String] + attr_accessor :transaction_id + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @aggregator_name = args[:aggregator_name] if args.key?(:aggregator_name) + @asins = args[:asins] if args.key?(:asins) + @brands = args[:brands] if args.key?(:brands) + @collection_method = args[:collection_method] if args.key?(:collection_method) + @cons = args[:cons] if args.key?(:cons) + @content = args[:content] if args.key?(:content) + @gtins = args[:gtins] if args.key?(:gtins) + @is_spam = args[:is_spam] if args.key?(:is_spam) + @max_rating = args[:max_rating] if args.key?(:max_rating) + @min_rating = args[:min_rating] if args.key?(:min_rating) + @mpns = args[:mpns] if args.key?(:mpns) + @product_links = args[:product_links] if args.key?(:product_links) + @product_names = args[:product_names] if args.key?(:product_names) + @pros = args[:pros] if args.key?(:pros) + @publisher_favicon = args[:publisher_favicon] if args.key?(:publisher_favicon) + @publisher_name = args[:publisher_name] if args.key?(:publisher_name) + @rating = args[:rating] if args.key?(:rating) + @review_country = args[:review_country] if args.key?(:review_country) + @review_language = args[:review_language] if args.key?(:review_language) + @review_link = args[:review_link] if args.key?(:review_link) + @review_time = args[:review_time] if args.key?(:review_time) + @reviewer_id = args[:reviewer_id] if args.key?(:reviewer_id) + @reviewer_image_links = args[:reviewer_image_links] if args.key?(:reviewer_image_links) + @reviewer_is_anonymous = args[:reviewer_is_anonymous] if args.key?(:reviewer_is_anonymous) + @reviewer_username = args[:reviewer_username] if args.key?(:reviewer_username) + @skus = args[:skus] if args.key?(:skus) + @subclient_name = args[:subclient_name] if args.key?(:subclient_name) + @title = args[:title] if args.key?(:title) + @transaction_id = args[:transaction_id] if args.key?(:transaction_id) + end + end + + # The destination status of the product review status. + class ProductReviewDestinationStatus + include Google::Apis::Core::Hashable + + # Output only. The name of the reporting context. + # Corresponds to the JSON property `reportingContext` + # @return [String] + attr_accessor :reporting_context + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @reporting_context = args[:reporting_context] if args.key?(:reporting_context) + end + end + + # The ItemLevelIssue of the product review status. + class ProductReviewItemLevelIssue + include Google::Apis::Core::Hashable + + # Output only. The attribute's name, if the issue is caused by a single + # attribute. + # Corresponds to the JSON property `attribute` + # @return [String] + attr_accessor :attribute + + # Output only. The error code of the issue. + # Corresponds to the JSON property `code` + # @return [String] + attr_accessor :code + + # Output only. A short issue description in English. + # Corresponds to the JSON property `description` + # @return [String] + attr_accessor :description + + # Output only. A detailed issue description in English. + # Corresponds to the JSON property `detail` + # @return [String] + attr_accessor :detail + + # Output only. The URL of a web page to help with resolving this issue. + # Corresponds to the JSON property `documentation` + # @return [String] + attr_accessor :documentation + + # Output only. The reporting context the issue applies to. + # Corresponds to the JSON property `reportingContext` + # @return [String] + attr_accessor :reporting_context + + # Output only. Whether the issue can be resolved by the merchant. + # Corresponds to the JSON property `resolution` + # @return [String] + attr_accessor :resolution + + # Output only. How this issue affects serving of the product review. + # Corresponds to the JSON property `severity` + # @return [String] + attr_accessor :severity + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @attribute = args[:attribute] if args.key?(:attribute) + @code = args[:code] if args.key?(:code) + @description = args[:description] if args.key?(:description) + @detail = args[:detail] if args.key?(:detail) + @documentation = args[:documentation] if args.key?(:documentation) + @reporting_context = args[:reporting_context] if args.key?(:reporting_context) + @resolution = args[:resolution] if args.key?(:resolution) + @severity = args[:severity] if args.key?(:severity) + end + end + + # Product review status. + class ProductReviewStatus + include Google::Apis::Core::Hashable + + # Output only. Date on which the item has been created, in [ISO 8601](http://en. + # wikipedia.org/wiki/ISO_8601) format. + # Corresponds to the JSON property `createTime` + # @return [String] + attr_accessor :create_time + + # Output only. The intended destinations for the product review. + # Corresponds to the JSON property `destinationStatuses` + # @return [Array] + attr_accessor :destination_statuses + + # Output only. A list of all issues associated with the product review. + # Corresponds to the JSON property `itemLevelIssues` + # @return [Array] + attr_accessor :item_level_issues + + # Output only. Date on which the item has been last updated, in [ISO 8601](http:/ + # /en.wikipedia.org/wiki/ISO_8601) format. + # Corresponds to the JSON property `lastUpdateTime` + # @return [String] + attr_accessor :last_update_time + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @create_time = args[:create_time] if args.key?(:create_time) + @destination_statuses = args[:destination_statuses] if args.key?(:destination_statuses) + @item_level_issues = args[:item_level_issues] if args.key?(:item_level_issues) + @last_update_time = args[:last_update_time] if args.key?(:last_update_time) + end + end + + # The message that the merchant will receive to notify about product status + # change event + class ProductStatusChangeMessage + include Google::Apis::Core::Hashable + + # The target account that owns the entity that changed. Format : `accounts/` + # merchant_id`` + # Corresponds to the JSON property `account` + # @return [String] + attr_accessor :account + + # The attribute in the resource that changed, in this case it will be always ` + # Status`. + # Corresponds to the JSON property `attribute` + # @return [String] + attr_accessor :attribute + + # A message to describe the change that happened to the product + # Corresponds to the JSON property `changes` + # @return [Array] + attr_accessor :changes + + # The account that manages the merchant's account. can be the same as merchant + # id if it is standalone account. Format : `accounts/`service_provider_id`` + # Corresponds to the JSON property `managingAccount` + # @return [String] + attr_accessor :managing_account + + # The product name. Format: ``product.name=accounts/`account`/products/`product`` + # ` + # Corresponds to the JSON property `resource` + # @return [String] + attr_accessor :resource + + # The product id. + # Corresponds to the JSON property `resourceId` + # @return [String] + attr_accessor :resource_id + + # The resource that changed, in this case it will always be `Product`. + # Corresponds to the JSON property `resourceType` + # @return [String] + attr_accessor :resource_type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @account = args[:account] if args.key?(:account) + @attribute = args[:attribute] if args.key?(:attribute) + @changes = args[:changes] if args.key?(:changes) + @managing_account = args[:managing_account] if args.key?(:managing_account) + @resource = args[:resource] if args.key?(:resource) + @resource_id = args[:resource_id] if args.key?(:resource_id) + @resource_type = args[:resource_type] if args.key?(:resource_type) + end + end + + # The URI of the review landing page. + class ReviewLink + include Google::Apis::Core::Hashable + + # Optional. The URI of the review landing page. For example: `http://www.example. + # com/review_5.html`. + # Corresponds to the JSON property `link` + # @return [String] + attr_accessor :link + + # Optional. Type of the review URI. + # Corresponds to the JSON property `type` + # @return [String] + attr_accessor :type + + def initialize(**args) + update!(**args) + end + + # Update properties of this object + def update!(**args) + @link = args[:link] if args.key?(:link) + @type = args[:type] if args.key?(:type) + end + end + end + end +end diff --git a/generated/google-apis-merchantapi_reviews_v1beta/lib/google/apis/merchantapi_reviews_v1beta/gem_version.rb b/generated/google-apis-merchantapi_reviews_v1beta/lib/google/apis/merchantapi_reviews_v1beta/gem_version.rb new file mode 100644 index 00000000000..59ca71696a8 --- /dev/null +++ b/generated/google-apis-merchantapi_reviews_v1beta/lib/google/apis/merchantapi_reviews_v1beta/gem_version.rb @@ -0,0 +1,28 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +module Google + module Apis + module MerchantapiReviewsV1beta + # Version of the google-apis-merchantapi_reviews_v1beta gem + GEM_VERSION = "0.1.0" + + # Version of the code generator used to generate this client + GENERATOR_VERSION = "0.15.1" + + # Revision of the discovery document this client was generated from + REVISION = "20241015" + end + end +end diff --git a/generated/google-apis-merchantapi_reviews_v1beta/lib/google/apis/merchantapi_reviews_v1beta/representations.rb b/generated/google-apis-merchantapi_reviews_v1beta/lib/google/apis/merchantapi_reviews_v1beta/representations.rb new file mode 100644 index 00000000000..059c9beb77c --- /dev/null +++ b/generated/google-apis-merchantapi_reviews_v1beta/lib/google/apis/merchantapi_reviews_v1beta/representations.rb @@ -0,0 +1,348 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'date' +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module MerchantapiReviewsV1beta + + class CustomAttribute + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class Empty + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListMerchantReviewsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ListProductReviewsResponse + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class MerchantReview + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class MerchantReviewAttributes + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class MerchantReviewDestinationStatus + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class MerchantReviewItemLevelIssue + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class MerchantReviewStatus + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ProductChange + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ProductReview + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ProductReviewAttributes + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ProductReviewDestinationStatus + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ProductReviewItemLevelIssue + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ProductReviewStatus + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ProductStatusChangeMessage + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class ReviewLink + class Representation < Google::Apis::Core::JsonRepresentation; end + + include Google::Apis::Core::JsonObjectSupport + end + + class CustomAttribute + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :group_values, as: 'groupValues', class: Google::Apis::MerchantapiReviewsV1beta::CustomAttribute, decorator: Google::Apis::MerchantapiReviewsV1beta::CustomAttribute::Representation + + property :name, as: 'name' + property :value, as: 'value' + end + end + + class Empty + # @private + class Representation < Google::Apis::Core::JsonRepresentation + end + end + + class ListMerchantReviewsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + collection :merchant_reviews, as: 'merchantReviews', class: Google::Apis::MerchantapiReviewsV1beta::MerchantReview, decorator: Google::Apis::MerchantapiReviewsV1beta::MerchantReview::Representation + + property :next_page_token, as: 'nextPageToken' + end + end + + class ListProductReviewsResponse + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :next_page_token, as: 'nextPageToken' + collection :product_reviews, as: 'productReviews', class: Google::Apis::MerchantapiReviewsV1beta::ProductReview, decorator: Google::Apis::MerchantapiReviewsV1beta::ProductReview::Representation + + end + end + + class MerchantReview + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :attributes, as: 'attributes', class: Google::Apis::MerchantapiReviewsV1beta::MerchantReviewAttributes, decorator: Google::Apis::MerchantapiReviewsV1beta::MerchantReviewAttributes::Representation + + collection :custom_attributes, as: 'customAttributes', class: Google::Apis::MerchantapiReviewsV1beta::CustomAttribute, decorator: Google::Apis::MerchantapiReviewsV1beta::CustomAttribute::Representation + + property :data_source, as: 'dataSource' + property :merchant_review_id, as: 'merchantReviewId' + property :merchant_review_status, as: 'merchantReviewStatus', class: Google::Apis::MerchantapiReviewsV1beta::MerchantReviewStatus, decorator: Google::Apis::MerchantapiReviewsV1beta::MerchantReviewStatus::Representation + + property :name, as: 'name' + end + end + + class MerchantReviewAttributes + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :collection_method, as: 'collectionMethod' + property :content, as: 'content' + property :is_anonymous, as: 'isAnonymous' + property :max_rating, :numeric_string => true, as: 'maxRating' + property :merchant_display_name, as: 'merchantDisplayName' + property :merchant_id, as: 'merchantId' + property :merchant_link, as: 'merchantLink' + property :merchant_rating_link, as: 'merchantRatingLink' + property :min_rating, :numeric_string => true, as: 'minRating' + property :rating, as: 'rating' + property :review_country, as: 'reviewCountry' + property :review_language, as: 'reviewLanguage' + property :review_time, as: 'reviewTime' + property :reviewer_id, as: 'reviewerId' + property :reviewer_username, as: 'reviewerUsername' + property :title, as: 'title' + end + end + + class MerchantReviewDestinationStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :reporting_context, as: 'reportingContext' + end + end + + class MerchantReviewItemLevelIssue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :attribute, as: 'attribute' + property :code, as: 'code' + property :description, as: 'description' + property :detail, as: 'detail' + property :documentation, as: 'documentation' + property :reporting_context, as: 'reportingContext' + property :resolution, as: 'resolution' + property :severity, as: 'severity' + end + end + + class MerchantReviewStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + collection :destination_statuses, as: 'destinationStatuses', class: Google::Apis::MerchantapiReviewsV1beta::MerchantReviewDestinationStatus, decorator: Google::Apis::MerchantapiReviewsV1beta::MerchantReviewDestinationStatus::Representation + + collection :item_level_issues, as: 'itemLevelIssues', class: Google::Apis::MerchantapiReviewsV1beta::MerchantReviewItemLevelIssue, decorator: Google::Apis::MerchantapiReviewsV1beta::MerchantReviewItemLevelIssue::Representation + + property :last_update_time, as: 'lastUpdateTime' + end + end + + class ProductChange + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :new_value, as: 'newValue' + property :old_value, as: 'oldValue' + property :region_code, as: 'regionCode' + property :reporting_context, as: 'reportingContext' + end + end + + class ProductReview + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :attributes, as: 'attributes', class: Google::Apis::MerchantapiReviewsV1beta::ProductReviewAttributes, decorator: Google::Apis::MerchantapiReviewsV1beta::ProductReviewAttributes::Representation + + collection :custom_attributes, as: 'customAttributes', class: Google::Apis::MerchantapiReviewsV1beta::CustomAttribute, decorator: Google::Apis::MerchantapiReviewsV1beta::CustomAttribute::Representation + + property :data_source, as: 'dataSource' + property :name, as: 'name' + property :product_review_id, as: 'productReviewId' + property :product_review_status, as: 'productReviewStatus', class: Google::Apis::MerchantapiReviewsV1beta::ProductReviewStatus, decorator: Google::Apis::MerchantapiReviewsV1beta::ProductReviewStatus::Representation + + end + end + + class ProductReviewAttributes + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :aggregator_name, as: 'aggregatorName' + collection :asins, as: 'asins' + collection :brands, as: 'brands' + property :collection_method, as: 'collectionMethod' + collection :cons, as: 'cons' + property :content, as: 'content' + collection :gtins, as: 'gtins' + property :is_spam, as: 'isSpam' + property :max_rating, :numeric_string => true, as: 'maxRating' + property :min_rating, :numeric_string => true, as: 'minRating' + collection :mpns, as: 'mpns' + collection :product_links, as: 'productLinks' + collection :product_names, as: 'productNames' + collection :pros, as: 'pros' + property :publisher_favicon, as: 'publisherFavicon' + property :publisher_name, as: 'publisherName' + property :rating, as: 'rating' + property :review_country, as: 'reviewCountry' + property :review_language, as: 'reviewLanguage' + property :review_link, as: 'reviewLink', class: Google::Apis::MerchantapiReviewsV1beta::ReviewLink, decorator: Google::Apis::MerchantapiReviewsV1beta::ReviewLink::Representation + + property :review_time, as: 'reviewTime' + property :reviewer_id, as: 'reviewerId' + collection :reviewer_image_links, as: 'reviewerImageLinks' + property :reviewer_is_anonymous, as: 'reviewerIsAnonymous' + property :reviewer_username, as: 'reviewerUsername' + collection :skus, as: 'skus' + property :subclient_name, as: 'subclientName' + property :title, as: 'title' + property :transaction_id, as: 'transactionId' + end + end + + class ProductReviewDestinationStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :reporting_context, as: 'reportingContext' + end + end + + class ProductReviewItemLevelIssue + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :attribute, as: 'attribute' + property :code, as: 'code' + property :description, as: 'description' + property :detail, as: 'detail' + property :documentation, as: 'documentation' + property :reporting_context, as: 'reportingContext' + property :resolution, as: 'resolution' + property :severity, as: 'severity' + end + end + + class ProductReviewStatus + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :create_time, as: 'createTime' + collection :destination_statuses, as: 'destinationStatuses', class: Google::Apis::MerchantapiReviewsV1beta::ProductReviewDestinationStatus, decorator: Google::Apis::MerchantapiReviewsV1beta::ProductReviewDestinationStatus::Representation + + collection :item_level_issues, as: 'itemLevelIssues', class: Google::Apis::MerchantapiReviewsV1beta::ProductReviewItemLevelIssue, decorator: Google::Apis::MerchantapiReviewsV1beta::ProductReviewItemLevelIssue::Representation + + property :last_update_time, as: 'lastUpdateTime' + end + end + + class ProductStatusChangeMessage + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :account, as: 'account' + property :attribute, as: 'attribute' + collection :changes, as: 'changes', class: Google::Apis::MerchantapiReviewsV1beta::ProductChange, decorator: Google::Apis::MerchantapiReviewsV1beta::ProductChange::Representation + + property :managing_account, as: 'managingAccount' + property :resource, as: 'resource' + property :resource_id, as: 'resourceId' + property :resource_type, as: 'resourceType' + end + end + + class ReviewLink + # @private + class Representation < Google::Apis::Core::JsonRepresentation + property :link, as: 'link' + property :type, as: 'type' + end + end + end + end +end diff --git a/generated/google-apis-merchantapi_reviews_v1beta/lib/google/apis/merchantapi_reviews_v1beta/service.rb b/generated/google-apis-merchantapi_reviews_v1beta/lib/google/apis/merchantapi_reviews_v1beta/service.rb new file mode 100644 index 00000000000..bb8708187f0 --- /dev/null +++ b/generated/google-apis-merchantapi_reviews_v1beta/lib/google/apis/merchantapi_reviews_v1beta/service.rb @@ -0,0 +1,345 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require 'google/apis/core/base_service' +require 'google/apis/core/json_representation' +require 'google/apis/core/hashable' +require 'google/apis/errors' + +module Google + module Apis + module MerchantapiReviewsV1beta + # Merchant API + # + # Programmatically manage your Merchant Center Accounts. + # + # @example + # require 'google/apis/merchantapi_reviews_v1beta' + # + # Merchantapi = Google::Apis::MerchantapiReviewsV1beta # Alias the module + # service = Merchantapi::MerchantService.new + # + # @see https://developers.devsite.corp.google.com/merchant/api + class MerchantService < Google::Apis::Core::BaseService + DEFAULT_ENDPOINT_TEMPLATE = "https://merchantapi.$UNIVERSE_DOMAIN$/" + + # @return [String] + # 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. + attr_accessor :key + + # @return [String] + # 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. + attr_accessor :quota_user + + def initialize + super(DEFAULT_ENDPOINT_TEMPLATE, '', + client_name: 'google-apis-merchantapi_reviews_v1beta', + client_version: Google::Apis::MerchantapiReviewsV1beta::GEM_VERSION) + @batch_path = 'batch' + end + + # Deletes merchant review. + # @param [String] name + # Required. The ID of the merchant review. Format: accounts/`account`/ + # merchantReviews/`merchantReview` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # 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. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MerchantapiReviewsV1beta::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MerchantapiReviewsV1beta::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_account_merchant_review(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'reviews/v1beta/{+name}', options) + command.response_representation = Google::Apis::MerchantapiReviewsV1beta::Empty::Representation + command.response_class = Google::Apis::MerchantapiReviewsV1beta::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a merchant review. + # @param [String] name + # Required. The ID of the merchant review. Format: accounts/`account`/ + # merchantReviews/`merchantReview` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # 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. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MerchantapiReviewsV1beta::MerchantReview] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MerchantapiReviewsV1beta::MerchantReview] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_account_merchant_review(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'reviews/v1beta/{+name}', options) + command.response_representation = Google::Apis::MerchantapiReviewsV1beta::MerchantReview::Representation + command.response_class = Google::Apis::MerchantapiReviewsV1beta::MerchantReview + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Inserts a review for your Merchant Center account. If the review already + # exists, then the review is replaced with the new instance. + # @param [String] parent + # Required. The account where the merchant review will be inserted. Format: + # accounts/`account` + # @param [Google::Apis::MerchantapiReviewsV1beta::MerchantReview] merchant_review_object + # @param [String] data_source + # Required. The data source of the [merchantreview](https://support.google.com/ + # merchants/answer/7045996?sjid=5253581244217581976-EU) Format: `accounts/` + # account`/dataSources/`datasource``. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # 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. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MerchantapiReviewsV1beta::MerchantReview] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MerchantapiReviewsV1beta::MerchantReview] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def insert_account_merchant_review(parent, merchant_review_object = nil, data_source: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'reviews/v1beta/{+parent}/merchantReviews:insert', options) + command.request_representation = Google::Apis::MerchantapiReviewsV1beta::MerchantReview::Representation + command.request_object = merchant_review_object + command.response_representation = Google::Apis::MerchantapiReviewsV1beta::MerchantReview::Representation + command.response_class = Google::Apis::MerchantapiReviewsV1beta::MerchantReview + command.params['parent'] = parent unless parent.nil? + command.query['dataSource'] = data_source unless data_source.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists merchant reviews. + # @param [String] parent + # Required. The account to list merchant reviews for. Format: accounts/`account` + # @param [Fixnum] page_size + # Optional. The maximum number of merchant reviews to return. The service can + # return fewer than this value. The maximum value is 1000; values above 1000 are + # coerced to 1000. If unspecified, the maximum number of reviews is returned. + # @param [String] page_token + # Optional. A page token, received from a previous `ListMerchantReviews` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to `ListMerchantReviews` must match the call that provided + # the page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # 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. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MerchantapiReviewsV1beta::ListMerchantReviewsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MerchantapiReviewsV1beta::ListMerchantReviewsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_account_merchant_reviews(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'reviews/v1beta/{+parent}/merchantReviews', options) + command.response_representation = Google::Apis::MerchantapiReviewsV1beta::ListMerchantReviewsResponse::Representation + command.response_class = Google::Apis::MerchantapiReviewsV1beta::ListMerchantReviewsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Deletes a product review. + # @param [String] name + # Required. The ID of the Product review. Format: accounts/`account`/ + # productReviews/`productReview` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # 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. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MerchantapiReviewsV1beta::Empty] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MerchantapiReviewsV1beta::Empty] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def delete_account_product_review(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:delete, 'reviews/v1beta/{+name}', options) + command.response_representation = Google::Apis::MerchantapiReviewsV1beta::Empty::Representation + command.response_class = Google::Apis::MerchantapiReviewsV1beta::Empty + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Gets a product review. + # @param [String] name + # Required. The ID of the merchant review. Format: accounts/`account`/ + # productReviews/`productReview` + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # 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. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MerchantapiReviewsV1beta::ProductReview] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MerchantapiReviewsV1beta::ProductReview] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_account_product_review(name, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'reviews/v1beta/{+name}', options) + command.response_representation = Google::Apis::MerchantapiReviewsV1beta::ProductReview::Representation + command.response_class = Google::Apis::MerchantapiReviewsV1beta::ProductReview + command.params['name'] = name unless name.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Inserts a product review. + # @param [String] parent + # Required. The account where the product review will be inserted. Format: + # accounts/`account` + # @param [Google::Apis::MerchantapiReviewsV1beta::ProductReview] product_review_object + # @param [String] data_source + # Required. Format: `accounts/`account`/dataSources/`datasource``. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # 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. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MerchantapiReviewsV1beta::ProductReview] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MerchantapiReviewsV1beta::ProductReview] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def insert_account_product_review(parent, product_review_object = nil, data_source: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:post, 'reviews/v1beta/{+parent}/productReviews:insert', options) + command.request_representation = Google::Apis::MerchantapiReviewsV1beta::ProductReview::Representation + command.request_object = product_review_object + command.response_representation = Google::Apis::MerchantapiReviewsV1beta::ProductReview::Representation + command.response_class = Google::Apis::MerchantapiReviewsV1beta::ProductReview + command.params['parent'] = parent unless parent.nil? + command.query['dataSource'] = data_source unless data_source.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + # Lists product reviews. + # @param [String] parent + # Required. The account to list product reviews for. Format: accounts/`account` + # @param [Fixnum] page_size + # Optional. The maximum number of products to return. The service may return + # fewer than this value. + # @param [String] page_token + # Optional. A page token, received from a previous `ListProductReviews` call. + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters provided to `ListProductReviews` must match the call that provided + # the page token. + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # 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. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::MerchantapiReviewsV1beta::ListProductReviewsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::MerchantapiReviewsV1beta::ListProductReviewsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def list_account_product_reviews(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) + command = make_simple_command(:get, 'reviews/v1beta/{+parent}/productReviews', options) + command.response_representation = Google::Apis::MerchantapiReviewsV1beta::ListProductReviewsResponse::Representation + command.response_class = Google::Apis::MerchantapiReviewsV1beta::ListProductReviewsResponse + command.params['parent'] = parent unless parent.nil? + command.query['pageSize'] = page_size unless page_size.nil? + command.query['pageToken'] = page_token unless page_token.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + execute_or_queue_command(command, &block) + end + + protected + + def apply_command_defaults(command) + command.query['key'] = key unless key.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + end + end + end + end +end diff --git a/generated/google-apis-merchantapi_reviews_v1beta/spec/generated_spec.rb b/generated/google-apis-merchantapi_reviews_v1beta/spec/generated_spec.rb new file mode 100644 index 00000000000..14f673dcd3b --- /dev/null +++ b/generated/google-apis-merchantapi_reviews_v1beta/spec/generated_spec.rb @@ -0,0 +1,27 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +require "rspec" + +RSpec.describe "Google::Apis::MerchantapiReviewsV1beta" do + # Minimal test just to ensure no syntax errors in generated code + it "should load" do + expect do + require "google/apis/merchantapi_reviews_v1beta" + end.not_to raise_error + expect do + Google::Apis::MerchantapiReviewsV1beta::MerchantService.new + end.not_to raise_error + end +end