Skip to content

Commit 7b40d30

Browse files
feat(api): add charges list api http handler (#4103)
1 parent 4afc0cc commit 7b40d30

15 files changed

Lines changed: 1290 additions & 553 deletions

File tree

api/spec/packages/aip/src/customers/charges/charges.tsp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@ enum ChargeStatus {
3737
Deleted: "deleted",
3838
}
3939

40+
/**
41+
* Discounts applicable to flat fee charges.
42+
*
43+
* This is the same as `ProductCatalog.Discounts` but without the `usage` field, which is not applicable to flat fee charges.
44+
*/
45+
@friendlyName("BillingFlatFeeDiscounts")
46+
@summary("Flat fee charge discounts")
47+
model FlatFeeDiscounts {
48+
...OmitProperties<ProductCatalog.Discounts, "usage">;
49+
}
50+
4051
/**
4152
* Shared fields present on all customer charge responses.
4253
*/
@@ -128,7 +139,7 @@ model ChargeBase<T extends ChargeType> {
128139
*/
129140
@visibility(Lifecycle.Read)
130141
@summary("Price")
131-
price: Shared.CurrencyAmount;
142+
price: ProductCatalog.Price;
132143

133144
/**
134145
* Unique reference ID of the charge.
@@ -165,7 +176,7 @@ model FlatFeeCharge {
165176
*/
166177
@visibility(Lifecycle.Read, Lifecycle.Create)
167178
@summary("Discounts")
168-
discounts?: OmitProperties<ProductCatalog.Discounts, "usage">;
179+
discounts?: FlatFeeDiscounts;
169180

170181
/**
171182
* The feature associated with the charge, when applicable.

api/v3/api.gen.go

Lines changed: 542 additions & 536 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)