shopify_oracle 0.2.0 → 0.5.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6358f75aacaa0791a36916ced984495ed7915a4f478f4d3e79c7430055fa32ac
|
|
4
|
+
data.tar.gz: 550532875258cc60683bb84b93111553127ce88e8c18444695327443b6da1433
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b965f4a3eb4cb32a06ef80c1177fdd0807442bda03ca918cbd769590a515025ba2c59073b8717c86b7364e3b17b69e25acd1ba698ad2e08b369fdf1ae934ef21
|
|
7
|
+
data.tar.gz: 68095adf5aa7f6deb0cb078b1f78ee0e41d91e48dda3611454612ca39029c6ff90287d36316d1362506f3801d434987f24a2347de09c9be9a78a1b6c50ae4364
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
module ShopifyOracle
|
|
4
4
|
module Connector
|
|
5
5
|
class Mutater < Base
|
|
6
|
-
def mutate(method,
|
|
6
|
+
def mutate(method, variables:)
|
|
7
7
|
mutation = ShopifyOracle::Mutations.const_get("#{method.to_s.upcase}_MUTATION".to_sym)
|
|
8
|
-
@client.query(query: mutation, variables:
|
|
8
|
+
@client.query(query: mutation, variables:)
|
|
9
9
|
end
|
|
10
10
|
end
|
|
11
11
|
end
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
module ShopifyOracle
|
|
4
4
|
module Connector
|
|
5
5
|
class Querier < Base
|
|
6
|
-
def query(method,
|
|
6
|
+
def query(method, variables:)
|
|
7
7
|
query = ShopifyOracle::Queries.const_get("#{method.to_s.upcase}_QUERY".to_sym)
|
|
8
|
-
@client.query(query:, variables:
|
|
8
|
+
@client.query(query:, variables:)
|
|
9
9
|
end
|
|
10
10
|
end
|
|
11
11
|
end
|
|
@@ -73,6 +73,13 @@ module ShopifyOracle
|
|
|
73
73
|
options
|
|
74
74
|
position
|
|
75
75
|
productCount
|
|
76
|
+
products(first: $first) {
|
|
77
|
+
edges {
|
|
78
|
+
node {
|
|
79
|
+
id
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
76
83
|
productVariantCount
|
|
77
84
|
productVariants(first: $first) {
|
|
78
85
|
edges {
|
|
@@ -231,11 +238,53 @@ module ShopifyOracle
|
|
|
231
238
|
}
|
|
232
239
|
GRAPHQL
|
|
233
240
|
|
|
234
|
-
|
|
241
|
+
ADDRESS = <<~GRAPHQL
|
|
242
|
+
fragment Address on SubscriptionMailingAddress {
|
|
243
|
+
address1
|
|
244
|
+
address2
|
|
245
|
+
city
|
|
246
|
+
company
|
|
247
|
+
country
|
|
248
|
+
countryCode
|
|
249
|
+
firstName
|
|
250
|
+
lastName
|
|
251
|
+
name
|
|
252
|
+
phone
|
|
253
|
+
province
|
|
254
|
+
provinceCode
|
|
255
|
+
zip
|
|
256
|
+
}
|
|
257
|
+
GRAPHQL
|
|
258
|
+
|
|
259
|
+
SHIPPING_OPTION = <<~GRAPHQL
|
|
260
|
+
fragment ShippingOption on SubscriptionDeliveryMethodShippingOption {
|
|
261
|
+
code
|
|
262
|
+
description
|
|
263
|
+
presentmentTitle
|
|
264
|
+
title
|
|
265
|
+
}
|
|
266
|
+
GRAPHQL
|
|
267
|
+
|
|
268
|
+
DELIVERY_METHOD = <<~GRAPHQL
|
|
269
|
+
#{ADDRESS}
|
|
270
|
+
#{SHIPPING_OPTION}
|
|
271
|
+
|
|
272
|
+
fragment DeliveryMethod on SubscriptionDeliveryMethodShipping {
|
|
273
|
+
address {
|
|
274
|
+
...Address
|
|
275
|
+
}
|
|
276
|
+
shippingOption {
|
|
277
|
+
...ShippingOption
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
GRAPHQL
|
|
281
|
+
|
|
282
|
+
SUBSCRIPTION_CONTRACT = <<~GRAPHQL
|
|
235
283
|
#{MONEY}
|
|
236
284
|
#{BILLING_POLICY}
|
|
237
285
|
#{DELIVERY_POLICY}
|
|
238
286
|
#{CUSTOMER}
|
|
287
|
+
#{DELIVERY_METHOD}
|
|
239
288
|
|
|
240
289
|
fragment SubscriptionContract on SubscriptionContract {
|
|
241
290
|
id
|
|
@@ -266,7 +315,11 @@ module ShopifyOracle
|
|
|
266
315
|
customer {
|
|
267
316
|
...Customer
|
|
268
317
|
}
|
|
269
|
-
deliveryMethod
|
|
318
|
+
deliveryMethod {
|
|
319
|
+
... on SubscriptionDeliveryMethodShipping {
|
|
320
|
+
...DeliveryMethod
|
|
321
|
+
}
|
|
322
|
+
}
|
|
270
323
|
}
|
|
271
324
|
GRAPHQL
|
|
272
325
|
end
|
data/lib/shopify_oracle.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shopify_oracle
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yari Labs
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-08-
|
|
11
|
+
date: 2022-08-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: shopify_api
|