-
Notifications
You must be signed in to change notification settings - Fork 4
/
organization_service.go
32 lines (30 loc) · 1.24 KB
/
organization_service.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
package moysklad
// OrganizationService
// Сервис для работы с юридическими лицами.
type OrganizationService struct {
endpointGetList[Organization]
endpointCreate[Organization]
endpointCreateUpdateDeleteMany[Organization]
endpointDelete
endpointGetById[Organization]
endpointUpdate[Organization]
endpointMetadata[MetadataAttributeShared]
endpointAttributes
endpointAccounts
endpointSyncID[Organization]
}
func NewOrganizationService(client *Client) *OrganizationService {
e := NewEndpoint(client, "entity/organization")
return &OrganizationService{
endpointGetList: endpointGetList[Organization]{e},
endpointCreate: endpointCreate[Organization]{e},
endpointCreateUpdateDeleteMany: endpointCreateUpdateDeleteMany[Organization]{e},
endpointDelete: endpointDelete{e},
endpointGetById: endpointGetById[Organization]{e},
endpointUpdate: endpointUpdate[Organization]{e},
endpointMetadata: endpointMetadata[MetadataAttributeShared]{e},
endpointAttributes: endpointAttributes{e},
endpointAccounts: endpointAccounts{e},
endpointSyncID: endpointSyncID[Organization]{e},
}
}