Update shipping address to reflect paypal API

This commit is contained in:
Roopak Venkatakrishnan 2019-07-21 12:46:13 -07:00
parent 888360be1f
commit 80ccf89d37
No known key found for this signature in database
GPG Key ID: 01FD0BAB58C09E04

View File

@ -337,7 +337,7 @@ type (
PurchaseUnitRequest struct { PurchaseUnitRequest struct {
ReferenceID string `json:"reference_id,omitempty"` ReferenceID string `json:"reference_id,omitempty"`
Amount *PurchaseUnitAmount `json:"amount"` Amount *PurchaseUnitAmount `json:"amount"`
Payee *PayeeForOrders `json:"payee,omitempty"` Payee *PayeeForOrders `json:"payee,omitempty"`
Description string `json:"description,omitempty"` Description string `json:"description,omitempty"`
CustomID string `json:"custom_id,omitempty"` CustomID string `json:"custom_id,omitempty"`
InvoiceID string `json:"invoice_id,omitempty"` InvoiceID string `json:"invoice_id,omitempty"`
@ -528,6 +528,16 @@ type (
Phone string `json:"phone,omitempty"` Phone string `json:"phone,omitempty"`
} }
// ShippingDetailAddressPortable used with create orders
ShippingDetailAddressPortable struct {
AddressLine1 string `json:"address_line_1,omitempty"`
AddressLine2 string `json:"address_line_2,omitempty"`
AdminArea1 string `json:"admin_area_1,omitempty"`
AdminArea2 string `json:"admin_area_2,omitempty"`
PostalCode string `json:"postal_code,omitempty"`
CountryCode string `json:"country_code,omitempty"`
}
// Name struct // Name struct
Name struct { Name struct {
FullName string `json:"full_name,omitempty"` FullName string `json:"full_name,omitempty"`
@ -535,8 +545,8 @@ type (
// ShippingDetail struct // ShippingDetail struct
ShippingDetail struct { ShippingDetail struct {
Name Name `json:"name,omitempty"` Name *Name `json:"name,omitempty"`
Address Address `json:"address,omitempty"` Address *ShippingDetailAddressPortable `json:"address,omitempty"`
} }
expirationTime int64 expirationTime int64