Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove IssuerFraudRecord #960

Merged
merged 2 commits into from
Sep 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions balancetransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,3 @@ func (s *BalanceTransactionSource) UnmarshalJSON(data []byte) error {

return err
}

// MarshalJSON handles serialization of a BalanceTransactionSource.
func (s *BalanceTransactionSource) MarshalJSON() ([]byte, error) {
return json.Marshal(s.ID)
}
4 changes: 0 additions & 4 deletions client/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
"github.com/stripe/stripe-go/filelink"
"github.com/stripe/stripe-go/invoice"
"github.com/stripe/stripe-go/invoiceitem"
"github.com/stripe/stripe-go/issuerfraudrecord"
"github.com/stripe/stripe-go/issuing/authorization"
issuingcard "github.com/stripe/stripe-go/issuing/card"
"github.com/stripe/stripe-go/issuing/cardholder"
Expand Down Expand Up @@ -137,8 +136,6 @@ type API struct {
Invoices *invoice.Client
// InvoiceItems is the client used to invoke /invoiceitems APIs.
InvoiceItems *invoiceitem.Client
// IssuerFraudRecords is the client used to invoke /issuer_fraud_records APIs.
IssuerFraudRecords *issuerfraudrecord.Client
// IssuingAuthorizations is the client used to invoke /issuing/authorizations APIs.
IssuingAuthorizations *authorization.Client
// IssuingCardholders is the client used to invoke /issuing/cardholders APIs.
Expand Down Expand Up @@ -270,7 +267,6 @@ func (a *API) Init(key string, backends *stripe.Backends) {
a.FileLinks = &filelink.Client{B: backends.API, Key: key}
a.Invoices = &invoice.Client{B: backends.API, Key: key}
a.InvoiceItems = &invoiceitem.Client{B: backends.API, Key: key}
a.IssuerFraudRecords = &issuerfraudrecord.Client{B: backends.API, Key: key}
a.IssuingAuthorizations = &authorization.Client{B: backends.API, Key: key}
a.IssuingCardholders = &cardholder.Client{B: backends.API, Key: key}
a.IssuingCards = &issuingcard.Client{B: backends.API, Key: key}
Expand Down
51 changes: 0 additions & 51 deletions issuerfraudrecord.go

This file was deleted.

61 changes: 0 additions & 61 deletions issuerfraudrecord/client.go

This file was deleted.

35 changes: 0 additions & 35 deletions issuerfraudrecord/client_test.go

This file was deleted.

8 changes: 0 additions & 8 deletions payout.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,3 @@ func (d *PayoutDestination) UnmarshalJSON(data []byte) error {

return err
}

// MarshalJSON handles serialization of a PayoutDestination.
// This custom marshaling is needed because we can only send a string
// ID as a destination, even though it can be expanded to a full
// object when retrieving
func (d *PayoutDestination) MarshalJSON() ([]byte, error) {
return json.Marshal(d.ID)
}
8 changes: 0 additions & 8 deletions recipienttransfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,3 @@ func (d *RecipientTransferDestination) UnmarshalJSON(data []byte) error {

return err
}

// MarshalJSON handles serialization of a RecipientTransferDestination.
// This custom marshaling is needed because we can only send a string
// ID as a destination, even though it can be expanded to a full
// object when retrieving
func (d *RecipientTransferDestination) MarshalJSON() ([]byte, error) {
return json.Marshal(d.ID)
}
8 changes: 0 additions & 8 deletions transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,3 @@ func (d *TransferDestination) UnmarshalJSON(data []byte) error {
*d = TransferDestination(v)
return json.Unmarshal(data, &d.Account)
}

// MarshalJSON handles serialization of a TransferDestination.
// This custom marshaling is needed because we can only send a string
// ID as a destination, even though it can be expanded to a full
// object when retrieving
func (d *TransferDestination) MarshalJSON() ([]byte, error) {
return json.Marshal(d.ID)
}
11 changes: 4 additions & 7 deletions transfer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,11 @@ func TestTransferDestination_UnmarshalJSON(t *testing.T) {

// Unmarshals from a JSON object
{
// We build the JSON object manually here because TransferDestination
// has a custom MarshalJSON implementation as well, and it'll turn into
// a string if we marshaled a struct instance. This ensures that we're
// working with a JSON objects.
data := []byte(`{"id":"acct_123"}`)
v := TransferDestination{ID: "acct_123"}
data, err := json.Marshal(&v)
assert.NoError(t, err)

var v TransferDestination
err := json.Unmarshal(data, &v)
err = json.Unmarshal(data, &v)
assert.NoError(t, err)
assert.Equal(t, "acct_123", v.ID)

Expand Down