diff --git a/partner_interconnect_attachments.go b/partner_interconnect_attachments.go index e2707dc..e0a439f 100644 --- a/partner_interconnect_attachments.go +++ b/partner_interconnect_attachments.go @@ -106,8 +106,9 @@ type BGP struct { // ServiceKey represents the service key of a Partner Interconnect Attachment. type ServiceKey struct { - ServiceKey string `json:"service_key,omitempty"` - State string `json:"state,omitempty"` + Value string `json:"value,omitempty"` + State string `json:"state,omitempty"` + CreatedAt time.Time `json:"created_at,omitempty"` } // RemoteRoute represents a route for a Partner Interconnect Attachment. diff --git a/partner_interconnect_attachments_test.go b/partner_interconnect_attachments_test.go index 0db54d4..fc8441f 100644 --- a/partner_interconnect_attachments_test.go +++ b/partner_interconnect_attachments_test.go @@ -292,13 +292,17 @@ func TestPartnerInterconnectAttachment_GetServiceKey(t *testing.T) { svc := client.PartnerInterconnectAttachments path := "/v2/partner_interconnect/attachments" want := &ServiceKey{ - ServiceKey: "my-service-key", + Value: "my-service-key", + State: "ACTIVE", + CreatedAt: time.Date(2024, 12, 26, 21, 48, 40, 995304079, time.UTC), } id := "880b7f98-f062-404d-b33c-458d545696f6" jsonBlob := ` { "service_key": { - "service_key": "my-service-key" + "value": "my-service-key", + "state": "ACTIVE", + "created_at": "2024-12-26T21:48:40.995304079Z" } } `