printavo-ruby 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/docs/CHANGELOG.md +19 -0
- data/docs/TODO.md +22 -22
- data/lib/printavo/client.rb +16 -0
- data/lib/printavo/models/custom_address.rb +13 -0
- data/lib/printavo/models/email_template.rb +11 -0
- data/lib/printavo/models/mockup.rb +11 -0
- data/lib/printavo/models/production_file.rb +11 -0
- data/lib/printavo/resources/custom_addresses.rb +72 -0
- data/lib/printavo/resources/email_templates.rb +33 -0
- data/lib/printavo/resources/mockups.rb +48 -0
- data/lib/printavo/resources/production_files.rb +60 -0
- data/lib/printavo/version.rb +1 -1
- data/lib/printavo.rb +8 -0
- metadata +10 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 07267da7ecd92123f50dab320f34dd59d32ceeb43a22421d561ec9adb92f04cb
|
|
4
|
+
data.tar.gz: b30f9770630423fca2c7ec5f5d632b5e87c48447d34f485e1c4ce9bdccf88bf4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2b2421014c3991017e1ed9a626680ab685bfc182af243e690959190d0ee2ee7d08aef65c77cb9f209a77a62a8807af67b4e4da3138270b616ec4042ab78f9228
|
|
7
|
+
data.tar.gz: 5ed669d1ef3f544e92033862894868d567b2e8b53004f8d0c71a967acf8a1955bdfbbe3086316209b37b803be82e8dcc84fd8144200250bb397b2e857d773624
|
data/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,25 @@ All notable changes to this project will be documented in this file.
|
|
|
6
6
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
7
7
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
8
8
|
|
|
9
|
+
## [0.12.0] - 2026-03-31
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- `Printavo::ProductionFile` model (`id`, `url`, `filename`, `created_at`)
|
|
13
|
+
- `ProductionFiles` resource: `all(order_id:)`, `find(id)`, `create(**input)` / `creates(inputs)`,
|
|
14
|
+
`delete(id)` / `deletes(ids)`
|
|
15
|
+
- `Printavo::Mockup` model (`id`, `url`, `position`, `created_at`)
|
|
16
|
+
- `Mockups` resource: `all(order_id:)`, `find(id)`, `delete(id)` / `deletes(ids)` — no create (mockups are
|
|
17
|
+
attached via `LineItems#mockup_create` and `Imprints#mockup_create`)
|
|
18
|
+
- `Printavo::EmailTemplate` model (`id`, `name`, `subject`, `body`)
|
|
19
|
+
- `EmailTemplates` resource: `all`, `find(id)` — read-only
|
|
20
|
+
- `Printavo::CustomAddress` model (`id`, `name`, `address`, `city`, `state`, `zip`)
|
|
21
|
+
- `CustomAddresses` resource: `all(order_id:)`, `find(id)`, `create(**input)` / `creates(inputs)`,
|
|
22
|
+
`update(id, **input)` / `updates(inputs)`, `delete(id)` / `deletes(ids)`
|
|
23
|
+
- `client.custom_addresses`, `client.email_templates`, `client.mockups`, `client.production_files`
|
|
24
|
+
entry points on `Printavo::Client`
|
|
25
|
+
- 20 new `.graphql` files under `lib/printavo/graphql/`
|
|
26
|
+
- 1 new factory file: `spec/support/factories/media.rb`
|
|
27
|
+
|
|
9
28
|
## [0.11.0] - 2026-03-31
|
|
10
29
|
|
|
11
30
|
### Added
|
data/docs/TODO.md
CHANGED
|
@@ -166,13 +166,13 @@ return values — they are exposed via model field accessors, not separate resou
|
|
|
166
166
|
- [ ] `Printavo::ContractorProfile` model (`id`, `name`, `email`)
|
|
167
167
|
- [ ] `ContractorProfiles` resource: `all`, `find(id)` — contractors assignable to invoices
|
|
168
168
|
|
|
169
|
-
### Custom Addresses
|
|
169
|
+
### Custom Addresses ✅
|
|
170
170
|
|
|
171
|
-
- [
|
|
172
|
-
- [
|
|
173
|
-
- [
|
|
174
|
-
- [
|
|
175
|
-
- [
|
|
171
|
+
- [x] `Printavo::CustomAddress` model (`id`, `name`, `address`, `city`, `state`, `zip`)
|
|
172
|
+
- [x] `CustomAddresses` resource: `all(order_id:)`, `find(id)`, `create`, `update`, `delete`
|
|
173
|
+
- [x] `customAddressCreate` / `customAddressCreates` (bulk) mutations
|
|
174
|
+
- [x] `customAddressUpdate` / `customAddressUpdates` (bulk) mutations
|
|
175
|
+
- [x] `customAddressDelete` / `customAddressDeletes` (bulk) mutations
|
|
176
176
|
|
|
177
177
|
### Delivery Methods
|
|
178
178
|
|
|
@@ -180,10 +180,10 @@ return values — they are exposed via model field accessors, not separate resou
|
|
|
180
180
|
- [ ] `DeliveryMethods` resource: `all`, `find(id)`, `create`, `update`, `archive`
|
|
181
181
|
- [ ] `deliveryMethodCreate`, `deliveryMethodUpdate`, `deliveryMethodArchive` mutations
|
|
182
182
|
|
|
183
|
-
### Email Templates
|
|
183
|
+
### Email Templates ✅
|
|
184
184
|
|
|
185
|
-
- [
|
|
186
|
-
- [
|
|
185
|
+
- [x] `Printavo::EmailTemplate` model (`id`, `name`, `subject`, `body`)
|
|
186
|
+
- [x] `EmailTemplates` resource: `all`, `find(id)`
|
|
187
187
|
|
|
188
188
|
### Expenses ✅
|
|
189
189
|
|
|
@@ -233,15 +233,15 @@ return values — they are exposed via model field accessors, not separate resou
|
|
|
233
233
|
- [x] `MerchOrders` resource: `all`, `find(id)`
|
|
234
234
|
- [x] `client.merch_stores` / `client.merch_orders` entry points
|
|
235
235
|
|
|
236
|
-
### Mockups & Production Files
|
|
236
|
+
### Mockups & Production Files ✅
|
|
237
237
|
|
|
238
|
-
- [
|
|
239
|
-
- [
|
|
240
|
-
- [
|
|
241
|
-
- [
|
|
242
|
-
- [
|
|
243
|
-
- [
|
|
244
|
-
- [
|
|
238
|
+
- [x] `Printavo::Mockup` model (`id`, `url`, `position`, `created_at`)
|
|
239
|
+
- [x] `Printavo::ProductionFile` model (`id`, `url`, `filename`, `created_at`)
|
|
240
|
+
- [x] `Mockups` resource: `all(order_id:)`, `find(id)`, `delete`, `deletes`
|
|
241
|
+
- [x] `mockupDelete` / `mockupDeletes` (bulk) mutations
|
|
242
|
+
- [x] `ProductionFiles` resource: `all(order_id:)`, `find(id)`, `create`, `creates`, `delete`, `deletes`
|
|
243
|
+
- [x] `productionFileCreate` / `productionFileCreates` (bulk) mutations
|
|
244
|
+
- [x] `productionFileDelete` / `productionFileDeletes` (bulk) mutations
|
|
245
245
|
|
|
246
246
|
### Payments ✅
|
|
247
247
|
|
|
@@ -349,12 +349,12 @@ return values — they are exposed via model field accessors, not separate resou
|
|
|
349
349
|
- [x] `PresetTasks` resource (`find`, `create`, `update`, `delete`)
|
|
350
350
|
- [x] `PresetTaskGroups` resource (`all`, `find`, `create`, `update`, `delete`, `apply`)
|
|
351
351
|
|
|
352
|
-
### v0.12.0 — Files, Media & Communication
|
|
352
|
+
### v0.12.0 — Files, Media & Communication ✅
|
|
353
353
|
|
|
354
|
-
- [
|
|
355
|
-
- [
|
|
356
|
-
- [
|
|
357
|
-
- [
|
|
354
|
+
- [x] `ProductionFiles` resource (`all`, `find`, `create`/`creates`, `delete`/`deletes`)
|
|
355
|
+
- [x] `Mockups` resource (`all`, `find`, `delete`/`deletes`)
|
|
356
|
+
- [x] `EmailTemplates` resource (`all`, `find`)
|
|
357
|
+
- [x] `CustomAddresses` resource (`all`, `find`, `create`/`creates`, `update`/`updates`, `delete`/`deletes`)
|
|
358
358
|
|
|
359
359
|
### v0.13.0 — People, Orgs & Reference Data
|
|
360
360
|
|
data/lib/printavo/client.rb
CHANGED
|
@@ -41,10 +41,18 @@ module Printavo
|
|
|
41
41
|
Resources::Contacts.new(@graphql)
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
+
def custom_addresses
|
|
45
|
+
Resources::CustomAddresses.new(@graphql)
|
|
46
|
+
end
|
|
47
|
+
|
|
44
48
|
def customers
|
|
45
49
|
Resources::Customers.new(@graphql)
|
|
46
50
|
end
|
|
47
51
|
|
|
52
|
+
def email_templates
|
|
53
|
+
Resources::EmailTemplates.new(@graphql)
|
|
54
|
+
end
|
|
55
|
+
|
|
48
56
|
def expenses
|
|
49
57
|
Resources::Expenses.new(@graphql)
|
|
50
58
|
end
|
|
@@ -97,6 +105,10 @@ module Printavo
|
|
|
97
105
|
Resources::MerchStores.new(@graphql)
|
|
98
106
|
end
|
|
99
107
|
|
|
108
|
+
def mockups
|
|
109
|
+
Resources::Mockups.new(@graphql)
|
|
110
|
+
end
|
|
111
|
+
|
|
100
112
|
def orders
|
|
101
113
|
Resources::Orders.new(@graphql)
|
|
102
114
|
end
|
|
@@ -125,6 +137,10 @@ module Printavo
|
|
|
125
137
|
Resources::PricingMatrices.new(@graphql)
|
|
126
138
|
end
|
|
127
139
|
|
|
140
|
+
def production_files
|
|
141
|
+
Resources::ProductionFiles.new(@graphql)
|
|
142
|
+
end
|
|
143
|
+
|
|
128
144
|
def products
|
|
129
145
|
Resources::Products.new(@graphql)
|
|
130
146
|
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# lib/printavo/models/custom_address.rb
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Printavo
|
|
5
|
+
class CustomAddress < Models::Base
|
|
6
|
+
def id = self['id']
|
|
7
|
+
def name = self['name']
|
|
8
|
+
def address = self['address']
|
|
9
|
+
def city = self['city']
|
|
10
|
+
def state = self['state']
|
|
11
|
+
def zip = self['zip']
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# lib/printavo/models/production_file.rb
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Printavo
|
|
5
|
+
class ProductionFile < Models::Base
|
|
6
|
+
def id = self['id']
|
|
7
|
+
def url = self['url']
|
|
8
|
+
def filename = self['filename']
|
|
9
|
+
def created_at = self['createdAt']
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# lib/printavo/resources/custom_addresses.rb
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Printavo
|
|
5
|
+
module Resources
|
|
6
|
+
class CustomAddresses < Base
|
|
7
|
+
ALL_QUERY = File.read(File.join(__dir__, '../graphql/custom_addresses/all.graphql')).freeze
|
|
8
|
+
FIND_QUERY = File.read(File.join(__dir__, '../graphql/custom_addresses/find.graphql')).freeze
|
|
9
|
+
CREATE_MUTATION = File.read(File.join(__dir__, '../graphql/custom_addresses/create.graphql')).freeze
|
|
10
|
+
CREATES_MUTATION = File.read(File.join(__dir__, '../graphql/custom_addresses/creates.graphql')).freeze
|
|
11
|
+
UPDATE_MUTATION = File.read(File.join(__dir__, '../graphql/custom_addresses/update.graphql')).freeze
|
|
12
|
+
UPDATES_MUTATION = File.read(File.join(__dir__, '../graphql/custom_addresses/updates.graphql')).freeze
|
|
13
|
+
DELETE_MUTATION = File.read(File.join(__dir__, '../graphql/custom_addresses/delete.graphql')).freeze
|
|
14
|
+
DELETES_MUTATION = File.read(File.join(__dir__, '../graphql/custom_addresses/deletes.graphql')).freeze
|
|
15
|
+
|
|
16
|
+
def all(order_id:, first: 25, after: nil)
|
|
17
|
+
fetch_page(order_id: order_id, first: first, after: after).records
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def find(id)
|
|
21
|
+
data = @graphql.query(FIND_QUERY, variables: { id: id.to_s })
|
|
22
|
+
Printavo::CustomAddress.new(data['customAddress'])
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def create(**input)
|
|
26
|
+
data = @graphql.mutate(CREATE_MUTATION, variables: { input: camelize_keys(input) })
|
|
27
|
+
Printavo::CustomAddress.new(data['customAddressCreate'])
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def creates(inputs)
|
|
31
|
+
data = @graphql.mutate(CREATES_MUTATION, variables: { inputs: inputs.map { |i| camelize_keys(i) } })
|
|
32
|
+
data['customAddressCreates'].map { |attrs| Printavo::CustomAddress.new(attrs) }
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def update(id, **input)
|
|
36
|
+
data = @graphql.mutate(UPDATE_MUTATION, variables: { id: id.to_s, input: camelize_keys(input) })
|
|
37
|
+
Printavo::CustomAddress.new(data['customAddressUpdate'])
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def updates(inputs)
|
|
41
|
+
data = @graphql.mutate(UPDATES_MUTATION, variables: { inputs: inputs.map { |i| camelize_keys(i) } })
|
|
42
|
+
data['customAddressUpdates'].map { |attrs| Printavo::CustomAddress.new(attrs) }
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def delete(id)
|
|
46
|
+
@graphql.mutate(DELETE_MUTATION, variables: { id: id.to_s })
|
|
47
|
+
nil
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def deletes(ids)
|
|
51
|
+
@graphql.mutate(DELETES_MUTATION, variables: { ids: ids.map(&:to_s) })
|
|
52
|
+
nil
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
private
|
|
56
|
+
|
|
57
|
+
def fetch_page(order_id:, first: 25, after: nil, **)
|
|
58
|
+
data = @graphql.query(
|
|
59
|
+
ALL_QUERY,
|
|
60
|
+
variables: { orderId: order_id.to_s, first: first, after: after }
|
|
61
|
+
)
|
|
62
|
+
nodes = data['order']['customAddresses']['nodes'].map { |attrs| Printavo::CustomAddress.new(attrs) }
|
|
63
|
+
page_info = data['order']['customAddresses']['pageInfo']
|
|
64
|
+
Printavo::Page.new(
|
|
65
|
+
records: nodes,
|
|
66
|
+
has_next_page: page_info['hasNextPage'],
|
|
67
|
+
end_cursor: page_info['endCursor']
|
|
68
|
+
)
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# lib/printavo/resources/email_templates.rb
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Printavo
|
|
5
|
+
module Resources
|
|
6
|
+
class EmailTemplates < Base
|
|
7
|
+
ALL_QUERY = File.read(File.join(__dir__, '../graphql/email_templates/all.graphql')).freeze
|
|
8
|
+
FIND_QUERY = File.read(File.join(__dir__, '../graphql/email_templates/find.graphql')).freeze
|
|
9
|
+
|
|
10
|
+
def all(first: 25, after: nil)
|
|
11
|
+
fetch_page(first: first, after: after).records
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def find(id)
|
|
15
|
+
data = @graphql.query(FIND_QUERY, variables: { id: id.to_s })
|
|
16
|
+
Printavo::EmailTemplate.new(data['emailTemplate'])
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
private
|
|
20
|
+
|
|
21
|
+
def fetch_page(first: 25, after: nil, **)
|
|
22
|
+
data = @graphql.query(ALL_QUERY, variables: { first: first, after: after })
|
|
23
|
+
nodes = data['emailTemplates']['nodes'].map { |attrs| Printavo::EmailTemplate.new(attrs) }
|
|
24
|
+
page_info = data['emailTemplates']['pageInfo']
|
|
25
|
+
Printavo::Page.new(
|
|
26
|
+
records: nodes,
|
|
27
|
+
has_next_page: page_info['hasNextPage'],
|
|
28
|
+
end_cursor: page_info['endCursor']
|
|
29
|
+
)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# lib/printavo/resources/mockups.rb
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Printavo
|
|
5
|
+
module Resources
|
|
6
|
+
class Mockups < Base
|
|
7
|
+
ALL_QUERY = File.read(File.join(__dir__, '../graphql/mockups/all.graphql')).freeze
|
|
8
|
+
FIND_QUERY = File.read(File.join(__dir__, '../graphql/mockups/find.graphql')).freeze
|
|
9
|
+
DELETE_MUTATION = File.read(File.join(__dir__, '../graphql/mockups/delete.graphql')).freeze
|
|
10
|
+
DELETES_MUTATION = File.read(File.join(__dir__, '../graphql/mockups/deletes.graphql')).freeze
|
|
11
|
+
|
|
12
|
+
def all(order_id:, first: 25, after: nil)
|
|
13
|
+
fetch_page(order_id: order_id, first: first, after: after).records
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def find(id)
|
|
17
|
+
data = @graphql.query(FIND_QUERY, variables: { id: id.to_s })
|
|
18
|
+
Printavo::Mockup.new(data['mockup'])
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def delete(id)
|
|
22
|
+
@graphql.mutate(DELETE_MUTATION, variables: { id: id.to_s })
|
|
23
|
+
nil
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def deletes(ids)
|
|
27
|
+
@graphql.mutate(DELETES_MUTATION, variables: { ids: ids.map(&:to_s) })
|
|
28
|
+
nil
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
private
|
|
32
|
+
|
|
33
|
+
def fetch_page(order_id:, first: 25, after: nil, **)
|
|
34
|
+
data = @graphql.query(
|
|
35
|
+
ALL_QUERY,
|
|
36
|
+
variables: { orderId: order_id.to_s, first: first, after: after }
|
|
37
|
+
)
|
|
38
|
+
nodes = data['order']['mockups']['nodes'].map { |attrs| Printavo::Mockup.new(attrs) }
|
|
39
|
+
page_info = data['order']['mockups']['pageInfo']
|
|
40
|
+
Printavo::Page.new(
|
|
41
|
+
records: nodes,
|
|
42
|
+
has_next_page: page_info['hasNextPage'],
|
|
43
|
+
end_cursor: page_info['endCursor']
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# lib/printavo/resources/production_files.rb
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
module Printavo
|
|
5
|
+
module Resources
|
|
6
|
+
class ProductionFiles < Base
|
|
7
|
+
ALL_QUERY = File.read(File.join(__dir__, '../graphql/production_files/all.graphql')).freeze
|
|
8
|
+
FIND_QUERY = File.read(File.join(__dir__, '../graphql/production_files/find.graphql')).freeze
|
|
9
|
+
CREATE_MUTATION = File.read(File.join(__dir__, '../graphql/production_files/create.graphql')).freeze
|
|
10
|
+
CREATES_MUTATION = File.read(File.join(__dir__, '../graphql/production_files/creates.graphql')).freeze
|
|
11
|
+
DELETE_MUTATION = File.read(File.join(__dir__, '../graphql/production_files/delete.graphql')).freeze
|
|
12
|
+
DELETES_MUTATION = File.read(File.join(__dir__, '../graphql/production_files/deletes.graphql')).freeze
|
|
13
|
+
|
|
14
|
+
def all(order_id:, first: 25, after: nil)
|
|
15
|
+
fetch_page(order_id: order_id, first: first, after: after).records
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def find(id)
|
|
19
|
+
data = @graphql.query(FIND_QUERY, variables: { id: id.to_s })
|
|
20
|
+
Printavo::ProductionFile.new(data['productionFile'])
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def create(**input)
|
|
24
|
+
data = @graphql.mutate(CREATE_MUTATION, variables: { input: camelize_keys(input) })
|
|
25
|
+
Printavo::ProductionFile.new(data['productionFileCreate'])
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def creates(inputs)
|
|
29
|
+
data = @graphql.mutate(CREATES_MUTATION, variables: { inputs: inputs.map { |i| camelize_keys(i) } })
|
|
30
|
+
data['productionFileCreates'].map { |attrs| Printavo::ProductionFile.new(attrs) }
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def delete(id)
|
|
34
|
+
@graphql.mutate(DELETE_MUTATION, variables: { id: id.to_s })
|
|
35
|
+
nil
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def deletes(ids)
|
|
39
|
+
@graphql.mutate(DELETES_MUTATION, variables: { ids: ids.map(&:to_s) })
|
|
40
|
+
nil
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
private
|
|
44
|
+
|
|
45
|
+
def fetch_page(order_id:, first: 25, after: nil, **)
|
|
46
|
+
data = @graphql.query(
|
|
47
|
+
ALL_QUERY,
|
|
48
|
+
variables: { orderId: order_id.to_s, first: first, after: after }
|
|
49
|
+
)
|
|
50
|
+
nodes = data['order']['productionFiles']['nodes'].map { |attrs| Printavo::ProductionFile.new(attrs) }
|
|
51
|
+
page_info = data['order']['productionFiles']['pageInfo']
|
|
52
|
+
Printavo::Page.new(
|
|
53
|
+
records: nodes,
|
|
54
|
+
has_next_page: page_info['hasNextPage'],
|
|
55
|
+
end_cursor: page_info['endCursor']
|
|
56
|
+
)
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
data/lib/printavo/version.rb
CHANGED
data/lib/printavo.rb
CHANGED
|
@@ -16,7 +16,9 @@ require_relative 'printavo/models/account'
|
|
|
16
16
|
require_relative 'printavo/models/approval_request'
|
|
17
17
|
require_relative 'printavo/models/category'
|
|
18
18
|
require_relative 'printavo/models/contact'
|
|
19
|
+
require_relative 'printavo/models/custom_address'
|
|
19
20
|
require_relative 'printavo/models/customer'
|
|
21
|
+
require_relative 'printavo/models/email_template'
|
|
20
22
|
require_relative 'printavo/models/expense'
|
|
21
23
|
require_relative 'printavo/models/fee'
|
|
22
24
|
require_relative 'printavo/models/imprint'
|
|
@@ -27,6 +29,7 @@ require_relative 'printavo/models/line_item'
|
|
|
27
29
|
require_relative 'printavo/models/line_item_group'
|
|
28
30
|
require_relative 'printavo/models/merch_order'
|
|
29
31
|
require_relative 'printavo/models/merch_store'
|
|
32
|
+
require_relative 'printavo/models/mockup'
|
|
30
33
|
require_relative 'printavo/models/order'
|
|
31
34
|
require_relative 'printavo/models/payment'
|
|
32
35
|
require_relative 'printavo/models/payment_request'
|
|
@@ -35,6 +38,7 @@ require_relative 'printavo/models/preset_task'
|
|
|
35
38
|
require_relative 'printavo/models/preset_task_group'
|
|
36
39
|
require_relative 'printavo/models/pricing_matrix'
|
|
37
40
|
require_relative 'printavo/models/product'
|
|
41
|
+
require_relative 'printavo/models/production_file'
|
|
38
42
|
require_relative 'printavo/models/status'
|
|
39
43
|
require_relative 'printavo/models/task'
|
|
40
44
|
require_relative 'printavo/models/thread'
|
|
@@ -45,7 +49,9 @@ require_relative 'printavo/resources/account'
|
|
|
45
49
|
require_relative 'printavo/resources/approval_requests'
|
|
46
50
|
require_relative 'printavo/resources/categories'
|
|
47
51
|
require_relative 'printavo/resources/contacts'
|
|
52
|
+
require_relative 'printavo/resources/custom_addresses'
|
|
48
53
|
require_relative 'printavo/resources/customers'
|
|
54
|
+
require_relative 'printavo/resources/email_templates'
|
|
49
55
|
require_relative 'printavo/resources/expenses'
|
|
50
56
|
require_relative 'printavo/resources/fees'
|
|
51
57
|
require_relative 'printavo/resources/imprints'
|
|
@@ -56,6 +62,7 @@ require_relative 'printavo/resources/line_item_groups'
|
|
|
56
62
|
require_relative 'printavo/resources/line_items'
|
|
57
63
|
require_relative 'printavo/resources/merch_orders'
|
|
58
64
|
require_relative 'printavo/resources/merch_stores'
|
|
65
|
+
require_relative 'printavo/resources/mockups'
|
|
59
66
|
require_relative 'printavo/resources/orders'
|
|
60
67
|
require_relative 'printavo/resources/payment_requests'
|
|
61
68
|
require_relative 'printavo/resources/payment_terms'
|
|
@@ -63,6 +70,7 @@ require_relative 'printavo/resources/payments'
|
|
|
63
70
|
require_relative 'printavo/resources/preset_task_groups'
|
|
64
71
|
require_relative 'printavo/resources/preset_tasks'
|
|
65
72
|
require_relative 'printavo/resources/pricing_matrices'
|
|
73
|
+
require_relative 'printavo/resources/production_files'
|
|
66
74
|
require_relative 'printavo/resources/products'
|
|
67
75
|
require_relative 'printavo/resources/statuses'
|
|
68
76
|
require_relative 'printavo/resources/tasks'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: printavo-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.12.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stan Carver II
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-04-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -277,7 +277,9 @@ files:
|
|
|
277
277
|
- lib/printavo/models/base.rb
|
|
278
278
|
- lib/printavo/models/category.rb
|
|
279
279
|
- lib/printavo/models/contact.rb
|
|
280
|
+
- lib/printavo/models/custom_address.rb
|
|
280
281
|
- lib/printavo/models/customer.rb
|
|
282
|
+
- lib/printavo/models/email_template.rb
|
|
281
283
|
- lib/printavo/models/expense.rb
|
|
282
284
|
- lib/printavo/models/fee.rb
|
|
283
285
|
- lib/printavo/models/imprint.rb
|
|
@@ -288,6 +290,7 @@ files:
|
|
|
288
290
|
- lib/printavo/models/line_item_group.rb
|
|
289
291
|
- lib/printavo/models/merch_order.rb
|
|
290
292
|
- lib/printavo/models/merch_store.rb
|
|
293
|
+
- lib/printavo/models/mockup.rb
|
|
291
294
|
- lib/printavo/models/order.rb
|
|
292
295
|
- lib/printavo/models/payment.rb
|
|
293
296
|
- lib/printavo/models/payment_request.rb
|
|
@@ -296,6 +299,7 @@ files:
|
|
|
296
299
|
- lib/printavo/models/preset_task_group.rb
|
|
297
300
|
- lib/printavo/models/pricing_matrix.rb
|
|
298
301
|
- lib/printavo/models/product.rb
|
|
302
|
+
- lib/printavo/models/production_file.rb
|
|
299
303
|
- lib/printavo/models/status.rb
|
|
300
304
|
- lib/printavo/models/task.rb
|
|
301
305
|
- lib/printavo/models/thread.rb
|
|
@@ -307,7 +311,9 @@ files:
|
|
|
307
311
|
- lib/printavo/resources/base.rb
|
|
308
312
|
- lib/printavo/resources/categories.rb
|
|
309
313
|
- lib/printavo/resources/contacts.rb
|
|
314
|
+
- lib/printavo/resources/custom_addresses.rb
|
|
310
315
|
- lib/printavo/resources/customers.rb
|
|
316
|
+
- lib/printavo/resources/email_templates.rb
|
|
311
317
|
- lib/printavo/resources/expenses.rb
|
|
312
318
|
- lib/printavo/resources/fees.rb
|
|
313
319
|
- lib/printavo/resources/imprints.rb
|
|
@@ -318,6 +324,7 @@ files:
|
|
|
318
324
|
- lib/printavo/resources/line_items.rb
|
|
319
325
|
- lib/printavo/resources/merch_orders.rb
|
|
320
326
|
- lib/printavo/resources/merch_stores.rb
|
|
327
|
+
- lib/printavo/resources/mockups.rb
|
|
321
328
|
- lib/printavo/resources/orders.rb
|
|
322
329
|
- lib/printavo/resources/payment_requests.rb
|
|
323
330
|
- lib/printavo/resources/payment_terms.rb
|
|
@@ -325,6 +332,7 @@ files:
|
|
|
325
332
|
- lib/printavo/resources/preset_task_groups.rb
|
|
326
333
|
- lib/printavo/resources/preset_tasks.rb
|
|
327
334
|
- lib/printavo/resources/pricing_matrices.rb
|
|
335
|
+
- lib/printavo/resources/production_files.rb
|
|
328
336
|
- lib/printavo/resources/products.rb
|
|
329
337
|
- lib/printavo/resources/statuses.rb
|
|
330
338
|
- lib/printavo/resources/tasks.rb
|