Sha256: 1869584c83f65876c62b387f8beaa92530c72e7fc1811d1efb06e11c4acc816f

Contents?: true

Size: 363 Bytes

Versions: 2

Compression:

Stored size: 363 Bytes

Contents

require File.dirname(__FILE__) + "/environment"

class Rate
  include Consumer::Mapping
  attr_accessor :service, :code, :price, :carrier
  
  # UPS
  map(:all, "//RatingServiceSelectionResponse/RatedShipment", {
    :price => "TotalCharges/MonetaryValue",
    # :name => "Service",
    :code => "Service/Code"
  }) {|instance| instance.carrier = "UPS" }
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
woahdae-consumer-0.8.1 examples/shipping/rate.rb
woahdae-consumer-0.8.2 examples/shipping/rate.rb