Class: ExactTarget::Client
- Inherits:
-
Object
- Object
- ExactTarget::Client
- Defined in:
- lib/exact_target/client.rb
Constant Summary collapse
- S4_WSDL_Document =
"https://webservice.s4.exacttarget.com/etframework.wsdl"
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#password ⇒ Object
Returns the value of attribute password.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(username, password) ⇒ Client
constructor
A new instance of Client.
- #new_client(wsdl_document = S4_WSDL_Document) ⇒ Object
- #system_status_ok? ⇒ Boolean
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
#client ⇒ Object
Returns the value of attribute client.
5 6 7 |
# File 'lib/exact_target/client.rb', line 5 def client @client end |
#password ⇒ Object
Returns the value of attribute password.
5 6 7 |
# File 'lib/exact_target/client.rb', line 5 def password @password end |
#username ⇒ Object
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
21 22 23 |
# File 'lib/exact_target/client.rb', line 21 def system_status_ok? system_status == "OK" end |