From dd82be9889c8fe1522071269225d09d3a12de97a Mon Sep 17 00:00:00 2001 From: Roopak Venkatakrishnan Date: Thu, 27 Jun 2019 10:55:21 -0700 Subject: [PATCH 1/2] use specific payee --- types.go | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/types.go b/types.go index 5ff7fe1..fdb5aad 100644 --- a/types.go +++ b/types.go @@ -335,15 +335,15 @@ type ( // PurchaseUnitRequest struct PurchaseUnitRequest struct { - ReferenceID string `json:"reference_id"` - Amount *PurchaseUnitAmount `json:"amount"` - Payee Payee `json:"payee,omitempty"` - Description string `json:"description,omitempty"` - CustomID string `json:"custom_id,omitempty"` - InvoiceID string `json:"invoice_id,omitempty"` - SoftDescriptor string `json:"soft_descriptor,omitempty"` - Items []Item `json:"items,omitempty"` - Shipping ShippingDetail `json:"shipping,omitempty"` + ReferenceID string `json:"reference_id"` + Amount *PurchaseUnitAmount `json:"amount"` + Payee PayeeForPurchaseUnitRequest `json:"payee,omitempty"` + Description string `json:"description,omitempty"` + CustomID string `json:"custom_id,omitempty"` + InvoiceID string `json:"invoice_id,omitempty"` + SoftDescriptor string `json:"soft_descriptor,omitempty"` + Items []Item `json:"items,omitempty"` + Shipping ShippingDetail `json:"shipping,omitempty"` } // MerchantPreferences struct @@ -569,6 +569,12 @@ type ( Email string `json:"email"` } + // PayeeForPurchaseUnitRequest struct + PayeeForPurchaseUnitRequest struct { + EmailAddress string `json:"email_address"` + MerchantID string `json:"merchant_id"` + } + // UserInfo struct UserInfo struct { ID string `json:"user_id"` From f51b1fe7a07bb252c548a874d5872a01a9ddb51c Mon Sep 17 00:00:00 2001 From: Roopak Venkatakrishnan Date: Thu, 27 Jun 2019 11:39:07 -0700 Subject: [PATCH 2/2] fixes --- types.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/types.go b/types.go index fdb5aad..c4204be 100644 --- a/types.go +++ b/types.go @@ -335,15 +335,15 @@ type ( // PurchaseUnitRequest struct PurchaseUnitRequest struct { - ReferenceID string `json:"reference_id"` - Amount *PurchaseUnitAmount `json:"amount"` - Payee PayeeForPurchaseUnitRequest `json:"payee,omitempty"` - Description string `json:"description,omitempty"` - CustomID string `json:"custom_id,omitempty"` - InvoiceID string `json:"invoice_id,omitempty"` - SoftDescriptor string `json:"soft_descriptor,omitempty"` - Items []Item `json:"items,omitempty"` - Shipping ShippingDetail `json:"shipping,omitempty"` + ReferenceID string `json:"reference_id,omitempty"` + Amount *PurchaseUnitAmount `json:"amount"` + Payee PayeeForOrders `json:"payee,omitempty"` + Description string `json:"description,omitempty"` + CustomID string `json:"custom_id,omitempty"` + InvoiceID string `json:"invoice_id,omitempty"` + SoftDescriptor string `json:"soft_descriptor,omitempty"` + Items []Item `json:"items,omitempty"` + Shipping ShippingDetail `json:"shipping,omitempty"` } // MerchantPreferences struct @@ -569,10 +569,10 @@ type ( Email string `json:"email"` } - // PayeeForPurchaseUnitRequest struct - PayeeForPurchaseUnitRequest struct { - EmailAddress string `json:"email_address"` - MerchantID string `json:"merchant_id"` + // PayeeForOrders struct + PayeeForOrders struct { + EmailAddress string `json:"email_address,omitempty"` + MerchantID string `json:"merchant_id,omitempty"` } // UserInfo struct