Class: Feed::Google::MerchantApi::ReportPuller::Result
- Inherits:
-
Data
- Object
- Data
- Feed::Google::MerchantApi::ReportPuller::Result
- Defined in:
- app/services/feed/google/merchant_api/report_puller.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#errors per-row failure messages (a missing/renamed offerId is not(per-rowfailuremessages(a missing/renamed offerId is) ⇒ Object
an error — see #pull — this is for genuine persistence failures).
-
#matched ⇒ Object
readonly
Returns the value of attribute matched.
- #matched rows whose offerId matched a CatalogItem and were persisted(rowswhoseofferIdmatchedaCatalogItem) ⇒ Object
-
#rows ⇒ Object
readonly
Returns the value of attribute rows.
- #rows total report rows returned(totalreportrowsreturned) ⇒ Object
Instance Method Summary collapse
-
#initialize(rows: 0, matched: 0, errors: []) ⇒ Result
constructor
A new instance of Result.
- #to_h ⇒ Object
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
#errors ⇒ Object (readonly)
Returns the value of attribute 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 |
#matched ⇒ Object (readonly)
Returns the value of attribute 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 |
#rows ⇒ Object (readonly)
Returns the value of attribute 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_h ⇒ Object
37 |
# File 'app/services/feed/google/merchant_api/report_puller.rb', line 37 def to_h = { rows:, matched:, errors: } |