Class: Google::Cloud::Channel::V1::CloudChannelService::Client
- Inherits:
-
Object
- Object
- Google::Cloud::Channel::V1::CloudChannelService::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/channel/v1/cloud_channel_service/client.rb
Overview
Client for the CloudChannelService service.
CloudChannelService lets Google cloud resellers and distributors manage their customers, channel partners, entitlements, and reports.
Using this service:
- Resellers and distributors can manage a customer entity.
- Distributors can register an authorized reseller in their channel and provide them with delegated admin access.
- Resellers and distributors can manage customer entitlements.
CloudChannelService exposes the following resources:
Customers: An entity-usually an enterprise-managed by a reseller or distributor.
Entitlements: An entity that provides a customer with the means to use a service. Entitlements are created or updated as a result of a successful fulfillment.
ChannelPartnerLinks: An entity that identifies links between distributors and their indirect resellers in a channel.
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#operations_client ⇒ ::Google::Cloud::Channel::V1::CloudChannelService::Operations
readonly
Get the associated client for long-running operations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the CloudChannelService Client class.
Instance Method Summary collapse
-
#activate_entitlement(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Activates a previously suspended entitlement.
-
#cancel_entitlement(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Cancels a previously fulfilled entitlement.
-
#change_offer(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Updates the Offer for an existing customer entitlement.
-
#change_parameters(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Change parameters of the entitlement.
-
#change_renewal_settings(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Updates the renewal settings for an existing customer entitlement.
-
#check_cloud_identity_accounts_exist(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse
Confirms the existence of Cloud Identity accounts based on the domain and if the Cloud Identity accounts are owned by the reseller.
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the CloudChannelService Client instance.
-
#create_channel_partner_link(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Channel::V1::ChannelPartnerLink
Initiates a channel partner link between a distributor and a reseller, or between resellers in an n-tier reseller channel.
-
#create_channel_partner_repricing_config(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig
Creates a ChannelPartnerRepricingConfig.
-
#create_customer(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Channel::V1::Customer
Creates a new Customer resource under the reseller or distributor account.
-
#create_customer_repricing_config(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Channel::V1::CustomerRepricingConfig
Creates a CustomerRepricingConfig.
-
#create_entitlement(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Creates an entitlement for a customer.
-
#delete_channel_partner_repricing_config(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes the given ChannelPartnerRepricingConfig permanently.
-
#delete_customer(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes the given Customer permanently.
-
#delete_customer_repricing_config(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes the given CustomerRepricingConfig permanently.
-
#get_channel_partner_link(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Channel::V1::ChannelPartnerLink
Returns the requested ChannelPartnerLink resource.
-
#get_channel_partner_repricing_config(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig
Gets information about how a Distributor modifies their bill before sending it to a ChannelPartner.
-
#get_customer(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Channel::V1::Customer
Returns the requested Customer resource.
-
#get_customer_repricing_config(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Channel::V1::CustomerRepricingConfig
Gets information about how a Reseller modifies their bill before sending it to a Customer.
-
#get_entitlement(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Channel::V1::Entitlement
Returns the requested Entitlement resource.
-
#import_customer(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Channel::V1::Customer
Imports a Customer from the Cloud Identity associated with the provided Cloud Identity ID or domain before a TransferEntitlements call.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new CloudChannelService client object.
-
#list_channel_partner_links(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerLink>
List ChannelPartnerLinks belonging to a distributor.
-
#list_channel_partner_repricing_configs(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig>
Lists information about how a Reseller modifies their bill before sending it to a ChannelPartner.
-
#list_customer_repricing_configs(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::CustomerRepricingConfig>
Lists information about how a Reseller modifies their bill before sending it to a Customer.
-
#list_customers(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Customer>
List Customers.
-
#list_entitlement_changes(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::EntitlementChange>
List entitlement history.
-
#list_entitlements(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Entitlement>
Lists Entitlements belonging to a customer.
-
#list_offers(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Offer>
Lists the Offers the reseller can sell.
-
#list_products(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Product>
Lists the Products the reseller is authorized to sell.
-
#list_purchasable_offers(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableOffer>
Lists the following:.
-
#list_purchasable_skus(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableSku>
Lists the following:.
-
#list_sku_group_billable_skus(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::BillableSku>
Lists the Billable SKUs in a given SKU group.
-
#list_sku_groups(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::SkuGroup>
Lists the Rebilling supported SKU groups the account is authorized to sell.
-
#list_skus(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Sku>
Lists the SKUs for a product the reseller is authorized to sell.
-
#list_subscribers(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Channel::V1::ListSubscribersResponse
Lists service accounts with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account.
-
#list_transferable_offers(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableOffer>
List TransferableOffers of a customer based on Cloud Identity ID or Customer Name in the request.
-
#list_transferable_skus(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableSku>
List TransferableSkus of a customer based on the Cloud Identity ID or Customer Name in the request.
-
#lookup_offer(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Channel::V1::Offer
Returns the requested Offer resource.
-
#provision_cloud_identity(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Creates a Cloud Identity for the given customer using the customer's information, or the information provided here.
-
#query_eligible_billing_accounts(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse
Lists the billing accounts that are eligible to purchase particular SKUs for a given customer.
-
#register_subscriber(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Channel::V1::RegisterSubscriberResponse
Registers a service account with subscriber privileges on the Cloud Pub/Sub topic for this Channel Services account.
-
#start_paid_service(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Starts paid service for a trial entitlement.
-
#suspend_entitlement(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Suspends a previously fulfilled entitlement.
-
#transfer_entitlements(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Transfers customer entitlements to new reseller.
-
#transfer_entitlements_to_google(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::Operation
Transfers customer entitlements from their current reseller to Google.
-
#universe_domain ⇒ String
The effective universe domain.
-
#unregister_subscriber(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Channel::V1::UnregisterSubscriberResponse
Unregisters a service account with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account.
-
#update_channel_partner_link(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Channel::V1::ChannelPartnerLink
Updates a channel partner link.
-
#update_channel_partner_repricing_config(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig
Updates a ChannelPartnerRepricingConfig.
-
#update_customer(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Channel::V1::Customer
Updates an existing Customer resource for the reseller or distributor.
-
#update_customer_repricing_config(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Channel::V1::CustomerRepricingConfig
Updates a CustomerRepricingConfig.
Methods included from Paths
#channel_partner_link_path, #channel_partner_repricing_config_path, #customer_path, #customer_repricing_config_path, #entitlement_path, #offer_path, #product_path, #sku_group_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new CloudChannelService client object.
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 170 def initialize # These require statements are intentionally placed here to initialize # the gRPC module only when it's required. # See https://github.com/googleapis/toolkit/issues/446 require "gapic/grpc" require "google/cloud/channel/v1/service_services_pb" # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @operations_client = Operations.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @config.endpoint config.universe_domain = @config.universe_domain end @cloud_channel_service_stub = ::Gapic::ServiceStub.new( ::Google::Cloud::Channel::V1::CloudChannelService::Stub, credentials: credentials, endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, channel_args: @config.channel_args, interceptors: @config.interceptors, channel_pool_config: @config.channel_pool ) end |
Instance Attribute Details
#operations_client ⇒ ::Google::Cloud::Channel::V1::CloudChannelService::Operations (readonly)
Get the associated client for long-running operations.
222 223 224 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 222 def operations_client @operations_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the CloudChannelService Client class.
See Configuration for a description of the configuration fields.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 81 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "Channel", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.timeout = 60.0 default_config.retry_policy = { initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.provision_cloud_identity.timeout = 60.0 default_config.rpcs.create_entitlement.timeout = 60.0 default_config.rpcs.change_parameters.timeout = 60.0 default_config.rpcs.change_renewal_settings.timeout = 60.0 default_config.rpcs.change_offer.timeout = 60.0 default_config.rpcs.start_paid_service.timeout = 60.0 default_config.rpcs.suspend_entitlement.timeout = 60.0 default_config.rpcs.cancel_entitlement.timeout = 60.0 default_config.rpcs.activate_entitlement.timeout = 60.0 default_config.rpcs.transfer_entitlements.timeout = 60.0 default_config.rpcs.transfer_entitlements_to_google.timeout = 60.0 default_config end yield @configure if block_given? @configure end |
Instance Method Details
#activate_entitlement(request, options = nil) ⇒ ::Gapic::Operation #activate_entitlement(name: nil, request_id: nil) ⇒ ::Gapic::Operation
Activates a previously suspended entitlement. Entitlements suspended for pending ToS acceptance can't be activated using this method.
An entitlement activation is a long-running operation and it updates the state of the customer entitlement.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: Entitlement resource not found.
- SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated suspensions and entitlements that have accepted the TOS.
- NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE state.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 2655 def activate_entitlement request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ActivateEntitlementRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.activate_entitlement..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.activate_entitlement.timeout, metadata: , retry_policy: @config.rpcs.activate_entitlement.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :activate_entitlement, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#cancel_entitlement(request, options = nil) ⇒ ::Gapic::Operation #cancel_entitlement(name: nil, request_id: nil) ⇒ ::Gapic::Operation
Cancels a previously fulfilled entitlement.
An entitlement cancellation is a long-running operation.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- FAILED_PRECONDITION: There are Google Cloud projects linked to the Google Cloud entitlement's Cloud Billing subaccount.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: Entitlement resource not found.
- DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace add-ons, or entitlements for Google Cloud's development platform.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata.
2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 2520 def cancel_entitlement request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CancelEntitlementRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.cancel_entitlement..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.cancel_entitlement.timeout, metadata: , retry_policy: @config.rpcs.cancel_entitlement.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :cancel_entitlement, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#change_offer(request, options = nil) ⇒ ::Gapic::Operation #change_offer(name: nil, offer: nil, parameters: nil, purchase_order_id: nil, request_id: nil, billing_account: nil) ⇒ ::Gapic::Operation
Updates the Offer for an existing customer entitlement.
An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: Offer or Entitlement resource not found.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 2125 def change_offer request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ChangeOfferRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.change_offer..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.change_offer.timeout, metadata: , retry_policy: @config.rpcs.change_offer.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :change_offer, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#change_parameters(request, options = nil) ⇒ ::Gapic::Operation #change_parameters(name: nil, parameters: nil, request_id: nil, purchase_order_id: nil) ⇒ ::Gapic::Operation
Change parameters of the entitlement.
An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid. For example, the number of seats being changed is greater than the allowed number of max seats, or decreasing seats for a commitment based plan.
- NOT_FOUND: Entitlement resource not found.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 1847 def change_parameters request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ChangeParametersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.change_parameters..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.change_parameters.timeout, metadata: , retry_policy: @config.rpcs.change_parameters.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :change_parameters, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#change_renewal_settings(request, options = nil) ⇒ ::Gapic::Operation #change_renewal_settings(name: nil, renewal_settings: nil, request_id: nil) ⇒ ::Gapic::Operation
Updates the renewal settings for an existing customer entitlement.
An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: Entitlement resource not found.
- NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a commitment plan. Can't enable or disable renewals for non-commitment plans.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 1980 def change_renewal_settings request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ChangeRenewalSettingsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.change_renewal_settings..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.change_renewal_settings.timeout, metadata: , retry_policy: @config.rpcs.change_renewal_settings.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :change_renewal_settings, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#check_cloud_identity_accounts_exist(request, options = nil) ⇒ ::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse #check_cloud_identity_accounts_exist(parent: nil, domain: nil, primary_admin_email: nil) ⇒ ::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistResponse
Confirms the existence of Cloud Identity accounts based on the domain and if the Cloud Identity accounts are owned by the reseller.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- INVALID_VALUE: Invalid domain value in the request.
Return value: A list of CloudIdentityCustomerAccount resources for the domain (may be empty)
Note: in the v1alpha1 version of the API, a NOT_FOUND error returns if no CloudIdentityCustomerAccount resources match the domain.
513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 513 def check_cloud_identity_accounts_exist request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CheckCloudIdentityAccountsExistRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.check_cloud_identity_accounts_exist..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.check_cloud_identity_accounts_exist.timeout, metadata: , retry_policy: @config.rpcs.check_cloud_identity_accounts_exist.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :check_cloud_identity_accounts_exist, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#configure {|config| ... } ⇒ Client::Configuration
Configure the CloudChannelService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.
See Configuration for a description of the configuration fields.
140 141 142 143 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 140 def configure yield @config if block_given? @config end |
#create_channel_partner_link(request, options = nil) ⇒ ::Google::Cloud::Channel::V1::ChannelPartnerLink #create_channel_partner_link(parent: nil, channel_partner_link: nil) ⇒ ::Google::Cloud::Channel::V1::ChannelPartnerLink
Initiates a channel partner link between a distributor and a reseller, or between resellers in an n-tier reseller channel. Invited partners need to follow the invite_link_uri provided in the response to accept. After accepting the invitation, a link is set up between the two parties. You must be a distributor to call this method.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- ALREADY_EXISTS: The ChannelPartnerLink sent in the request already exists.
- NOT_FOUND: No Cloud Identity customer exists for provided domain.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The new ChannelPartnerLink resource.
3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 3276 def create_channel_partner_link request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateChannelPartnerLinkRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_channel_partner_link..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_channel_partner_link.timeout, metadata: , retry_policy: @config.rpcs.create_channel_partner_link.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :create_channel_partner_link, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_channel_partner_repricing_config(request, options = nil) ⇒ ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig #create_channel_partner_repricing_config(parent: nil, channel_partner_repricing_config: nil) ⇒ ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig
Creates a ChannelPartnerRepricingConfig. Call this method to set modifications for a specific ChannelPartner's bill. You can only create configs if the RepricingConfig.effective_invoice_month is a future month. If needed, you can create a config for the current month, with some restrictions.
When creating a config for a future month, make sure there are no existing configs for that RepricingConfig.effective_invoice_month.
The following restrictions are for creating configs in the current month.
- This functionality is reserved for recovering from an erroneous config, and should not be used for regular business cases.
- The new config will not modify exports used with other configs. Changes to the config may be immediate, but may take up to 24 hours.
- There is a limit of ten configs for any ChannelPartner or RepricingConfig.EntitlementGranularity.entitlement, for any RepricingConfig.effective_invoice_month.
- The contained ChannelPartnerRepricingConfig.repricing_config value must be different from the value used in the current config for a ChannelPartner.
Possible Error Codes:
- PERMISSION_DENIED: If the account making the request and the account being queried are different.
- INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months.
- NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist or is not associated with the given account.
- INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.
Return Value: If successful, the updated ChannelPartnerRepricingConfig resource, otherwise returns an error.
4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 4361 def create_channel_partner_repricing_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateChannelPartnerRepricingConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_channel_partner_repricing_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_channel_partner_repricing_config.timeout, metadata: , retry_policy: @config.rpcs.create_channel_partner_repricing_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :create_channel_partner_repricing_config, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_customer(request, options = nil) ⇒ ::Google::Cloud::Channel::V1::Customer #create_customer(parent: nil, customer: nil) ⇒ ::Google::Cloud::Channel::V1::Customer
Creates a new Customer resource under the reseller or distributor account.
Possible error codes:
- PERMISSION_DENIED:
- The reseller account making the request is different from the reseller account in the API request.
- You are not authorized to create a customer. See https://support.google.com/channelservices/answer/9759265
- INVALID_ARGUMENT:
- Required request parameters are missing or invalid.
- Domain field value doesn't match the primary email domain.
Return value: The newly created Customer resource.
617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 617 def create_customer request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateCustomerRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_customer..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_customer.timeout, metadata: , retry_policy: @config.rpcs.create_customer.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :create_customer, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_customer_repricing_config(request, options = nil) ⇒ ::Google::Cloud::Channel::V1::CustomerRepricingConfig #create_customer_repricing_config(parent: nil, customer_repricing_config: nil) ⇒ ::Google::Cloud::Channel::V1::CustomerRepricingConfig
Creates a CustomerRepricingConfig. Call this method to set modifications for a specific customer's bill. You can only create configs if the RepricingConfig.effective_invoice_month is a future month. If needed, you can create a config for the current month, with some restrictions.
When creating a config for a future month, make sure there are no existing configs for that RepricingConfig.effective_invoice_month.
The following restrictions are for creating configs in the current month.
- This functionality is reserved for recovering from an erroneous config, and should not be used for regular business cases.
- The new config will not modify exports used with other configs. Changes to the config may be immediate, but may take up to 24 hours.
- There is a limit of ten configs for any RepricingConfig.EntitlementGranularity.entitlement, for any RepricingConfig.effective_invoice_month.
- The contained CustomerRepricingConfig.repricing_config value must be different from the value used in the current config for a RepricingConfig.EntitlementGranularity.entitlement.
Possible Error Codes:
- PERMISSION_DENIED: If the account making the request and the account being queried are different.
- INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months.
- NOT_FOUND: The CustomerRepricingConfig specified does not exist or is not associated with the given account.
- INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.
Return Value: If successful, the updated CustomerRepricingConfig resource, otherwise returns an error.
3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 3764 def create_customer_repricing_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateCustomerRepricingConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_customer_repricing_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_customer_repricing_config.timeout, metadata: , retry_policy: @config.rpcs.create_customer_repricing_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :create_customer_repricing_config, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#create_entitlement(request, options = nil) ⇒ ::Gapic::Operation #create_entitlement(parent: nil, entitlement: nil, request_id: nil) ⇒ ::Gapic::Operation
Creates an entitlement for a customer.
Possible error codes:
- PERMISSION_DENIED:
- The customer doesn't belong to the reseller.
- The reseller is not authorized to transact on this Product. See https://support.google.com/channelservices/answer/9759265
- INVALID_ARGUMENT:
- Required request parameters are missing or invalid.
- There is already a customer entitlement for a SKU from the same product family.
- INVALID_VALUE: Make sure the OfferId is valid. If it is, contact Google Channel support for further troubleshooting.
- NOT_FOUND: The customer or offer resource was not found.
- ALREADY_EXISTS:
- The SKU was already purchased for the customer.
- The customer's primary email already exists. Retry after changing the customer's primary contact email.
- CONDITION_NOT_MET or FAILED_PRECONDITION:
- The domain required for purchasing a SKU has not been verified.
- A pre-requisite SKU required to purchase an Add-On SKU is missing. For example, Google Workspace Business Starter is required to purchase Vault or Drive.
- (Developer accounts only) Reseller and resold domain must meet the
following naming requirements:
- Domain names must start with goog-test.
- Domain names must include the reseller domain.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 1707 def create_entitlement request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::CreateEntitlementRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_entitlement..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_entitlement.timeout, metadata: , retry_policy: @config.rpcs.create_entitlement.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :create_entitlement, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_channel_partner_repricing_config(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_channel_partner_repricing_config(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes the given ChannelPartnerRepricingConfig permanently. You can only delete configs if their RepricingConfig.effective_invoice_month is set to a date after the current month.
Possible error codes:
- PERMISSION_DENIED: The account making the request does not own this customer.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- FAILED_PRECONDITION: The ChannelPartnerRepricingConfig is active or in the past.
- NOT_FOUND: No ChannelPartnerRepricingConfig found for the name in the request.
4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 4581 def delete_channel_partner_repricing_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::DeleteChannelPartnerRepricingConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_channel_partner_repricing_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_channel_partner_repricing_config.timeout, metadata: , retry_policy: @config.rpcs.delete_channel_partner_repricing_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :delete_channel_partner_repricing_config, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_customer(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_customer(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes the given Customer permanently.
Possible error codes:
- PERMISSION_DENIED: The account making the request does not own this customer.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- FAILED_PRECONDITION: The customer has existing entitlements.
- NOT_FOUND: No Customer resource found for the name in the request.
813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 813 def delete_customer request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::DeleteCustomerRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_customer..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_customer.timeout, metadata: , retry_policy: @config.rpcs.delete_customer.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :delete_customer, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_customer_repricing_config(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_customer_repricing_config(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes the given CustomerRepricingConfig permanently. You can only delete configs if their RepricingConfig.effective_invoice_month is set to a date after the current month.
Possible error codes:
- PERMISSION_DENIED: The account making the request does not own this customer.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- FAILED_PRECONDITION: The CustomerRepricingConfig is active or in the past.
- NOT_FOUND: No CustomerRepricingConfig found for the name in the request.
3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 3985 def delete_customer_repricing_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::DeleteCustomerRepricingConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_customer_repricing_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_customer_repricing_config.timeout, metadata: , retry_policy: @config.rpcs.delete_customer_repricing_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :delete_customer_repricing_config, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_channel_partner_link(request, options = nil) ⇒ ::Google::Cloud::Channel::V1::ChannelPartnerLink #get_channel_partner_link(name: nil, view: nil) ⇒ ::Google::Cloud::Channel::V1::ChannelPartnerLink
Returns the requested ChannelPartnerLink resource. You must be a distributor to call this method.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: ChannelPartnerLink resource not found because of an invalid channel partner link name.
Return value: The ChannelPartnerLink resource.
3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 3162 def get_channel_partner_link request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetChannelPartnerLinkRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_channel_partner_link..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_channel_partner_link.timeout, metadata: , retry_policy: @config.rpcs.get_channel_partner_link.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :get_channel_partner_link, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_channel_partner_repricing_config(request, options = nil) ⇒ ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig #get_channel_partner_repricing_config(name: nil) ⇒ ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig
Gets information about how a Distributor modifies their bill before sending it to a ChannelPartner.
Possible Error Codes:
- PERMISSION_DENIED: If the account making the request and the account being queried are different.
- NOT_FOUND: The ChannelPartnerRepricingConfig was not found.
- INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.
Return Value: If successful, the ChannelPartnerRepricingConfig resource, otherwise returns an error.
4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 4089 def get_channel_partner_repricing_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetChannelPartnerRepricingConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_channel_partner_repricing_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_channel_partner_repricing_config.timeout, metadata: , retry_policy: @config.rpcs.get_channel_partner_repricing_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :get_channel_partner_repricing_config, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_customer(request, options = nil) ⇒ ::Google::Cloud::Channel::V1::Customer #get_customer(name: nil) ⇒ ::Google::Cloud::Channel::V1::Customer
Returns the requested Customer resource.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: The customer resource doesn't exist. Usually the result of an invalid name parameter.
Return value: The Customer resource.
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 401 def get_customer request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetCustomerRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_customer..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_customer.timeout, metadata: , retry_policy: @config.rpcs.get_customer.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :get_customer, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_customer_repricing_config(request, options = nil) ⇒ ::Google::Cloud::Channel::V1::CustomerRepricingConfig #get_customer_repricing_config(name: nil) ⇒ ::Google::Cloud::Channel::V1::CustomerRepricingConfig
Gets information about how a Reseller modifies their bill before sending it to a Customer.
Possible Error Codes:
- PERMISSION_DENIED: If the account making the request and the account being queried are different.
- NOT_FOUND: The CustomerRepricingConfig was not found.
- INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.
Return Value: If successful, the CustomerRepricingConfig resource, otherwise returns an error.
3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 3496 def get_customer_repricing_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetCustomerRepricingConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_customer_repricing_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_customer_repricing_config.timeout, metadata: , retry_policy: @config.rpcs.get_customer_repricing_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :get_customer_repricing_config, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_entitlement(request, options = nil) ⇒ ::Google::Cloud::Channel::V1::Entitlement #get_entitlement(name: nil) ⇒ ::Google::Cloud::Channel::V1::Entitlement
Returns the requested Entitlement resource.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: The customer entitlement was not found.
Return value: The requested Entitlement resource.
1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 1559 def get_entitlement request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::GetEntitlementRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_entitlement..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_entitlement.timeout, metadata: , retry_policy: @config.rpcs.get_entitlement.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :get_entitlement, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#import_customer(request, options = nil) ⇒ ::Google::Cloud::Channel::V1::Customer #import_customer(domain: nil, cloud_identity_id: nil, primary_admin_email: nil, parent: nil, auth_token: nil, overwrite_if_exists: nil, channel_partner_id: nil, customer: nil) ⇒ ::Google::Cloud::Channel::V1::Customer
Imports a Customer from the Cloud Identity associated with the provided Cloud Identity ID or domain before a TransferEntitlements call. If a linked Customer already exists and overwrite_if_exists is true, it will update that Customer's data.
Possible error codes:
- PERMISSION_DENIED:
- The reseller account making the request is different from the reseller account in the API request.
- You are not authorized to import the customer. See https://support.google.com/channelservices/answer/9759265
- NOT_FOUND: Cloud Identity doesn't exist or was deleted.
- INVALID_ARGUMENT: Required parameters are missing, or the auth_token is expired or invalid.
- ALREADY_EXISTS: A customer already exists and has conflicting critical fields. Requires an overwrite.
Return value: The Customer.
944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 944 def import_customer request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ImportCustomerRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.import_customer..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.import_customer.timeout, metadata: , retry_policy: @config.rpcs.import_customer.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :import_customer, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_channel_partner_links(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerLink> #list_channel_partner_links(parent: nil, page_size: nil, page_token: nil, view: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerLink>
List ChannelPartnerLinks belonging to a distributor. You must be a distributor to call this method.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
Return value: The list of the distributor account's ChannelPartnerLink resources.
3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 3057 def list_channel_partner_links request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListChannelPartnerLinksRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_channel_partner_links..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_channel_partner_links.timeout, metadata: , retry_policy: @config.rpcs.list_channel_partner_links.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :list_channel_partner_links, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_channel_partner_links, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_channel_partner_repricing_configs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig> #list_channel_partner_repricing_configs(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig>
Lists information about how a Reseller modifies their bill before sending it to a ChannelPartner.
Possible Error Codes:
- PERMISSION_DENIED: If the account making the request and the account being queried are different.
- NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist or is not associated with the given account.
- INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.
Return Value: If successful, the ChannelPartnerRepricingConfig resources. The data for each resource is displayed in the ascending order of:
- Channel Partner ID
- RepricingConfig.effective_invoice_month
- ChannelPartnerRepricingConfig.update_time
If unsuccessful, returns an error.
4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 4228 def list_channel_partner_repricing_configs request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListChannelPartnerRepricingConfigsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_channel_partner_repricing_configs..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_channel_partner_repricing_configs.timeout, metadata: , retry_policy: @config.rpcs.list_channel_partner_repricing_configs.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :list_channel_partner_repricing_configs, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_channel_partner_repricing_configs, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_customer_repricing_configs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::CustomerRepricingConfig> #list_customer_repricing_configs(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::CustomerRepricingConfig>
Lists information about how a Reseller modifies their bill before sending it to a Customer.
Possible Error Codes:
- PERMISSION_DENIED: If the account making the request and the account being queried are different.
- NOT_FOUND: The CustomerRepricingConfig specified does not exist or is not associated with the given account.
- INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.
Return Value: If successful, the CustomerRepricingConfig resources. The data for each resource is displayed in the ascending order of:
- Customer ID
- RepricingConfig.EntitlementGranularity.entitlement
- RepricingConfig.effective_invoice_month
- CustomerRepricingConfig.update_time
If unsuccessful, returns an error.
3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 3632 def list_customer_repricing_configs request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListCustomerRepricingConfigsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_customer_repricing_configs..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_customer_repricing_configs.timeout, metadata: , retry_policy: @config.rpcs.list_customer_repricing_configs.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :list_customer_repricing_configs, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_customer_repricing_configs, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_customers(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Customer> #list_customers(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Customer>
List Customers.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
Return value: List of Customers, or an empty list if there are no customers.
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 301 def list_customers request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListCustomersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_customers..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_customers.timeout, metadata: , retry_policy: @config.rpcs.list_customers.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :list_customers, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_customers, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_entitlement_changes(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::EntitlementChange> #list_entitlement_changes(parent: nil, page_size: nil, page_token: nil, filter: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::EntitlementChange>
List entitlement history.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different.
- INVALID_ARGUMENT: Missing or invalid required fields in the request.
- NOT_FOUND: The parent resource doesn't exist. Usually the result of an invalid name parameter.
- INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact CloudChannel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
Return value: List of EntitlementChanges.
6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 6030 def list_entitlement_changes request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListEntitlementChangesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_entitlement_changes..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_entitlement_changes.timeout, metadata: , retry_policy: @config.rpcs.list_entitlement_changes.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :list_entitlement_changes, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_entitlement_changes, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_entitlements(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Entitlement> #list_entitlements(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Entitlement>
Lists Entitlements belonging to a customer.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
Return value: A list of the customer's Entitlements.
1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 1181 def list_entitlements request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListEntitlementsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_entitlements..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_entitlements.timeout, metadata: , retry_policy: @config.rpcs.list_entitlements.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :list_entitlements, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_entitlements, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_offers(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Offer> #list_offers(parent: nil, page_size: nil, page_token: nil, filter: nil, language_code: nil, show_future_offers: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Offer>
Lists the Offers the reseller can sell.
Possible error codes:
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 5244 def list_offers request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListOffersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_offers..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_offers.timeout, metadata: , retry_policy: @config.rpcs.list_offers.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :list_offers, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_offers, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_products(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Product> #list_products(account: nil, page_size: nil, page_token: nil, language_code: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Product>
Lists the Products the reseller is authorized to sell.
Possible error codes:
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 5024 def list_products request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListProductsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_products..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id .apply_defaults timeout: @config.rpcs.list_products.timeout, metadata: , retry_policy: @config.rpcs.list_products.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :list_products, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_products, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_purchasable_offers(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableOffer> #list_purchasable_offers(create_entitlement_purchase: nil, change_offer_purchase: nil, customer: nil, page_size: nil, page_token: nil, language_code: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableOffer>
Lists the following:
- Offers that you can purchase for a customer.
- Offers that you can change for an entitlement.
Possible error codes:
- PERMISSION_DENIED:
- The customer doesn't belong to the reseller
- The reseller is not authorized to transact on this Product. See https://support.google.com/channelservices/answer/9759265
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 5475 def list_purchasable_offers request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListPurchasableOffersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_purchasable_offers..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.customer header_params["customer"] = request.customer end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_purchasable_offers.timeout, metadata: , retry_policy: @config.rpcs.list_purchasable_offers.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :list_purchasable_offers, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_purchasable_offers, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_purchasable_skus(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableSku> #list_purchasable_skus(create_entitlement_purchase: nil, change_offer_purchase: nil, customer: nil, page_size: nil, page_token: nil, language_code: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::PurchasableSku>
Lists the following:
- SKUs that you can purchase for a customer
- SKUs that you can upgrade or downgrade for an entitlement.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 5358 def list_purchasable_skus request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListPurchasableSkusRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_purchasable_skus..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.customer header_params["customer"] = request.customer end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_purchasable_skus.timeout, metadata: , retry_policy: @config.rpcs.list_purchasable_skus.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :list_purchasable_skus, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_purchasable_skus, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_sku_group_billable_skus(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::BillableSku> #list_sku_group_billable_skus(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::BillableSku>
Lists the Billable SKUs in a given SKU group.
Possible error codes: PERMISSION_DENIED: If the account making the request and the account being queried for are different, or the account doesn't exist. INVALID_ARGUMENT: Missing or invalid required parameters in the request. INTERNAL: Any non-user error related to technical issue in the backend. In this case, contact cloud channel support.
Return Value: If successful, the BillableSku resources. The data for each resource is displayed in the ascending order of:
If unsuccessful, returns an error.
4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 4821 def list_sku_group_billable_skus request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSkuGroupBillableSkusRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_sku_group_billable_skus..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_sku_group_billable_skus.timeout, metadata: , retry_policy: @config.rpcs.list_sku_group_billable_skus.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :list_sku_group_billable_skus, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_sku_group_billable_skus, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_sku_groups(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::SkuGroup> #list_sku_groups(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::SkuGroup>
Lists the Rebilling supported SKU groups the account is authorized to sell. Reference: https://cloud.google.com/skus/sku-groups
Possible Error Codes:
- PERMISSION_DENIED: If the account making the request and the account being queried are different, or the account doesn't exist.
- INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.
Return Value: If successful, the SkuGroup resources. The data for each resource is displayed in the alphabetical order of SKU group display name. The data for each resource is displayed in the ascending order of SkuGroup.display_name
If unsuccessful, returns an error.
4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 4701 def list_sku_groups request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSkuGroupsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_sku_groups..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_sku_groups.timeout, metadata: , retry_policy: @config.rpcs.list_sku_groups.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :list_sku_groups, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_sku_groups, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_skus(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Sku> #list_skus(parent: nil, account: nil, page_size: nil, page_token: nil, language_code: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::Sku>
Lists the SKUs for a product the reseller is authorized to sell.
Possible error codes:
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 5127 def list_skus request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSkusRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_skus..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_skus.timeout, metadata: , retry_policy: @config.rpcs.list_skus.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :list_skus, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_skus, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_subscribers(request, options = nil) ⇒ ::Google::Cloud::Channel::V1::ListSubscribersResponse #list_subscribers(account: nil, page_size: nil, page_token: nil) ⇒ ::Google::Cloud::Channel::V1::ListSubscribersResponse
Lists service accounts with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: The topic resource doesn't exist.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: A list of service email addresses.
5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 5905 def list_subscribers request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListSubscribersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_subscribers..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.account header_params["account"] = request.account end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_subscribers.timeout, metadata: , retry_policy: @config.rpcs.list_subscribers.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :list_subscribers, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_transferable_offers(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableOffer> #list_transferable_offers(cloud_identity_id: nil, customer_name: nil, parent: nil, page_size: nil, page_token: nil, sku: nil, language_code: nil, billing_account: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableOffer>
List TransferableOffers of a customer based on Cloud Identity ID or Customer Name in the request.
Use this method when a reseller gets the entitlement information of an unowned customer. The reseller should provide the customer's Cloud Identity ID or Customer Name.
Possible error codes:
- PERMISSION_DENIED:
- The customer doesn't belong to the reseller and has no auth token.
- The customer provided incorrect reseller information when generating auth token.
- The reseller account making the request is different from the reseller account in the query.
- The reseller is not authorized to transact on this Product. See https://support.google.com/channelservices/answer/9759265
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
Return value: List of TransferableOffer for the given customer and SKU.
1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 1460 def list_transferable_offers request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListTransferableOffersRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_transferable_offers..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_transferable_offers.timeout, metadata: , retry_policy: @config.rpcs.list_transferable_offers.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :list_transferable_offers, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_transferable_offers, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_transferable_skus(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableSku> #list_transferable_skus(cloud_identity_id: nil, customer_name: nil, parent: nil, page_size: nil, page_token: nil, auth_token: nil, language_code: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Channel::V1::TransferableSku>
List TransferableSkus of a customer based on the Cloud Identity ID or Customer Name in the request.
Use this method to list the entitlements information of an unowned customer. You should provide the customer's Cloud Identity ID or Customer Name.
Possible error codes:
- PERMISSION_DENIED:
- The customer doesn't belong to the reseller and has no auth token.
- The supplied auth token is invalid.
- The reseller account making the request is different from the reseller account in the query.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
Return value: A list of the customer's TransferableSku.
1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 1320 def list_transferable_skus request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ListTransferableSkusRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_transferable_skus..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_transferable_skus.timeout, metadata: , retry_policy: @config.rpcs.list_transferable_skus.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :list_transferable_skus, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @cloud_channel_service_stub, :list_transferable_skus, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#lookup_offer(request, options = nil) ⇒ ::Google::Cloud::Channel::V1::Offer #lookup_offer(entitlement: nil) ⇒ ::Google::Cloud::Channel::V1::Offer
4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 4919 def lookup_offer request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::LookupOfferRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.lookup_offer..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.entitlement header_params["entitlement"] = request.entitlement end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.lookup_offer.timeout, metadata: , retry_policy: @config.rpcs.lookup_offer.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :lookup_offer, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#provision_cloud_identity(request, options = nil) ⇒ ::Gapic::Operation #provision_cloud_identity(customer: nil, cloud_identity_info: nil, user: nil, validate_only: nil) ⇒ ::Gapic::Operation
Creates a Cloud Identity for the given customer using the customer's information, or the information provided here.
Possible error codes:
- PERMISSION_DENIED:
- The customer doesn't belong to the reseller.
- You are not authorized to provision cloud identity id. See https://support.google.com/channelservices/answer/9759265
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: The customer was not found.
- ALREADY_EXISTS: The customer's primary email already exists. Retry after changing the customer's primary contact email.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata contains an instance of OperationMetadata.
1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 1067 def provision_cloud_identity request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::ProvisionCloudIdentityRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.provision_cloud_identity..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.customer header_params["customer"] = request.customer end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.provision_cloud_identity.timeout, metadata: , retry_policy: @config.rpcs.provision_cloud_identity.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :provision_cloud_identity, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#query_eligible_billing_accounts(request, options = nil) ⇒ ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse #query_eligible_billing_accounts(customer: nil, skus: nil) ⇒ ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsResponse
Lists the billing accounts that are eligible to purchase particular SKUs for a given customer.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
Return value: Based on the provided list of SKUs, returns a list of SKU groups that must be purchased using the same billing account and the billing accounts eligible to purchase each SKU group.
5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 5577 def query_eligible_billing_accounts request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::QueryEligibleBillingAccountsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.query_eligible_billing_accounts..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.customer header_params["customer"] = request.customer end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.query_eligible_billing_accounts.timeout, metadata: , retry_policy: @config.rpcs.query_eligible_billing_accounts.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :query_eligible_billing_accounts, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#register_subscriber(request, options = nil) ⇒ ::Google::Cloud::Channel::V1::RegisterSubscriberResponse #register_subscriber(account: nil, service_account: nil) ⇒ ::Google::Cloud::Channel::V1::RegisterSubscriberResponse
Registers a service account with subscriber privileges on the Cloud Pub/Sub topic for this Channel Services account. After you create a subscriber, you get the events through SubscriberEvent
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The topic name with the registered service email address.
5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 5683 def register_subscriber request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::RegisterSubscriberRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.register_subscriber..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.account header_params["account"] = request.account end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.register_subscriber.timeout, metadata: , retry_policy: @config.rpcs.register_subscriber.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :register_subscriber, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#start_paid_service(request, options = nil) ⇒ ::Gapic::Operation #start_paid_service(name: nil, request_id: nil) ⇒ ::Gapic::Operation
Starts paid service for a trial entitlement.
Starts paid service for a trial entitlement immediately. This method is only applicable if a plan is set up for a trial entitlement but has some trial days remaining.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: Entitlement resource not found.
- FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for entitlement on trial plans.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 2257 def start_paid_service request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::StartPaidServiceRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.start_paid_service..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.start_paid_service.timeout, metadata: , retry_policy: @config.rpcs.start_paid_service.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :start_paid_service, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#suspend_entitlement(request, options = nil) ⇒ ::Gapic::Operation #suspend_entitlement(name: nil, request_id: nil) ⇒ ::Gapic::Operation
Suspends a previously fulfilled entitlement.
An entitlement suspension is a long-running operation.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: Entitlement resource not found.
- NOT_ACTIVE: Entitlement is not active.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 2386 def suspend_entitlement request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::SuspendEntitlementRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.suspend_entitlement..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.suspend_entitlement.timeout, metadata: , retry_policy: @config.rpcs.suspend_entitlement.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :suspend_entitlement, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#transfer_entitlements(request, options = nil) ⇒ ::Gapic::Operation #transfer_entitlements(parent: nil, entitlements: nil, auth_token: nil, request_id: nil) ⇒ ::Gapic::Operation
Transfers customer entitlements to new reseller.
Possible error codes:
- PERMISSION_DENIED:
- The customer doesn't belong to the reseller.
- The reseller is not authorized to transact on this Product. See https://support.google.com/channelservices/answer/9759265
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: The customer or offer resource was not found.
- ALREADY_EXISTS: The SKU was already transferred for the customer.
- CONDITION_NOT_MET or FAILED_PRECONDITION:
- The SKU requires domain verification to transfer, but the domain is not verified.
- An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic).
- (Developer accounts only) Reseller and resold domain must meet the
following naming requirements:
- Domain names must start with goog-test.
- Domain names must include the reseller domain.
- Specify all transferring entitlements.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 2802 def transfer_entitlements request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::TransferEntitlementsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.transfer_entitlements..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.transfer_entitlements.timeout, metadata: , retry_policy: @config.rpcs.transfer_entitlements.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :transfer_entitlements, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#transfer_entitlements_to_google(request, options = nil) ⇒ ::Gapic::Operation #transfer_entitlements_to_google(parent: nil, entitlements: nil, request_id: nil) ⇒ ::Gapic::Operation
Transfers customer entitlements from their current reseller to Google.
Possible error codes:
- PERMISSION_DENIED: The customer doesn't belong to the reseller.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: The customer or offer resource was not found.
- ALREADY_EXISTS: The SKU was already transferred for the customer.
- CONDITION_NOT_MET or FAILED_PRECONDITION:
- The SKU requires domain verification to transfer, but the domain is not verified.
- An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic).
- (Developer accounts only) Reseller and resold domain must meet the
following naming requirements:
- Domain names must start with goog-test.
- Domain names must include the reseller domain.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The ID of a long-running operation.
To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata.
2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 2941 def transfer_entitlements_to_google request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::TransferEntitlementsToGoogleRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.transfer_entitlements_to_google..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.transfer_entitlements_to_google.timeout, metadata: , retry_policy: @config.rpcs.transfer_entitlements_to_google.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :transfer_entitlements_to_google, request, options: do |response, operation| response = ::Gapic::Operation.new response, @operations_client, options: yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
150 151 152 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 150 def universe_domain @cloud_channel_service_stub.universe_domain end |
#unregister_subscriber(request, options = nil) ⇒ ::Google::Cloud::Channel::V1::UnregisterSubscriberResponse #unregister_subscriber(account: nil, service_account: nil) ⇒ ::Google::Cloud::Channel::V1::UnregisterSubscriberResponse
Unregisters a service account with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account. If there are no service accounts left with subscriber privileges, this deletes the topic. You can call ListSubscribers to check for these accounts.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: The topic resource doesn't exist.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The topic name that unregistered the service email address. Returns a success response if the service email address wasn't registered with the topic.
5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 5792 def unregister_subscriber request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UnregisterSubscriberRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.unregister_subscriber..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.account header_params["account"] = request.account end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.unregister_subscriber.timeout, metadata: , retry_policy: @config.rpcs.unregister_subscriber.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :unregister_subscriber, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#update_channel_partner_link(request, options = nil) ⇒ ::Google::Cloud::Channel::V1::ChannelPartnerLink #update_channel_partner_link(name: nil, channel_partner_link: nil, update_mask: nil) ⇒ ::Google::Cloud::Channel::V1::ChannelPartnerLink
Updates a channel partner link. Distributors call this method to change a link's status. For example, to suspend a partner link. You must be a distributor to call this method.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- INVALID_ARGUMENT:
- Required request parameters are missing or invalid.
- Link state cannot change from invited to active or suspended.
- Cannot send reseller_cloud_identity_id, invite_url, or name in update mask.
- NOT_FOUND: ChannelPartnerLink resource not found.
- INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
- UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
Return value: The updated ChannelPartnerLink resource.
3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 3392 def update_channel_partner_link request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateChannelPartnerLinkRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_channel_partner_link..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_channel_partner_link.timeout, metadata: , retry_policy: @config.rpcs.update_channel_partner_link.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :update_channel_partner_link, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#update_channel_partner_repricing_config(request, options = nil) ⇒ ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig #update_channel_partner_repricing_config(channel_partner_repricing_config: nil) ⇒ ::Google::Cloud::Channel::V1::ChannelPartnerRepricingConfig
Updates a ChannelPartnerRepricingConfig. Call this method to set modifications for a specific ChannelPartner's bill. This method overwrites the existing CustomerRepricingConfig.
You can only update configs if the RepricingConfig.effective_invoice_month is a future month. To make changes to configs for the current month, use CreateChannelPartnerRepricingConfig, taking note of its restrictions. You cannot update the RepricingConfig.effective_invoice_month.
When updating a config in the future:
- This config must already exist.
Possible Error Codes:
- PERMISSION_DENIED: If the account making the request and the account being queried are different.
- INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months.
- NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist or is not associated with the given account.
- INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.
Return Value: If successful, the updated ChannelPartnerRepricingConfig resource, otherwise returns an error.
4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 4478 def update_channel_partner_repricing_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateChannelPartnerRepricingConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_channel_partner_repricing_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.channel_partner_repricing_config&.name header_params["channel_partner_repricing_config.name"] = request.channel_partner_repricing_config.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_channel_partner_repricing_config.timeout, metadata: , retry_policy: @config.rpcs.update_channel_partner_repricing_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :update_channel_partner_repricing_config, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#update_customer(request, options = nil) ⇒ ::Google::Cloud::Channel::V1::Customer #update_customer(customer: nil, update_mask: nil) ⇒ ::Google::Cloud::Channel::V1::Customer
Updates an existing Customer resource for the reseller or distributor.
Possible error codes:
- PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
- INVALID_ARGUMENT: Required request parameters are missing or invalid.
- NOT_FOUND: No Customer resource found for the name in the request.
Return value: The updated Customer resource.
718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 718 def update_customer request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateCustomerRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_customer..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.customer&.name header_params["customer.name"] = request.customer.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_customer.timeout, metadata: , retry_policy: @config.rpcs.update_customer.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :update_customer, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#update_customer_repricing_config(request, options = nil) ⇒ ::Google::Cloud::Channel::V1::CustomerRepricingConfig #update_customer_repricing_config(customer_repricing_config: nil) ⇒ ::Google::Cloud::Channel::V1::CustomerRepricingConfig
Updates a CustomerRepricingConfig. Call this method to set modifications for a specific customer's bill. This method overwrites the existing CustomerRepricingConfig.
You can only update configs if the RepricingConfig.effective_invoice_month is a future month. To make changes to configs for the current month, use CreateCustomerRepricingConfig, taking note of its restrictions. You cannot update the RepricingConfig.effective_invoice_month.
When updating a config in the future:
- This config must already exist.
Possible Error Codes:
- PERMISSION_DENIED: If the account making the request and the account being queried are different.
- INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months.
- NOT_FOUND: The CustomerRepricingConfig specified does not exist or is not associated with the given account.
- INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.
Return Value: If successful, the updated CustomerRepricingConfig resource, otherwise returns an error.
3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 |
# File 'lib/google/cloud/channel/v1/cloud_channel_service/client.rb', line 3881 def update_customer_repricing_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Channel::V1::UpdateCustomerRepricingConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_customer_repricing_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Channel::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.customer_repricing_config&.name header_params["customer_repricing_config.name"] = request.customer_repricing_config.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_customer_repricing_config.timeout, metadata: , retry_policy: @config.rpcs.update_customer_repricing_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @cloud_channel_service_stub.call_rpc :update_customer_repricing_config, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |