shopify_api 4.7.1 → 4.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +4 -0
- data/lib/shopify_api/resources/marketing_event.rb +4 -0
- data/lib/shopify_api/version.rb +1 -1
- data/test/fixtures/engagement.json +15 -0
- data/test/marketing_event_test.rb +19 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcb1fe2d6a1c1b42c80381495c978e6b2fb0e911
|
4
|
+
data.tar.gz: 5c9f07855c85365f9784c06a53f11e0c6b706805
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7526001ec0f3edea9b9d43f7ec213e066d9c8fe305d0dceae1dec74122fee38f32cc3faf3a3f70f2a486d8983c2381e4a7df0e805e86832e3228092933e0e06a
|
7
|
+
data.tar.gz: 2ac04850be172a6a06ef670a16720324c2e8d572cfc9d4d140f9b0372c0a2509c6794a55fe68d6ebc36fda463d9d026def2f188384eb9f01d2b0ef8ee305142c
|
data/CHANGELOG
CHANGED
data/lib/shopify_api/version.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"engagements": [
|
3
|
+
{
|
4
|
+
"occurred_on": "2017-04-20",
|
5
|
+
"impressions_count": null,
|
6
|
+
"views_count": null,
|
7
|
+
"clicks_count": 10,
|
8
|
+
"shares_count": null,
|
9
|
+
"favorites_count": null,
|
10
|
+
"comments_count": null,
|
11
|
+
"ad_spend": null,
|
12
|
+
"is_cumulative": true
|
13
|
+
}
|
14
|
+
]
|
15
|
+
}
|
@@ -46,4 +46,23 @@ class MarketingEventTest < Test::Unit::TestCase
|
|
46
46
|
marketing_events_count = ShopifyAPI::MarketingEvent.get(:count)
|
47
47
|
assert_equal 2, marketing_events_count
|
48
48
|
end
|
49
|
+
|
50
|
+
def test_add_engagements
|
51
|
+
fake "marketing_events/1", method: :get, body: load_fixture('marketing_event')
|
52
|
+
marketing_event = ShopifyAPI::MarketingEvent.find(1)
|
53
|
+
fake "marketing_events/1/engagements", method: :post, status: 201, body: load_fixture('engagement')
|
54
|
+
engagement = {
|
55
|
+
occurred_on: "2017-04-20",
|
56
|
+
impressions_count: nil,
|
57
|
+
views_count: nil,
|
58
|
+
clicks_count: 10,
|
59
|
+
shares_count: nil,
|
60
|
+
favorites_count: nil,
|
61
|
+
comments_count: nil,
|
62
|
+
ad_spend: nil,
|
63
|
+
is_cumulative: true
|
64
|
+
}
|
65
|
+
marketing_event.add_engagements(engagement)
|
66
|
+
assert "2017-04-20", engagement[:occurred_on]
|
67
|
+
end
|
49
68
|
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: 4.
|
4
|
+
version: 4.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeresource
|
@@ -277,6 +277,7 @@ files:
|
|
277
277
|
- test/fixtures/draft_order_completed.json
|
278
278
|
- test/fixtures/draft_order_invoice.json
|
279
279
|
- test/fixtures/draft_orders.json
|
280
|
+
- test/fixtures/engagement.json
|
280
281
|
- test/fixtures/events.json
|
281
282
|
- test/fixtures/fulfillment.json
|
282
283
|
- test/fixtures/fulfillment_event.json
|