Class: ActiveShipping::ExternalReturnLabelResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/active_shipping/external_return_label_response.rb

Instance Attribute Summary collapse

Attributes inherited from Response

#message, #params, #request, #test, #xml

Instance Method Summary collapse

Methods inherited from Response

#success?, #test?

Constructor Details

#initialize(success, message, params = {}, options = {}) ⇒ ExternalReturnLabelResponse

Returns a new instance of ExternalReturnLabelResponse.



10
11
12
13
14
15
16
17
# File 'lib/active_shipping/external_return_label_response.rb', line 10

def initialize(success, message, params = {}, options = {})
  @carrier = options[:carrier].parameterize.to_sym
  @carrier_name = options[:carrier]
  @return_label = options[:return_label]
  @tracking_number = options[:tracking_number]
  @postal_routing = options[:postal_routing]
  super
end

Instance Attribute Details

#carrierObject (readonly)

symbol



4
5
6
# File 'lib/active_shipping/external_return_label_response.rb', line 4

def carrier
  @carrier
end

#carrier_nameObject (readonly)

string



5
6
7
# File 'lib/active_shipping/external_return_label_response.rb', line 5

def carrier_name
  @carrier_name
end

#postal_routingObject (readonly)

string



8
9
10
# File 'lib/active_shipping/external_return_label_response.rb', line 8

def postal_routing
  @postal_routing
end

#return_labelObject (readonly)

string



7
8
9
# File 'lib/active_shipping/external_return_label_response.rb', line 7

def return_label
  @return_label
end

#tracking_numberObject (readonly)

string



6
7
8
# File 'lib/active_shipping/external_return_label_response.rb', line 6

def tracking_number
  @tracking_number
end

Instance Method Details

#has_exception?Boolean Also known as: exception?

Returns:

  • (Boolean)


19
20
21
# File 'lib/active_shipping/external_return_label_response.rb', line 19

def has_exception?
  @status == :exception
end