github.com/stripe/stripe-go/v76@v76.25.0/radar_earlyfraudwarning.go (about) 1 // 2 // 3 // File generated from our OpenAPI spec 4 // 5 // 6 7 package stripe 8 9 // The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. 10 type RadarEarlyFraudWarningFraudType string 11 12 // List of values that RadarEarlyFraudWarningFraudType can take 13 const ( 14 RadarEarlyFraudWarningFraudTypeCardNeverReceived RadarEarlyFraudWarningFraudType = "card_never_received" 15 RadarEarlyFraudWarningFraudTypeFraudulentCardApplication RadarEarlyFraudWarningFraudType = "fraudulent_card_application" 16 RadarEarlyFraudWarningFraudTypeMadeWithCounterfeitCard RadarEarlyFraudWarningFraudType = "made_with_counterfeit_card" 17 RadarEarlyFraudWarningFraudTypeMadeWithLostCard RadarEarlyFraudWarningFraudType = "made_with_lost_card" 18 RadarEarlyFraudWarningFraudTypeMadeWithStolenCard RadarEarlyFraudWarningFraudType = "made_with_stolen_card" 19 RadarEarlyFraudWarningFraudTypeMisc RadarEarlyFraudWarningFraudType = "misc" 20 RadarEarlyFraudWarningFraudTypeUnauthorizedUseOfCard RadarEarlyFraudWarningFraudType = "unauthorized_use_of_card" 21 ) 22 23 // Returns a list of early fraud warnings. 24 type RadarEarlyFraudWarningListParams struct { 25 ListParams `form:"*"` 26 // Only return early fraud warnings for the charge specified by this charge ID. 27 Charge *string `form:"charge"` 28 // Only return early fraud warnings that were created during the given date interval. 29 Created *int64 `form:"created"` 30 // Only return early fraud warnings that were created during the given date interval. 31 CreatedRange *RangeQueryParams `form:"created"` 32 // Specifies which fields in the response should be expanded. 33 Expand []*string `form:"expand"` 34 // Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. 35 PaymentIntent *string `form:"payment_intent"` 36 } 37 38 // AddExpand appends a new field to expand. 39 func (p *RadarEarlyFraudWarningListParams) AddExpand(f string) { 40 p.Expand = append(p.Expand, &f) 41 } 42 43 // Retrieves the details of an early fraud warning that has previously been created. 44 // 45 // Please refer to the [early fraud warning](https://stripe.com/docs/api#early_fraud_warning_object) object reference for more details. 46 type RadarEarlyFraudWarningParams struct { 47 Params `form:"*"` 48 // Specifies which fields in the response should be expanded. 49 Expand []*string `form:"expand"` 50 } 51 52 // AddExpand appends a new field to expand. 53 func (p *RadarEarlyFraudWarningParams) AddExpand(f string) { 54 p.Expand = append(p.Expand, &f) 55 } 56 57 // An early fraud warning indicates that the card issuer has notified us that a 58 // charge may be fraudulent. 59 // 60 // Related guide: [Early fraud warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings) 61 type RadarEarlyFraudWarning struct { 62 APIResource 63 // An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. 64 Actionable bool `json:"actionable"` 65 // ID of the charge this early fraud warning is for, optionally expanded. 66 Charge *Charge `json:"charge"` 67 // Time at which the object was created. Measured in seconds since the Unix epoch. 68 Created int64 `json:"created"` 69 // The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. 70 FraudType RadarEarlyFraudWarningFraudType `json:"fraud_type"` 71 // Unique identifier for the object. 72 ID string `json:"id"` 73 // Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. 74 Livemode bool `json:"livemode"` 75 // String representing the object's type. Objects of the same type share the same value. 76 Object string `json:"object"` 77 // ID of the Payment Intent this early fraud warning is for, optionally expanded. 78 PaymentIntent *PaymentIntent `json:"payment_intent"` 79 } 80 81 // RadarEarlyFraudWarningList is a list of EarlyFraudWarnings as retrieved from a list endpoint. 82 type RadarEarlyFraudWarningList struct { 83 APIResource 84 ListMeta 85 Data []*RadarEarlyFraudWarning `json:"data"` 86 }