func (d *RecipientTransferDestination) MarshalJSON() ([]byte, error) {
	return json.Marshal(d.ID)
}
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
package stripe
import "encoding/json"
type RecipientTransferDestinationType string
type RecipientTransferFailCode string
type RecipientTransferSourceType string
type RecipientTransferStatus string
type RecipientTransferType string
const (
	RecipientTransferDestinationBankAccount RecipientTransferDestinationType = "bank_account"
	RecipientTransferDestinationCard RecipientTransferDestinationType = "card"
)
type RecipientTransferMethodType string
const (
	RecipientTransferMethodInstant RecipientTransferMethodType = "instant"
	RecipientTransferMethodStandard RecipientTransferMethodType = "standard"
)
type RecipientTransferDestination struct {
	BankAccount *BankAccount                     `json:"-"`
	Card        *Card                            `json:"-"`
	ID          string                           `json:"id"`
	Type        RecipientTransferDestinationType `json:"object"`
}
type RecipientTransfer struct {
	Amount             int64                        `json:"amount"`
	AmountReversed     int64                        `json:"amount_reversed"`
	BalanceTransaction *Transaction                 `json:"balance_transaction"`
	Bank               *BankAccount                 `json:"bank_account"`
	Card               *Card                        `json:"card"`
	Created            int64                        `json:"created"`
	Currency           Currency                     `json:"currency"`
	Date               int64                        `json:"date"`
	Desc               string                       `json:"description"`
	Dest               RecipientTransferDestination `json:"destination"`
	FailCode           RecipientTransferFailCode    `json:"failure_code"`
	FailMsg            string                       `json:"failure_message"`
	ID                 string                       `json:"id"`
	Live               bool                         `json:"livemode"`
	Meta               map[string]string            `json:"metadata"`
	Method             RecipientTransferMethodType  `json:"method"`
	Recipient          *Recipient                   `json:"recipient"`
	Reversals          *ReversalList                `json:"reversals"`
	Reversed           bool                         `json:"reversed"`
	SourceTx           *TransactionSource           `json:"source_transaction"`
	SourceType         RecipientTransferSourceType  `json:"source_type"`
	Statement          string                       `json:"statement_descriptor"`
	Status             RecipientTransferStatus      `json:"status"`
	Type               RecipientTransferType        `json:"type"`
}
func (t *RecipientTransfer) UnmarshalJSON(data []byte) error {
	type transfer RecipientTransfer
	var tb transfer
	err := json.Unmarshal(data, &tb)
	if err == nil {
		*t = RecipientTransfer(tb)
	} else {
		t.ID = string(data[1 : len(data)-1])
	}
	return nil
}
func (d *RecipientTransferDestination) UnmarshalJSON(data []byte) error {
	type dest RecipientTransferDestination
	var dd dest
	err := json.Unmarshal(data, &dd)
	if err == nil {
		*d = RecipientTransferDestination(dd)
		switch d.Type {
		case RecipientTransferDestinationBankAccount:
			err = json.Unmarshal(data, &d.BankAccount)
		case RecipientTransferDestinationCard:
			err = json.Unmarshal(data, &d.Card)
		}
		if err != nil {
			return err
		}
	} else {
		d.ID = string(data[1 : len(data)-1])
	}
	return nil
}