Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit f3a411b

Browse files
feat: Add billing account to entitlement definitions for Cloud Channel API (#233)
* feat: Add billing account to entitlement definitions for Cloud Channel API PiperOrigin-RevId: 529744735 Source-Link: googleapis/googleapis@1ebad32 Source-Link: https://github.com/googleapis/googleapis-gen/commit/bef559b2fc10c063ba63d2bc3018e9af1e06c4d6 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmVmNTU5YjJmYzEwYzA2M2JhNjNkMmJjMzAxOGU5YWYxZTA2YzRkNiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 58999a6 commit f3a411b

7 files changed

Lines changed: 20 additions & 9 deletions

File tree

google/cloud/channel_v1/services/cloud_channel_service/async_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3400,7 +3400,7 @@ async def list_customer_repricing_configs(
34003400
resources. The data for each resource is displayed in the
34013401
ascending order of:
34023402
3403-
- customer ID
3403+
- Customer ID
34043404
- [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement]
34053405
- [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
34063406
- [CustomerRepricingConfig.update_time][google.cloud.channel.v1.CustomerRepricingConfig.update_time]
@@ -4087,7 +4087,7 @@ async def list_channel_partner_repricing_configs(
40874087
resources. The data for each resource is displayed in the
40884088
ascending order of:
40894089
4090-
- channel partner ID
4090+
- Channel Partner ID
40914091
- [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
40924092
- [ChannelPartnerRepricingConfig.update_time][google.cloud.channel.v1.ChannelPartnerRepricingConfig.update_time]
40934093

google/cloud/channel_v1/services/cloud_channel_service/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3766,7 +3766,7 @@ def list_customer_repricing_configs(
37663766
resources. The data for each resource is displayed in the
37673767
ascending order of:
37683768
3769-
- customer ID
3769+
- Customer ID
37703770
- [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement]
37713771
- [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
37723772
- [CustomerRepricingConfig.update_time][google.cloud.channel.v1.CustomerRepricingConfig.update_time]
@@ -4463,7 +4463,7 @@ def list_channel_partner_repricing_configs(
44634463
resources. The data for each resource is displayed in the
44644464
ascending order of:
44654465
4466-
- channel partner ID
4466+
- Channel Partner ID
44674467
- [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
44684468
- [ChannelPartnerRepricingConfig.update_time][google.cloud.channel.v1.ChannelPartnerRepricingConfig.update_time]
44694469

google/cloud/channel_v1/services/cloud_channel_service/transports/grpc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,7 +1604,7 @@ def list_customer_repricing_configs(
16041604
resources. The data for each resource is displayed in the
16051605
ascending order of:
16061606
1607-
- customer ID
1607+
- Customer ID
16081608
- [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement]
16091609
- [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
16101610
- [CustomerRepricingConfig.update_time][google.cloud.channel.v1.CustomerRepricingConfig.update_time]
@@ -1895,7 +1895,7 @@ def list_channel_partner_repricing_configs(
18951895
resources. The data for each resource is displayed in the
18961896
ascending order of:
18971897
1898-
- channel partner ID
1898+
- Channel Partner ID
18991899
- [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
19001900
- [ChannelPartnerRepricingConfig.update_time][google.cloud.channel.v1.ChannelPartnerRepricingConfig.update_time]
19011901

google/cloud/channel_v1/services/cloud_channel_service/transports/grpc_asyncio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1636,7 +1636,7 @@ def list_customer_repricing_configs(
16361636
resources. The data for each resource is displayed in the
16371637
ascending order of:
16381638
1639-
- customer ID
1639+
- Customer ID
16401640
- [RepricingConfig.EntitlementGranularity.entitlement][google.cloud.channel.v1.RepricingConfig.EntitlementGranularity.entitlement]
16411641
- [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
16421642
- [CustomerRepricingConfig.update_time][google.cloud.channel.v1.CustomerRepricingConfig.update_time]
@@ -1929,7 +1929,7 @@ def list_channel_partner_repricing_configs(
19291929
resources. The data for each resource is displayed in the
19301930
ascending order of:
19311931
1932-
- channel partner ID
1932+
- Channel Partner ID
19331933
- [RepricingConfig.effective_invoice_month][google.cloud.channel.v1.RepricingConfig.effective_invoice_month]
19341934
- [ChannelPartnerRepricingConfig.update_time][google.cloud.channel.v1.ChannelPartnerRepricingConfig.update_time]
19351935

google/cloud/channel_v1/types/entitlements.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ class Entitlement(proto.Message):
108108
accepted as input:
109109
110110
- display_name: The display name of the billing subaccount.
111+
billing_account (str):
112+
Optional. The billing account resource name
113+
that is used to pay for this entitlement.
111114
"""
112115

113116
class ProvisioningState(proto.Enum):
@@ -211,6 +214,10 @@ class SuspensionReason(proto.Enum):
211214
number=26,
212215
message="Parameter",
213216
)
217+
billing_account: str = proto.Field(
218+
proto.STRING,
219+
number=28,
220+
)
214221

215222

216223
class Parameter(proto.Message):

samples/generated_samples/snippet_metadata_google.cloud.channel.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-channel",
11-
"version": "1.13.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

tests/unit/gapic/channel_v1/test_cloud_channel_service.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3478,6 +3478,7 @@ def test_get_entitlement(request_type, transport: str = "grpc"):
34783478
entitlements.Entitlement.SuspensionReason.RESELLER_INITIATED
34793479
],
34803480
purchase_order_id="purchase_order_id_value",
3481+
billing_account="billing_account_value",
34813482
)
34823483
response = client.get_entitlement(request)
34833484

@@ -3497,6 +3498,7 @@ def test_get_entitlement(request_type, transport: str = "grpc"):
34973498
entitlements.Entitlement.SuspensionReason.RESELLER_INITIATED
34983499
]
34993500
assert response.purchase_order_id == "purchase_order_id_value"
3501+
assert response.billing_account == "billing_account_value"
35003502

35013503

35023504
def test_get_entitlement_empty_call():
@@ -3540,6 +3542,7 @@ async def test_get_entitlement_async(
35403542
entitlements.Entitlement.SuspensionReason.RESELLER_INITIATED
35413543
],
35423544
purchase_order_id="purchase_order_id_value",
3545+
billing_account="billing_account_value",
35433546
)
35443547
)
35453548
response = await client.get_entitlement(request)
@@ -3560,6 +3563,7 @@ async def test_get_entitlement_async(
35603563
entitlements.Entitlement.SuspensionReason.RESELLER_INITIATED
35613564
]
35623565
assert response.purchase_order_id == "purchase_order_id_value"
3566+
assert response.billing_account == "billing_account_value"
35633567

35643568

35653569
@pytest.mark.asyncio

0 commit comments

Comments
 (0)