Sha256: 29a70fe963495eaa3aee8b1b337181df48b251fcb6e76ded286f73321e1b0ea5

Contents?: true

Size: 518 Bytes

Versions: 10

Compression:

Stored size: 518 Bytes

Contents

module FuelSDK::Targeting
  attr_accessor :access_token
  attr_reader :endpoint

  include FuelSDK::HTTPRequest

  def endpoint
    unless @endpoint
      determine_stack
    end
    @endpoint
  end

  protected
    def determine_stack
      options = {'params' => {'access_token' => self.access_token}}
      response = get("https://www.exacttargetapis.com/platform/v1/endpoints/soap", options)
      @endpoint = response['url']
    rescue => e
      raise 'Unable to determine stack using: ' + e.message
    end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
fuelsdk-0.1.0 lib/fuelsdk/targeting.rb
fuelsdk-0.0.9 lib/fuelsdk/targeting.rb
fuelsdk-0.0.8 lib/fuelsdk/targeting.rb
fuelsdk-0.0.7 lib/fuelsdk/targeting.rb
fuelsdk-0.0.6 lib/fuelsdk/targeting.rb
fuelsdk-0.0.5 lib/fuelsdk/targeting.rb
fuelsdk-0.0.4 lib/fuelsdk/targeting.rb
fuelsdk-0.0.3 lib/fuelsdk/targeting.rb
fuelsdk-0.0.2 lib/fuelsdk/targeting.rb
fuelsdk-0.0.1 lib/fuelsdk/targeting.rb