shopify_oracle 0.1.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: defea64701807a0cf64b279725f45d4dfe86e85de39219cbc3c9e9db21dc236f
4
- data.tar.gz: d8cb7321597b0a657a62b8c194ea78888f08d4a051bd1ed46f8c00011ec3c27d
3
+ metadata.gz: 1f4c790f249f6c16e7670f0e7468694a2e907c33c0d9b70bb30f916bb3544f30
4
+ data.tar.gz: '08263d09fcfc8c234444a5fbf3d4bf2f6656cdf68dbc6305ba3a1d0a666fdc09'
5
5
  SHA512:
6
- metadata.gz: 9c57b559d16995d352663f61955a56b3cf567e82d9084c478b7da61312070bee0e35bb36c784d7d49ffa012cb48a32b5979652a3f3ff66618723c7bb9d7d7eb4
7
- data.tar.gz: 50db4102a76b1a97394879b1e93313cd417d22e5c258b94a42b8c595d5307a0ba22b4a47a451379b743e36c683b4253d204294e85d0ada3628829d1abdf71431
6
+ metadata.gz: 1c05012f4ede04f35ab77a2bad3ae683885919c5bc81dd1d214af4f4c88b3f539a97b02124e02b9cfd1ed2ca382fd08e154403b6f693b5ab2db578fd8ad80140
7
+ data.tar.gz: 949d77618062b6bbf438535e73ef3e76e65c5795f905682cee522336914ad81fa936ecb57df6809ab5195890c4b23c7f90e0af2ba6493e96efd3695026c8f1ad
@@ -27,12 +27,12 @@ module ShopifyOracle
27
27
 
28
28
  @gid = id.is_a?(Integer) ? "gid://shopify/#{class_name}/#{id}" : id
29
29
 
30
- object = self.class.find(id: @gid, oracle: @oracle).body['data'][object_class_name]
30
+ object = self.class.find(id: @gid).body['data'][object_class_name]
31
31
  @object = JSON.parse(object.to_json, object_class:)
32
32
  end
33
33
 
34
34
  def reload
35
- object = self.class.find(id: @gid, oracle: @oracle).body['data'][object_class]
35
+ object = self.class.find(id: @gid).body['data'][object_class]
36
36
  @object = JSON.parse(object.to_json, object_class:)
37
37
  end
38
38
  end
@@ -5,7 +5,7 @@ module ShopifyOracle
5
5
  class Customer < Base
6
6
  attr_reader :customer
7
7
 
8
- def initialize(id:, oracle: nil)
8
+ def initialize(id:)
9
9
  super
10
10
  @customer = @object
11
11
  end
@@ -11,7 +11,7 @@ module ShopifyOracle
11
11
 
12
12
  attr_reader :selling_plan_group
13
13
 
14
- def initialize(id:, oracle: nil)
14
+ def initialize(id:)
15
15
  super
16
16
  @selling_plan_group = @object
17
17
  end
@@ -88,7 +88,7 @@ module ShopifyOracle
88
88
 
89
89
  attr_reader :contract
90
90
 
91
- def initialize(id:, oracle: nil)
91
+ def initialize(id:)
92
92
  super
93
93
  @contract = @object
94
94
  end
@@ -7,7 +7,7 @@ module ShopifyOracle
7
7
  class SubscriptionDraft < Base
8
8
  attr_reader :draft
9
9
 
10
- def initialize(id:, oracle: nil)
10
+ def initialize(id:)
11
11
  super
12
12
  @draft = @object
13
13
  end
@@ -3,9 +3,9 @@
3
3
  module ShopifyOracle
4
4
  module Connector
5
5
  class Mutater < Base
6
- def mutate(method, **args)
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: args)
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, **args)
6
+ def query(method, variables:)
7
7
  query = ShopifyOracle::Queries.const_get("#{method.to_s.upcase}_QUERY".to_sym)
8
- @client.query(query:, variables: args)
8
+ @client.query(query:, variables:)
9
9
  end
10
10
  end
11
11
  end
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.1.2
4
+ version: 0.3.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-08 00:00:00.000000000 Z
11
+ date: 2022-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: shopify_api