Class: Edi::MarketplaceLabelPurchaser::PurchaseResult
- Inherits:
-
Data
- Object
- Data
- Edi::MarketplaceLabelPurchaser::PurchaseResult
- Defined in:
- app/services/edi/marketplace_label_purchaser.rb
Overview
Standardized result object for label operations. api_log is the
accumulated per-call request/response trace from the marketplace client
(Amazon's @api_log, Walmart's, etc.) — surfaced here so the caller can
persist it onto Delivery#shipping_api_log for post-hoc debugging.
Instance Attribute Summary collapse
-
#api_log ⇒ Object
readonly
Returns the value of attribute api_log.
-
#carrier ⇒ Object
readonly
Returns the value of attribute carrier.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#label_id ⇒ Object
readonly
Returns the value of attribute label_id.
-
#label_upload ⇒ Object
readonly
Returns the value of attribute label_upload.
-
#service_type ⇒ Object
readonly
Returns the value of attribute service_type.
-
#success ⇒ Object
readonly
Returns the value of attribute success.
-
#tracking_number ⇒ Object
readonly
Returns the value of attribute tracking_number.
Instance Method Summary collapse
-
#initialize(success: nil, label_id: nil, tracking_number: nil, carrier: nil, service_type: nil, label_upload: nil, error: nil, api_log: []) ⇒ PurchaseResult
constructor
A new instance of PurchaseResult.
Constructor Details
#initialize(success: nil, label_id: nil, tracking_number: nil, carrier: nil, service_type: nil, label_upload: nil, error: nil, api_log: []) ⇒ PurchaseResult
Returns a new instance of PurchaseResult.
34 |
# File 'app/services/edi/marketplace_label_purchaser.rb', line 34 def initialize(success: nil, label_id: nil, tracking_number: nil, carrier: nil, service_type: nil, label_upload: nil, error: nil, api_log: []) = super |
Instance Attribute Details
#api_log ⇒ Object (readonly)
Returns the value of attribute api_log
33 34 35 |
# File 'app/services/edi/marketplace_label_purchaser.rb', line 33 def api_log @api_log end |
#carrier ⇒ Object (readonly)
Returns the value of attribute carrier
33 34 35 |
# File 'app/services/edi/marketplace_label_purchaser.rb', line 33 def carrier @carrier end |
#error ⇒ Object (readonly)
Returns the value of attribute error
33 34 35 |
# File 'app/services/edi/marketplace_label_purchaser.rb', line 33 def error @error end |
#label_id ⇒ Object (readonly)
Returns the value of attribute label_id
33 34 35 |
# File 'app/services/edi/marketplace_label_purchaser.rb', line 33 def label_id @label_id end |
#label_upload ⇒ Object (readonly)
Returns the value of attribute label_upload
33 34 35 |
# File 'app/services/edi/marketplace_label_purchaser.rb', line 33 def label_upload @label_upload end |
#service_type ⇒ Object (readonly)
Returns the value of attribute service_type
33 34 35 |
# File 'app/services/edi/marketplace_label_purchaser.rb', line 33 def service_type @service_type end |
#success ⇒ Object (readonly)
Returns the value of attribute success
33 34 35 |
# File 'app/services/edi/marketplace_label_purchaser.rb', line 33 def success @success end |
#tracking_number ⇒ Object (readonly)
Returns the value of attribute tracking_number
33 34 35 |
# File 'app/services/edi/marketplace_label_purchaser.rb', line 33 def tracking_number @tracking_number end |