class Oshpark::ShippingRate
Public Class Methods
attrs()
click to toggle source
# File lib/oshpark/shipping_rate.rb, line 4 def self.attrs %w| carrier_name service_name price | end
rates_for_address(address)
click to toggle source
# File lib/oshpark/shipping_rate.rb, line 10 def self.rates_for_address address json = Oshpark::client.shipping_rates address.to_h json['shipping_rates'].collect do |shipping_rate_json| from_json shipping_rate_json end end
Public Instance Methods
to_h()
click to toggle source
# File lib/oshpark/shipping_rate.rb, line 18 def to_h {carrier_name: carrier_name, service_name: service_name} end