Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultAPIBaseURL = "https://api.stripe.com"
DefaultAPIBaseURL is the default base URL for API requests
View Source
const DefaultDashboardBaseURL = "https://dashboard.stripe.com"
DefaultDashboardBaseURL is the default base URL for dashboard requests
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLITelemetry ¶ added in v0.8.0
type CLITelemetry struct {
CommandPath string `json:"command_path"`
DeviceName string `json:"device_name"`
GeneratedResource bool `json:"generated_resource"`
}
CLITelemetry is the structure that holds telemetry data sent to Stripe in API requests.
func GetTelemetryInstance ¶ added in v0.8.0
func GetTelemetryInstance() *CLITelemetry
GetTelemetryInstance returns the CLITelemetry instance (initializing it first if necessary).
func (*CLITelemetry) SetCommandContext ¶ added in v0.8.0
func (t *CLITelemetry) SetCommandContext(cmd *cobra.Command)
SetCommandContext sets the telemetry values for the command being executed.
func (*CLITelemetry) SetDeviceName ¶ added in v1.2.2
func (t *CLITelemetry) SetDeviceName(deviceName string)
SetDeviceName puts the device name into telemetry
type Client ¶
type Client struct {
// The base URL (protocol + hostname) used for all requests sent by this
// client.
BaseURL *url.URL
// API key used to authenticate requests sent by this client. If left
// empty, the `Authorization` header will be omitted.
APIKey string
// When this is enabled, request and response headers will be printed to
// stdout.
Verbose bool
// contains filtered or unexported fields
}
Client is the API client used to sent requests to Stripe.
Click to show internal directories.
Click to hide internal directories.