Sha256: ecb666942f15ac19716b5e74dbe024081fd48b279829027b803e0741ce247308

Contents?: true

Size: 1.52 KB

Versions: 1

Compression:

Stored size: 1.52 KB

Contents

module Spree
  module Calculator::Shipping
    module Usps
      class FirstClassPackageInternational < Spree::Calculator::Shipping::Usps::Base
        def self.geo_group
          :international
        end

        def self.service_code
          "#{SERVICE_CODE_PREFIX[geo_group]}:15" # First-Class Package International Serviceā„¢
        end

        def self.description
          I18n.t("usps.first_class_package_international")
        end

        protected
        # weight limit in ounces or zero (if there is no limit)
        def max_weight_for_country(country)
          64  # See limit of 4 pounds below.
        end

        # SAMPLE API RESPONSE
        #  Pulled 21-Nov-2013
        #{
        #"ID": "15",
        #"Pounds": "0",
        #"Ounces": "11",
        #"MailType": "Package",
        #"Container": "RECTANGULAR",
        #"Size": "REGULAR",
        #"Width": "0.01",
        #"Length": "0.01",
        #"Height": "0.01",
        #"Girth": "0.01",
        #"Country": "SPAIN",
        #"Postage": "14.90",
        #"ExtraServices": null,
        #"ValueOfContents": "0.00",
        #"InsComment": "SERVICE",
        #"SvcCommitments": "Varies by destination",
        #"SvcDescription": "First-Class Package International Service&lt;sup&gt;&#8482;&lt;/sup&gt;**",
        #"MaxDimensions": "Other than rolls: Max. length 24\", max length, height and depth (thickness) combined 36\"<br>Rolls: Max. length 36\". Max length and twice the diameter combined 42\"",
        #"MaxWeight": "4"
        #}
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solidus_active_shipping-1.0.0 app/models/spree/calculator/shipping/usps/first_class_package_international.rb