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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
// Code generated by msgraph-generate.go DO NOT EDIT.
package msgraph
import "context"
// CustomerRequestBuilder is request builder for Customer
type CustomerRequestBuilder struct{ BaseRequestBuilder }
// Request returns CustomerRequest
func (b *CustomerRequestBuilder) Request() *CustomerRequest {
return &CustomerRequest{
BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client},
}
}
// CustomerRequest is request for Customer
type CustomerRequest struct{ BaseRequest }
// Get performs GET request for Customer
func (r *CustomerRequest) Get(ctx context.Context) (resObj *Customer, err error) {
var query string
if r.query != nil {
query = "?" + r.query.Encode()
}
err = r.JSONRequest(ctx, "GET", query, nil, &resObj)
return
}
// Update performs PATCH request for Customer
func (r *CustomerRequest) Update(ctx context.Context, reqObj *Customer) error {
return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
}
// Delete performs DELETE request for Customer
func (r *CustomerRequest) Delete(ctx context.Context) error {
return r.JSONRequest(ctx, "DELETE", "", nil, nil)
}
// CustomerPaymentRequestBuilder is request builder for CustomerPayment
type CustomerPaymentRequestBuilder struct{ BaseRequestBuilder }
// Request returns CustomerPaymentRequest
func (b *CustomerPaymentRequestBuilder) Request() *CustomerPaymentRequest {
return &CustomerPaymentRequest{
BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client},
}
}
// CustomerPaymentRequest is request for CustomerPayment
type CustomerPaymentRequest struct{ BaseRequest }
// Get performs GET request for CustomerPayment
func (r *CustomerPaymentRequest) Get(ctx context.Context) (resObj *CustomerPayment, err error) {
var query string
if r.query != nil {
query = "?" + r.query.Encode()
}
err = r.JSONRequest(ctx, "GET", query, nil, &resObj)
return
}
// Update performs PATCH request for CustomerPayment
func (r *CustomerPaymentRequest) Update(ctx context.Context, reqObj *CustomerPayment) error {
return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
}
// Delete performs DELETE request for CustomerPayment
func (r *CustomerPaymentRequest) Delete(ctx context.Context) error {
return r.JSONRequest(ctx, "DELETE", "", nil, nil)
}
// CustomerPaymentJournalRequestBuilder is request builder for CustomerPaymentJournal
type CustomerPaymentJournalRequestBuilder struct{ BaseRequestBuilder }
// Request returns CustomerPaymentJournalRequest
func (b *CustomerPaymentJournalRequestBuilder) Request() *CustomerPaymentJournalRequest {
return &CustomerPaymentJournalRequest{
BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client},
}
}
// CustomerPaymentJournalRequest is request for CustomerPaymentJournal
type CustomerPaymentJournalRequest struct{ BaseRequest }
// Get performs GET request for CustomerPaymentJournal
func (r *CustomerPaymentJournalRequest) Get(ctx context.Context) (resObj *CustomerPaymentJournal, err error) {
var query string
if r.query != nil {
query = "?" + r.query.Encode()
}
err = r.JSONRequest(ctx, "GET", query, nil, &resObj)
return
}
// Update performs PATCH request for CustomerPaymentJournal
func (r *CustomerPaymentJournalRequest) Update(ctx context.Context, reqObj *CustomerPaymentJournal) error {
return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
}
// Delete performs DELETE request for CustomerPaymentJournal
func (r *CustomerPaymentJournalRequest) Delete(ctx context.Context) error {
return r.JSONRequest(ctx, "DELETE", "", nil, nil)
}
|