app/services/easy_post_service.rb
# turns parsed JSON response into an object to pass around
turns parsed JSON response into an object to pass around
turns parsed JSON response into an object to pass around
def shipping_rate_params
    params = {
      "shipment[to_address][name]":"#{user.first_name} #{user.last_name}",
      "shipment[to_address][street1]":"#{user.address}",
      "shipment[to_address][street2]":"#{user.address_2}",
      "shipment[to_address][city]":"#{user.city}",
      "shipment[to_address][state]":"#{user.state}",
      "shipment[to_address][zip]":"#{user.zip}",
      "shipment[to_address][country]":"US",
      "shipment[to_address][phone]":"#{user.phone}",
      "shipment[from_address][company]":"Little Shop",
      "shipment[from_address][street1]":"1331 17th Street",
      "shipment[from_address][street2]":"L100",
      "shipment[from_address][city]":"Denver",
      "shipment[from_address][state]":"CO",
      "shipment[from_address][zip]":"80202",
      "shipment[from_address][country]":"US",
      "shipment[from_address][phone]":"3038765309",
      "shipment[from_address][email]":"blbillington1@gmail.com",
      "shipment[parcel][length]":"#{package.length}",
      "shipment[parcel][width]":"#{package.width}",
      "shipment[parcel][height]":"#{package.height}",
      "shipment[parcel][weight]":"#{package.weight}"
    }
  end
def shipping_rate_params params = { "shipment[to_address][name]" : "#{user.first_name} #{user.last_name}" , "shipment[to_address][street1]" : "#{user.address}" , "shipment[to_address][street2]" : "#{user.address_2}" , "shipment[to_address][city]" : "#{user.city}" , "shipment[to_address][state]" : "#{user.state}" , "shipment[to_address][zip]" : "#{user.zip}" , "shipment[to_address][country]" : "US" , "shipment[to_address][phone]" : "#{user.phone}" , "shipment[from_address][company]" : "Little Shop" , "shipment[from_address][street1]" : "1331 17th Street" , "shipment[from_address][street2]" : "L100" , "shipment[from_address][city]" : "Denver" , "shipment[from_address][state]" : "CO" , "shipment[from_address][zip]" : "80202" , "shipment[from_address][country]" : "US" , "shipment[from_address][phone]" : "3038765309" , "shipment[from_address][email]" : "blbillington1@gmail.com" , "shipment[parcel][length]" : "#{package.length}" , "shipment[parcel][width]" : "#{package.width}" , "shipment[parcel][height]" : "#{package.height}" , "shipment[parcel][weight]" : "#{package.weight}" } end
turns parsed JSON response into an object to pass around
turns parsed JSON response into an object to pass around