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

Add Metadata and Object on Topup #1108

Merged
merged 1 commit into from
May 29, 2020
Merged
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
6 changes: 5 additions & 1 deletion topup.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ type TopupList struct {
type Topup struct {
APIResource
Amount int64 `json:"amount"`
ArrivalDate int64 `json:"arrival_date"`
BalanceTransaction *BalanceTransaction `json:"balance_transaction"`
Created int64 `json:"created"`
Currency Currency `json:"currency"`
Expand All @@ -50,8 +49,13 @@ type Topup struct {
FailureMessage string `json:"failure_message"`
ID string `json:"id"`
Livemode bool `json:"livemode"`
Metadata map[string]string `json:"metadata"`
Object string `json:"object"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this one is an enum with just one value topup for now, right? Do we want to add that one value as TopupObject or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've never done this so no. It's really just a string and I've added it manually to resources when I catch it.

Source *PaymentSource `json:"source"`
StatementDescriptor string `json:"statement_descriptor"`
Status string `json:"status"`
TransferGroup string `json:"transfer_group"`

// The following property is deprecated
ArrivalDate int64 `json:"arrival_date"`
}