Skip to content

Commit

Permalink
Merge pull request #164 from jasonfriedland/ISSUE-163
Browse files Browse the repository at this point in the history
ISSUE-163: Add missing sub-account ID field on SuppressionEntry type
  • Loading branch information
yargevad authored Nov 9, 2021
2 parents 5b781fa + 3bb3bf4 commit 7c43df4
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 7c43df4

Please sign in to comment.