Class: FuelSDK::ET_DeleteRest

Inherits:
ET_Constructor show all
Defined in:
lib/new.rb

Instance Attribute Summary

Attributes inherited from ET_Constructor

#code, #message, #moreResults, #request_id, #results, #status

Instance Method Summary collapse

Constructor Details

#initialize(authStub, endpoint) ⇒ ET_DeleteRest

Returns a new instance of ET_DeleteRest.



892
893
894
895
896
897
898
899
900
901
902
903
904
905
# File 'lib/new.rb', line 892

def initialize(authStub, endpoint)
  authStub.refreshToken

  qs = {"access_token" => authStub.authToken}

  uri = URI.parse(endpoint)
  uri.query = URI.encode_www_form(qs)
  http = Net::HTTP.new(uri.host, uri.port)
  http.use_ssl = true
  request = Net::HTTP::Delete.new(uri.request_uri)
  requestResponse = http.request(request)
  super(requestResponse, true)

end