Skip to content

Commit

Permalink
Merge pull request #918 from stripe/remi-fix-fraudwarnings
Browse files Browse the repository at this point in the history
Properly use /v1/radar/early_fraud_warnings as the API
  • Loading branch information
remi-stripe authored Aug 15, 2019
2 parents e954b4f + 7de305a commit f2bc011
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions issuerfraudrecord.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ type IssuerFraudRecordList struct {

// IssuerFraudRecord is the resource representing an issuer fraud record. For
// more details see https://stripe.com/docs/api#issuer_fraud_records.
// TODO: Remove in the next major version as this was replaced by EarlyFraudWarnings
type IssuerFraudRecord struct {
Actionable bool `json:"actionable"`
Charge *Charge `json:"charge"`
Expand Down
4 changes: 2 additions & 2 deletions radar/earlyfraudwarning/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func Get(id string, params *stripe.RadarEarlyFraudWarningParams) (*stripe.RadarE

// Get returns the details of an early fraud warning.
func (c Client) Get(id string, params *stripe.RadarEarlyFraudWarningParams) (*stripe.RadarEarlyFraudWarning, error) {
path := stripe.FormatURLPath("/v1/issuer_fraud_records/%s", id)
path := stripe.FormatURLPath("/v1/radar/early_fraud_warnings/%s", id)
ifr := &stripe.RadarEarlyFraudWarning{}
err := c.B.Call(http.MethodGet, path, c.Key, params, ifr)
return ifr, err
Expand All @@ -39,7 +39,7 @@ func List(params *stripe.RadarEarlyFraudWarningListParams) *Iter {
func (c Client) List(listParams *stripe.RadarEarlyFraudWarningListParams) *Iter {
return &Iter{stripe.GetIter(listParams, func(p *stripe.Params, b *form.Values) ([]interface{}, stripe.ListMeta, error) {
list := &stripe.RadarEarlyFraudWarningList{}
err := c.B.CallRaw(http.MethodGet, "/v1/issuer_fraud_records", c.Key, b, p, list)
err := c.B.CallRaw(http.MethodGet, "/v1/radar/early_fraud_warnings", c.Key, b, p, list)

ret := make([]interface{}, len(list.Values))
for i, v := range list.Values {
Expand Down

0 comments on commit f2bc011

Please sign in to comment.