<commit_before># frozen_string_literal: true

module Nexmo
  class Account < Namespace
    self.host = 'rest.nexmo.com'

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

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

    def topup(params)
      request('/account/top-up', params: params, type: Post)
    end
  end
end<commit_msg>Document Nexmo::Account methods<commit_after># frozen_string_literal: true

module Nexmo
  class Account < Namespace
    self.host = 'rest.nexmo.com'

    # Retrieve your account balance.
    #
    # @return [Entity]
    #
    # @see https://developer.nexmo.com/api/developer/account#get-balance
    #
    def balance
      request('/account/get-balance')
    end

    # Modify settings for your account including callback URLs and your API secret.
    #
    # @option params [String] :moCallBackUrl
    #   The URL where Nexmo will send a webhook when an SMS is received to a Nexmo number that does not have SMS handling configured.
    #
    # @option params [String] :drCallBackUrl
    #   The URL where Nexmo will send a webhook when an delivery receipt is received without a specific callback URL configured.
    #
    # @param [Hash] params
    #
    # @return [Entity]
    #
    # @see https://developer.nexmo.com/api/developer/account#settings
    #
    def update(params)
      request('/account/settings', params: params, type: Post)
    end

    # Top-up your account balance.
    #
    # @option params [required, String] :trx
    #   The ID associated with your original auto-reload transaction.
    #
    # @param [Hash] params
    #
    # @see https://developer.nexmo.com/api/developer/account#top-up
    #
    def topup(params)
      request('/account/top-up', params: params, type: Post)
    end
  end
end
{'fraction_non_alphanumeric': 0.1014892443463872, 'fraction_numerical': 0.0, 'mean_word_length': 2.763485477178423, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6396862', 'n_tokens_mistral': 558, 'n_tokens_neox': 535, 'n_words': 166}