Skip to content

Commit

Permalink
Add missing sub-account ID field on SuppressionEntry type, update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jfriedland-atlassian committed Nov 2, 2021
1 parent 5b781fa commit 3bb3bf4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions suppression_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type SuppressionEntry struct {
Description string `json:"description,omitempty"`
Updated string `json:"updated,omitempty"`
Created string `json:"created,omitempty"`
SubAccountID string `json:"subaccount_id,omitempty"`
}

// WritableSuppressionEntry stores a recipient’s opt-out preferences. It is a list of recipient email addresses to which you do NOT want to send email.
Expand Down
2 changes: 2 additions & 0 deletions suppression_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,8 @@ func verifySuppressionEnty(t *testing.T, suppressionEntry *sp.SuppressionEntry)
testFailVerbose(t, nil, "Unexpected Updated: %s", suppressionEntry.Updated)
} else if suppressionEntry.NonTransactional != true {
testFailVerbose(t, nil, "Unexpected NonTransactional value")
} else if suppressionEntry.SubAccountID != "42" {
testFailVerbose(t, nil, "Unexpected SubAccountID value")
}
}

Expand Down
3 changes: 2 additions & 1 deletion test/json/suppression_entry_simple.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"type": "non_transactional",
"created": "2016-05-02T16:29:56+00:00",
"updated": "2016-05-02T17:20:50+00:00",
"non_transactional": true
"non_transactional": true,
"subaccount_id": "42"
}
3 changes: 2 additions & 1 deletion test/json/suppression_retrieve.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"type": "non_transactional",
"created": "2016-05-02T16:29:56+00:00",
"updated": "2016-05-02T17:20:50+00:00",
"non_transactional": true
"non_transactional": true,
"subaccount_id": "42"
}
],
"links": [],
Expand Down

0 comments on commit 3bb3bf4

Please sign in to comment.