Class: Veeqo::Order

Inherits:
Base
  • Object
show all
Includes:
Actions::Base
Defined in:
lib/veeqo/order.rb

Instance Method Summary collapse

Methods included from Actions::Delete

#delete

Methods included from Actions::Find

#find

Methods included from Actions::List

#list

Methods inherited from Base

method_missing

Instance Method Details

#create(channel_id:, customer_id:, delivery_method_id:, **attributes) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/veeqo/order.rb', line 5

def create(channel_id:, customer_id:, delivery_method_id:, **attributes)
  required_attributes = {
    channel_id: channel_id,
    customer_id: customer_id,
    delivery_method_id: delivery_method_id,
  }

  create_resource(order: required_attributes.merge(attributes))
end

#update(order_id, attributes = {}) ⇒ Object



15
16
17
# File 'lib/veeqo/order.rb', line 15

def update(order_id, attributes = {})
  update_resource(order_id, attributes)
end