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

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

Overview

Path helper methods for the MerchantReviewsService 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/merchant_reviews_service/paths.rb', line 38

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

#merchant_review_path(account:, name:) ⇒ ::String

Create a fully-qualified MerchantReview resource string.

The resource will be in the following format:

accounts/{account}/merchantReviews/{name}

Parameters:

  • account (String)
  • name (String)

Returns:

  • (::String)

Raises:

  • (::ArgumentError)


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

def merchant_review_path account:, name:
  raise ::ArgumentError, "account cannot contain /" if .to_s.include? "/"

  "accounts/#{account}/merchantReviews/#{name}"
end