Class: Warranty::PublicRegistration::Result
- Inherits:
-
Data
- Object
- Data
- Warranty::PublicRegistration::Result
- 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
-
#already_registered ⇒ Object
readonly
Returns the value of attribute already_registered.
-
#customer ⇒ Object
readonly
Returns the value of attribute customer.
-
#customer_created ⇒ Object
readonly
Returns the value of attribute customer_created.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#success ⇒ Object
readonly
Returns the value of attribute success.
-
#warranty ⇒ Object
readonly
Returns the value of attribute warranty.
Instance Method Summary collapse
-
#initialize(success: nil, warranty: nil, customer: nil, customer_created: false, error: nil, already_registered: false) ⇒ Result
constructor
A new instance of Result.
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_registered ⇒ Object (readonly)
Returns the value of attribute already_registered
40 41 42 |
# File 'app/services/warranty/public_registration.rb', line 40 def already_registered @already_registered end |
#customer ⇒ Object (readonly)
Returns the value of attribute customer
40 41 42 |
# File 'app/services/warranty/public_registration.rb', line 40 def customer @customer end |
#customer_created ⇒ Object (readonly)
Returns the value of attribute customer_created
40 41 42 |
# File 'app/services/warranty/public_registration.rb', line 40 def customer_created @customer_created end |
#error ⇒ Object (readonly)
Returns the value of attribute error
40 41 42 |
# File 'app/services/warranty/public_registration.rb', line 40 def error @error end |
#success ⇒ Object (readonly)
Returns the value of attribute success
40 41 42 |
# File 'app/services/warranty/public_registration.rb', line 40 def success @success end |
#warranty ⇒ Object (readonly)
Returns the value of attribute warranty
40 41 42 |
# File 'app/services/warranty/public_registration.rb', line 40 def warranty @warranty end |