diff --git a/duffel.go b/duffel.go index 873cb54..4a6189f 100644 --- a/duffel.go +++ b/duffel.go @@ -74,6 +74,13 @@ type ( CabinClassMarketingName string `json:"cabin_class_marketing_name"` CabinClass CabinClass `json:"cabin_class"` Baggages []Baggage `json:"baggages"` + Seat Seat `json:"seat"` + } + + Seat struct { + Name string `json:"name,omitempty"` + Disclosures []string `json:"disclosures,omitempty"` + Designator string `json:"designator,omitempty"` } Aircraft struct { diff --git a/fixtures/200-get-order.json b/fixtures/200-get-order.json index 19fc8a4..0a1529a 100644 --- a/fixtures/200-get-order.json +++ b/fixtures/200-get-order.json @@ -22,6 +22,7 @@ "passenger_id": "passenger_0", "cabin_class_marketing_name": "Economy Basic", "cabin_class": "economy", + "fare_basis_code": "OXZ0RO", "baggages": [ { "type": "checked", diff --git a/orders_test.go b/orders_test.go index e1cb448..e90aac3 100644 --- a/orders_test.go +++ b/orders_test.go @@ -89,6 +89,11 @@ func TestCreateOrder(t *testing.T) { a.Len(order.Slices[0].Segments, 1) a.Len(order.Slices[0].Segments[0].Passengers, 1) a.Equal("passenger_0", order.Slices[0].Segments[0].Passengers[0].ID) + a.Equal(CabinClassEconomy, order.Slices[0].Segments[0].Passengers[0].CabinClass) + a.Equal("Economy Basic", order.Slices[0].Segments[0].Passengers[0].CabinClassMarketingName) + a.Equal("14B", order.Slices[0].Segments[0].Passengers[0].Seat.Designator) + a.Equal("Exit row seat", order.Slices[0].Segments[0].Passengers[0].Seat.Name) + a.Equal([]string{"Do not seat children in exit row seats", "Do not seat passengers with special needs in exit row seats"}, order.Slices[0].Segments[0].Passengers[0].Seat.Disclosures) } func TestListOrders(t *testing.T) {