payment_methods

package
v0.1.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeleteCmd = &cobra.Command{
	Use:   "delete <payment method ID>",
	Short: "Delete payment method",
	Long:  `This endpoint deletes a payment method. Deleted payment methods can no longer be used for placing new orders.`,
	Args:  cobra.MatchAll(cobra.ExactArgs(1)),
	Run: func(cmd *cobra.Command, args []string) {
		r, err := api.Request().BillingDeletePaymentMethodV1WithResponse(context.TODO(), utils.StringToInt(args[0]))
		if err != nil {
			log.Fatal(err)
		}

		output.Format(cmd, r.Body, r.StatusCode())
	},
}
View Source
var GroupCmd = &cobra.Command{
	Use:   "payment-methods",
	Short: "Payment method management",
	Long:  ``,
}
View Source
var ListCmd = &cobra.Command{
	Use:   "list",
	Short: "Get payment method list",
	Long:  `This endpoint retrieves a list of available payment methods that can be used for placing new orders.`,
	Run: func(cmd *cobra.Command, args []string) {
		r, err := api.Request().BillingGetPaymentMethodListV1WithResponse(context.TODO())
		if err != nil {
			log.Fatal(err)
		}

		output.Format(cmd, r.Body, r.StatusCode())
	},
}
View Source
var SetDefaultCmd = &cobra.Command{
	Use:   "set-default <payment method ID>",
	Short: "Set default payment method",
	Long:  `This endpoint sets a specified payment method as the default. The default payment method is used automatically for new orders.`,
	Args:  cobra.MatchAll(cobra.ExactArgs(1)),
	Run: func(cmd *cobra.Command, args []string) {
		r, err := api.Request().BillingSetDefaultPaymentMethodV1WithResponse(context.TODO(), utils.StringToInt(args[0]))
		if err != nil {
			log.Fatal(err)
		}

		output.Format(cmd, r.Body, r.StatusCode())
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL