Module: Google::Shopping::Merchant::Reviews::V1beta::ProductReviewsService::Paths

Extended by:
Paths
Included in:
Client, Paths, Rest::Client
Defined in:
lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/paths.rb

Overview

Path helper methods for the ProductReviewsService API.

Instance Method Summary collapse

Instance Method Details

#account_path(account:) ⇒ ::String

Create a fully-qualified Account resource string.

The resource will be in the following format:

accounts/{account}

Parameters:

  • account (String)

Returns:

  • (::String)


38
39
40
# File 'lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/paths.rb', line 38

def  account:
  "accounts/#{account}"
end

#product_review_path(account:, productreview:) ⇒ ::String

Create a fully-qualified ProductReview resource string.

The resource will be in the following format:

accounts/{account}/productReviews/{productreview}

Parameters:

  • account (String)
  • productreview (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


53
54
55
56
57
# File 'lib/google/shopping/merchant/reviews/v1beta/product_reviews_service/paths.rb', line 53

def product_review_path account:, productreview:
  raise ::ArgumentError, "account cannot contain /" if .to_s.include? "/"

  "accounts/#{account}/productReviews/#{productreview}"
end