app/models/concerns/spree/shipment_provider/active_shipping.rb
# Returns an ActiveShipping::Location to describe where the package is
# going to. This information is derived from the address on the package/shipment
Returns an ActiveShipping::Location to describe where the package is
going to. This information is derived from the address on the package/shipment
Returns an ActiveShipping :: Location to describe where the package is going to . This information is derived from the address on the package / shipment
def to_location
      addr = @package.address
      @to_location ||= ::ActiveShipping::Location.new \
        company_name: (addr.company? ? addr.company : nil),
        name: "#{addr.firstname} #{addr.lastname}",
        phone: addr.phone,
        address1: addr.address1,
        address2: (addr.address2? ? addr.address2 : nil),
        city: addr.city,
        state: (addr.state ? addr.state.abbr : nil),
        zip: addr.zipcode,
        country: (addr.country ? addr.country.iso : nil)
    end
def to_location addr = @package . address @to_location ||= :: ActiveShipping :: Location . new company_name : ( addr . company? ? addr . company : nil ) , name : "#{addr.firstname} #{addr.lastname}" , phone : addr . phone , address1 : addr . address1 , address2 : ( addr . address2? ? addr . address2 : nil ) , city : addr . city , state : ( addr . state ? addr . state . abbr : nil ) , zip : addr . zipcode , country : ( addr . country ? addr . country . iso : nil ) end
Returns an ActiveShipping::Location to describe where the package is
going to.
Returns an ActiveShipping :: Location to describe where the package is going to .