Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) Create(request CustomerRequest) (*common.IdResponse, error)
- func (c *Client) CreateWithContext(ctx context.Context, request CustomerRequest) (*common.IdResponse, error)
- func (c *Client) Delete(customerId string) (*common.MetadataResponse, error)
- func (c *Client) DeleteWithContext(ctx context.Context, customerId string) (*common.MetadataResponse, error)
- func (c *Client) Get(customerId string) (*GetCustomerResponse, error)
- func (c *Client) GetWithContext(ctx context.Context, customerId string) (*GetCustomerResponse, error)
- func (c *Client) Update(customerId string, request CustomerRequest) (*common.MetadataResponse, error)
- func (c *Client) UpdateWithContext(ctx context.Context, customerId string, request CustomerRequest) (*common.MetadataResponse, error)
- type CustomerRequest
- type GetCustomerResponse
Constants ¶
View Source
const Path = "customers"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(configuration *configuration.Configuration, apiClient client.HttpClient) *Client
func (*Client) Create ¶
func (c *Client) Create(request CustomerRequest) (*common.IdResponse, error)
func (*Client) CreateWithContext ¶
func (c *Client) CreateWithContext(ctx context.Context, request CustomerRequest) (*common.IdResponse, error)
func (*Client) Delete ¶
func (c *Client) Delete(customerId string) (*common.MetadataResponse, error)
func (*Client) DeleteWithContext ¶
func (*Client) GetWithContext ¶
func (*Client) Update ¶
func (c *Client) Update(customerId string, request CustomerRequest) (*common.MetadataResponse, error)
func (*Client) UpdateWithContext ¶
func (c *Client) UpdateWithContext(ctx context.Context, customerId string, request CustomerRequest) (*common.MetadataResponse, error)
type CustomerRequest ¶
type CustomerRequest struct { Email string `json:"email,omitempty"` Name string `json:"name,omitempty"` Phone *common.Phone `json:"phone,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` DefaultId string `json:"default,omitempty"` Instruments []string `json:"instruments,omitempty"` }
type GetCustomerResponse ¶
type GetCustomerResponse struct { HttpMetadata common.HttpMetadata Id string `json:"id,omitempty"` Email string `json:"email,omitempty"` Default string `json:"default,omitempty"` Name string `json:"name,omitempty"` Phone *common.Phone `json:"phone,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Instruments []instruments.GetInstrumentResponse `json:"instruments,omitempty"` }
Click to show internal directories.
Click to hide internal directories.