Sha256: bac8bcdec14d9c544a0144920a448f043986a3ff8786a33196f2931309a483fd

Contents?: true

Size: 1.1 KB

Versions: 3

Compression:

Stored size: 1.1 KB

Contents

module Phaxio
  class Config
    DEFAULT_API_ENDPOINT = 'https://api.phaxio.com/v2.1/'.freeze

    class << self
      # Your Phaxio API key. This will be used for all interactions with the Phaxio API.
      #
      # To find your API key, visit https://console.phaxio.com/api_credentials
      attr_accessor :api_key

      # Your Phaxio API secret. This will be used for all interactions with the Phaxio API.
      #
      # To find your API secret, visit https://console.phaxio.com/api_credentials
      attr_accessor :api_secret

      # Your Phaxio webhook token. This will be used to verify that webhook requests are coming
      # from Phaxio.
      #
      # To find your webhook token, visit https://console.phaxio.com/user/callbacks/edit
      attr_accessor :webhook_token
      alias callback_token webhook_token
      alias callback_token= webhook_token=

      # The Phaxio API endpoint. Users generally shouldn't need to change it.
      # Defaults to https://api.phaxio.com/v2.1/
      attr_writer :api_endpoint

      def api_endpoint
        @api_endpoint || DEFAULT_API_ENDPOINT
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
phaxio-2.1.2 lib/phaxio/config.rb
phaxio-2.1.1 lib/phaxio/config.rb
phaxio-2.1.0 lib/phaxio/config.rb