lucid_shopify 0.12.1 → 0.13.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: a2beb43231e15f6cc5f05d857bafedbaf49e5e96f7fc6c4c6e2fa4d73afdb5ab
4
- data.tar.gz: b1fa7c8dc3c7b14e5e3093d7caec13e0116bb94183fe4a30b39704ac6fe9a4cf
3
+ metadata.gz: e8692657f4678813af3fadfa69a579b244673eefb32e0dd4a931547869ff8dad
4
+ data.tar.gz: 2f0259dc467c8a28491b6418af07202c3330f9e013cdf9452d04da7040a51016
5
5
  SHA512:
6
- metadata.gz: 8ad6e9008d5da48f20733a97f70686c88939fe4f67b0d2e639791b603fd1969470eaf9419421f762ba768d944bf34d1648fbdb317ec6952cf30499d4fa31744f
7
- data.tar.gz: 44531fb0c0eb3ee4f82195b285865771523237b2974d6b7abfb71e1db6350364febb84608ae1d100768b04c886573adb003abf23a8fdbda54551fb1e52d91015
6
+ metadata.gz: 3d7622765d89ede2c6c0114aeffcdbff221d158debab50ec2c83c2ca81e9c0fb6a736371b174ee6f1ae1c9890f046e85bca97e29db6422acb4dffa91c9c0d7f8
7
+ data.tar.gz: 516ccf218bf85bb16260300cdb017d7534db73c5dc4e5ba086fd36a9044b6b15cabaf735dd5166308d23a421c6141fa353ae6daec4cf25ecfb36a0dfe1aa7bf6
data/README.md CHANGED
@@ -18,6 +18,7 @@ Usage
18
18
  '...', # api_key
19
19
  '...', # shared_secret
20
20
  '...', # scope
21
+ '...', # callback_uri (for OAuth; unused by this gem)
21
22
  '...', # billing_callback_uri
22
23
  '...', # webhook_uri
23
24
  )
@@ -38,6 +38,8 @@ module LucidShopify
38
38
  # @return [String]
39
39
  param :scope
40
40
  # @return [String]
41
+ param :callback_uri
42
+ # @return [String]
41
43
  param :billing_callback_uri
42
44
  # @return [String]
43
45
  param :webhook_uri
@@ -18,6 +18,8 @@ module LucidShopify
18
18
  # @param request_credentials [RequestCredentials]
19
19
  # @param webhooks [WebhookList]
20
20
  #
21
+ # @return [Array<Hash>] response data
22
+ #
21
23
  def call(request_credentials, webhooks: Container[:webhook_list])
22
24
  webhooks.map do |webhook|
23
25
  Thread.new { @create_webhook.(request_credentials, webhook) }
@@ -21,8 +21,8 @@ module LucidShopify
21
21
  #
22
22
  def call(request_credentials, charge)
23
23
  data = @client.post_json(request_credentials, 'recurring_application_charges', {
24
- return_url: LucidShopify.config.billing_callback_uri
25
- }.merge(charge))
24
+ 'return_url' => LucidShopify.config.billing_callback_uri
25
+ }.merge(charge.transform_keys(&:to_s)))
26
26
 
27
27
  data['recurring_application_charge']
28
28
  end
@@ -15,6 +15,8 @@ module LucidShopify
15
15
  # @param request_credentials [RequestCredentials]
16
16
  # @param webhook [Hash]
17
17
  #
18
+ # @return [Hash] response data
19
+ #
18
20
  def call(request_credentials, webhook)
19
21
  data = {**webhook, address: LucidShopify.config.webhook_uri}
20
22
 
@@ -19,6 +19,8 @@ module LucidShopify
19
19
  #
20
20
  # @param request_credentials [RequestCredentials]
21
21
  #
22
+ # @return [Array<Hash>] response data
23
+ #
22
24
  def call(request_credentials)
23
25
  webhooks = @client.get('webhooks')['webhooks']
24
26
 
@@ -15,6 +15,8 @@ module LucidShopify
15
15
  # @param request_credentials [RequestCredentials]
16
16
  # @param id [Integer]
17
17
  #
18
+ # @return [Hash] response data
19
+ #
18
20
  def call(request_credentials, id)
19
21
  @client.delete(request_credentials, "webhooks/#{id}")
20
22
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LucidShopify
4
- VERSION = '0.12.1'
4
+ VERSION = '0.13.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lucid_shopify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kelsey Judson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-08 00:00:00.000000000 Z
11
+ date: 2018-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv