Class: Warranty::PublicRegistration::Result

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

Overview

customer_created surfaces whether a brand-new Party was minted (a
marketplace end consumer we've never seen) for the thank-you page copy.
warranty is THE created registration (one per submission, with one
Warranty::Product per registered unit).
already_registered flags a one-shot violation caught under the order
lock (concurrent double-submit) so the controller can bounce to the
status page instead of showing an error.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(success: nil, warranty: nil, customer: nil, customer_created: false, error: nil, already_registered: false) ⇒ Result

Returns a new instance of Result.



41
# File 'app/services/warranty/public_registration.rb', line 41

def initialize(success: nil, warranty: nil, customer: nil, customer_created: false, error: nil, already_registered: false) = super

Instance Attribute Details

#already_registeredObject (readonly)

Returns the value of attribute already_registered

Returns:

  • (Object)

    the current value of already_registered



40
41
42
# File 'app/services/warranty/public_registration.rb', line 40

def already_registered
  @already_registered
end

#customerObject (readonly)

Returns the value of attribute customer

Returns:

  • (Object)

    the current value of customer



40
41
42
# File 'app/services/warranty/public_registration.rb', line 40

def customer
  @customer
end

#customer_createdObject (readonly)

Returns the value of attribute customer_created

Returns:

  • (Object)

    the current value of customer_created



40
41
42
# File 'app/services/warranty/public_registration.rb', line 40

def customer_created
  @customer_created
end

#errorObject (readonly)

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



40
41
42
# File 'app/services/warranty/public_registration.rb', line 40

def error
  @error
end

#successObject (readonly)

Returns the value of attribute success

Returns:

  • (Object)

    the current value of success



40
41
42
# File 'app/services/warranty/public_registration.rb', line 40

def success
  @success
end

#warrantyObject (readonly)

Returns the value of attribute warranty

Returns:

  • (Object)

    the current value of warranty



40
41
42
# File 'app/services/warranty/public_registration.rb', line 40

def warranty
  @warranty
end