Documentation ¶
Index ¶
- type Client
- func (a *Client) ListCustomerSegments(params *ListCustomerSegmentsParams, authInfo runtime.ClientAuthInfoWriter, ...) (*ListCustomerSegmentsOK, error)
- func (a *Client) RetrieveCustomerSegment(params *RetrieveCustomerSegmentParams, authInfo runtime.ClientAuthInfoWriter, ...) (*RetrieveCustomerSegmentOK, error)
- func (a *Client) SetTransport(transport runtime.ClientTransport)
- type ClientOption
- type ClientService
- type ListCustomerSegmentsOK
- type ListCustomerSegmentsParams
- func NewListCustomerSegmentsParams() *ListCustomerSegmentsParams
- func NewListCustomerSegmentsParamsWithContext(ctx context.Context) *ListCustomerSegmentsParams
- func NewListCustomerSegmentsParamsWithHTTPClient(client *http.Client) *ListCustomerSegmentsParams
- func NewListCustomerSegmentsParamsWithTimeout(timeout time.Duration) *ListCustomerSegmentsParams
- func (o *ListCustomerSegmentsParams) SetContext(ctx context.Context)
- func (o *ListCustomerSegmentsParams) SetCursor(cursor *string)
- func (o *ListCustomerSegmentsParams) SetDefaults()
- func (o *ListCustomerSegmentsParams) SetHTTPClient(client *http.Client)
- func (o *ListCustomerSegmentsParams) SetTimeout(timeout time.Duration)
- func (o *ListCustomerSegmentsParams) WithContext(ctx context.Context) *ListCustomerSegmentsParams
- func (o *ListCustomerSegmentsParams) WithCursor(cursor *string) *ListCustomerSegmentsParams
- func (o *ListCustomerSegmentsParams) WithDefaults() *ListCustomerSegmentsParams
- func (o *ListCustomerSegmentsParams) WithHTTPClient(client *http.Client) *ListCustomerSegmentsParams
- func (o *ListCustomerSegmentsParams) WithTimeout(timeout time.Duration) *ListCustomerSegmentsParams
- func (o *ListCustomerSegmentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type ListCustomerSegmentsReader
- type RetrieveCustomerSegmentOK
- type RetrieveCustomerSegmentParams
- func NewRetrieveCustomerSegmentParams() *RetrieveCustomerSegmentParams
- func NewRetrieveCustomerSegmentParamsWithContext(ctx context.Context) *RetrieveCustomerSegmentParams
- func NewRetrieveCustomerSegmentParamsWithHTTPClient(client *http.Client) *RetrieveCustomerSegmentParams
- func NewRetrieveCustomerSegmentParamsWithTimeout(timeout time.Duration) *RetrieveCustomerSegmentParams
- func (o *RetrieveCustomerSegmentParams) SetContext(ctx context.Context)
- func (o *RetrieveCustomerSegmentParams) SetDefaults()
- func (o *RetrieveCustomerSegmentParams) SetHTTPClient(client *http.Client)
- func (o *RetrieveCustomerSegmentParams) SetSegmentID(segmentID string)
- func (o *RetrieveCustomerSegmentParams) SetTimeout(timeout time.Duration)
- func (o *RetrieveCustomerSegmentParams) WithContext(ctx context.Context) *RetrieveCustomerSegmentParams
- func (o *RetrieveCustomerSegmentParams) WithDefaults() *RetrieveCustomerSegmentParams
- func (o *RetrieveCustomerSegmentParams) WithHTTPClient(client *http.Client) *RetrieveCustomerSegmentParams
- func (o *RetrieveCustomerSegmentParams) WithSegmentID(segmentID string) *RetrieveCustomerSegmentParams
- func (o *RetrieveCustomerSegmentParams) WithTimeout(timeout time.Duration) *RetrieveCustomerSegmentParams
- func (o *RetrieveCustomerSegmentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type RetrieveCustomerSegmentReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for customer segments API
func (*Client) ListCustomerSegments ¶
func (a *Client) ListCustomerSegments(params *ListCustomerSegmentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListCustomerSegmentsOK, error)
ListCustomerSegments lists customer segments
Retrieves the list of customer segments of a business.
func (*Client) RetrieveCustomerSegment ¶
func (a *Client) RetrieveCustomerSegment(params *RetrieveCustomerSegmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RetrieveCustomerSegmentOK, error)
RetrieveCustomerSegment retrieves customer segment
Retrieves a specific customer segment as identified by the `segment_id` value.
func (*Client) SetTransport ¶
func (a *Client) SetTransport(transport runtime.ClientTransport)
SetTransport changes the transport on the client
type ClientOption ¶
type ClientOption func(*runtime.ClientOperation)
ClientOption is the option for Client methods
type ClientService ¶
type ClientService interface { ListCustomerSegments(params *ListCustomerSegmentsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ListCustomerSegmentsOK, error) RetrieveCustomerSegment(params *RetrieveCustomerSegmentParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RetrieveCustomerSegmentOK, error) SetTransport(transport runtime.ClientTransport) }
ClientService is the interface for Client methods
func New ¶
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService
New creates a new customer segments API client.
type ListCustomerSegmentsOK ¶
type ListCustomerSegmentsOK struct {
Payload *models.ListCustomerSegmentsResponse
}
ListCustomerSegmentsOK describes a response with status code 200, with default header values.
Success
func NewListCustomerSegmentsOK ¶
func NewListCustomerSegmentsOK() *ListCustomerSegmentsOK
NewListCustomerSegmentsOK creates a ListCustomerSegmentsOK with default headers values
func (*ListCustomerSegmentsOK) Error ¶
func (o *ListCustomerSegmentsOK) Error() string
func (*ListCustomerSegmentsOK) GetPayload ¶
func (o *ListCustomerSegmentsOK) GetPayload() *models.ListCustomerSegmentsResponse
type ListCustomerSegmentsParams ¶
type ListCustomerSegmentsParams struct { /* Cursor. A pagination cursor returned by previous calls to __ListCustomerSegments__. Used to retrieve the next set of query results. See the [Pagination guide](https://developer.squareup.com/docs/docs/working-with-apis/pagination) for more information. */ Cursor *string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
ListCustomerSegmentsParams contains all the parameters to send to the API endpoint
for the list customer segments operation. Typically these are written to a http.Request.
func NewListCustomerSegmentsParams ¶
func NewListCustomerSegmentsParams() *ListCustomerSegmentsParams
NewListCustomerSegmentsParams creates a new ListCustomerSegmentsParams object, with the default timeout for this client.
Default values are not hydrated, since defaults are normally applied by the API server side.
To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewListCustomerSegmentsParamsWithContext ¶
func NewListCustomerSegmentsParamsWithContext(ctx context.Context) *ListCustomerSegmentsParams
NewListCustomerSegmentsParamsWithContext creates a new ListCustomerSegmentsParams object with the ability to set a context for a request.
func NewListCustomerSegmentsParamsWithHTTPClient ¶
func NewListCustomerSegmentsParamsWithHTTPClient(client *http.Client) *ListCustomerSegmentsParams
NewListCustomerSegmentsParamsWithHTTPClient creates a new ListCustomerSegmentsParams object with the ability to set a custom HTTPClient for a request.
func NewListCustomerSegmentsParamsWithTimeout ¶
func NewListCustomerSegmentsParamsWithTimeout(timeout time.Duration) *ListCustomerSegmentsParams
NewListCustomerSegmentsParamsWithTimeout creates a new ListCustomerSegmentsParams object with the ability to set a timeout on a request.
func (*ListCustomerSegmentsParams) SetContext ¶
func (o *ListCustomerSegmentsParams) SetContext(ctx context.Context)
SetContext adds the context to the list customer segments params
func (*ListCustomerSegmentsParams) SetCursor ¶
func (o *ListCustomerSegmentsParams) SetCursor(cursor *string)
SetCursor adds the cursor to the list customer segments params
func (*ListCustomerSegmentsParams) SetDefaults ¶
func (o *ListCustomerSegmentsParams) SetDefaults()
SetDefaults hydrates default values in the list customer segments params (not the query body).
All values with no default are reset to their zero value.
func (*ListCustomerSegmentsParams) SetHTTPClient ¶
func (o *ListCustomerSegmentsParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the list customer segments params
func (*ListCustomerSegmentsParams) SetTimeout ¶
func (o *ListCustomerSegmentsParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the list customer segments params
func (*ListCustomerSegmentsParams) WithContext ¶
func (o *ListCustomerSegmentsParams) WithContext(ctx context.Context) *ListCustomerSegmentsParams
WithContext adds the context to the list customer segments params
func (*ListCustomerSegmentsParams) WithCursor ¶
func (o *ListCustomerSegmentsParams) WithCursor(cursor *string) *ListCustomerSegmentsParams
WithCursor adds the cursor to the list customer segments params
func (*ListCustomerSegmentsParams) WithDefaults ¶
func (o *ListCustomerSegmentsParams) WithDefaults() *ListCustomerSegmentsParams
WithDefaults hydrates default values in the list customer segments params (not the query body).
All values with no default are reset to their zero value.
func (*ListCustomerSegmentsParams) WithHTTPClient ¶
func (o *ListCustomerSegmentsParams) WithHTTPClient(client *http.Client) *ListCustomerSegmentsParams
WithHTTPClient adds the HTTPClient to the list customer segments params
func (*ListCustomerSegmentsParams) WithTimeout ¶
func (o *ListCustomerSegmentsParams) WithTimeout(timeout time.Duration) *ListCustomerSegmentsParams
WithTimeout adds the timeout to the list customer segments params
func (*ListCustomerSegmentsParams) WriteToRequest ¶
func (o *ListCustomerSegmentsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type ListCustomerSegmentsReader ¶
type ListCustomerSegmentsReader struct {
// contains filtered or unexported fields
}
ListCustomerSegmentsReader is a Reader for the ListCustomerSegments structure.
func (*ListCustomerSegmentsReader) ReadResponse ¶
func (o *ListCustomerSegmentsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type RetrieveCustomerSegmentOK ¶
type RetrieveCustomerSegmentOK struct {
Payload *models.RetrieveCustomerSegmentResponse
}
RetrieveCustomerSegmentOK describes a response with status code 200, with default header values.
Success
func NewRetrieveCustomerSegmentOK ¶
func NewRetrieveCustomerSegmentOK() *RetrieveCustomerSegmentOK
NewRetrieveCustomerSegmentOK creates a RetrieveCustomerSegmentOK with default headers values
func (*RetrieveCustomerSegmentOK) Error ¶
func (o *RetrieveCustomerSegmentOK) Error() string
func (*RetrieveCustomerSegmentOK) GetPayload ¶
func (o *RetrieveCustomerSegmentOK) GetPayload() *models.RetrieveCustomerSegmentResponse
type RetrieveCustomerSegmentParams ¶
type RetrieveCustomerSegmentParams struct { /* SegmentID. The Square-issued ID of the customer segment. */ SegmentID string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
RetrieveCustomerSegmentParams contains all the parameters to send to the API endpoint
for the retrieve customer segment operation. Typically these are written to a http.Request.
func NewRetrieveCustomerSegmentParams ¶
func NewRetrieveCustomerSegmentParams() *RetrieveCustomerSegmentParams
NewRetrieveCustomerSegmentParams creates a new RetrieveCustomerSegmentParams object, with the default timeout for this client.
Default values are not hydrated, since defaults are normally applied by the API server side.
To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewRetrieveCustomerSegmentParamsWithContext ¶
func NewRetrieveCustomerSegmentParamsWithContext(ctx context.Context) *RetrieveCustomerSegmentParams
NewRetrieveCustomerSegmentParamsWithContext creates a new RetrieveCustomerSegmentParams object with the ability to set a context for a request.
func NewRetrieveCustomerSegmentParamsWithHTTPClient ¶
func NewRetrieveCustomerSegmentParamsWithHTTPClient(client *http.Client) *RetrieveCustomerSegmentParams
NewRetrieveCustomerSegmentParamsWithHTTPClient creates a new RetrieveCustomerSegmentParams object with the ability to set a custom HTTPClient for a request.
func NewRetrieveCustomerSegmentParamsWithTimeout ¶
func NewRetrieveCustomerSegmentParamsWithTimeout(timeout time.Duration) *RetrieveCustomerSegmentParams
NewRetrieveCustomerSegmentParamsWithTimeout creates a new RetrieveCustomerSegmentParams object with the ability to set a timeout on a request.
func (*RetrieveCustomerSegmentParams) SetContext ¶
func (o *RetrieveCustomerSegmentParams) SetContext(ctx context.Context)
SetContext adds the context to the retrieve customer segment params
func (*RetrieveCustomerSegmentParams) SetDefaults ¶
func (o *RetrieveCustomerSegmentParams) SetDefaults()
SetDefaults hydrates default values in the retrieve customer segment params (not the query body).
All values with no default are reset to their zero value.
func (*RetrieveCustomerSegmentParams) SetHTTPClient ¶
func (o *RetrieveCustomerSegmentParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the retrieve customer segment params
func (*RetrieveCustomerSegmentParams) SetSegmentID ¶
func (o *RetrieveCustomerSegmentParams) SetSegmentID(segmentID string)
SetSegmentID adds the segmentId to the retrieve customer segment params
func (*RetrieveCustomerSegmentParams) SetTimeout ¶
func (o *RetrieveCustomerSegmentParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the retrieve customer segment params
func (*RetrieveCustomerSegmentParams) WithContext ¶
func (o *RetrieveCustomerSegmentParams) WithContext(ctx context.Context) *RetrieveCustomerSegmentParams
WithContext adds the context to the retrieve customer segment params
func (*RetrieveCustomerSegmentParams) WithDefaults ¶
func (o *RetrieveCustomerSegmentParams) WithDefaults() *RetrieveCustomerSegmentParams
WithDefaults hydrates default values in the retrieve customer segment params (not the query body).
All values with no default are reset to their zero value.
func (*RetrieveCustomerSegmentParams) WithHTTPClient ¶
func (o *RetrieveCustomerSegmentParams) WithHTTPClient(client *http.Client) *RetrieveCustomerSegmentParams
WithHTTPClient adds the HTTPClient to the retrieve customer segment params
func (*RetrieveCustomerSegmentParams) WithSegmentID ¶
func (o *RetrieveCustomerSegmentParams) WithSegmentID(segmentID string) *RetrieveCustomerSegmentParams
WithSegmentID adds the segmentID to the retrieve customer segment params
func (*RetrieveCustomerSegmentParams) WithTimeout ¶
func (o *RetrieveCustomerSegmentParams) WithTimeout(timeout time.Duration) *RetrieveCustomerSegmentParams
WithTimeout adds the timeout to the retrieve customer segment params
func (*RetrieveCustomerSegmentParams) WriteToRequest ¶
func (o *RetrieveCustomerSegmentParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type RetrieveCustomerSegmentReader ¶
type RetrieveCustomerSegmentReader struct {
// contains filtered or unexported fields
}
RetrieveCustomerSegmentReader is a Reader for the RetrieveCustomerSegment structure.
func (*RetrieveCustomerSegmentReader) ReadResponse ¶
func (o *RetrieveCustomerSegmentReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.