Module: Reshape::Client::Orders

Included in:
Reshape::Client
Defined in:
lib/reshape/client/orders.rb

Instance Method Summary collapse

Instance Method Details

#add_to_cart(model_id, material_id, quantity, options = {}, raw = false) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/reshape/client/orders.rb', line 9

def add_to_cart(model_id, material_id, quantity, options={}, raw=false)
  options.merge!(
    {
      modelId: model_id,
      materialId: material_id,
      quantity: quantity
    })
  post("/orders/cart/#{api_version}", options, raw)
end

#cart(options = {}, raw = false) ⇒ Object



5
6
7
# File 'lib/reshape/client/orders.rb', line 5

def cart(options={}, raw=false)
  get("/orders/cart/#{api_version}", options, raw)
end