Method: ETAPI::Session#tracking_retrieve

Defined in:
lib/etapi/calls/tracking.rb

#tracking_retrieve(*args) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/etapi/calls/tracking.rb', line 5

def tracking_retrieve(*args)
  
  # options
  options         = args.extract_options!
  @job_id         = options[:job_id]
  
  # check for required options
  required_options = ["job_id"]
  return false unless check_required(required_options)
  
  # merge parameters and values
  type        = "tracking"
  method      = "retrieve"
  @parameters = {
    "search_type"   => "jobID",
    "sub_action"    => "summary",
    "search_value"  => @job_id,
    "search_value2" => ""
  }
  
  response = build_call(type, method, {:parse_response => false})
  Hash.from_xml(response)['exacttarget']['system']['tracking']['emailSummary'] rescue false
  
end