Method: Vonage::Numbers#buy

Defined in:
lib/vonage/numbers.rb

#buy(params) ⇒ Response

Request to purchase a specific inbound number.

Examples:

response = client.numbers.buy(country: 'GB', msisdn: '447700900000')

Parameters:

  • params (Hash)

Options Hash (params):

  • :country (required, String)

    The two character country code in ISO 3166-1 alpha-2 format.

  • :msisdn (required, String)

    An available inbound virtual number.

  • :target_api_key (String)

    If you'd like to perform an action on a subaccount, provide the api_key of that account here. If you'd like to perform an action on your own account, you do not need to provide this field.

Returns:

See Also:



129
130
131
132
133
134
135
136
# File 'lib/vonage/numbers.rb', line 129

def buy(params)
  request(
    "/number/buy",
    params: params,
    type: Post,
    response_class: Response
  )
end