Sha256: d7f3b66dd19fa9ce255ccebc99c19ccd351e9473884d9fc0e990388a5a39caaa

Contents?: true

Size: 550 Bytes

Versions: 3

Compression:

Stored size: 550 Bytes

Contents

module FuelSDK::Targeting
  attr_accessor :auth_token
  attr_accessor :endpoint

  include FuelSDK::HTTPRequest

  def refresh
    raise NotImplementedError
  end

  def endpoint
    @endpoint ||= determine_stack
  end

  protected
    def determine_stack
      refresh unless self.auth_token
      options = {'params' => {'access_token' => self.auth_token}}
      response = get("https://www.exacttargetapis.com/platform/v1/endpoints/soap", options)
      raise 'Unable to determine stack' unless response.success?
      response['url']
    end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fuelsdk-0.1.8 lib/fuelsdk/targeting.rb
fuelsdk-0.1.7 lib/fuelsdk/targeting.rb
fuelsdk-0.1.6 lib/fuelsdk/targeting.rb