Skip to content

Commit

Permalink
feat: Add billing account to entitlement definitions for Cloud Channe…
Browse files Browse the repository at this point in the history
…l API (#6184)

PiperOrigin-RevId: 529744735
Source-Link: googleapis/googleapis@1ebad32
Source-Link: googleapis/googleapis-gen@bef559b
Copy-Tag: eyJwIjoiQ2hhbm5lbC8uT3dsQm90LnlhbWwiLCJoIjoiYmVmNTU5YjJmYzEwYzA2M2JhNjNkMmJjMzAxOGU5YWYxZTA2YzRkNiJ9
  • Loading branch information
gcf-owl-bot[bot] authored May 5, 2023
1 parent 5c2bf22 commit c24fd21
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 4 deletions.
Binary file modified Channel/metadata/V1/Entitlements.php
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
* [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
* resources. The data for each resource is displayed in the ascending order
* of:
* * channel partner ID
*
* * Channel Partner ID
* * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
* * [ChannelPartnerRepricingConfig.update_time][google.cloud.channel.v1.ChannelPartnerRepricingConfig.update_time]
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
* [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
* resources. The data for each resource is displayed in the ascending order
* of:
* * customer ID
*
* * Customer ID
* * [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement]
* * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
* * [CustomerRepricingConfig.update_time][google.cloud.channel.v1.CustomerRepricingConfig.update_time]
Expand Down
38 changes: 38 additions & 0 deletions Channel/src/V1/Entitlement.php

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

6 changes: 4 additions & 2 deletions Channel/src/V1/Gapic/CloudChannelServiceGapicClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -2256,7 +2256,8 @@ public function listChannelPartnerLinks($parent, array $optionalArgs = [])
* [ChannelPartnerRepricingConfig][google.cloud.channel.v1.ChannelPartnerRepricingConfig]
* resources. The data for each resource is displayed in the ascending order
* of:
* * channel partner ID
*
* * Channel Partner ID
* * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
* * [ChannelPartnerRepricingConfig.update_time][google.cloud.channel.v1.ChannelPartnerRepricingConfig.update_time]
*
Expand Down Expand Up @@ -2365,7 +2366,8 @@ public function listChannelPartnerRepricingConfigs($parent, array $optionalArgs
* [CustomerRepricingConfig][google.cloud.channel.v1.CustomerRepricingConfig]
* resources. The data for each resource is displayed in the ascending order
* of:
* * customer ID
*
* * Customer ID
* * [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement]
* * [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
* * [CustomerRepricingConfig.update_time][google.cloud.channel.v1.CustomerRepricingConfig.update_time]
Expand Down
16 changes: 16 additions & 0 deletions Channel/tests/Unit/V1/CloudChannelServiceClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,12 @@ public function activateEntitlementTest()
$name2 = 'name2-1052831874';
$offer = 'offer105650780';
$purchaseOrderId = 'purchaseOrderId548224298';
$billingAccount = 'billingAccount-545871767';
$expectedResponse = new Entitlement();
$expectedResponse->setName($name2);
$expectedResponse->setOffer($offer);
$expectedResponse->setPurchaseOrderId($purchaseOrderId);
$expectedResponse->setBillingAccount($billingAccount);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
Expand Down Expand Up @@ -367,10 +369,12 @@ public function changeOfferTest()
$name2 = 'name2-1052831874';
$offer2 = 'offer2-1548812529';
$purchaseOrderId2 = 'purchaseOrderId2-1437424035';
$billingAccount = 'billingAccount-545871767';
$expectedResponse = new Entitlement();
$expectedResponse->setName($name2);
$expectedResponse->setOffer($offer2);
$expectedResponse->setPurchaseOrderId($purchaseOrderId2);
$expectedResponse->setBillingAccount($billingAccount);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
Expand Down Expand Up @@ -494,10 +498,12 @@ public function changeParametersTest()
$name2 = 'name2-1052831874';
$offer = 'offer105650780';
$purchaseOrderId2 = 'purchaseOrderId2-1437424035';
$billingAccount = 'billingAccount-545871767';
$expectedResponse = new Entitlement();
$expectedResponse->setName($name2);
$expectedResponse->setOffer($offer);
$expectedResponse->setPurchaseOrderId($purchaseOrderId2);
$expectedResponse->setBillingAccount($billingAccount);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
Expand Down Expand Up @@ -621,10 +627,12 @@ public function changeRenewalSettingsTest()
$name2 = 'name2-1052831874';
$offer = 'offer105650780';
$purchaseOrderId = 'purchaseOrderId548224298';
$billingAccount = 'billingAccount-545871767';
$expectedResponse = new Entitlement();
$expectedResponse->setName($name2);
$expectedResponse->setOffer($offer);
$expectedResponse->setPurchaseOrderId($purchaseOrderId);
$expectedResponse->setBillingAccount($billingAccount);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
Expand Down Expand Up @@ -1138,10 +1146,12 @@ public function createEntitlementTest()
$name = 'name3373707';
$offer = 'offer105650780';
$purchaseOrderId = 'purchaseOrderId548224298';
$billingAccount = 'billingAccount-545871767';
$expectedResponse = new Entitlement();
$expectedResponse->setName($name);
$expectedResponse->setOffer($offer);
$expectedResponse->setPurchaseOrderId($purchaseOrderId);
$expectedResponse->setBillingAccount($billingAccount);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
Expand Down Expand Up @@ -1688,10 +1698,12 @@ public function getEntitlementTest()
$name2 = 'name2-1052831874';
$offer = 'offer105650780';
$purchaseOrderId = 'purchaseOrderId548224298';
$billingAccount = 'billingAccount-545871767';
$expectedResponse = new Entitlement();
$expectedResponse->setName($name2);
$expectedResponse->setOffer($offer);
$expectedResponse->setPurchaseOrderId($purchaseOrderId);
$expectedResponse->setBillingAccount($billingAccount);
$transport->addResponse($expectedResponse);
// Mock request
$formattedName = $gapicClient->entitlementName('[ACCOUNT]', '[CUSTOMER]', '[ENTITLEMENT]');
Expand Down Expand Up @@ -3069,10 +3081,12 @@ public function startPaidServiceTest()
$name2 = 'name2-1052831874';
$offer = 'offer105650780';
$purchaseOrderId = 'purchaseOrderId548224298';
$billingAccount = 'billingAccount-545871767';
$expectedResponse = new Entitlement();
$expectedResponse->setName($name2);
$expectedResponse->setOffer($offer);
$expectedResponse->setPurchaseOrderId($purchaseOrderId);
$expectedResponse->setBillingAccount($billingAccount);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
Expand Down Expand Up @@ -3192,10 +3206,12 @@ public function suspendEntitlementTest()
$name2 = 'name2-1052831874';
$offer = 'offer105650780';
$purchaseOrderId = 'purchaseOrderId548224298';
$billingAccount = 'billingAccount-545871767';
$expectedResponse = new Entitlement();
$expectedResponse->setName($name2);
$expectedResponse->setOffer($offer);
$expectedResponse->setPurchaseOrderId($purchaseOrderId);
$expectedResponse->setBillingAccount($billingAccount);
$anyResponse = new Any();
$anyResponse->setValue($expectedResponse->serializeToString());
$completeOperation = new Operation();
Expand Down

0 comments on commit c24fd21

Please sign in to comment.