Class: Shipping::LtlShippingInsurance::Result
- Inherits:
-
Data
- Object
- Data
- Shipping::LtlShippingInsurance::Result
- Defined in:
- app/services/shipping/ltl_shipping_insurance.rb
Overview
Outcome returned by the service and its helper methods.
Instance Attribute Summary collapse
-
#status_message ⇒ Object
readonly
human-readable message.
Instance Method Summary collapse
- #initialize(status: nil, status_message: nil) ⇒ Result constructor
-
#status(value) ⇒ Object
outcome status (
:okor:error).
Constructor Details
#initialize(status: nil, status_message: nil) ⇒ Result
20 |
# File 'app/services/shipping/ltl_shipping_insurance.rb', line 20 def initialize(status: nil, status_message: nil) = super |
Instance Attribute Details
#status_message ⇒ Object (readonly)
human-readable message
16 17 18 19 20 21 |
# File 'app/services/shipping/ltl_shipping_insurance.rb', line 16 Result = Data.define(:status, :status_message) do # @param status [Symbol, nil] outcome status (`:ok` or `:error`) # @param status_message [String, nil] human-readable message # @return [Result] def initialize(status: nil, status_message: nil) = super end |
Instance Method Details
#status=(value) ⇒ Object
outcome status (:ok or :error)
16 17 18 19 20 21 |
# File 'app/services/shipping/ltl_shipping_insurance.rb', line 16 Result = Data.define(:status, :status_message) do # @param status [Symbol, nil] outcome status (`:ok` or `:error`) # @param status_message [String, nil] human-readable message # @return [Result] def initialize(status: nil, status_message: nil) = super end |