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
18
19
20
|
# File 'lib/versacommerce_api/resources/order.rb', line 18
def billing_address
associated_resource "billing_address", false
end
|
#payments ⇒ Object
10
11
12
|
# File 'lib/versacommerce_api/resources/order.rb', line 10
def payments
associated_resource "payment"
end
|
#shipping_address ⇒ Object
14
15
16
|
# File 'lib/versacommerce_api/resources/order.rb', line 14
def shipping_address
associated_resource "shipping_address", false
end
|