Class: Feed::Google::MerchantApi::ReportPuller::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/feed/google/merchant_api/report_puller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rows: 0, matched: 0, errors: []) ⇒ Result

Returns a new instance of Result.



36
# File 'app/services/feed/google/merchant_api/report_puller.rb', line 36

def initialize(rows: 0, matched: 0, errors: []) = super

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors

Returns:

  • (Object)

    the current value of errors



35
36
37
# File 'app/services/feed/google/merchant_api/report_puller.rb', line 35

def errors
  @errors
end

#errors per-row failure messages (a missing/renamed offerId is not(per-rowfailuremessages(a missing/renamed offerId is) ⇒ Object

an error — see Feed::Google::MerchantApi::ReportPuller#pull — this is for genuine persistence failures)



35
36
37
38
# File 'app/services/feed/google/merchant_api/report_puller.rb', line 35

Result = Data.define(:rows, :matched, :errors) do
  def initialize(rows: 0, matched: 0, errors: []) = super
  def to_h = { rows:, matched:, errors: }
end

#matchedObject (readonly)

Returns the value of attribute matched

Returns:

  • (Object)

    the current value of matched



35
36
37
# File 'app/services/feed/google/merchant_api/report_puller.rb', line 35

def matched
  @matched
end

#matched rows whose offerId matched a CatalogItem and were persisted(rowswhoseofferIdmatchedaCatalogItem) ⇒ Object



35
36
37
38
# File 'app/services/feed/google/merchant_api/report_puller.rb', line 35

Result = Data.define(:rows, :matched, :errors) do
  def initialize(rows: 0, matched: 0, errors: []) = super
  def to_h = { rows:, matched:, errors: }
end

#rowsObject (readonly)

Returns the value of attribute rows

Returns:

  • (Object)

    the current value of rows



35
36
37
# File 'app/services/feed/google/merchant_api/report_puller.rb', line 35

def rows
  @rows
end

#rows total report rows returned(totalreportrowsreturned) ⇒ Object



35
36
37
38
# File 'app/services/feed/google/merchant_api/report_puller.rb', line 35

Result = Data.define(:rows, :matched, :errors) do
  def initialize(rows: 0, matched: 0, errors: []) = super
  def to_h = { rows:, matched:, errors: }
end

Instance Method Details

#to_hObject



37
# File 'app/services/feed/google/merchant_api/report_puller.rb', line 37

def to_h = { rows:, matched:, errors: }