b2b

package
v1.786.216 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2026 License: Apache-2.0, MIT Imports: 14 Imported by: 0

Documentation

Overview

Package b2b wires the B2B commerce HTTP surface: companies, employees (with their spending headroom), quotes (accept/reject + message thread), and spend-approvals. Every handler is tenant-scoped via the caller's organization namespace; the REST layer auto-namespaces the default CRUD routes and each custom sub-route passes the Namespace middleware explicitly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcceptQuote

func AcceptQuote(c *gin.Context)

AcceptQuote transitions a pending quote to accepted. Accepting a quote commits the org to a negotiated price, so it is admin-only — enforced inside the handler because the route middleware no-ops on the IAM path (Red HIGH-4).

func AddQuoteMessage

func AddQuoteMessage(c *gin.Context)

AddQuoteMessage appends a message to a quote's negotiation thread.

func ApproveApproval

func ApproveApproval(c *gin.Context)

ApproveApproval approves a pending approval.

func EmployeeSpending

func EmployeeSpending(c *gin.Context)

EmployeeSpending returns an employee's remaining spend headroom. The amount already committed is supplied by the caller (the cart/order in flight) via the `committed` query param in cents, defaulting to 0.

func ListQuoteMessages

func ListQuoteMessages(c *gin.Context)

ListQuoteMessages lists the messages on a quote's thread.

func RejectApproval

func RejectApproval(c *gin.Context)

RejectApproval rejects a pending approval.

func RejectQuote

func RejectQuote(c *gin.Context)

RejectQuote transitions a pending quote to a rejected state. Admin-only (a quote state decision) — gated inside the handler like AcceptQuote.

func Route

func Route(router router.Router, args ...gin.HandlerFunc)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL