Skip to content

Commit e7bca29

Browse files
committed
fixed a naming issue with the Identifier asset type
1 parent 8950411 commit e7bca29

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

general/identifier.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const (
5757
// - Issuing agent (e.g., ContactRecord)
5858
type Identifier struct {
5959
UniqueID string `json:"unique_id"`
60-
EntityID string `json:"entity_id"`
60+
ID string `json:"id"`
6161
Type string `json:"id_type"`
6262
CreationDate string `json:"creation_date,omitempty"`
6363
UpdatedDate string `json:"update_date,omitempty"`

general/identifier_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func TestIdentifierKey(t *testing.T) {
1515
want := "Legal Entity Identifier:549300XMYB546ZI1F126"
1616
i := Identifier{
1717
UniqueID: want,
18-
EntityID: "549300XMYB546ZI1F126",
18+
ID: "549300XMYB546ZI1F126",
1919
Type: "Legal Entity Identifier"}
2020

2121
if got := i.Key(); got != want {
@@ -39,14 +39,14 @@ func TestIdentifierAssetType(t *testing.T) {
3939
func TestIdentifierJSON(t *testing.T) {
4040
i := Identifier{
4141
UniqueID: "Legal Entity Identifier:549300XMYB546ZI1F126",
42-
EntityID: "549300XMYB546ZI1F126",
42+
ID: "549300XMYB546ZI1F126",
4343
Type: "Legal Entity Identifier",
4444
CreationDate: "2013-07-24T14:15:00Z",
4545
UpdatedDate: "2023-08-04T17:33:45Z",
4646
ExpirationDate: "2020-01-16T00:32:00Z",
4747
Status: "ACTIVE",
4848
}
49-
expected := `{"unique_id":"Legal Entity Identifier:549300XMYB546ZI1F126","entity_id":"549300XMYB546ZI1F126","id_type":"Legal Entity Identifier","creation_date":"2013-07-24T14:15:00Z","update_date":"2023-08-04T17:33:45Z","expiration_date":"2020-01-16T00:32:00Z","status":"ACTIVE"}`
49+
expected := `{"unique_id":"Legal Entity Identifier:549300XMYB546ZI1F126","id":"549300XMYB546ZI1F126","id_type":"Legal Entity Identifier","creation_date":"2013-07-24T14:15:00Z","update_date":"2023-08-04T17:33:45Z","expiration_date":"2020-01-16T00:32:00Z","status":"ACTIVE"}`
5050
actual, err := i.JSON()
5151

5252
if err != nil {

0 commit comments

Comments
 (0)