(Customer)
- CreateTicketingCustomer - Create a customer
- GetTicketingCustomer - Retrieve a customer
- ListTicketingCustomers - List all customers
- PatchTicketingCustomer - Update a customer
- RemoveTicketingCustomer - Remove a customer
- UpdateTicketingCustomer - Update a customer
Create a customer
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"context"
"log"
)
func main() {
s := unifiedgosdk.New()
request := operations.CreateTicketingCustomerRequest{
ConnectionID: "<value>",
}
ctx := context.Background()
res, err := s.Customer.CreateTicketingCustomer(ctx, request)
if err != nil {
log.Fatal(err)
}
if res.TicketingCustomer != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.CreateTicketingCustomerRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.CreateTicketingCustomerResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Retrieve a customer
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"context"
"log"
)
func main() {
s := unifiedgosdk.New()
request := operations.GetTicketingCustomerRequest{
ConnectionID: "<value>",
ID: "<id>",
}
ctx := context.Background()
res, err := s.Customer.GetTicketingCustomer(ctx, request)
if err != nil {
log.Fatal(err)
}
if res.TicketingCustomer != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.GetTicketingCustomerRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetTicketingCustomerResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
List all customers
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"context"
"log"
)
func main() {
s := unifiedgosdk.New()
request := operations.ListTicketingCustomersRequest{
ConnectionID: "<value>",
}
ctx := context.Background()
res, err := s.Customer.ListTicketingCustomers(ctx, request)
if err != nil {
log.Fatal(err)
}
if res.TicketingCustomers != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.ListTicketingCustomersRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListTicketingCustomersResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Update a customer
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"context"
"log"
)
func main() {
s := unifiedgosdk.New()
request := operations.PatchTicketingCustomerRequest{
ConnectionID: "<value>",
ID: "<id>",
}
ctx := context.Background()
res, err := s.Customer.PatchTicketingCustomer(ctx, request)
if err != nil {
log.Fatal(err)
}
if res.TicketingCustomer != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.PatchTicketingCustomerRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.PatchTicketingCustomerResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Remove a customer
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"context"
"log"
)
func main() {
s := unifiedgosdk.New()
request := operations.RemoveTicketingCustomerRequest{
ConnectionID: "<value>",
ID: "<id>",
}
ctx := context.Background()
res, err := s.Customer.RemoveTicketingCustomer(ctx, request)
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.RemoveTicketingCustomerRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.RemoveTicketingCustomerResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Update a customer
package main
import(
unifiedgosdk "github.com/unified-to/unified-go-sdk"
"github.com/unified-to/unified-go-sdk/pkg/models/operations"
"context"
"log"
)
func main() {
s := unifiedgosdk.New()
request := operations.UpdateTicketingCustomerRequest{
ConnectionID: "<value>",
ID: "<id>",
}
ctx := context.Background()
res, err := s.Customer.UpdateTicketingCustomer(ctx, request)
if err != nil {
log.Fatal(err)
}
if res.TicketingCustomer != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
request |
operations.UpdateTicketingCustomerRequest | ✔️ | The request object to use for the request. |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UpdateTicketingCustomerResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |