Method: ContactOrders#get_orders

Defined in:
lib/contact/ecommerce/orders.rb

#get_orders(options = nil, use_post = true) ⇒ Object

Get Orders.

Get a collection of orders.

Parameters

options

(Hash) – List of Resource Collection Options shown above can be used as parameter.

use_post

(Boolean) – Variable to determine if the request is by ‘post’ or ‘get’ functions.

First Example

@data = @mints_pub.get_orders

Second Example

options = { fields: 'title' }
@data = @mints_pub.get_orders(options)

Third Example

options = { fields: 'title' }
@data = @mints_pub.get_orders(options, false)


22
23
24
25
26
27
28
# File 'lib/contact/ecommerce/orders.rb', line 22

def get_orders(options = nil, use_post = true)
  if use_post
    @client.raw('post', '/ecommerce/orders/query', options, nil, @contact_v1_url)
  else
    @client.raw('get', '/ecommerce/orders', options, nil, @contact_v1_url)
  end
end