|
| 1 | +// File generated from our OpenAPI spec |
| 2 | +package com.stripe.events; |
| 3 | + |
| 4 | +import com.google.gson.annotations.SerializedName; |
| 5 | +import com.stripe.exception.StripeException; |
| 6 | +import com.stripe.model.v2.billing.RateCardCustomPricingUnitOverageRate; |
| 7 | +import com.stripe.model.v2.core.Event; |
| 8 | +import com.stripe.model.v2.core.Event.RelatedObject; |
| 9 | +import java.time.Instant; |
| 10 | +import lombok.Getter; |
| 11 | +import lombok.Setter; |
| 12 | + |
| 13 | +@Getter |
| 14 | +public final class V2BillingRateCardCustomPricingUnitOverageRateCreatedEvent extends Event { |
| 15 | + /** Data for the v2.billing.rate_card_custom_pricing_unit_overage_rate.created event. */ |
| 16 | + @SerializedName("data") |
| 17 | + V2BillingRateCardCustomPricingUnitOverageRateCreatedEvent.EventData data; |
| 18 | + |
| 19 | + @Getter |
| 20 | + @Setter |
| 21 | + public static final class EventData { |
| 22 | + /** Timestamp of when the object was created. */ |
| 23 | + @SerializedName("created") |
| 24 | + Instant created; |
| 25 | + /** The ID of the custom pricing unit this overage rate applies to. */ |
| 26 | + @SerializedName("custom_pricing_unit") |
| 27 | + String customPricingUnit; |
| 28 | + /** The ID of the RateCard which this custom pricing unit overage rate belongs to. */ |
| 29 | + @SerializedName("rate_card") |
| 30 | + String rateCard; |
| 31 | + /** The ID of the RateCard Version when the custom pricing unit overage rate was created. */ |
| 32 | + @SerializedName("rate_card_version") |
| 33 | + String rateCardVersion; |
| 34 | + } |
| 35 | + |
| 36 | + @SerializedName("related_object") |
| 37 | + |
| 38 | + /** Object containing the reference to API resource relevant to the event. */ |
| 39 | + RelatedObject relatedObject; |
| 40 | + |
| 41 | + /** Retrieves the related object from the API. Make an API request on every call. */ |
| 42 | + public RateCardCustomPricingUnitOverageRate fetchRelatedObject() throws StripeException { |
| 43 | + return (RateCardCustomPricingUnitOverageRate) super.fetchRelatedObject(this.relatedObject); |
| 44 | + } |
| 45 | +} |
0 commit comments