Class: ExactTarget::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/exact_target/client.rb

Constant Summary collapse

S4_WSDL_Document =
"https://webservice.s4.exacttarget.com/etframework.wsdl"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(username, password) ⇒ Client

Returns a new instance of Client.



7
8
9
10
11
12
# File 'lib/exact_target/client.rb', line 7

def initialize(username, password)
  self.username = username
  self.password = password

  self.client = new_client
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



5
6
7
# File 'lib/exact_target/client.rb', line 5

def client
  @client
end

#passwordObject

Returns the value of attribute password.



5
6
7
# File 'lib/exact_target/client.rb', line 5

def password
  @password
end

#usernameObject

Returns the value of attribute username.



5
6
7
# File 'lib/exact_target/client.rb', line 5

def username
  @username
end

Instance Method Details

#new_client(wsdl_document = S4_WSDL_Document) ⇒ Object



14
15
16
17
18
19
# File 'lib/exact_target/client.rb', line 14

def new_client(wsdl_document=S4_WSDL_Document)
  client = Savon::Client.new {
    wsdl.document = wsdl_document
    wsse.credentials(username, password)
  }
end

#system_status_ok?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/exact_target/client.rb', line 21

def system_status_ok?
  system_status == "OK"
end