Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DeleteCmd = &cobra.Command{ Use: "delete <payment-method-id>", Short: "Delete payment method", Long: "Delete a payment method from your account.\n\nUse this endpoint to remove unused payment methods from user accounts.", 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 methods commands",
}
View Source
var ListCmd = &cobra.Command{ Use: "list", Short: "Get payment method list", Long: "Retrieve available payment methods that can be used for placing new orders.\n\nIf you want to add new payment method,\nplease use [hPanel](https://hpanel.hostinger.com/billing/payment-methods).\n\nUse this endpoint to view available payment options before creating 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: "Set the default payment method for your account.\n\nUse this endpoint to configure the primary payment method for future 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.
Click to show internal directories.
Click to hide internal directories.