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

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 (#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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored May 5, 2023
1 parent 58999a6 commit f3a411b
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3400,7 +3400,7 @@ async def list_customer_repricing_configs(
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 Expand Up @@ -4087,7 +4087,7 @@ async def list_channel_partner_repricing_configs(
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 @@ -3766,7 +3766,7 @@ def list_customer_repricing_configs(
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 Expand Up @@ -4463,7 +4463,7 @@ def list_channel_partner_repricing_configs(
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 @@ -1604,7 +1604,7 @@ def list_customer_repricing_configs(
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 Expand Up @@ -1895,7 +1895,7 @@ def list_channel_partner_repricing_configs(
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 @@ -1636,7 +1636,7 @@ def list_customer_repricing_configs(
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 Expand Up @@ -1929,7 +1929,7 @@ def list_channel_partner_repricing_configs(
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
7 changes: 7 additions & 0 deletions google/cloud/channel_v1/types/entitlements.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ class Entitlement(proto.Message):
accepted as input:
- display_name: The display name of the billing subaccount.
billing_account (str):
Optional. The billing account resource name
that is used to pay for this entitlement.
"""

class ProvisioningState(proto.Enum):
Expand Down Expand Up @@ -211,6 +214,10 @@ class SuspensionReason(proto.Enum):
number=26,
message="Parameter",
)
billing_account: str = proto.Field(
proto.STRING,
number=28,
)


class Parameter(proto.Message):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-channel",
"version": "1.13.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/gapic/channel_v1/test_cloud_channel_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -3478,6 +3478,7 @@ def test_get_entitlement(request_type, transport: str = "grpc"):
entitlements.Entitlement.SuspensionReason.RESELLER_INITIATED
],
purchase_order_id="purchase_order_id_value",
billing_account="billing_account_value",
)
response = client.get_entitlement(request)

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


def test_get_entitlement_empty_call():
Expand Down Expand Up @@ -3540,6 +3542,7 @@ async def test_get_entitlement_async(
entitlements.Entitlement.SuspensionReason.RESELLER_INITIATED
],
purchase_order_id="purchase_order_id_value",
billing_account="billing_account_value",
)
)
response = await client.get_entitlement(request)
Expand All @@ -3560,6 +3563,7 @@ async def test_get_entitlement_async(
entitlements.Entitlement.SuspensionReason.RESELLER_INITIATED
]
assert response.purchase_order_id == "purchase_order_id_value"
assert response.billing_account == "billing_account_value"


@pytest.mark.asyncio
Expand Down

0 comments on commit f3a411b

Please sign in to comment.