From 4557d3e5a78cccc5ece2719050783e3e1fa55578 Mon Sep 17 00:00:00 2001 From: tungquach Date: Sun, 21 Apr 2019 10:44:07 +0700 Subject: [PATCH] update order struct --- types.go | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/types.go b/types.go index 9eee27f..c9fcf66 100644 --- a/types.go +++ b/types.go @@ -94,6 +94,12 @@ type ( Value string `json:"value"` } + // GrossTotalAmount struct + GrossTotalAmount struct { + Value string `json:"value"` + Currency string `json:"currency"` + } + // ApplicationContext struct ApplicationContext struct { BrandName string `json:"brand_name"` @@ -325,14 +331,13 @@ type ( // Order struct Order struct { - ID string `json:"id,omitempty"` - CreateTime *time.Time `json:"create_time,omitempty"` - UpdateTime *time.Time `json:"update_time,omitempty"` - State string `json:"state,omitempty"` - Amount *Amount `json:"amount,omitempty"` - PendingReason string `json:"pending_reason,omitempty"` - ParentPayment string `json:"parent_payment,omitempty"` - Links []Link `json:"links,omitempty"` + ID string `json:"id,omitempty"` + Status string `json:"status,omitempty"` + Intent string `json:"intent,omitempty"` + GrossTotalAmount *GrossTotalAmount `json:"gross_total_amount,omitempty"` + Links []Link `json:"links,omitempty"` + CreateTime *time.Time `json:"create_time,omitempty"` + UpdateTime *time.Time `json:"update_time,omitempty"` } // Payer struct