Sha256: 36bb337d73ec52325bc0a82819eef488c47ab15e35178b24e43087a9ec4834fc
Contents?: true
Size: 602 Bytes
Versions: 32
Compression:
Stored size: 602 Bytes
Contents
module ChargeBee class Environment API_VERSION = "v2" attr_accessor :api_key, :site attr_reader :api_endpoint def initialize(options) [:api_key, :site].each do |attr| instance_variable_set "@#{attr}", options[attr] end if($CHARGEBEE_DOMAIN == nil) @api_endpoint = "https://#{@site}.chargebee.com/api/#{API_VERSION}" else @api_endpoint = "#{$ENV_PROTOCOL == nil ? "http": "https"}://#{@site}.#{$CHARGEBEE_DOMAIN}/api/#{API_VERSION}" end end def api_url(url) url = @api_endpoint + url end end end
Version data entries
32 entries across 32 versions & 1 rubygems