Class: VersacommerceAPI::Order
Overview
An order comes by default with three associations: shipping_address, billing_address and customer.
because we already know the amount of data. if you want to include order items use the :include option like:
VersaCommerceShopApi::Order.find(:all, :params => => 'items', :limit => 10)
Instance Method Summary
collapse
#associated_resource
Methods inherited from Base
activate_session, all, clear_session, headers, root!
Methods included from Countable
#count
build, delete, headers
Instance Method Details
#billing_address ⇒ Object
17
18
19
|
# File 'lib/versacommerce_api/resources/order.rb', line 17
def billing_address
associated_resource "billing_address", false
end
|
#payments ⇒ Object
9
10
11
|
# File 'lib/versacommerce_api/resources/order.rb', line 9
def payments
associated_resource "payment"
end
|
#shipping_address ⇒ Object
13
14
15
|
# File 'lib/versacommerce_api/resources/order.rb', line 13
def shipping_address
associated_resource "shipping_address", false
end
|