-
Notifications
You must be signed in to change notification settings - Fork 26
/
accounts.go
executable file
·67 lines (58 loc) · 1.85 KB
/
accounts.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// Copyright 2022 James Cote
// All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated by gen-esign; DO NOT EDIT.
// Package accounts implements the DocuSign SDK
// category Accounts.
//
// Information about accounts.
//
//
// Service Api documentation may be found at:
// https://developers.docusign.com/docs/rooms-api/reference/Accounts
// Usage example:
//
// import (
// "github.com/jfcote87/esign"
// "github.com/jfcote87/esign/rooms"
// )
// ...
// accountsService := accounts.New(esignCredential)
package accounts // import "github.com/jfcote87/esignrooms//accounts"
import (
"context"
"net/url"
"github.com/jfcote87/esign"
"github.com/jfcote87/esign/rooms"
)
// Service implements DocuSign Accounts API operations
type Service struct {
credential esign.Credential
}
// New initializes a accounts service using cred to authorize ops.
func New(cred esign.Credential) *Service {
return &Service{credential: cred}
}
// GetAccountInformation gets account information.
//
// https://developers.docusign.com/docs/rooms-api/reference/accounts/accounts/getaccountinformation
//
// SDK Method Accounts::GetAccountInformation
func (s *Service) GetAccountInformation() *GetAccountInformationOp {
return &GetAccountInformationOp{
Credential: s.credential,
Method: "GET",
Path: "/v2/accounts/{accountId}",
Accept: "application/json",
QueryOpts: make(url.Values),
Version: esign.RoomsV2,
}
}
// GetAccountInformationOp implements DocuSign API SDK Accounts::GetAccountInformation
type GetAccountInformationOp esign.Op
// Do executes the op. A nil context will return error.
func (op *GetAccountInformationOp) Do(ctx context.Context) (*rooms.AccountSummary, error) {
var res *rooms.AccountSummary
return res, ((*esign.Op)(op)).Do(ctx, &res)
}