Class: Edi::MarketplaceLabelPurchaser::PurchaseResult

Inherits:
Data
  • Object
show all
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

Instance Method Summary collapse

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_logObject (readonly)

Returns the value of attribute api_log

Returns:

  • (Object)

    the current value of api_log



33
34
35
# File 'app/services/edi/marketplace_label_purchaser.rb', line 33

def api_log
  @api_log
end

#carrierObject (readonly)

Returns the value of attribute carrier

Returns:

  • (Object)

    the current value of carrier



33
34
35
# File 'app/services/edi/marketplace_label_purchaser.rb', line 33

def carrier
  @carrier
end

#errorObject (readonly)

Returns the value of attribute error

Returns:

  • (Object)

    the current value of error



33
34
35
# File 'app/services/edi/marketplace_label_purchaser.rb', line 33

def error
  @error
end

#label_idObject (readonly)

Returns the value of attribute label_id

Returns:

  • (Object)

    the current value of label_id



33
34
35
# File 'app/services/edi/marketplace_label_purchaser.rb', line 33

def label_id
  @label_id
end

#label_uploadObject (readonly)

Returns the value of attribute label_upload

Returns:

  • (Object)

    the current value of label_upload



33
34
35
# File 'app/services/edi/marketplace_label_purchaser.rb', line 33

def label_upload
  @label_upload
end

#service_typeObject (readonly)

Returns the value of attribute service_type

Returns:

  • (Object)

    the current value of service_type



33
34
35
# File 'app/services/edi/marketplace_label_purchaser.rb', line 33

def service_type
  @service_type
end

#successObject (readonly)

Returns the value of attribute success

Returns:

  • (Object)

    the current value of success



33
34
35
# File 'app/services/edi/marketplace_label_purchaser.rb', line 33

def success
  @success
end

#tracking_numberObject (readonly)

Returns the value of attribute tracking_number

Returns:

  • (Object)

    the current value of tracking_number



33
34
35
# File 'app/services/edi/marketplace_label_purchaser.rb', line 33

def tracking_number
  @tracking_number
end