github.com/stripe/stripe-go/v76@v76.25.0/billing_metereventadjustment.go (about) 1 // 2 // 3 // File generated from our OpenAPI spec 4 // 5 // 6 7 package stripe 8 9 // The meter event adjustment's status. 10 type BillingMeterEventAdjustmentStatus string 11 12 // List of values that BillingMeterEventAdjustmentStatus can take 13 const ( 14 BillingMeterEventAdjustmentStatusComplete BillingMeterEventAdjustmentStatus = "complete" 15 BillingMeterEventAdjustmentStatusPending BillingMeterEventAdjustmentStatus = "pending" 16 ) 17 18 // Specifies whether to cancel a single event or a range of events for a time period. 19 type BillingMeterEventAdjustmentType string 20 21 // List of values that BillingMeterEventAdjustmentType can take 22 const ( 23 BillingMeterEventAdjustmentTypeCancel BillingMeterEventAdjustmentType = "cancel" 24 ) 25 26 // Specifies which event to cancel. 27 type BillingMeterEventAdjustmentCancelParams struct { 28 // Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. 29 Identifier *string `form:"identifier"` 30 } 31 32 // Creates a billing meter event adjustment 33 type BillingMeterEventAdjustmentParams struct { 34 Params `form:"*"` 35 // Specifies which event to cancel. 36 Cancel *BillingMeterEventAdjustmentCancelParams `form:"cancel"` 37 // The name of the meter event. Corresponds with the `event_name` field on a meter. 38 EventName *string `form:"event_name"` 39 // Specifies which fields in the response should be expanded. 40 Expand []*string `form:"expand"` 41 // Specifies whether to cancel a single event or a range of events for a time period. 42 Type *string `form:"type"` 43 } 44 45 // AddExpand appends a new field to expand. 46 func (p *BillingMeterEventAdjustmentParams) AddExpand(f string) { 47 p.Expand = append(p.Expand, &f) 48 } 49 50 type BillingMeterEventAdjustmentCancel struct { 51 // Unique identifier for the event. 52 Identifier string `json:"identifier"` 53 } 54 55 // A billing meter event adjustment represents the status of a meter event adjustment. 56 type BillingMeterEventAdjustment struct { 57 APIResource 58 Cancel *BillingMeterEventAdjustmentCancel `json:"cancel"` 59 // The name of the meter event. Corresponds with the `event_name` field on a meter. 60 EventName string `json:"event_name"` 61 // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. 62 Livemode bool `json:"livemode"` 63 // String representing the object's type. Objects of the same type share the same value. 64 Object string `json:"object"` 65 // The meter event adjustment's status. 66 Status BillingMeterEventAdjustmentStatus `json:"status"` 67 // Specifies whether to cancel a single event or a range of events for a time period. 68 Type BillingMeterEventAdjustmentType `json:"type"` 69 }