Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
printavo-ruby (0.16.0)
printavo-ruby (0.17.0)
faraday (~> 2.0)
faraday-retry (~> 2.0)
thor (~> 1.0)
Expand Down Expand Up @@ -236,7 +236,7 @@ CHECKSUMS
notiffany (0.1.3) sha256=d37669605b7f8dcb04e004e6373e2a780b98c776f8eb503ac9578557d7808738
parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130
parser (3.3.11.1) sha256=d17ace7aabe3e72c3cc94043714be27cc6f852f104d81aa284c2281aecc65d54
printavo-ruby (0.16.0)
printavo-ruby (0.17.0)
prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
pry (0.16.0) sha256=d76c69065698ed1f85e717bd33d7942c38a50868f6b0673c636192b3d1b6054e
public_suffix (7.0.5) sha256=1a8bb08f1bbea19228d3bed6e5ed908d1cb4f7c2726d18bd9cadf60bc676f623
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

[![CI](https://github.com/scarver2/printavo-ruby/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/scarver2/printavo-ruby/actions/workflows/ci.yml)
[![Coverage Status](https://coveralls.io/repos/github/scarver2/printavo-ruby/badge.svg?branch=master)](https://coveralls.io/github/scarver2/printavo-ruby?branch=master)
[![Gem Version](https://img.shields.io/gem/v/printavo-ruby.svg)](https://rubygems.org/gems/printavo-ruby)
[![Gem Version](https://badge.fury.io/rb/printavo-ruby.svg)](https://badge.fury.io/rb/printavo-ruby)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

A framework-agnostic Ruby SDK for the [Printavo](https://www.printavo.com) GraphQL API (v2).
Expand Down
54 changes: 33 additions & 21 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,49 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.17.0] - 2026-04-01

### Added
- `Order#visual_id`, `Order#created_at`, `Order#updated_at` — expose `VisualIDed` and
`Timestamps` interface fields on the `Order` model
- `Invoice#visual_id`, `Invoice#created_at`, `Invoice#updated_at` — same for `Invoice`
- `Customer#created_at`, `Customer#updated_at` — `Timestamps` interface fields
- `Contact#created_at`, `Contact#updated_at` — `Timestamps` interface fields
- `CustomAddress#country` — completes the `MailAddress` interface (`address`, `city`,
`state`, `zip`, `country` are now all exposed)
- `visualId`, `createdAt`, `updatedAt` added to all order/invoice query and mutation
GraphQL files (`find`, `all`, `create`, `update`)
- `createdAt`, `updatedAt` added to customer and contact query/mutation files
- `country` added to all 6 custom_address query/mutation files
- Gem version badge in `README.md` switched to `badge.fury.io` service

## [0.16.0] - 2026-04-01

### Added
- `Printavo::Enums` namespace — 18 enum modules covering every GraphQL enum in the
Printavo V2 schema (excluding `__DirectiveLocation` and `__TypeKind`, which are
GraphQL introspection internals):
- `ApprovalRequestStatus` — APPROVED, PENDING, REVOKED, UNAPPROVED
- `ContactSortField` — CREATED_AT, EMAIL, FIRST_NAME, LAST_NAME, UPDATED_AT
- `LineItemSize` — full garment size set (XS–6XL, youth, toddler, infant, OS, NONE)
- `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
- `ApprovalRequestStatus` — APPROVED, DECLINED, PENDING, REVOKED, UNAPPROVED
- `ContactSortField` — CONTACT_EMAIL, CONTACT_NAME, CUSTOMER_NAME, ORDER_COUNT
- `LineItemSize` — full garment size set (size_xs–size_6xl, youth, toddler, infant, size_other)
- `LineItemStatus` — arrived, attached_to_po, in, need_ordering, ordered, partially_received, received
- `MerchOrderDeliveryMethod` — DELIVERY, PICKUP
- `MerchOrderStatus` — FULFILLED, UNFULFILLED
- `MerchStoreStatus` — CLOSED, LIVE
- `MessageDeliveryStatus` — BOUNCED, CLICKED, DELIVERED, ERROR, LINKED, OPENED, OTHER, PAY_FOR, PENDING, REJECTED, SENT
- `OrderPaymentStatus` — PAID, PARTIAL_PAYMENT, UNPAID
- `OrderSortField` — CUSTOMER_DUE_AT, CUSTOMER_NAME, OWNER, STATUS, TOTAL, VISUAL_ID
- `PaymentDisputeStatusField` — DISPUTE_INITIATED, DISPUTE_IN_REVIEW, DISPUTE_LOST, DISPUTE_WON, RETRIEVAL_REQUEST
- `PaymentRequestStatus` — ARCHIVED, CLOSED, OPEN
- `PoGoodsStatus` — arrived, not_ordered, ordered, partially_received, received
- `StatusType` — INVOICE, QUOTE
- `TaskSortField` — BODY, CREATED_AT, DUE_AT, UPDATED_AT
- `TaskableType` — INVOICE, QUOTE
- `TransactionCategory` — PAYMENT, REFUND
- `TransactionSource` — CARD, CASH, CHECK, MANUAL, ONLINE
- `TaskSortField` — CREATED_AT, DUE_AT
- `TaskableType` — CUSTOMER, INVOICE, QUOTE
- `TransactionCategory` — BANK_TRANSFER, CASH, CHECK, CREDIT_CARD, ECHECK, OTHER
- `TransactionSource` — MANUAL, PROCESSOR
- Each enum exposes an `ALL` frozen array of all values
- Shared RSpec example `'a Printavo enum'` validates structure across all 18 modules

### Notes
- Enum values are the best-effort representation of the Printavo V2 schema at time of
release. Values that differ from the live schema should be reported as patch issues.

## [0.15.0] - 2026-04-01

### Added
Expand Down
2 changes: 2 additions & 0 deletions lib/printavo/graphql/contacts/create.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ mutation ContactCreate($input: ContactInput!) {
email
phone
fax
createdAt
updatedAt
}
}
2 changes: 2 additions & 0 deletions lib/printavo/graphql/contacts/find.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ query Contact($id: ID!) {
email
phone
fax
createdAt
updatedAt
}
}
2 changes: 2 additions & 0 deletions lib/printavo/graphql/contacts/update.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ mutation ContactUpdate($id: ID!, $input: ContactInput!) {
email
phone
fax
createdAt
updatedAt
}
}
1 change: 1 addition & 0 deletions lib/printavo/graphql/custom_addresses/all.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ query CustomAddresses($orderId: ID!, $first: Int, $after: String) {
city
state
zip
country
}
pageInfo {
hasNextPage
Expand Down
1 change: 1 addition & 0 deletions lib/printavo/graphql/custom_addresses/create.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ mutation CustomAddressCreate($input: CustomAddressInput!) {
city
state
zip
country
}
}
1 change: 1 addition & 0 deletions lib/printavo/graphql/custom_addresses/creates.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ mutation CustomAddressCreates($inputs: [CustomAddressInput!]!) {
city
state
zip
country
}
}
1 change: 1 addition & 0 deletions lib/printavo/graphql/custom_addresses/find.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ query CustomAddress($id: ID!) {
city
state
zip
country
}
}
1 change: 1 addition & 0 deletions lib/printavo/graphql/custom_addresses/update.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ mutation CustomAddressUpdate($id: ID!, $input: CustomAddressInput!) {
city
state
zip
country
}
}
1 change: 1 addition & 0 deletions lib/printavo/graphql/custom_addresses/updates.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ mutation CustomAddressUpdates($inputs: [CustomAddressUpdateInput!]!) {
city
state
zip
country
}
}
2 changes: 2 additions & 0 deletions lib/printavo/graphql/customers/all.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ query Customers($first: Int, $after: String) {
email
phone
company
createdAt
updatedAt
}
pageInfo {
hasNextPage
Expand Down
2 changes: 2 additions & 0 deletions lib/printavo/graphql/customers/find.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ query Customer($id: ID!) {
email
phone
company
createdAt
updatedAt
}
}
3 changes: 3 additions & 0 deletions lib/printavo/graphql/invoices/all.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ query Invoices($first: Int, $after: String) {
invoices(first: $first, after: $after) {
nodes {
id
visualId
nickname
total
amountPaid
amountOutstanding
paidInFull
invoiceAt
paymentDueAt
createdAt
updatedAt
status {
id
name
Expand Down
3 changes: 3 additions & 0 deletions lib/printavo/graphql/invoices/find.graphql
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
query Invoice($id: ID!) {
invoice(id: $id) {
id
visualId
nickname
total
amountPaid
amountOutstanding
paidInFull
invoiceAt
paymentDueAt
createdAt
updatedAt
status {
id
name
Expand Down
3 changes: 3 additions & 0 deletions lib/printavo/graphql/invoices/update.graphql
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
mutation InvoiceUpdate($id: ID!, $input: InvoiceInput!) {
invoiceUpdate(id: $id, input: $input) {
id
visualId
nickname
total
amountPaid
amountOutstanding
paidInFull
invoiceAt
paymentDueAt
createdAt
updatedAt
status {
id
name
Expand Down
3 changes: 3 additions & 0 deletions lib/printavo/graphql/orders/all.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ query Orders($first: Int, $after: String) {
orders(first: $first, after: $after) {
nodes {
id
visualId
nickname
totalPrice
createdAt
updatedAt
status {
id
name
Expand Down
3 changes: 3 additions & 0 deletions lib/printavo/graphql/orders/create.graphql
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
mutation QuoteCreate($input: QuoteCreateInput!) {
quoteCreate(input: $input) {
id
visualId
nickname
total
createdAt
updatedAt
status {
id
name
Expand Down
3 changes: 3 additions & 0 deletions lib/printavo/graphql/orders/find.graphql
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
query Order($id: ID!) {
order(id: $id) {
id
visualId
nickname
totalPrice
createdAt
updatedAt
status {
id
name
Expand Down
3 changes: 3 additions & 0 deletions lib/printavo/graphql/orders/update.graphql
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
mutation QuoteUpdate($id: ID!, $input: QuoteInput!) {
quoteUpdate(id: $id, input: $input) {
id
visualId
nickname
total
createdAt
updatedAt
status {
id
name
Expand Down
2 changes: 2 additions & 0 deletions lib/printavo/models/contact.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ def last_name = self['lastName']
def email = self['email']
def phone = self['phone']
def fax = self['fax']
def created_at = self['createdAt']
def updated_at = self['updatedAt']

def full_name
self['fullName'] || [first_name, last_name].compact.join(' ').strip
Expand Down
1 change: 1 addition & 0 deletions lib/printavo/models/custom_address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ def address = self['address']
def city = self['city']
def state = self['state']
def zip = self['zip']
def country = self['country']
end
end
2 changes: 2 additions & 0 deletions lib/printavo/models/customer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ def last_name = self['lastName']
def email = self['email']
def phone = self['phone']
def company = self['company']
def created_at = self['createdAt']
def updated_at = self['updatedAt']

def full_name
[first_name, last_name].compact.join(' ').strip
Expand Down
3 changes: 3 additions & 0 deletions lib/printavo/models/invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
module Printavo
class Invoice < Models::Base
def id = self['id']
def visual_id = self['visualId']
def nickname = self['nickname']
def created_at = self['createdAt']
def updated_at = self['updatedAt']
def total = self['total']
def amount_paid = self['amountPaid']
def amount_outstanding = self['amountOutstanding']
Expand Down
3 changes: 3 additions & 0 deletions lib/printavo/models/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
module Printavo
class Order < Models::Base
def id = self['id']
def visual_id = self['visualId']
def nickname = self['nickname']
def total_price = self['totalPrice']
def created_at = self['createdAt']
def updated_at = self['updatedAt']

def status
dig('status', 'name')
Expand Down
2 changes: 1 addition & 1 deletion lib/printavo/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# frozen_string_literal: true

module Printavo
VERSION = '0.16.0'
VERSION = '0.17.0'
end
2 changes: 2 additions & 0 deletions spec/printavo/contact_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
it { expect(contact.last_name).to be_a(String) }
it { expect(contact.email).to include('@') }
it { expect(contact.phone).to be_a(String) }
it { expect(contact.created_at).to be_a(String) }
it { expect(contact.updated_at).to be_a(String) }

describe '#full_name' do
it 'returns fullName from API when present' do
Expand Down
1 change: 1 addition & 0 deletions spec/printavo/custom_address_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
it { expect(custom_address.city).to be_a(String) }
it { expect(custom_address.state).to be_a(String) }
it { expect(custom_address.zip).to be_a(String) }
it { expect(custom_address.country).to be_a(String) }
end
8 changes: 8 additions & 0 deletions spec/printavo/customer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@
it 'exposes company' do
expect(customer.company).to be_a(String)
end

it 'exposes created_at' do
expect(customer.created_at).to be_a(String)
end

it 'exposes updated_at' do
expect(customer.updated_at).to be_a(String)
end
end

describe '#full_name' do
Expand Down
3 changes: 3 additions & 0 deletions spec/printavo/invoice_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
subject(:invoice) { described_class.new(fake_invoice_attrs) }

it { expect(invoice.id).to be_a(String) }
it { expect(invoice.visual_id).to be_a(String) }
it { expect(invoice.nickname).to be_a(String) }
it { expect(invoice.created_at).to be_a(String) }
it { expect(invoice.updated_at).to be_a(String) }
it { expect(invoice.total).to be_a(String) }
it { expect(invoice.amount_paid).to be_a(String) }
it { expect(invoice.amount_outstanding).to be_a(String) }
Expand Down
4 changes: 3 additions & 1 deletion spec/support/factories/contact.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ def fake_contact_attrs(overrides = {})
'fullName' => Faker::Name.name,
'email' => Faker::Internet.email,
'phone' => Faker::PhoneNumber.phone_number,
'fax' => nil
'fax' => nil,
'createdAt' => Faker::Time.backward(days: 90).iso8601,
'updatedAt' => Faker::Time.backward(days: 30).iso8601
}.merge(overrides.transform_keys(&:to_s))
end
end
4 changes: 3 additions & 1 deletion spec/support/factories/customer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ def fake_customer_attrs(overrides = {})
'lastName' => Faker::Name.last_name,
'email' => Faker::Internet.email,
'phone' => Faker::PhoneNumber.phone_number,
'company' => Faker::Company.name
'company' => Faker::Company.name,
'createdAt' => Faker::Time.backward(days: 90).iso8601,
'updatedAt' => Faker::Time.backward(days: 30).iso8601
}.merge(overrides.transform_keys(&:to_s))
end

Expand Down
Loading
Loading