generated/google-apis-cloudchannel_v1/lib/google/apis/cloudchannel_v1/service.rb
# Lists the Purchasable Offers for the following cases: * Offers that can be
# newly purchased for a customer * Offers that can be changed to, for an
# entitlement. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn'
# t belong to the reseller * INVALID_ARGUMENT: Missing or invalid required
# parameters in the request.
# @param [String] customer
#   Required. The resource name of the customer for which to list Offers. Format:
#   accounts/`account_id`/customers/`customer_id`.
# @param [String] change_offer_purchase_entitlement
#   Required. Resource name of the entitlement. Format: accounts/`account_id`/
#   customers/`customer_id`/entitlements/`entitlement_id`
# @param [String] change_offer_purchase_new_sku
#   Optional. Resource name of the SKU that is being changed to. Should be
#   provided if upgrading or downgrading an entitlement. Format: products/`
#   product_id`/skus/`sku_id`
# @param [String] create_entitlement_purchase_sku
#   Required. SKU that the result should be restricted to. Format: products/`
#   product_id`/skus/`sku_id`.
# @param [String] language_code
#   Optional. The BCP-47 language code, such as "en-US". If specified, the
#   response will be localized to the corresponding language code. Default is "en-
#   US".
# @param [Fixnum] page_size
#   Optional. Requested page size. Server might return fewer results than
#   requested. If unspecified, at most 100 Offers will be returned. The maximum
#   value is 1000; values above 1000 will be coerced to 1000.
# @param [String] page_token
#   Optional. A token identifying a page of results, if other than the first one.
# @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::CloudchannelV1::GoogleCloudChannelV1ListPurchasableOffersResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListPurchasableOffersResponse]
#
# @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
Lists the Purchasable Offers for the following cases: * Offers that can be
newly purchased for a customer * Offers that can be changed to, for an
entitlement. Possible Error Codes: * PERMISSION_DENIED: If the customer doesn'
t belong to the reseller * INVALID_ARGUMENT: Missing or invalid required
parameters in the request.
Lists the Purchasable Offers for the following cases : * Offers that can be newly purchased for a customer * Offers that can be changed to for an entitlement . Possible Error Codes : * PERMISSION_DENIED : If the customer doesn ' t belong to the reseller * INVALID_ARGUMENT : Missing or invalid required parameters in the request .
def list_account_customer_purchasable_offers(customer, change_offer_purchase_entitlement: nil, change_offer_purchase_new_sku: nil, create_entitlement_purchase_sku: nil, language_code: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
          command = make_simple_command(:get, 'v1/{+customer}:listPurchasableOffers', options)
          command.response_representation = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListPurchasableOffersResponse::Representation
          command.response_class = Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListPurchasableOffersResponse
          command.params['customer'] = customer unless customer.nil?
          command.query['changeOfferPurchase.entitlement'] = change_offer_purchase_entitlement unless change_offer_purchase_entitlement.nil?
          command.query['changeOfferPurchase.newSku'] = change_offer_purchase_new_sku unless change_offer_purchase_new_sku.nil?
          command.query['createEntitlementPurchase.sku'] = create_entitlement_purchase_sku unless create_entitlement_purchase_sku.nil?
          command.query['languageCode'] = language_code unless language_code.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
def list_account_customer_purchasable_offers ( customer , change_offer_purchase_entitlement : nil , change_offer_purchase_new_sku : nil , create_entitlement_purchase_sku : nil , language_code : nil , page_size : nil , page_token : nil , fields : nil , quota_user : nil , options : nil , & block ) command = make_simple_command ( :get , 'v1/{+customer}:listPurchasableOffers' , options ) command . response_representation = Google :: Apis :: CloudchannelV1 :: GoogleCloudChannelV1ListPurchasableOffersResponse :: Representation command . response_class = Google :: Apis :: CloudchannelV1 :: GoogleCloudChannelV1ListPurchasableOffersResponse command . params [ 'customer' ] = customer unless customer . nil? command . query [ 'changeOfferPurchase.entitlement' ] = change_offer_purchase_entitlement unless change_offer_purchase_entitlement . nil? command . query [ 'changeOfferPurchase.newSku' ] = change_offer_purchase_new_sku unless change_offer_purchase_new_sku . nil? command . query [ 'createEntitlementPurchase.sku' ] = create_entitlement_purchase_sku unless create_entitlement_purchase_sku . nil? command . query [ 'languageCode' ] = language_code unless language_code . 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
Lists the Purchasable Offers for the following cases: * Offers that can be
newly purchased for a customer * Offers that can be changed to, for an
entitlement.
Lists the Purchasable Offers for the following cases : * Offers that can be newly purchased for a customer * Offers that can be changed to for an entitlement .
None
Google::Apis::CloudchannelV1::GoogleCloudChannelV1ListPurchasableOffersResponse
[Google::Apis::ServerError] An error occurred on the server and the request can be retried
[ Google :: Apis :: ServerError ] An error occurred on the server and the request can be retried
[Google::Apis::ClientError] The request is invalid and should not be retried without modification
[ Google :: Apis :: ClientError ] The request is invalid and should not be retried without modification
[Google::Apis::AuthorizationError] Authorization is required
[ Google :: Apis :: AuthorizationError ] Authorization is required
customer
change_offer_purchase_entitlement
change_offer_purchase_new_sku
create_entitlement_purchase_sku
language_code
page_size
page_token
fields
quota_user
options
block
options Request-specific options
options Request - specific options
]
Result & error if block supplied
Result & error if block supplied
result
parsed result object
parsed result object
err
error object if request failed
error object if request failed