Repository: cloudflare/cloudflare-go
Pull request #3699 (2024-12-04 11:30:38)

Add `dns_destination_ips_id` and `ipv4_destination_backup` to TeamsLocation
Add these missing fields to `TeamsLocation`

## Description


## Has your change been tested?

Ran it against my account and updated unit tests.

```
ctx := context.Background()
accountId := ""
locations, _, err := api.TeamsLocations(ctx, accountId)
if err != nil {
	log.Fatal(err)
}
for _, l := range locations {
	fmt.Println(l)
}

location := locations[0]
location.IPv4DestinationBackup = "172.64.36.3"
location.DnsDestinationIpsIds = "0e4a32c6-6fb8-4858-9296-98f51631e8e5"
location, err = api.UpdateTeamsLocation(ctx, accountId, location)
if err != nil {
	log.Fatal(err)
}
println(location.DnsDestinationIpsIds)
println(location.IPv4DestinationBackup)
```

## Types of changes

What sort of change does your code introduce/modify?
- [x] New feature (non-breaking change which adds functionality)

## Checklist:

- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have added tests to cover my changes.
- [x] All new and existing tests passed.
- [x] This change is using publicly documented in [cloudflare/api-schemas](https://github.com/cloudflare/api-schemas) 
      and relies on stable APIs.

[1]: https://help.github.com/articles/closing-issues-using-keywords/


github-actions[bot]: Oops! It looks like no changelog entry is attached to this PR. Please include a release note as described in https://github.com/cloudflare/cloudflare-go/blob/master/docs/changelog-process.md.

Example: 

~~~
```release-note:TYPE
Release note
```
~~~

If you do not require a release note to be included, please add the `workflow/skip-changelog-entry` label.

Patch:
diff --git a/.changelog/3699.txt b/.changelog/3699.txt
new file mode 100644
index 000000000..715f54179
--- /dev/null
+++ b/.changelog/3699.txt
@@ -0,0 +1,3 @@
+```release-note:enhancement
+teams_locations: Add dns_destination_ips_id and ipv4_destination_backup
+```
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 87187ed89..84a55a165 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,25 +1,4 @@
-## 0.112.0 (Unreleased)
-
-## 0.111.0 (December 4th, 2024)
-
-BREAKING CHANGES:
-
-* access: Remove the deprecated `SelfHostedDomains` field from Access applications. Use `Destinations` instead. ([#3667](https://github.com/cloudflare/cloudflare-go/issues/3667))
-
-ENHANCEMENTS:
-
-* Adds allow_email_alias connection rule boolean to access infra policy payload ([#3675](https://github.com/cloudflare/cloudflare-go/issues/3675))
-* access: Add `DomainType` field to Access applications. ([#3667](https://github.com/cloudflare/cloudflare-go/issues/3667))
-* leaked_credential_check: add new methods to interact with leaked credential check cloudfare API ([#3634](https://github.com/cloudflare/cloudflare-go/issues/3634))
-
-BUG FIXES:
-
-* authenticated_origin_pulls_per_hostname: fixes the struct to allow null (nil) values on the `Enabled` property ([#3680](https://github.com/cloudflare/cloudflare-go/issues/3680))
-* snippets_rules: fix upsert request type ([#3669](https://github.com/cloudflare/cloudflare-go/issues/3669))
-
-DEPENDENCIES:
-
-* deps: bumps github.com/stretchr/testify from 1.9.0 to 1.10.0 ([#3672](https://github.com/cloudflare/cloudflare-go/issues/3672))
+## 0.111.0 (Unreleased)
 
 ## 0.110.0 (November 20th, 2024)
 
diff --git a/teams_locations.go b/teams_locations.go
index b6c58304e..5d3402311 100644
--- a/teams_locations.go
+++ b/teams_locations.go
@@ -34,6 +34,8 @@ type TeamsLocation struct {
 	Subdomain             string                 `json:"doh_subdomain"`
 	AnonymizedLogsEnabled bool                   `json:"anonymized_logs_enabled"`
 	IPv4Destination       string                 `json:"ipv4_destination"`
+	IPv4DestinationBackup string                 `json:"ipv4_destination_backup"`
+	DNSDestinationIPsID   string                 `json:"dns_destination_ips_id"`
 	ClientDefault         bool                   `json:"client_default"`
 	ECSSupport            *bool                  `json:"ecs_support,omitempty"`
 


Test patch:
diff --git a/teams_locations_test.go b/teams_locations_test.go
index 4eb615b1b..51ab7cf59 100644
--- a/teams_locations_test.go
+++ b/teams_locations_test.go
@@ -36,7 +36,9 @@ func TestTeamsLocations(t *testing.T) {
 					"ip": "2a06:98c1:54::2419",
 					"doh_subdomain": "q15l7x2lbw",
 					"anonymized_logs_enabled": false,
-					"ipv4_destination": null,
+					"ipv4_destination": "1.2.3.4",
+					"ipv4_destination_backup": "1.2.3.5",
+					"dns_destination_ips_id": "9da8e0c9-e9cc-4bbd-85c5-b351fc373354",
 					"client_default": false,
 					"ecs_support": false,
 					"created_at": "2020-05-18T22:07:03Z",
@@ -59,7 +61,9 @@ func TestTeamsLocations(t *testing.T) {
 		Ip:                    "2a06:98c1:54::2419",
 		Subdomain:             "q15l7x2lbw",
 		AnonymizedLogsEnabled: false,
-		IPv4Destination:       "",
+		IPv4Destination:       "1.2.3.4",
+		IPv4DestinationBackup: "1.2.3.5",
+		DNSDestinationIPsID:   "9da8e0c9-e9cc-4bbd-85c5-b351fc373354",
 		ClientDefault:         false,
 		ECSSupport:            BoolPtr(false),
 		CreatedAt:             &createdAt,