shopify_api 5.2.2 → 5.2.3

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: b24e62339306bcf90e50246ef4e98f4ffa46c6a885d5859b14969f3aa1e62c9c
4
- data.tar.gz: 7e57071a073cb0e5e2bda965a1ef4cef3cc42a968905b407df9184757a04ec3b
3
+ metadata.gz: e75163182c1fb7b35dd1812beb6a3a13da3d41ecb4f26c0af4677204442db127
4
+ data.tar.gz: 8ed57602229d2399ab17c5609941f6fe111cb5146282f76b518c42851edb0b95
5
5
  SHA512:
6
- metadata.gz: 5224d787f4cc65f3174fa894098af11b7342059510c916fc4359ab2285793053e97bfb8eee318e136410fe6fd67626f7146f7f7727f8dba4e5bcc1b32867d597
7
- data.tar.gz: 54c9dfed163c44b51fd811ba38efcf4c157ffdcaad5b5cc7f064e035ad0c890d9580b20ed316b75f99cac6368eb19e17e19c1a2da1bb556eb49562dd3f947a72
6
+ metadata.gz: acf3ef0aed4a68b6d339d8594d41f47c89b14322b557b5e4d7d0b90a1214f7f06f4fce3d7cc78e5d03ace2b01b747cef4572a427e933d504734e15e6f61ed7b4
7
+ data.tar.gz: 20ac9414d8d480332c07cd184b190cb67ca3ca1a27918c0091d356ee7c8f4d27946673335d3d7462f15c355e5fce0405059644975f42de735b447fc86f22bcee
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ == Version 5.2.3
2
+
3
+ * Update delivery confirmation resource to delivery confirmation details resource.
4
+
1
5
  == Version 5.2.2
2
6
 
3
7
  * Add delivery confirmation endpoint to Ping resources.
@@ -15,31 +15,28 @@ module ShopifyAPI
15
15
  end
16
16
 
17
17
  def successful_delivery(message_id:, delivery_timestamp:)
18
- delivery_details = ShopifyAPI::Ping::DeliveryConfirmation.new(
19
- conversation_id: id,
20
- message_id: message_id,
21
- delivery_confirmation_details: {
22
- delivered: true,
23
- confirmation_timestamp: delivery_timestamp,
24
- }
18
+ delivery_details = ShopifyAPI::Ping::DeliveryConfirmationDetails.new(
19
+ delivery_attrs(message_id, delivery_timestamp).merge(delivered: true)
25
20
  )
26
21
  delivery_details.save
27
22
  delivery_details
28
23
  end
29
24
 
30
25
  def failed_delivery(message_id:, delivery_timestamp:, details:)
31
- delivery_details = ShopifyAPI::Ping::DeliveryConfirmation.new(
32
- conversation_id: id,
33
- message_id: message_id,
34
- delivery_confirmation_details: {
35
- delivered: false,
36
- confirmation_timestamp: delivery_timestamp,
37
- details: details,
38
- }
26
+ delivery_details = ShopifyAPI::Ping::DeliveryConfirmationDetails.new(
27
+ delivery_attrs(message_id, delivery_timestamp).merge(delivered: false, details: details)
39
28
  )
40
29
  delivery_details.save
41
30
  delivery_details
42
31
  end
32
+
33
+ def delivery_attrs(message_id, delivery_timestamp)
34
+ {
35
+ conversation_id: id,
36
+ message_id: message_id,
37
+ confirmation_timestamp: delivery_timestamp,
38
+ }
39
+ end
43
40
  end
44
41
  end
45
42
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module ShopifyAPI
4
4
  module Ping
5
- class DeliveryConfirmation < Base
5
+ class DeliveryConfirmationDetails < Base
6
6
  self.prefix = "/admin/api/ping-api/v1/conversations/:conversation_id/messages/:message_id/"
7
7
  self.collection_name = "delivery_confirmation"
8
8
  end
@@ -1,3 +1,3 @@
1
1
  module ShopifyAPI
2
- VERSION = "5.2.2"
2
+ VERSION = "5.2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.2
4
+ version: 5.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-11 00:00:00.000000000 Z
11
+ date: 2019-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource
@@ -250,7 +250,7 @@ files:
250
250
  - lib/shopify_api/resources/payment_details.rb
251
251
  - lib/shopify_api/resources/ping.rb
252
252
  - lib/shopify_api/resources/ping/conversation.rb
253
- - lib/shopify_api/resources/ping/delivery_confirmation.rb
253
+ - lib/shopify_api/resources/ping/delivery_confirmation_details.rb
254
254
  - lib/shopify_api/resources/ping/message.rb
255
255
  - lib/shopify_api/resources/policy.rb
256
256
  - lib/shopify_api/resources/price_rule.rb