Skip to content

Commit f0d90eb

Browse files
author
jacksiegel
authored
Fix status object in /item/get response (#93)
1 parent d03fb88 commit f0d90eb

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

plaid/item.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@ import (
77
)
88

99
type Item struct {
10-
AvailableProducts []string `json:"available_products"`
11-
BilledProducts []string `json:"billed_products"`
12-
Error Error `json:"error"`
13-
InstitutionID string `json:"institution_id"`
14-
ItemID string `json:"item_id"`
15-
Webhook string `json:"webhook"`
16-
Status ItemStatus `json:"status"`
17-
ConsentExpirationTime time.Time `json:"consent_expiration_time"`
10+
AvailableProducts []string `json:"available_products"`
11+
BilledProducts []string `json:"billed_products"`
12+
Error Error `json:"error"`
13+
InstitutionID string `json:"institution_id"`
14+
ItemID string `json:"item_id"`
15+
Webhook string `json:"webhook"`
16+
ConsentExpirationTime time.Time `json:"consent_expiration_time"`
1817
}
1918

2019
type ItemStatus struct {
@@ -41,7 +40,8 @@ type getItemRequest struct {
4140

4241
type GetItemResponse struct {
4342
APIResponse
44-
Item Item `json:"item"`
43+
Item Item `json:"item"`
44+
Status ItemStatus `json:"status"`
4545
}
4646

4747
type removeItemRequest struct {

plaid/item_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ func TestGetItem(t *testing.T) {
2424

2525
assert.Nil(t, err)
2626
assert.NotNil(t, itemResp.Item)
27+
assert.NotEmpty(t, itemResp.Status)
2728
}
2829

2930
func TestRemoveItem(t *testing.T) {

0 commit comments

Comments
 (0)