Sha256: 87fd093786023d3b2e552545e528eff34b75a3566a29b3d377e13411925032c8

Contents?: true

Size: 1.13 KB

Versions: 25

Compression:

Stored size: 1.13 KB

Contents

# frozen_string_literal: true

module FriendlyShipping
  module Services
    class Ups
      # Options for getting timing information from UPS
      # @attribute [Time] pickup When the shipment will be picked up
      # @attribute [Money] invoice_total How much the items in the shipment are worth
      #   As this is not super important for getting timing information, we use a default
      #   value of 50 USD here.
      # @attribute [Boolean] documents_only Does the shipment only contain documents?
      # @attribute [String] customer_context A string to connect request and response in the calling code
      class TimingOptions
        attr_reader :pickup,
                    :invoice_total,
                    :documents_only,
                    :customer_context

        def initialize(
          pickup: Time.now,
          invoice_total: Money.new(5000, 'USD'),
          documents_only: false,
          customer_context: nil
        )
          @pickup = pickup
          @invoice_total = invoice_total
          @documents_only = documents_only
          @customer_context = customer_context
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
friendly_shipping-0.9.0 lib/friendly_shipping/services/ups/timing_options.rb
friendly_shipping-0.8.1 lib/friendly_shipping/services/ups/timing_options.rb
friendly_shipping-0.8.0 lib/friendly_shipping/services/ups/timing_options.rb
friendly_shipping-0.7.3 lib/friendly_shipping/services/ups/timing_options.rb
friendly_shipping-0.7.2 lib/friendly_shipping/services/ups/timing_options.rb
friendly_shipping-0.7.1 lib/friendly_shipping/services/ups/timing_options.rb
friendly_shipping-0.7.0 lib/friendly_shipping/services/ups/timing_options.rb
friendly_shipping-0.6.5 lib/friendly_shipping/services/ups/timing_options.rb
friendly_shipping-0.6.4 lib/friendly_shipping/services/ups/timing_options.rb
friendly_shipping-0.6.3 lib/friendly_shipping/services/ups/timing_options.rb
friendly_shipping-0.6.2 lib/friendly_shipping/services/ups/timing_options.rb
friendly_shipping-0.6.1 lib/friendly_shipping/services/ups/timing_options.rb
friendly_shipping-0.6.0 lib/friendly_shipping/services/ups/timing_options.rb
friendly_shipping-0.5.3 lib/friendly_shipping/services/ups/timing_options.rb
friendly_shipping-0.5.2 lib/friendly_shipping/services/ups/timing_options.rb
friendly_shipping-0.5.1 lib/friendly_shipping/services/ups/timing_options.rb
friendly_shipping-0.5 lib/friendly_shipping/services/ups/timing_options.rb
friendly_shipping-0.4.14 lib/friendly_shipping/services/ups/timing_options.rb
friendly_shipping-0.4.13 lib/friendly_shipping/services/ups/timing_options.rb
friendly_shipping-0.4.12 lib/friendly_shipping/services/ups/timing_options.rb