github.com/stripe/stripe-go/v76@v76.25.0/entitlements_activeentitlement.go (about) 1 // 2 // 3 // File generated from our OpenAPI spec 4 // 5 // 6 7 package stripe 8 9 // Retrieve a list of active entitlements for a customer 10 type EntitlementsActiveEntitlementListParams struct { 11 ListParams `form:"*"` 12 // The ID of the customer. 13 Customer *string `form:"customer"` 14 // Specifies which fields in the response should be expanded. 15 Expand []*string `form:"expand"` 16 } 17 18 // AddExpand appends a new field to expand. 19 func (p *EntitlementsActiveEntitlementListParams) AddExpand(f string) { 20 p.Expand = append(p.Expand, &f) 21 } 22 23 // Retrieve an active entitlement 24 type EntitlementsActiveEntitlementParams struct { 25 Params `form:"*"` 26 // Specifies which fields in the response should be expanded. 27 Expand []*string `form:"expand"` 28 } 29 30 // AddExpand appends a new field to expand. 31 func (p *EntitlementsActiveEntitlementParams) AddExpand(f string) { 32 p.Expand = append(p.Expand, &f) 33 } 34 35 // An active entitlement describes access to a feature for a customer. 36 type EntitlementsActiveEntitlement struct { 37 APIResource 38 // The feature that the customer is entitled to. 39 Feature string `json:"feature"` 40 // Unique identifier for the object. 41 ID string `json:"id"` 42 // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. 43 Livemode bool `json:"livemode"` 44 // A unique key you provide as your own system identifier. This may be up to 80 characters. 45 LookupKey string `json:"lookup_key"` 46 // String representing the object's type. Objects of the same type share the same value. 47 Object string `json:"object"` 48 } 49 50 // EntitlementsActiveEntitlementList is a list of ActiveEntitlements as retrieved from a list endpoint. 51 type EntitlementsActiveEntitlementList struct { 52 APIResource 53 ListMeta 54 Data []*EntitlementsActiveEntitlement `json:"data"` 55 }