Class: Warranty::OrderLookup::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/warranty/order_lookup.rb

Overview

Lookup outcome. verified is true only when a supplied email/ZIP
matched the order; error is a customer-facing message.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(success: nil, order: nil, verified: false, error: nil) ⇒ Result

Returns a new instance of Result.

Parameters:

  • success (Boolean, nil) (defaults to: nil)
  • order (Order, nil) (defaults to: nil)
  • verified (Boolean) (defaults to: false)
  • error (String, nil) (defaults to: nil)


31
# File 'app/services/warranty/order_lookup.rb', line 31

def initialize(success: nil, order: nil, verified: false, error: nil) = super

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



26
27
28
# File 'app/services/warranty/order_lookup.rb', line 26

def error
  @error
end

#orderObject (readonly)

Returns the value of attribute order

Returns:

  • (Object)

    the current value of order



26
27
28
# File 'app/services/warranty/order_lookup.rb', line 26

def order
  @order
end

#successObject (readonly)

Returns the value of attribute success

Returns:

  • (Object)

    the current value of success



26
27
28
# File 'app/services/warranty/order_lookup.rb', line 26

def success
  @success
end

#verifiedObject (readonly)

Returns the value of attribute verified

Returns:

  • (Object)

    the current value of verified



26
27
28
# File 'app/services/warranty/order_lookup.rb', line 26

def verified
  @verified
end