Hey @Pilzington,
we talked about this on a call already, but I still wanted to make sure this doesn't get lost:
When fetching prices on the /prices page of our website, I use PaymentService.getDefaultPrices() to retrieve a PaymentServiceGetDefaultPricesResponse type. This type seems to return a class that contains an array of Price classes:
| exportclassPaymentServiceGetDefaultPricesResponseextendsMessage<PaymentServiceGetDefaultPricesResponse>{ |
| /** |
| * @generated from field: repeated api.v1.Price prices = 1; |
| */ |
| prices: Price[]=[]; |
| |
| constructor(data?: PartialMessage<PaymentServiceGetDefaultPricesResponse>){ |
This Price Class looks to reference productType as an enum.
| /** |
| * @generated from field: api.v1.ProductType product_type = 5; |
| */ |
| productType=ProductType.UNSPECIFIED; |
| |
In my case, fetching from the API doesn't return the ENUM member but the metadata from the enum:
{"name": "ip","unitAmountDecimal": 0.016203704,"currency": "eur","unitLabel": "minute","productType": "PRODUCT_TYPE_NETWORK",// <-- THIS seems to be the Enum.metadata.name instead of the enum member itself?"description": "Connect to the internet with ephemeral or static public facing IPv4 addresses."}
Hey @Pilzington,
we talked about this on a call already, but I still wanted to make sure this doesn't get lost:
When fetching prices on the
/pricespage of our website, I usePaymentService.getDefaultPrices()to retrieve aPaymentServiceGetDefaultPricesResponsetype. This type seems to return a class that contains an array ofPriceclasses:api/js/api/v1/payment_pb.ts
Lines 1226 to 1232 in 777e867
This Price Class looks to reference
productTypeas an enum.api/js/api/v1/payment_pb.ts
Lines 241 to 245 in 777e867
In my case, fetching from the API doesn't return the ENUM member but the metadata from the enum: