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

feat: Add support for granular repricing configurations via SkuGroups in Cloud Channel Repricing APIs #218

Merged
merged 2 commits into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions google/cloud/channel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,14 @@
)
from google.cloud.channel_v1.types.repricing import (
ChannelPartnerRepricingConfig,
ConditionalOverride,
CustomerRepricingConfig,
PercentageAdjustment,
RebillingBasis,
RepricingAdjustment,
RepricingCondition,
RepricingConfig,
SkuGroupCondition,
)
from google.cloud.channel_v1.types.service import (
ActivateEntitlementRequest,
Expand Down Expand Up @@ -235,10 +238,13 @@
"RunReportJobRequest",
"RunReportJobResponse",
"ChannelPartnerRepricingConfig",
"ConditionalOverride",
"CustomerRepricingConfig",
"PercentageAdjustment",
"RepricingAdjustment",
"RepricingCondition",
"RepricingConfig",
"SkuGroupCondition",
"RebillingBasis",
"ActivateEntitlementRequest",
"CancelEntitlementRequest",
Expand Down
6 changes: 6 additions & 0 deletions google/cloud/channel_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,14 @@
)
from .types.repricing import (
ChannelPartnerRepricingConfig,
ConditionalOverride,
CustomerRepricingConfig,
PercentageAdjustment,
RebillingBasis,
RepricingAdjustment,
RepricingCondition,
RepricingConfig,
SkuGroupCondition,
)
from .types.service import (
ActivateEntitlementRequest,
Expand Down Expand Up @@ -179,6 +182,7 @@
"CloudIdentityInfo",
"Column",
"CommitmentSettings",
"ConditionalOverride",
"Constraints",
"ContactInfo",
"CreateChannelPartnerLinkRequest",
Expand Down Expand Up @@ -267,12 +271,14 @@
"ReportStatus",
"ReportValue",
"RepricingAdjustment",
"RepricingCondition",
"RepricingConfig",
"ResourceType",
"Row",
"RunReportJobRequest",
"RunReportJobResponse",
"Sku",
"SkuGroupCondition",
"StartPaidServiceRequest",
"SubscriberEvent",
"SuspendEntitlementRequest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,8 @@ async def sample_run_report_job():
google.api_core.operation_async.AsyncOperation:
An object representing a long-running operation.

The result type for the operation will be
:class:`google.cloud.channel_v1.types.RunReportJobResponse`
Response message for
[CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob].
The result type for the operation will be :class:`google.cloud.channel_v1.types.RunReportJobResponse` Response message for
[CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob].

"""
# Create or coerce a protobuf request object.
Expand Down Expand Up @@ -416,7 +414,8 @@ async def sample_fetch_report_results():

Returns:
google.cloud.channel_v1.services.cloud_channel_reports_service.pagers.FetchReportResultsAsyncPager:
Response message for [CloudChannelReportsService.FetchReportResults][google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults].
Response message for
[CloudChannelReportsService.FetchReportResults][google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults].
Contains a tabular representation of the report
results.

Expand Down Expand Up @@ -538,7 +537,7 @@ async def sample_list_reports():
Returns:
google.cloud.channel_v1.services.cloud_channel_reports_service.pagers.ListReportsAsyncPager:
Response message for
[CloudChannelReportsService.ListReports][google.cloud.channel.v1.CloudChannelReportsService.ListReports].
[CloudChannelReportsService.ListReports][google.cloud.channel.v1.CloudChannelReportsService.ListReports].

Iterating over this object will yield results and
resolve additional pages automatically.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,10 +542,8 @@ def sample_run_report_job():
google.api_core.operation.Operation:
An object representing a long-running operation.

The result type for the operation will be
:class:`google.cloud.channel_v1.types.RunReportJobResponse`
Response message for
[CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob].
The result type for the operation will be :class:`google.cloud.channel_v1.types.RunReportJobResponse` Response message for
[CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob].

"""
# Create or coerce a protobuf request object.
Expand Down Expand Up @@ -647,7 +645,8 @@ def sample_fetch_report_results():

Returns:
google.cloud.channel_v1.services.cloud_channel_reports_service.pagers.FetchReportResultsPager:
Response message for [CloudChannelReportsService.FetchReportResults][google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults].
Response message for
[CloudChannelReportsService.FetchReportResults][google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults].
Contains a tabular representation of the report
results.

Expand Down Expand Up @@ -769,7 +768,7 @@ def sample_list_reports():
Returns:
google.cloud.channel_v1.services.cloud_channel_reports_service.pagers.ListReportsPager:
Response message for
[CloudChannelReportsService.ListReports][google.cloud.channel.v1.CloudChannelReportsService.ListReports].
[CloudChannelReportsService.ListReports][google.cloud.channel.v1.CloudChannelReportsService.ListReports].

Iterating over this object will yield results and
resolve additional pages automatically.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ class CloudChannelServiceAsyncClient:

CloudChannelService exposes the following resources:

- [Customer][google.cloud.channel.v1.Customer]s: An entityusually
an enterprisemanaged by a reseller or distributor.
- [Customer][google.cloud.channel.v1.Customer]s: An entity-usually
an enterprise-managed by a reseller or distributor.

- [Entitlement][google.cloud.channel.v1.Entitlement]s: An entity
that provides a customer with the means to use a service.
Expand Down Expand Up @@ -344,7 +344,7 @@ async def sample_list_customers():
Returns:
google.cloud.channel_v1.services.cloud_channel_service.pagers.ListCustomersAsyncPager:
Response message for
[CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers].
[CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers].

Iterating over this object will yield results and
resolve additional pages automatically.
Expand Down Expand Up @@ -1179,7 +1179,7 @@ async def sample_list_entitlements():
Returns:
google.cloud.channel_v1.services.cloud_channel_service.pagers.ListEntitlementsAsyncPager:
Response message for
[CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements].
[CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements].

Iterating over this object will yield results and
resolve additional pages automatically.
Expand Down Expand Up @@ -1295,7 +1295,7 @@ async def sample_list_transferable_skus():
Returns:
google.cloud.channel_v1.services.cloud_channel_service.pagers.ListTransferableSkusAsyncPager:
Response message for
[CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus].
[CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus].

Iterating over this object will yield results and
resolve additional pages automatically.
Expand Down Expand Up @@ -1415,7 +1415,7 @@ async def sample_list_transferable_offers():
Returns:
google.cloud.channel_v1.services.cloud_channel_service.pagers.ListTransferableOffersAsyncPager:
Response message for
[CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers].
[CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers].

Iterating over this object will yield results and
resolve additional pages automatically.
Expand Down Expand Up @@ -2641,7 +2641,8 @@ async def sample_transfer_entitlements():
google.api_core.operation_async.AsyncOperation:
An object representing a long-running operation.

The result type for the operation will be :class:`google.cloud.channel_v1.types.TransferEntitlementsResponse` Response message for [CloudChannelService.TransferEntitlements][google.cloud.channel.v1.CloudChannelService.TransferEntitlements].
The result type for the operation will be :class:`google.cloud.channel_v1.types.TransferEntitlementsResponse` Response message for
[CloudChannelService.TransferEntitlements][google.cloud.channel.v1.CloudChannelService.TransferEntitlements].
This is put in the response field of
google.longrunning.Operation.

Expand Down Expand Up @@ -2889,7 +2890,7 @@ async def sample_list_channel_partner_links():
Returns:
google.cloud.channel_v1.services.cloud_channel_service.pagers.ListChannelPartnerLinksAsyncPager:
Response message for
[CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks].
[CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks].

Iterating over this object will yield results and
resolve additional pages automatically.
Expand Down Expand Up @@ -3455,7 +3456,7 @@ async def sample_list_customer_repricing_configs():
Returns:
google.cloud.channel_v1.services.cloud_channel_service.pagers.ListCustomerRepricingConfigsAsyncPager:
Response message for
[CloudChannelService.ListCustomerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListCustomerRepricingConfigs].
[CloudChannelService.ListCustomerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListCustomerRepricingConfigs].

Iterating over this object will yield results and
resolve additional pages automatically.
Expand Down
19 changes: 10 additions & 9 deletions google/cloud/channel_v1/services/cloud_channel_service/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ class CloudChannelServiceClient(metaclass=CloudChannelServiceClientMeta):

CloudChannelService exposes the following resources:

- [Customer][google.cloud.channel.v1.Customer]s: An entityusually
an enterprisemanaged by a reseller or distributor.
- [Customer][google.cloud.channel.v1.Customer]s: An entity-usually
an enterprise-managed by a reseller or distributor.

- [Entitlement][google.cloud.channel.v1.Entitlement]s: An entity
that provides a customer with the means to use a service.
Expand Down Expand Up @@ -674,7 +674,7 @@ def sample_list_customers():
Returns:
google.cloud.channel_v1.services.cloud_channel_service.pagers.ListCustomersPager:
Response message for
[CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers].
[CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers].

Iterating over this object will yield results and
resolve additional pages automatically.
Expand Down Expand Up @@ -1517,7 +1517,7 @@ def sample_list_entitlements():
Returns:
google.cloud.channel_v1.services.cloud_channel_service.pagers.ListEntitlementsPager:
Response message for
[CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements].
[CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements].

Iterating over this object will yield results and
resolve additional pages automatically.
Expand Down Expand Up @@ -1634,7 +1634,7 @@ def sample_list_transferable_skus():
Returns:
google.cloud.channel_v1.services.cloud_channel_service.pagers.ListTransferableSkusPager:
Response message for
[CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus].
[CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus].

Iterating over this object will yield results and
resolve additional pages automatically.
Expand Down Expand Up @@ -1755,7 +1755,7 @@ def sample_list_transferable_offers():
Returns:
google.cloud.channel_v1.services.cloud_channel_service.pagers.ListTransferableOffersPager:
Response message for
[CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers].
[CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers].

Iterating over this object will yield results and
resolve additional pages automatically.
Expand Down Expand Up @@ -2991,7 +2991,8 @@ def sample_transfer_entitlements():
google.api_core.operation.Operation:
An object representing a long-running operation.

The result type for the operation will be :class:`google.cloud.channel_v1.types.TransferEntitlementsResponse` Response message for [CloudChannelService.TransferEntitlements][google.cloud.channel.v1.CloudChannelService.TransferEntitlements].
The result type for the operation will be :class:`google.cloud.channel_v1.types.TransferEntitlementsResponse` Response message for
[CloudChannelService.TransferEntitlements][google.cloud.channel.v1.CloudChannelService.TransferEntitlements].
This is put in the response field of
google.longrunning.Operation.

Expand Down Expand Up @@ -3243,7 +3244,7 @@ def sample_list_channel_partner_links():
Returns:
google.cloud.channel_v1.services.cloud_channel_service.pagers.ListChannelPartnerLinksPager:
Response message for
[CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks].
[CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks].

Iterating over this object will yield results and
resolve additional pages automatically.
Expand Down Expand Up @@ -3821,7 +3822,7 @@ def sample_list_customer_repricing_configs():
Returns:
google.cloud.channel_v1.services.cloud_channel_service.pagers.ListCustomerRepricingConfigsPager:
Response message for
[CloudChannelService.ListCustomerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListCustomerRepricingConfigs].
[CloudChannelService.ListCustomerRepricingConfigs][google.cloud.channel.v1.CloudChannelService.ListCustomerRepricingConfigs].

Iterating over this object will yield results and
resolve additional pages automatically.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ class CloudChannelServiceGrpcTransport(CloudChannelServiceTransport):

CloudChannelService exposes the following resources:

- [Customer][google.cloud.channel.v1.Customer]s: An entityusually
an enterprisemanaged by a reseller or distributor.
- [Customer][google.cloud.channel.v1.Customer]s: An entity-usually
an enterprise-managed by a reseller or distributor.

- [Entitlement][google.cloud.channel.v1.Entitlement]s: An entity
that provides a customer with the means to use a service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ class CloudChannelServiceGrpcAsyncIOTransport(CloudChannelServiceTransport):

CloudChannelService exposes the following resources:

- [Customer][google.cloud.channel.v1.Customer]s: An entityusually
an enterprisemanaged by a reseller or distributor.
- [Customer][google.cloud.channel.v1.Customer]s: An entity-usually
an enterprise-managed by a reseller or distributor.

- [Entitlement][google.cloud.channel.v1.Entitlement]s: An entity
that provides a customer with the means to use a service.
Expand Down
6 changes: 6 additions & 0 deletions google/cloud/channel_v1/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,14 @@
)
from .repricing import (
ChannelPartnerRepricingConfig,
ConditionalOverride,
CustomerRepricingConfig,
PercentageAdjustment,
RebillingBasis,
RepricingAdjustment,
RepricingCondition,
RepricingConfig,
SkuGroupCondition,
)
from .service import (
ActivateEntitlementRequest,
Expand Down Expand Up @@ -199,10 +202,13 @@
"RunReportJobRequest",
"RunReportJobResponse",
"ChannelPartnerRepricingConfig",
"ConditionalOverride",
"CustomerRepricingConfig",
"PercentageAdjustment",
"RepricingAdjustment",
"RepricingCondition",
"RepricingConfig",
"SkuGroupCondition",
"RebillingBasis",
"ActivateEntitlementRequest",
"CancelEntitlementRequest",
Expand Down
Loading