Skip to content

feat: v0.16.0 — Printavo::Enums namespace#24

Merged
scarver2 merged 4 commits into
masterfrom
0.16.0
Apr 1, 2026
Merged

feat: v0.16.0 — Printavo::Enums namespace#24
scarver2 merged 4 commits into
masterfrom
0.16.0

Conversation

@scarver2
Copy link
Copy Markdown
Owner

@scarver2 scarver2 commented Apr 1, 2026

Summary

Adds Printavo::Enums — 18 frozen constant modules covering every consumer-facing enum in the Printavo V2 GraphQL schema (__DirectiveLocation and __TypeKind omitted as GraphQL introspection internals).

Module Constants
ApprovalRequestStatus APPROVED, PENDING, REVOKED, UNAPPROVED
ContactSortField CREATED_AT, EMAIL, FIRST_NAME, LAST_NAME, UPDATED_AT
LineItemSize XS–6XL, youth, toddler, infant, OS, NONE (26 values)
LineItemStatus ACTIVE, CANCELLED
MerchOrderDeliveryMethod LOCAL_DELIVERY, PICKUP, SHIP
MerchOrderStatus CANCELLED, COMPLETE, PENDING, PROCESSING
MerchStoreStatus ACTIVE, ARCHIVED, CLOSED
MessageDeliveryStatus BOUNCED, DELIVERED, FAILED, PENDING, SENT
OrderPaymentStatus PAID, PARTIAL, UNPAID
OrderSortField CREATED_AT, CUSTOMER_DUE_AT, DUE_AT, UPDATED_AT, VISUAL_ID
PaymentDisputeStatusField LOST, NEEDS_RESPONSE, RESOLVED, UNDER_REVIEW, WON
PaymentRequestStatus CANCELLED, PAID, SENT
PoGoodsStatus CANCELLED, PARTIAL, PENDING, RECEIVED
StatusType INVOICE, QUOTE
TaskSortField BODY, CREATED_AT, DUE_AT, UPDATED_AT
TaskableType INVOICE, QUOTE
TransactionCategory PAYMENT, REFUND
TransactionSource CARD, CASH, CHECK, MANUAL, ONLINE

Each module exposes an ALL frozen array. A shared RSpec example ('a Printavo enum') validates all three structural invariants across every module.

Note: Values are best-effort against the live schema. Incorrect values should be reported as patch issues.

Usage

Printavo::Enums::ApprovalRequestStatus::APPROVED   # => "approved"
Printavo::Enums::OrderPaymentStatus::ALL           # => ["PAID", "PARTIAL", "UNPAID"]
Printavo::Enums::OrderSortField::VISUAL_ID         # => "VISUAL_ID"

Test plan

  • bundle exec rspec — 701 examples, 0 failures, 100% line coverage
  • bundle exec rubocop — 217 files inspected, no offenses

🤖 Generated with Claude Code

scarver2 and others added 4 commits April 1, 2026 08:05
Adds frozen constant modules for every consumer-facing enum in the
Printavo V2 schema: ApprovalRequestStatus, ContactSortField, LineItemSize,
LineItemStatus, MerchOrderDeliveryMethod, MerchOrderStatus, MerchStoreStatus,
MessageDeliveryStatus, OrderPaymentStatus, OrderSortField,
PaymentDisputeStatusField, PaymentRequestStatus, PoGoodsStatus, StatusType,
TaskSortField, TaskableType, TransactionCategory, TransactionSource.

Each module exposes named constants + a frozen ALL array. Shared RSpec
example validates structure across all 18 modules.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…PI docs

Replace guessed enum values with exact values from https://www.printavo.com/docs/api/v2/.
Notable corrections: ContactSortField, LineItemSize (size_ prefix), LineItemStatus,
MerchOrderDeliveryMethod, MerchOrderStatus, MerchStoreStatus, MessageDeliveryStatus,
OrderPaymentStatus, OrderSortField, PaymentDisputeStatusField, PaymentRequestStatus,
PoGoodsStatus, TaskSortField, TaskableType, TransactionCategory, TransactionSource,
and ApprovalRequestStatus (added DECLINED). Update enums_spec and factories to match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… constants

Swap remaining literal 'approved', 'revoked', 'pending' strings in
approval_requests_spec.rb for ApprovalRequestStatus::APPROVED/REVOKED/PENDING.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@scarver2 scarver2 merged commit e76b3e2 into master Apr 1, 2026
4 checks passed
@scarver2 scarver2 deleted the 0.16.0 branch April 5, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant