class Lce::Offer

Public Class Methods

find(id) click to toggle source
# File lib/lce/offer.rb, line 5
def find(id)
  response = Lce.client.get('offers', id)
  new(response)
end

Public Instance Methods

available_delivery_locations(params) click to toggle source
# File lib/lce/offer.rb, line 17
def available_delivery_locations(params)
  return [] unless product.preset_delivery_location == true
  Lce.client.get('offers', id, 'available_delivery_locations', nil , {location: params }).map! do |l|
    Hashie::Mash.new(l)
  end
end
place_order(params) click to toggle source
# File lib/lce/offer.rb, line 12
def place_order(params)
  params.merge!(offer_id: id)
  Order.place(params)    
end