fix payer for orders

This commit is contained in:
Roopak Venkatakrishnan 2019-07-21 18:29:26 -07:00
parent 80ccf89d37
commit ed0c8f85a0
No known key found for this signature in database
GPG Key ID: 01FD0BAB58C09E04

View File

@ -333,6 +333,40 @@ type (
Amount *PurchaseUnitAmount `json:"amount,omitempty"` Amount *PurchaseUnitAmount `json:"amount,omitempty"`
} }
// TaxInfo used for orders.
TaxInfo struct {
TaxID string `json:"tax_id,omitempty"`
TaxIDType string `json:"tax_id_type,omitempty"`
}
// PhoneWithTypeNumber struct for PhoneWithType
PhoneWithTypeNumber struct {
NationalNumber string `json:"national_number,omitempty"`
}
// PhoneWithType struct used for orders
PhoneWithType struct {
PhoneType string `json:"phone_type,omitempty"`
PhoneNumber *PhoneWithTypeNumber `json:"phone_number,omitempty"`
}
// CreateOrderPayerName create order payer name
CreateOrderPayerName struct {
GivenName string `json:"given_name,omitempty"`
Surname string `json:"surname,omitempty"`
}
// CreateOrderPayer used with create order requests
CreateOrderPayer struct {
Name *CreateOrderPayerName `json:"name,omitempty"`
EmailAddress string `json:"email_address,omitempty"`
PayerID string `json:"payer_id,omitempty"`
Phone *PhoneWithType `json:"phone,omitempty"`
BirthDate string `json:"birth_date,omitempty"`
TaxInfo *TaxInfo `json:"tax_info,omitempty"`
Address *ShippingDetailAddressPortable `json:"address,omitempty"`
}
// PurchaseUnitRequest struct // PurchaseUnitRequest struct
PurchaseUnitRequest struct { PurchaseUnitRequest struct {
ReferenceID string `json:"reference_id,omitempty"` ReferenceID string `json:"reference_id,omitempty"`