Skip to content

Commit

Permalink
feat: add show_future_offers to ListOffers (#5962)
Browse files Browse the repository at this point in the history
feat: add ListEntitlementChanges
PiperOrigin-RevId: 516294330
Source-Link: googleapis/googleapis@c0eb8fa
Source-Link: googleapis/googleapis-gen@7217f21
Copy-Tag: eyJwIjoiQ2hhbm5lbC8uT3dsQm90LnlhbWwiLCJoIjoiNzIxN2YyMTJjNDFkNmVjMzVkMzVhZjYxYjU4N2JkZWU5MmViZDExYSJ9
  • Loading branch information
gcf-owl-bot[bot] committed Mar 14, 2023
1 parent 36bfd15 commit 150d787
Show file tree
Hide file tree
Showing 21 changed files with 1,620 additions and 15 deletions.
7 changes: 4 additions & 3 deletions Channel/metadata/V1/Customers.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Channel/metadata/V1/EntitlementChanges.php
Binary file not shown.
Binary file modified Channel/metadata/V1/ReportsService.php
Binary file not shown.
Binary file modified Channel/metadata/V1/Service.php
Binary file not shown.
@@ -0,0 +1,95 @@
<?php
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/*
* GENERATED CODE WARNING
* This file was automatically generated - do not edit!
*/

require_once __DIR__ . '/../../../vendor/autoload.php';

// [START cloudchannel_v1_generated_CloudChannelService_ListEntitlementChanges_sync]
use Google\ApiCore\ApiException;
use Google\ApiCore\PagedListResponse;
use Google\Cloud\Channel\V1\CloudChannelServiceClient;
use 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 [EntitlementChange][google.cloud.channel.v1.EntitlementChange]s.
*
* @param string $formattedParent The resource name of the entitlement for which to list
* entitlement changes. The `-` wildcard may be used to match entitlements
* across a customer. Formats:
*
* * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
* * accounts/{account_id}/customers/{customer_id}/entitlements/-
* Please see {@see CloudChannelServiceClient::entitlementName()} for help formatting this field.
*/
function list_entitlement_changes_sample(string $formattedParent): void
{
// Create a client.
$cloudChannelServiceClient = new CloudChannelServiceClient();

// Call the API and handle any network failures.
try {
/** @var PagedListResponse $response */
$response = $cloudChannelServiceClient->listEntitlementChanges($formattedParent);

/** @var EntitlementChange $element */
foreach ($response as $element) {
printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString());
}
} catch (ApiException $ex) {
printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}
}

/**
* Helper to execute the sample.
*
* This sample has been automatically generated and should be regarded as a code
* template only. It will require modifications to work:
* - It may require correct/in-range values for request initialization.
* - It may require specifying regional endpoints when creating the service client,
* please see the apiEndpoint client configuration option for more details.
*/
function callSample(): void
{
$formattedParent = CloudChannelServiceClient::entitlementName(
'[ACCOUNT]',
'[CUSTOMER]',
'[ENTITLEMENT]'
);

list_entitlement_changes_sample($formattedParent);
}
// [END cloudchannel_v1_generated_CloudChannelService_ListEntitlementChanges_sync]
38 changes: 38 additions & 0 deletions Channel/src/V1/Customer.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 32 additions & 12 deletions Channel/src/V1/Entitlement.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 150d787

Please sign in to comment.