class Ecommerce::Resources::AccountOrder

A wrapper to Ecommerce orders API

API

Documentation: myfreecomm.github.io/passaporte-web/ecommerce/api/index.html

Public Class Methods

find_all(account_uuid, page = 1, limit = 20) click to toggle source

Lists all Orders of an account and return a collection with orders and pagination information (represented by Ecommerce::Resources::Collection)

API

Method: GET /api/accounts/:account_uuid/orders/

Documentation: myfreecomm.github.io/passaporte-web/ecommerce/api/orders.html#listagem-das-ordens-de-compra-de-uma-conta

# File lib/ecommerce/resources/account_order.rb, line 18
def self.find_all(account_uuid, page = 1, limit = 20)
  body = { page: page, limit: limit }
  client.get("/api/accounts/#{account_uuid}/orders/", body: body) do |response|
    Ecommerce::Resources::OrderCollection.build(response)
  end
end