forked from go-packages/paypal
update order struct, add purchase units
This commit is contained in:
parent
4557d3e5a7
commit
561690178b
32
types.go
32
types.go
|
@ -94,12 +94,6 @@ type (
|
||||||
Value string `json:"value"`
|
Value string `json:"value"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// GrossTotalAmount struct
|
|
||||||
GrossTotalAmount struct {
|
|
||||||
Value string `json:"value"`
|
|
||||||
Currency string `json:"currency"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// ApplicationContext struct
|
// ApplicationContext struct
|
||||||
ApplicationContext struct {
|
ApplicationContext struct {
|
||||||
BrandName string `json:"brand_name"`
|
BrandName string `json:"brand_name"`
|
||||||
|
@ -319,6 +313,18 @@ type (
|
||||||
Enctype string `json:"enctype,omitempty"`
|
Enctype string `json:"enctype,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PurchaseUnitAmount struct
|
||||||
|
PurchaseUnitAmount struct {
|
||||||
|
Currency string `json:"currency_code"`
|
||||||
|
Value string `json:"value"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// PurchaseUnit struct
|
||||||
|
PurchaseUnit struct {
|
||||||
|
ReferenceID string `json:"reference_id"`
|
||||||
|
Amount *PurchaseUnitAmount `json:"amount,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
// MerchantPreferences struct
|
// MerchantPreferences struct
|
||||||
MerchantPreferences struct {
|
MerchantPreferences struct {
|
||||||
SetupFee *AmountPayout `json:"setup_fee,omitempty"`
|
SetupFee *AmountPayout `json:"setup_fee,omitempty"`
|
||||||
|
@ -331,13 +337,13 @@ type (
|
||||||
|
|
||||||
// Order struct
|
// Order struct
|
||||||
Order struct {
|
Order struct {
|
||||||
ID string `json:"id,omitempty"`
|
ID string `json:"id,omitempty"`
|
||||||
Status string `json:"status,omitempty"`
|
Status string `json:"status,omitempty"`
|
||||||
Intent string `json:"intent,omitempty"`
|
Intent string `json:"intent,omitempty"`
|
||||||
GrossTotalAmount *GrossTotalAmount `json:"gross_total_amount,omitempty"`
|
PurchaseUnits []PurchaseUnit `json:"purchase_units,omitempty"`
|
||||||
Links []Link `json:"links,omitempty"`
|
Links []Link `json:"links,omitempty"`
|
||||||
CreateTime *time.Time `json:"create_time,omitempty"`
|
CreateTime *time.Time `json:"create_time,omitempty"`
|
||||||
UpdateTime *time.Time `json:"update_time,omitempty"`
|
UpdateTime *time.Time `json:"update_time,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Payer struct
|
// Payer struct
|
||||||
|
|
Loading…
Reference in New Issue
Block a user