doc/classes/AdWords/ResponseHandler.html in adwords4r-17.0.1 vs doc/classes/AdWords/ResponseHandler.html in adwords4r-17.1.0
- old
+ new
@@ -140,11 +140,11 @@
<div class="sectiontitle">Instance Public methods</div>
<div class="method">
<div class="title" id="M000028">
- <a name="M000028"></a><b>on_callback</b>(method_name, endpoint, envelope, params)
+ <a name="M000028"></a><b>on_callback</b>(method_name, endpoint, envelope, params, fault = false, fault_msg = nil)
</div>
<div class="description">
<p>
@@ -164,10 +164,16 @@
</li>
<li>params: the parameters that were passed to the method
</li>
+<li>fault: whether the request resulted in a fault or not
+
+</li>
+<li>fault_msg: the fault message in case of a fault (nil if none)
+
+</li>
</ul>
</div>
@@ -177,12 +183,13 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000028_source')" id="l_M000028_source">show</a>
</p>
<div id="M000028_source" class="dyn-source">
- <pre><span class="ruby-comment cmt"># File lib/adwords4r.rb, line 450</span>
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">on_callback</span>(<span class="ruby-identifier">method_name</span>, <span class="ruby-identifier">endpoint</span>, <span class="ruby-identifier">envelope</span>, <span class="ruby-identifier">params</span>)
+ <pre><span class="ruby-comment cmt"># File lib/adwords4r.rb, line 452</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">on_callback</span>(<span class="ruby-identifier">method_name</span>, <span class="ruby-identifier">endpoint</span>, <span class="ruby-identifier">envelope</span>, <span class="ruby-identifier">params</span>, <span class="ruby-identifier">fault</span> = <span class="ruby-keyword kw">false</span>,
+ <span class="ruby-identifier">fault_msg</span> = <span class="ruby-keyword kw">nil</span>)
<span class="ruby-identifier">units</span> = <span class="ruby-keyword kw">nil</span>
<span class="ruby-identifier">operations</span> = <span class="ruby-keyword kw">nil</span>
<span class="ruby-identifier">response_time</span> = <span class="ruby-keyword kw">nil</span>
<span class="ruby-identifier">request_id</span> = <span class="ruby-keyword kw">nil</span>
<span class="ruby-identifier">operators</span> = <span class="ruby-keyword kw">nil</span>
@@ -241,12 +248,20 @@
<span class="ruby-identifier">data</span> = <span class="ruby-node">"host=#{host} method=#{method_name} "</span> <span class="ruby-operator">+</span>
<span class="ruby-node">"responseTime=#{response_time} operations=#{operations} "</span>
<span class="ruby-identifier">data</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"operators={#{operator_count}} "</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">operator_count</span>
- <span class="ruby-identifier">data</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"units=#{units} requestId=#{request_id}"</span>
+ <span class="ruby-identifier">data</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"units=#{units} requestId=#{request_id} "</span>
+ <span class="ruby-identifier">data</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"isFault=#{(!!fault).to_s} "</span>
+
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">fault_msg</span>
+ <span class="ruby-identifier">data</span> <span class="ruby-operator">+=</span> <span class="ruby-node">"faultMessage=\"#{fault_msg}\""</span>
+ <span class="ruby-keyword kw">else</span>
+ <span class="ruby-identifier">data</span> <span class="ruby-operator">+=</span> <span class="ruby-value str">"faultMessage=none"</span>
+ <span class="ruby-keyword kw">end</span>
+
<span class="ruby-ivar">@parent</span>.<span class="ruby-identifier">unit_logger</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">data</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@@ -285,10 +300,10 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000029_source')" id="l_M000029_source">show</a>
</p>
<div id="M000029_source" class="dyn-source">
- <pre><span class="ruby-comment cmt"># File lib/adwords4r.rb, line 526</span>
+ <pre><span class="ruby-comment cmt"># File lib/adwords4r.rb, line 537</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_header</span>(<span class="ruby-identifier">header</span>)
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">header</span>.<span class="ruby-identifier">nil?</span>
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
<span class="ruby-keyword kw">end</span>
\ No newline at end of file