Class: FriendlyShipping::Services::Ups::RateEstimateOptions
- Inherits:
-
FriendlyShipping::ShipmentOptions
- Object
- FriendlyShipping::ShipmentOptions
- FriendlyShipping::Services::Ups::RateEstimateOptions
- Defined in:
- lib/friendly_shipping/services/ups/rate_estimate_options.rb
Constant Summary collapse
- PICKUP_TYPE_CODES =
{ daily_pickup: "01", customer_counter: "03", one_time_pickup: "06", on_call_air: "07", suggested_retail_rates: "11", letter_center: "19", air_service_center: "20" }.freeze
- CUSTOMER_CLASSIFICATION_CODES =
{ shipper_number: "00", daily_rates: "01", retail_rates: "04", regional_rates: "05", general_rates: "06", standard_rates: "53" }.freeze
Instance Attribute Summary collapse
-
#carbon_neutral ⇒ Object
readonly
Returns the value of attribute carbon_neutral.
-
#customer_context ⇒ Object
readonly
Returns the value of attribute customer_context.
-
#destination_account ⇒ Object
readonly
Returns the value of attribute destination_account.
-
#negotiated_rates ⇒ Object
readonly
Returns the value of attribute negotiated_rates.
-
#saturday_delivery ⇒ Object
readonly
Returns the value of attribute saturday_delivery.
-
#saturday_pickup ⇒ Object
readonly
Returns the value of attribute saturday_pickup.
-
#shipper ⇒ Object
readonly
Returns the value of attribute shipper.
-
#shipper_number ⇒ Object
readonly
Returns the value of attribute shipper_number.
-
#shipping_method ⇒ Object
readonly
Returns the value of attribute shipping_method.
-
#with_time_in_transit ⇒ Object
readonly
Returns the value of attribute with_time_in_transit.
Instance Method Summary collapse
- #customer_classification_code ⇒ Object
-
#initialize(shipper_number:, carbon_neutral: true, customer_context: nil, customer_classification: :daily_rates, destination_account: nil, negotiated_rates: false, pickup_type: :daily_pickup, saturday_delivery: false, saturday_pickup: false, shipper: nil, shipping_method: nil, with_time_in_transit: false, package_options_class: FriendlyShipping::Services::Ups::RateEstimatePackageOptions, **kwargs) ⇒ RateEstimateOptions
constructor
A new instance of RateEstimateOptions.
- #pickup_type_code ⇒ Object
Methods inherited from FriendlyShipping::ShipmentOptions
Constructor Details
#initialize(shipper_number:, carbon_neutral: true, customer_context: nil, customer_classification: :daily_rates, destination_account: nil, negotiated_rates: false, pickup_type: :daily_pickup, saturday_delivery: false, saturday_pickup: false, shipper: nil, shipping_method: nil, with_time_in_transit: false, package_options_class: FriendlyShipping::Services::Ups::RateEstimatePackageOptions, **kwargs) ⇒ RateEstimateOptions
Returns a new instance of RateEstimateOptions.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/friendly_shipping/services/ups/rate_estimate_options.rb', line 59 def initialize( shipper_number:, carbon_neutral: true, customer_context: nil, customer_classification: :daily_rates, destination_account: nil, negotiated_rates: false, pickup_type: :daily_pickup, saturday_delivery: false, saturday_pickup: false, shipper: nil, shipping_method: nil, with_time_in_transit: false, package_options_class: FriendlyShipping::Services::Ups::RateEstimatePackageOptions, **kwargs ) @carbon_neutral = carbon_neutral @customer_context = customer_context @customer_classification = customer_classification @destination_account = destination_account @negotiated_rates = negotiated_rates @shipper_number = shipper_number @pickup_type = pickup_type @saturday_delivery = saturday_delivery @saturday_pickup = saturday_pickup @shipper = shipper @shipping_method = shipping_method @with_time_in_transit = with_time_in_transit super(**kwargs.merge(package_options_class: )) end |
Instance Attribute Details
#carbon_neutral ⇒ Object (readonly)
Returns the value of attribute carbon_neutral.
48 49 50 |
# File 'lib/friendly_shipping/services/ups/rate_estimate_options.rb', line 48 def carbon_neutral @carbon_neutral end |
#customer_context ⇒ Object (readonly)
Returns the value of attribute customer_context.
48 49 50 |
# File 'lib/friendly_shipping/services/ups/rate_estimate_options.rb', line 48 def customer_context @customer_context end |
#destination_account ⇒ Object (readonly)
Returns the value of attribute destination_account.
48 49 50 |
# File 'lib/friendly_shipping/services/ups/rate_estimate_options.rb', line 48 def destination_account @destination_account end |
#negotiated_rates ⇒ Object (readonly)
Returns the value of attribute negotiated_rates.
48 49 50 |
# File 'lib/friendly_shipping/services/ups/rate_estimate_options.rb', line 48 def negotiated_rates @negotiated_rates end |
#saturday_delivery ⇒ Object (readonly)
Returns the value of attribute saturday_delivery.
48 49 50 |
# File 'lib/friendly_shipping/services/ups/rate_estimate_options.rb', line 48 def saturday_delivery @saturday_delivery end |
#saturday_pickup ⇒ Object (readonly)
Returns the value of attribute saturday_pickup.
48 49 50 |
# File 'lib/friendly_shipping/services/ups/rate_estimate_options.rb', line 48 def saturday_pickup @saturday_pickup end |
#shipper ⇒ Object (readonly)
Returns the value of attribute shipper.
48 49 50 |
# File 'lib/friendly_shipping/services/ups/rate_estimate_options.rb', line 48 def shipper @shipper end |
#shipper_number ⇒ Object (readonly)
Returns the value of attribute shipper_number.
48 49 50 |
# File 'lib/friendly_shipping/services/ups/rate_estimate_options.rb', line 48 def shipper_number @shipper_number end |
#shipping_method ⇒ Object (readonly)
Returns the value of attribute shipping_method.
48 49 50 |
# File 'lib/friendly_shipping/services/ups/rate_estimate_options.rb', line 48 def shipping_method @shipping_method end |
#with_time_in_transit ⇒ Object (readonly)
Returns the value of attribute with_time_in_transit.
48 49 50 |
# File 'lib/friendly_shipping/services/ups/rate_estimate_options.rb', line 48 def with_time_in_transit @with_time_in_transit end |
Instance Method Details
#customer_classification_code ⇒ Object
94 95 96 |
# File 'lib/friendly_shipping/services/ups/rate_estimate_options.rb', line 94 def customer_classification_code CUSTOMER_CLASSIFICATION_CODES[@customer_classification] end |
#pickup_type_code ⇒ Object
90 91 92 |
# File 'lib/friendly_shipping/services/ups/rate_estimate_options.rb', line 90 def pickup_type_code PICKUP_TYPE_CODES[@pickup_type] end |