-
Notifications
You must be signed in to change notification settings - Fork 0
/
update_external_account.go
46 lines (40 loc) · 1.74 KB
/
update_external_account.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package transactapi
import (
"net/http"
)
type UpdateExternalAccountRequest struct {
ClientID string `json:"clientID"`
DeveloperAPIKey string `json:"developerAPIKey"`
ExtAccountfullname string `json:"ExtAccountfullname"`
ExtNickname string `json:"Extnickname"`
Types string `json:"types"`
AccountID string `json:"accountId"`
ExtRoutingnumber string `json:"ExtRoutingnumber"`
ExtAccountnumber string `json:"ExtAccountnumber"`
UpdatedIPAddress string `json:"updatedIpAddress"`
}
type UpdateExternalAccountResponse struct {
StatusCode string `json:"statusCode"`
StatusDesc string `json:"statusDesc"`
AccountDetails []accountDetailUnion `json:"accountDetails"`
}
type accountDetailClass struct {
AccountID string `json:"accountId"`
ExtAccountfullname string `json:"ExtAccountfullname"`
Extnickname string `json:"Extnickname"`
ExtRoutingnumber string `json:"ExtRoutingnumber"`
ExtAccountnumber string `json:"ExtAccountnumber"`
AccountType string `json:"accountType"`
Types string `json:"types"`
}
type accountDetailUnion struct {
AccountDetailClassArray []accountDetailClass
Bool *bool
}
// This method is used to update fields related to a particular external account for an Account (createAccount).
// The Account ID must be specified as a request parameter to update the record.
//
// Reference: https://transactapi.readme.io/reference/updateexternalaccount
func (c *Client) UpdateExternalAccount(req *UpdateExternalAccountRequest) (*UpdateExternalAccountResponse, error) {
return request[UpdateExternalAccountRequest, UpdateExternalAccountResponse](c, http.MethodPost, EndpointUpdateExternalAccount, req)
}