-
Notifications
You must be signed in to change notification settings - Fork 2
/
entity_unlink_business_member.go
35 lines (28 loc) · 1.14 KB
/
entity_unlink_business_member.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
package sila
import "github.com/bpancost/sila/domain"
func (client ClientImpl) UnlinkBusinessMember(userHandle string, businessHandle string) UnlinkBusinessMember {
return &UnlinkBusinessMemberMsg{
Header: client.generateHeader().setUserHandle(userHandle).setBusinessHandle(businessHandle),
}
}
type UnlinkBusinessMemberMsg struct {
Header *Header `json:"header"`
Role string `json:"role"`
}
func (msg *UnlinkBusinessMemberMsg) SetAdminRole() UnlinkBusinessMember {
msg.Role = "administrator"
return msg
}
func (msg *UnlinkBusinessMemberMsg) SetBeneficialOwnerRole() UnlinkBusinessMember {
msg.Role = "beneficial_owner"
return msg
}
func (msg *UnlinkBusinessMemberMsg) SetControllingOfficerRole() UnlinkBusinessMember {
msg.Role = "controlling_officer"
return msg
}
func (msg *UnlinkBusinessMemberMsg) Do(userWalletPrivateKey string, businessWalletPrivateKey string) (domain.UnlinkBusinessMemberResponse, error) {
var responseBody domain.UnlinkBusinessMemberResponse
err := instance.performCallWithUserAndBusinessAuth("/unlink_business_member", msg, &responseBody, userWalletPrivateKey, businessWalletPrivateKey)
return responseBody, err
}