Class: Nexmo::Account

Inherits:
Namespace
  • Object
show all
Defined in:
lib/nexmo/account.rb

Instance Method Summary collapse

Instance Method Details

#balanceResponse

Retrieve your account balance.


15
16
17
# File 'lib/nexmo/account.rb', line 15

def balance
  request('/account/get-balance')
end

#topup(params) ⇒ Response

Top-up your account balance.

Parameters:

  • params (Hash)

Options Hash (params):

  • :trx (required, String)

    The ID associated with your original auto-reload transaction.

Returns:

See Also:


52
53
54
# File 'lib/nexmo/account.rb', line 52

def topup(params)
  request('/account/top-up', params: params, type: Post)
end

#update(params) ⇒ Response

Note:

The URLs you provide must be valid and active. Nexmo will check that they return a 200 OK response before the setting is saved.

Update the default callback URLs (where the webhooks are sent to) associated with your account.

Parameters:

  • params (Hash)

Options Hash (params):

  • :mo_call_back_url (String)

    The URL where Nexmo will send a webhook when an SMS is received to a Nexmo number that does not have SMS handling configured. Send an empty string to unset this value.

  • :dr_call_back_url (String)

    The URL where Nexmo will send a webhook when an delivery receipt is received without a specific callback URL configured. Send an empty string to unset this value.

Returns:

See Also:


37
38
39
# File 'lib/nexmo/account.rb', line 37

def update(params)
  request('/account/settings', params: camelcase(params), type: Post)
end