-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocument_read_test.go
34 lines (28 loc) · 1.04 KB
/
document_read_test.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
package webservices_test
import (
"encoding/json"
"fmt"
"testing"
_ "github.com/joho/godotenv/autoload"
)
func TestDocumentRead(t *testing.T) {
req := client.NewDocumentReadRequest()
req.QueryParams().Top.Set(10)
// req.QueryParams().Filter.Set("ID eq guid'{e4e12d2a-409b-4447-93ad-360efc59a4e5}'")
// req.QueryParams().Filter.Set("AccountCode eq ' 80004153'")
// req.QueryParams().Filter.Set("DebtorCode eq '776724'")
// req.QueryParams().Filter.Set("substringof('776724', CreditorCode)")
// req.QueryParams().Filter.Set("ID eq guid'{e4e12d2a-409b-4447-93ad-360efc59a4e5}'")
// req.QueryParams().Select.Add("CompanyName")
// req.QueryParams().Filter.Set("substringof('Pyrotek', AccountName)")
// req.QueryParams().Select.Add("FirstName")
// req.QueryParams().Select.Add("LastName")
// req.QueryParams().Select.Add("FullName")
// req.PathParams().Date = time.Date(2018, 12, 5, 0, 0, 0, 0, time.UTC)
resp, err := req.Do()
if err != nil {
t.Error(err)
}
b, _ := json.MarshalIndent(resp, "", " ")
fmt.Println(string(b))
}