Orders
Orders — methods, parameters, and examples for easy-sdk (gem).
An order represents a discrete transaction in your system — typically created server-side after a checkout completes. The SDK exposes a read-only orders list plus a tag-update for reconciliation metadata. Order creation happens implicitly through checkout, payment links, and invoices.
Accessed via client.orders.
Methods
list(limit: nil, offset: nil, ids: nil)
GET /orders.
client.orders.list(limit: 50)retrieve(id)
GET /orders/:id.
client.orders.retrieve("ord_…")update_tags(id, tags:)
PATCH /orders/:id with { tags }. The legacy /orders/:id/tags
suffix returns 404 on the current API and is not used by the SDK.
client.orders.update_tags("ord_…", tags: { region: "us-east", source: "shopify" })Object shape
:id, :state, :amount, :currency, :customer, :line_items,
:tags, :created_at, … plus references to the originating checkout
session, payment link, or invoice.
Examples
Tag an order with internal reconciliation IDs
client.orders.update_tags(
"ord_…",
tags: { netsuite_id: "12345", reconciled_at: Time.now.iso8601 }
)Pull recent orders for a CSV export
rows = client.orders.list(limit: 100)[:data] || []
rows.each do |order|
puts [order[:id], order[:amount], order[:currency], order[:state]].join(",")
end