Sha256: 283ba51e80e84efa2ff01c960073e5e6e7605a4a7030703c7abfa12c09462730

Contents?: true

Size: 1.41 KB

Versions: 32

Compression:

Stored size: 1.41 KB

Contents

# frozen_string_literal: true

module FriendlyShipping
  module Services
    class Ups
      # Represents billing-related options for obtaining shipment labels.
      # @option bill_third_party [Boolean] When truthy, bill an account other than the shipper's.
      #  Specified by billing_(account, zip and country)
      # @option bill_to_consignee [Boolean] If billing a third party, bill the consignee instead of the 3rd party shipper
      # @option prepay [Boolean] If truthy the shipper will be bill immediately. Otherwise the shipper is billed
      #   when the label is used. Default: false
      class LabelBillingOptions
        attr_reader :bill_third_party,
                    :bill_to_consignee,
                    :prepay,
                    :billing_account,
                    :billing_zip,
                    :billing_country,
                    :currency

        def initialize(
          bill_third_party: false,
          bill_to_consignee: false,
          prepay: false,
          billing_account: nil,
          billing_zip: nil,
          billing_country: nil,
          currency: nil
        )
          @bill_third_party = bill_third_party
          @bill_to_consignee = bill_to_consignee
          @prepay = prepay
          @billing_account = billing_account
          @billing_zip = billing_zip
          @billing_country = billing_country
          @currency = currency
        end
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

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