app/models/concerns/spree/shipment_provider/active_shipping.rb
# Returns an ActiveShipping::Location to describe where the package is
# coming from. This information is derived from the stock location associated
# with the package/shipment.
Returns an ActiveShipping::Location to describe where the package is
coming from. This information is derived from the stock location associated
with the package/shipment.
Returns an ActiveShipping :: Location to describe where the package is coming from . This information is derived from the stock location associated with the package / shipment .
def from_location
      location = @package.stock_location
      @from_location ||= ::ActiveShipping::Location.new \
        company_name: Spree::Store.current.name,
        phone: location.phone,
        address1: location.address1,
        address2: (location.address2? ? location.address2 : nil),
        city: location.city,
        state: (location.state ? location.state.abbr : nil),
        zip: location.zipcode,
        country: (location.country ? location.country.iso : nil)
    end
def from_location location = @package . stock_location @from_location ||= :: ActiveShipping :: Location . new company_name : Spree :: Store . current . name , phone : location . phone , address1 : location . address1 , address2 : ( location . address2? ? location . address2 : nil ) , city : location . city , state : ( location . state ? location . state . abbr : nil ) , zip : location . zipcode , country : ( location . country ? location . country . iso : nil ) end
Returns an ActiveShipping::Location to describe where the package is
coming from.
Returns an ActiveShipping :: Location to describe where the package is coming from .
# Use the stock location associated with the package/shipment to determine # the from location.