Class: ActiveShipping::DeliveryDateEstimate

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(origin, destination, carrier, service_name, options = {}) ⇒ DeliveryDateEstimate

Returns a new instance of DeliveryDateEstimate.



12
13
14
15
16
17
18
# File 'lib/active_shipping/delivery_date_estimate.rb', line 12

def initialize(origin, destination, carrier, service_name, options={})
  @origin, @destination, @carrier, @service_name = origin, destination, carrier, service_name
  @service_code = options[:service_code]
  @date = options[:date]
  @guaranteed = options[:guaranteed]
  @business_transit_days = options[:business_transit_days]
end

Instance Attribute Details

#business_transit_daysObject (readonly)

Returns the value of attribute business_transit_days.



10
11
12
# File 'lib/active_shipping/delivery_date_estimate.rb', line 10

def business_transit_days
  @business_transit_days
end

#carrierObject (readonly)

Returns the value of attribute carrier.



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

def carrier
  @carrier
end

#dateObject (readonly)

Returns the value of attribute date.



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

def date
  @date
end

#destinationObject (readonly)

Returns the value of attribute destination.



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

def destination
  @destination
end

#guaranteedObject (readonly)

Returns the value of attribute guaranteed.



9
10
11
# File 'lib/active_shipping/delivery_date_estimate.rb', line 9

def guaranteed
  @guaranteed
end

#originObject (readonly)

Returns the value of attribute origin.



3
4
5
# File 'lib/active_shipping/delivery_date_estimate.rb', line 3

def origin
  @origin
end

#service_codeObject (readonly)

Returns the value of attribute service_code.



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

def service_code
  @service_code
end

#service_nameObject (readonly)

Returns the value of attribute service_name.



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

def service_name
  @service_name
end