Sha256: 7f6a9b231066da871db503c13adfab412b317f564f5b7ce21ac77487c45d99d3

Contents?: true

Size: 886 Bytes

Versions: 3

Compression:

Stored size: 886 Bytes

Contents

module MangoPay

  # Top-level configuration details
  class Configuration

    # [true/false] True if the sandbox environment should be used
    attr_accessor :preproduction

    # [String] Root URL to use for requests
    attr_accessor :root_url

    # [String] Your client ID
    attr_accessor :client_id

    # [String] Your client apiKey
    attr_accessor :client_apiKey

    # [String] Path to directory in which to store authorization token
    #          If nil, tokens will be stored in-memory.
    attr_accessor :temp_dir

    # [String] Path for logging file
    attr_accessor :log_dir

    # [Integer] Number of milliseconds after which to timeout requests
    attr_accessor :http_timeout

    def initialize
      self.preproduction = true
      self.http_timeout = 10_000
    end

    def api_version
      'v2.01'
    end

    alias preproduction? preproduction
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mangopay-v4-4.1.0 lib/mangopay/configuration.rb
mangopay-v4-4.0.2 lib/mangopay/configuration.rb
mangopay-v4-4.0.1 lib/mangopay/configuration.rb