Sha256: ff98d57acc212d230f05649693e82f9580a95510b54b0d2e75bcba355840f19c

Contents?: true

Size: 729 Bytes

Versions: 7

Compression:

Stored size: 729 Bytes

Contents

# frozen_string_literal: true

module FriendlyShipping
  module Services
    class UpsFreight
      class GeneratePickupOptionsHash
        def self.call(pickup_options:)
          {
            PickupOptions: {
              LiftGateRequiredIndicator: pickup_options.lift_gate_required ? "" : nil,
              WeekendPickupIndicator: pickup_options.weekend_pickup ? "" : nil,
              InsidePickupIndicator: pickup_options.inside_pickup ? "" : nil,
              HolidayPickupIndicator: pickup_options.holiday_pickup ? "" : nil,
              LimitedAccessPickupIndicator: pickup_options.limited_access_pickup ? "" : nil
            }.compact.presence
          }.compact.presence
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
friendly_shipping-0.6.5 lib/friendly_shipping/services/ups_freight/generate_pickup_options_hash.rb
friendly_shipping-0.6.4 lib/friendly_shipping/services/ups_freight/generate_pickup_options_hash.rb
friendly_shipping-0.6.3 lib/friendly_shipping/services/ups_freight/generate_pickup_options_hash.rb
friendly_shipping-0.6.2 lib/friendly_shipping/services/ups_freight/generate_pickup_options_hash.rb
friendly_shipping-0.6.1 lib/friendly_shipping/services/ups_freight/generate_pickup_options_hash.rb
friendly_shipping-0.6.0 lib/friendly_shipping/services/ups_freight/generate_pickup_options_hash.rb
friendly_shipping-0.5.3 lib/friendly_shipping/services/ups_freight/generate_pickup_options_hash.rb