Skip to content

Latest commit

 

History

History
355 lines (232 loc) · 9.49 KB

CustomerManagementApi.md

File metadata and controls

355 lines (232 loc) · 9.49 KB

\CustomerManagementApi

All URIs are relative to http://localhost

Method HTTP request Description
CustomerDetail Get /api/v1/customers/{cUUID} Get a customer's details
DeleteCustomer Delete /api/v1/customers/{cUUID} Delete a customer
GetHostInfo Get /api/v1/customers/{cUUID}/host_info Get a customer's host info
ListOfCustomers Get /api/v1/customers List customers
UpdateCustomer Put /api/v1/customers/{cUUID} Update a customer

CustomerDetail

CustomerDetailsData CustomerDetail(ctx, cUUID).Execute()

Get a customer's details

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    cUUID := TODO // string | 

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.CustomerManagementApi.CustomerDetail(context.Background(), cUUID).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CustomerManagementApi.CustomerDetail``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CustomerDetail`: CustomerDetailsData
    fmt.Fprintf(os.Stdout, "Response from `CustomerManagementApi.CustomerDetail`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
cUUID string

Other Parameters

Other parameters are passed through a pointer to a apiCustomerDetailRequest struct via the builder pattern

Name Type Description Notes

Return type

CustomerDetailsData

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteCustomer

YBPSuccess DeleteCustomer(ctx, cUUID).Request(request).Execute()

Delete a customer

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    cUUID := TODO // string | 
    request := TODO // interface{} |  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.CustomerManagementApi.DeleteCustomer(context.Background(), cUUID).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CustomerManagementApi.DeleteCustomer``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DeleteCustomer`: YBPSuccess
    fmt.Fprintf(os.Stdout, "Response from `CustomerManagementApi.DeleteCustomer`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
cUUID string

Other Parameters

Other parameters are passed through a pointer to a apiDeleteCustomerRequest struct via the builder pattern

Name Type Description Notes

request | interface{} | |

Return type

YBPSuccess

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetHostInfo

map[string]map[string]interface{} GetHostInfo(ctx, cUUID).Execute()

Get a customer's host info

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    cUUID := TODO // string | 

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.CustomerManagementApi.GetHostInfo(context.Background(), cUUID).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CustomerManagementApi.GetHostInfo``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetHostInfo`: map[string]map[string]interface{}
    fmt.Fprintf(os.Stdout, "Response from `CustomerManagementApi.GetHostInfo`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
cUUID string

Other Parameters

Other parameters are passed through a pointer to a apiGetHostInfoRequest struct via the builder pattern

Name Type Description Notes

Return type

map[string]map[string]interface{}

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListOfCustomers

[]Customer ListOfCustomers(ctx).Request(request).Execute()

List customers

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    request := TODO // interface{} |  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.CustomerManagementApi.ListOfCustomers(context.Background()).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CustomerManagementApi.ListOfCustomers``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListOfCustomers`: []Customer
    fmt.Fprintf(os.Stdout, "Response from `CustomerManagementApi.ListOfCustomers`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiListOfCustomersRequest struct via the builder pattern

Name Type Description Notes
request interface{}

Return type

[]Customer

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateCustomer

Customer UpdateCustomer(ctx, cUUID).Customer(customer).Request(request).Execute()

Update a customer

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    cUUID := TODO // string | 
    customer := *openapiclient.NewCustomerAlertData(*openapiclient.NewAlertingData(), "CallhomeLevel_example", *openapiclient.NewSmtpData()) // CustomerAlertData | Customer data to be updated
    request := TODO // interface{} |  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.CustomerManagementApi.UpdateCustomer(context.Background(), cUUID).Customer(customer).Request(request).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `CustomerManagementApi.UpdateCustomer``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateCustomer`: Customer
    fmt.Fprintf(os.Stdout, "Response from `CustomerManagementApi.UpdateCustomer`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
cUUID string

Other Parameters

Other parameters are passed through a pointer to a apiUpdateCustomerRequest struct via the builder pattern

Name Type Description Notes

customer | CustomerAlertData | Customer data to be updated | request | interface{} | |

Return type

Customer

Authorization

apiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]