forked from omise/omise-go
/
charge.go
37 lines (29 loc) · 1.1 KB
/
charge.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package omise
// Charge represents Omise's charge object.
// See https://www.omise.co/charges-api for more information.
type Charge struct {
Base
Status ChargeStatus `json:"status"`
Amount int64 `json:"amount"`
Currency string `json:"currency"`
Description *string `json:"description"`
Capture bool `json:"capture"`
Authorized bool `json:"authorized"`
Reversed bool `json:"reversed"`
Paid bool `json:"paid"`
Transaction string `json:"transaction"`
Card *Card `json:"card"`
Refunded int64 `json:"refunded"`
Refunds *RefundList `json:"refunds"`
FailureCode *string `json:"failure_code"`
FailureMessage *string `json:"failure_message"`
CustomerID string `json:"customer"`
IP *string `json:"ip"`
Dispute *Dispute `json:"dispute"`
ReturnURI string `json:"return_uri"`
AuthorizeURI string `json:"authorize_uri"`
SourceOfFund SourceOfFunds `json:"source_of_fund"`
Offsite OffsiteTypes `json:"offsite"`
Source *Source `json:"source"`
Metadata map[string]interface{} `json:"metadata"`
}