Class: Markety::Client
- Inherits:
-
Object
- Object
- Markety::Client
- Defined in:
- lib/markety/client.rb
Overview
All of the Markety::Command modules are mixed in to Client, so see the documentation for those modules.
Instance Attribute Summary collapse
-
#target_workspace ⇒ Object
readonly
Returns the value of attribute target_workspace.
Instance Method Summary collapse
-
#initialize(access_key, secret_key, end_point, options = {}) ⇒ Client
constructor
A new instance of Client.
Methods included from Markety::Command::ListOperation
#add_to_list, #is_member_of_list, #remove_from_list
Methods included from Markety::Command::SyncLead
Methods included from Markety::Command::GetLead
#get_lead_by_idnum, #get_leads_by_email
Constructor Details
#initialize(access_key, secret_key, end_point, options = {}) ⇒ Client
Returns a new instance of Client.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/markety/client.rb', line 13 def initialize(access_key, secret_key, end_point, = {}) api_version = .fetch(:api_version, '2_3') @client = Savon.client do endpoint end_point wsdl "http://app.marketo.com/soap/mktows/#{api_version}?WSDL" namespaces({"xmlns:ns1" => "http://www.marketo.com/mktows/"}) env_namespace "SOAP-ENV" pretty_print_xml true log false if [:log] == false end @auth_header = Markety::AuthenticationHeader.new(access_key, secret_key) = {} [:target_workspace] = .has_key?(:target_workspace) ? [:target_workspace] : {} end |
Instance Attribute Details
#target_workspace ⇒ Object (readonly)
Returns the value of attribute target_workspace.
11 12 13 |
# File 'lib/markety/client.rb', line 11 def target_workspace @target_workspace end |