forked from xendit/xendit-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
card.go
61 lines (57 loc) · 3.11 KB
/
card.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package xendit
import "time"
// CardCharge contains data from Xendit's API response of card's charge related requests
// and Create Authorization request.
// For more details see https://xendit.github.io/apireference/?bash#create-charge
// and https://xendit.github.io/apireference/?bash#create-authorization.
// For documentation of subpackage card, checkout https://pkg.go.dev/github.com/xendit/xendit-go/card
type CardCharge struct {
ID string `json:"id"`
Status string `json:"status"`
MerchantID string `json:"merchant_id"`
Created *time.Time `json:"created"`
BusinessID string `json:"business_id"`
AuthorizedAmount float64 `json:"authorized_amount"`
ExternalID string `json:"external_id"`
MerchantReferenceCode string `json:"merchant_reference_code"`
ChargeType string `json:"charge_type"`
CardBrand string `json:"card_brand"`
MaskedCardNumber string `json:"masked_card_number"`
CaptureAmount float64 `json:"capture_amount,omitempty"`
ECI string `json:"eci,omitempty"`
FailureReason string `json:"failure_reason,omitempty"`
CardType string `json:"card_type,omitempty"`
BankReconciliationID string `json:"bank_reconciliation_id,omitempty"`
Descriptor string `json:"descriptor,omitempty"`
MidLabel string `json:"mid_label,omitempty"`
Currency string `json:"currency,omitempty"`
}
// CardRefund contains data from Xendit's API response of card's Create Refund request.
// For more details see https://xendit.github.io/apireference/?bash#CreateRefund.
// For documentation of subpackage card, checkout https://pkg.go.dev/github.com/xendit/xendit-go/card
type CardRefund struct {
ID string `json:"id"`
Updated *time.Time `json:"updated"`
Created *time.Time `json:"created"`
CreditCardChargeID string `json:"credit_card_charge_id"`
UserID string `json:"user_id"`
Amount float64 `json:"amount"`
ExternalID string `json:"external_id"`
Currency string `json:"currency"`
Status string `json:"status"`
FeeRefundAmount float64 `json:"fee_refund_amount"`
FailureReason string `json:"failure_reason"`
}
// CardReverseAuthorization contains data from Xendit's API response of card's Reverse Authorization request.
// For more details see https://xendit.github.io/apireference/?bash#reverse-authorization.
// For documentation of subpackage card, checkout https://pkg.go.dev/github.com/xendit/xendit-go/card
type CardReverseAuthorization struct {
ID string `json:"id"`
ExternalID string `json:"external_id"`
CreditCardChargeID string `json:"credit_card_charge_id"`
BusinessID string `json:"business_id"`
Amount float64 `json:"amount"`
Status string `json:"status"`
Created *time.Time `json:"created"`
Currency string `json:"currency,omitempty"`
}