stream-ruby 2.8.0 → 2.9.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: 7b6c8feb7c88c6720ee77dfcc74357c8740efa95d91ae0a5d44eb1c72c10a9d8
4
- data.tar.gz: af6f3754dd0d138f58178c839fb5972ac7af1065e23f0328e4afebf3061c435c
3
+ metadata.gz: becda7571b74f9aafa3184c2886c46aad9e832c10254a44c6399d5579ddd1877
4
+ data.tar.gz: 00de69a0e93425085d4d6e0efa9851edb982167449d580845b831c7d3c4696ca
5
5
  SHA512:
6
- metadata.gz: 149ebe1c0e847fca8751d1ae5b86731e3694f7e508b26fc477eedf718ab83fe909c37c82af7981fbc80983c7515f0d30b9ccdb900f339d67e64eeaec19898ea3
7
- data.tar.gz: 66bd896baf76ae5e567eecfaa93eee2158d9e4ab799d9b14e883a210858219f77b352e0c45d3e94f49ac940ff7fa84f4947e2300a9f183a48bdac0c46e812821
6
+ metadata.gz: 5686b82d209f7c743aea82dcc286c84a836e3379747e8beba35be9b652954b1a47d1240b000fc4ec546a3dabb354062426d7b4352410d36e296897a63a768c3c
7
+ data.tar.gz: a34dff05a28d11d42184b9d7e27322686686fef374a37c9c9475dcbd26e5edb7cbce554ce1ac1b44524fb3b4c39bcc5fd9f550cb061f9d5d843f9933b6d44cff
@@ -25,5 +25,43 @@ module Stream
25
25
  make_request(:get, '/activities/', signature, params)
26
26
  end
27
27
 
28
+ #
29
+ # Partial update activity, via foreign ID or Foreign ID + timestamp
30
+ #
31
+ # @param [Hash<:id, :foreign_id, :time, :set, :unset>] data the request params (id and foreign_id+timestamp mutually exclusive)
32
+ #
33
+ # @return the updated activity.
34
+ #
35
+ # @example
36
+ #
37
+ # @client.update_activity_partial(
38
+ # id: "4b39fda2-d6e2-42c9-9abf-5301ef071b12",
39
+ # set: {
40
+ # "product.price.eur": 12.99,
41
+ # "colors": {
42
+ # "blue": "#0000ff",
43
+ # "green": "#00ff00",
44
+ # }
45
+ # },
46
+ # unset: [ "popularity", "size.xl" ]
47
+ # )
48
+ #
49
+ # @client.update_activity_partial(
50
+ # foreign_id: 'product:123',
51
+ # time: '2016-11-10T13:20:00.000000',
52
+ # set: {
53
+ # "product.price.eur": 12.99,
54
+ # "colors": {
55
+ # "blue": "#0000ff",
56
+ # "green": "#00ff00",
57
+ # }
58
+ # },
59
+ # unset: [ "popularity", "size.xl" ]
60
+ # )
61
+ def update_activity_partial(data = {})
62
+ signature = Stream::Signer.create_jwt_token('activities', '*', @api_secret, '*')
63
+ make_request(:post, '/activity/', signature, {}, data)
64
+ end
65
+
28
66
  end
29
67
  end
@@ -1,3 +1,3 @@
1
1
  module Stream
2
- VERSION = '2.8.0'.freeze
2
+ VERSION = '2.9.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stream-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tommaso Barbugli
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-07-10 00:00:00.000000000 Z
13
+ date: 2018-07-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday