Class: Retailer::SiblingPriceRefresher::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/retailer/sibling_price_refresher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(refreshed_count: nil, lowest_price: nil, prices: nil, errors: nil) ⇒ Result

Returns a new instance of Result.



20
# File 'app/services/retailer/sibling_price_refresher.rb', line 20

def initialize(refreshed_count: nil, lowest_price: nil, prices: nil, errors: nil) = super

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors

Returns:

  • (Object)

    the current value of errors



19
20
21
# File 'app/services/retailer/sibling_price_refresher.rb', line 19

def errors
  @errors
end

#lowest_priceObject (readonly)

Returns the value of attribute lowest_price

Returns:

  • (Object)

    the current value of lowest_price



19
20
21
# File 'app/services/retailer/sibling_price_refresher.rb', line 19

def lowest_price
  @lowest_price
end

#pricesObject (readonly)

Returns the value of attribute prices

Returns:

  • (Object)

    the current value of prices



19
20
21
# File 'app/services/retailer/sibling_price_refresher.rb', line 19

def prices
  @prices
end

#refreshed_countObject (readonly)

Returns the value of attribute refreshed_count

Returns:

  • (Object)

    the current value of refreshed_count



19
20
21
# File 'app/services/retailer/sibling_price_refresher.rb', line 19

def refreshed_count
  @refreshed_count
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'app/services/retailer/sibling_price_refresher.rb', line 21

def success?
  errors.empty?
end