forked from braintree-go/braintree-go
-
Notifications
You must be signed in to change notification settings - Fork 12
/
address.go
47 lines (43 loc) · 1.95 KB
/
address.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package braintree
import (
"encoding/xml"
"time"
)
type Address struct {
XMLName xml.Name
Id string `xml:"id,omitempty"`
CustomerId string `xml:"customer-id,omitempty"`
FirstName string `xml:"first-name,omitempty"`
LastName string `xml:"last-name,omitempty"`
Company string `xml:"company,omitempty"`
StreetAddress string `xml:"street-address,omitempty"`
ExtendedAddress string `xml:"extended-address,omitempty"`
Locality string `xml:"locality,omitempty"`
Region string `xml:"region,omitempty"`
PostalCode string `xml:"postal-code,omitempty"`
CountryCodeAlpha2 string `xml:"country-code-alpha2,omitempty"`
CountryCodeAlpha3 string `xml:"country-code-alpha3,omitempty"`
CountryCodeNumeric string `xml:"country-code-numeric,omitempty"`
CountryName string `xml:"country-name,omitempty"`
CreatedAt *time.Time `xml:"created-at,omitempty"`
UpdatedAt *time.Time `xml:"updated-at,omitempty"`
}
type AddressRequest struct {
XMLName xml.Name `xml:"address"`
FirstName string `xml:"first-name,omitempty"`
LastName string `xml:"last-name,omitempty"`
Company string `xml:"company,omitempty"`
StreetAddress string `xml:"street-address,omitempty"`
ExtendedAddress string `xml:"extended-address,omitempty"`
Locality string `xml:"locality,omitempty"`
Region string `xml:"region,omitempty"`
PostalCode string `xml:"postal-code,omitempty"`
CountryCodeAlpha2 string `xml:"country-code-alpha2,omitempty"`
CountryCodeAlpha3 string `xml:"country-code-alpha3,omitempty"`
CountryCodeNumeric string `xml:"country-code-numeric,omitempty"`
CountryName string `xml:"country-name,omitempty"`
}
type Addresses struct {
XMLName string `xml:"addresses"`
Address []*Address `xml:"address"`
}