number

package
v0.1.1-beta Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "number",
	Short: "Manage Bandwidth phone numbers",
}

Cmd is the `band number` parent command.

Functions

func BuildCheckerBody

func BuildCheckerBody(phoneNumbers []string) map[string]interface{}

BuildCheckerBody constructs the body for the dry-run POST /api/v2/accounts/{accountId}/serviceActivationChecker.

func BuildOrderBody

func BuildOrderBody(numbers []string) map[string]interface{}

BuildOrderBody builds the XML request body for ordering phone numbers.

func BuildServiceActivationBody

func BuildServiceActivationBody(opts ServiceActivationOpts) (map[string]interface{}, error)

BuildServiceActivationBody constructs the JSON body for POST /api/v2/accounts/{accountId}/serviceActivation.

The API requires at least one service to be specified; we surface that requirement as a CLI-level validation error rather than letting the API reject the request.

Types

type ServiceActivationOpts

type ServiceActivationOpts struct {
	Action          string // "ACTIVATE" or "DEACTIVATE"
	PhoneNumbers    []string
	VoiceInbound    bool
	VoiceOutNat     bool
	VoiceOutInt     bool
	Messaging       bool
	CustomerOrderID string
}

ServiceActivationOpts holds the parsed flag state for one invocation.

Jump to

Keyboard shortcuts

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