Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing account reference attribute #34

Merged
merged 10 commits into from
Apr 8, 2024
9 changes: 4 additions & 5 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,11 +455,10 @@ type DeviceLinkGroupLink struct {

// DeviceLinkGroupMetroLink describes metro details and throughput
type DeviceLinkGroupMetroLink struct {
AccountNumber *string
AccountReferenceId *string
MetroCode *string
Throughput *string
ThroughputUnit *string
AccountNumber *string
MetroCode *string
Throughput *string
ThroughputUnit *string
}

// ClusterDetails describes Network Edge cluster device details
Expand Down
9 changes: 4 additions & 5 deletions internal/api/device_link.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ type DeviceLinkGroupLink struct {
DestinationZoneCode *string `json:"destinationZoneCode,omitempty"`
}
type DeviceLinkGroupMetroLink struct {
AccountNumber *string `json:"accountNumber,omitempty"`
AccountReferenceId *string `json:"accountReferenceID,omitempty"`
MetroCode *string `json:"metroCode,omitempty"`
Throughput *string `json:"throughput,omitempty"`
ThroughputUnit *string `json:"throughputUnit,omitempty"`
AccountNumber *string `json:"accountNumber,omitempty"`
MetroCode *string `json:"metroCode,omitempty"`
Throughput *string `json:"throughput,omitempty"`
ThroughputUnit *string `json:"throughputUnit,omitempty"`
}

type DeviceLinkGroupCreateResponse struct {
Expand Down
18 changes: 8 additions & 10 deletions rest_device_link.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,10 @@ func mapDeviceLinkGroupLinkAPIToDomain(apiLinkGroupLink api.DeviceLinkGroupLink)

func mapDeviceLinkGroupMetroLinkAPIToDomain(apiLinkGroupMetroLink api.DeviceLinkGroupMetroLink) DeviceLinkGroupMetroLink {
return DeviceLinkGroupMetroLink{
AccountNumber: apiLinkGroupMetroLink.AccountNumber,
AccountReferenceId: apiLinkGroupMetroLink.AccountReferenceId,
MetroCode: apiLinkGroupMetroLink.MetroCode,
Throughput: apiLinkGroupMetroLink.Throughput,
ThroughputUnit: apiLinkGroupMetroLink.ThroughputUnit,
AccountNumber: apiLinkGroupMetroLink.AccountNumber,
MetroCode: apiLinkGroupMetroLink.MetroCode,
Throughput: apiLinkGroupMetroLink.Throughput,
ThroughputUnit: apiLinkGroupMetroLink.ThroughputUnit,
}
}

Expand Down Expand Up @@ -241,10 +240,9 @@ func mapDeviceLinkGroupLinkDomainToAPI(linkGroupLink DeviceLinkGroupLink) api.De

func mapDeviceLinkGroupMetroLinkDomainToAPI(metroLink DeviceLinkGroupMetroLink) api.DeviceLinkGroupMetroLink {
return api.DeviceLinkGroupMetroLink{
AccountNumber: metroLink.AccountNumber,
AccountReferenceId: metroLink.AccountReferenceId,
MetroCode: metroLink.MetroCode,
Throughput: metroLink.Throughput,
ThroughputUnit: metroLink.ThroughputUnit,
AccountNumber: metroLink.AccountNumber,
MetroCode: metroLink.MetroCode,
Throughput: metroLink.Throughput,
ThroughputUnit: metroLink.ThroughputUnit,
}
}
2 changes: 0 additions & 2 deletions test-fixtures/ne_device_link_get_resp.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@
"metroLinks": [
{
"accountNumber": "592205",
"accountReferenceId": "",
"metroCode": "MX",
"throughput": "10",
"throughputUnit": "Mbps"
},
{
"account_number": "606828",
"accountReferenceId": "",
"metroCode": "LD",
"throughput": "10",
"throughputUnit": "Mbps"
Expand Down
Loading