class Bing::Content::Api::Response
Attributes
failures[R]
successes[R]
Public Class Methods
new(response_entries, batch)
click to toggle source
# File lib/bing/content/api/response.rb, line 7 def initialize(response_entries, batch) @failures = [] @successes = [] response_entries.each do |entry| id = entry["batchId"].to_i error = entry["errors"] if error failures << { response: entry, product: batch.product_by_batch_id(id) } else successes << { response: entry, product: batch.product_by_batch_id(id) } end end end