shopify_oracle 0.1.0 → 0.2.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: 431af632e49a61cea23e3606be12a3040b5183a351229a53cf4fc27f387d9363
4
- data.tar.gz: 74ab32a60f133889b2ea6048672725709ffdeae8abd130beb4e8b6bb5db421e3
3
+ metadata.gz: b854be54bd921640d2e467ea55719ff4d20d5129e4555fdab04a165375d4a409
4
+ data.tar.gz: 105ac42c35ec7ad9cc9ea0584f798db231e6023d3015bad526bf9ee007c95e46
5
5
  SHA512:
6
- metadata.gz: 675da738016eb86aff429354012e318cb830feb314826137315e4b7cfd8b895f83e152587dca174cc366dad983f3d145bb6c82ee94287593dd1d42e506a1972e
7
- data.tar.gz: e19467c647f5ce7666a6b6ddbb8f97a81b33cf90a3938da45030315b97731a022e2f435af73ab43adc32a3fbf9c654e1cc41bd1079c33ce7eb2d49771bb75224
6
+ metadata.gz: 40c19dafa2dcf2fe3c670e6daf8c7546201019b39d1b7ccfa78ce92594f207b7249bffbea22be15dc87cae9b177354b790c8d42dc72a59a45009d30c326ea225
7
+ data.tar.gz: a2b31cdcbce6c79aa77c001499c13b134bacff360b0f389eaba32b4593155bca425b3816dcc00e1046fa04bb54a071ce1ce34aa1d04632f666217e71d4c05511
@@ -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
@@ -8,8 +8,7 @@ module ShopifyOracle
8
8
  class << self
9
9
  def create_v2(
10
10
  customer_id:,
11
- customerPaymentMethodId:,
12
- oracle: nil
11
+ customerPaymentMethodId:
13
12
  )
14
13
  customerId = customer_id.is_a?(Integer) ? "gid://shopify/Customer/#{customer_id}" : customer_id
15
14
 
@@ -22,7 +21,7 @@ module ShopifyOracle
22
21
 
23
22
  # rubocop:disable Metrics/MethodLength
24
23
  def create(
25
- customer:, oracle: nil,
24
+ customer:,
26
25
  interval: 'WEEK',
27
26
  intervalCount: 6,
28
27
  maxCycles: 10,
@@ -89,7 +88,7 @@ module ShopifyOracle
89
88
 
90
89
  attr_reader :contract
91
90
 
92
- def initialize(id:, oracle: nil)
91
+ def initialize(id:)
93
92
  super
94
93
  @contract = @object
95
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  module ShopifyOracle
4
4
  module Queries
5
- CUSTOMERS_QUERY = <<~GRAPHQL
5
+ CUSTOMERS_QUERY = <<~GRAPHQL.freeze
6
6
  #{ShopifyOracle::Fragments::CUSTOMER}
7
7
 
8
8
  query($first: Int = 10) {
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.0
4
+ version: 0.2.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
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '10'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubocop
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.33'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.33'
27
41
  description: A simple gem to facilitate interacting with the Shopify GraphQL API
28
42
  email: dev@yarilabs.com
29
43
  executables: []
@@ -45,16 +59,17 @@ files:
45
59
  homepage: https://rubygems.org/gems/shopify_oracle
46
60
  licenses:
47
61
  - MIT
48
- metadata: {}
62
+ metadata:
63
+ rubygems_mfa_required: 'false'
49
64
  post_install_message:
50
65
  rdoc_options: []
51
66
  require_paths:
52
67
  - lib
53
68
  required_ruby_version: !ruby/object:Gem::Requirement
54
69
  requirements:
55
- - - ">="
70
+ - - "~>"
56
71
  - !ruby/object:Gem::Version
57
- version: '0'
72
+ version: 3.1.0
58
73
  required_rubygems_version: !ruby/object:Gem::Requirement
59
74
  requirements:
60
75
  - - ">="