tarpon 0.5.0 → 0.5.1

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: 8d6acb3ebc1ea690eba860bd056c0de1e1bd225d82d27996c281415e82e8deca
4
- data.tar.gz: e350303887989f6dd361e6d8a4517dc421be6ca29589120f677980b4ba046b20
3
+ metadata.gz: 2ad61cd6fc041273c6649f617d1f2402ff2534e455ee632663f288b94dd63598
4
+ data.tar.gz: 6238cf84ca22ea839b16dc5313fc59e0358dc2fbeecec35790d0a078e9ec1d01
5
5
  SHA512:
6
- metadata.gz: 542d5d0781ff979ce7c51c5df96e54afe89830aa8f1570dc76b6326c7cd07519764d4d95b197cc66a6c9de1504093dcfe6819a89c3c97a3c011f3341da42d6e1
7
- data.tar.gz: 79d50fa993c8d48c648bc81a7d9ef793278459445095b6703019d97dc8269d956afd073e15e7b8553303fe297672ec8b0e4cd3053fd5ec1993fce29e6bc3c754
6
+ metadata.gz: 378a679fecc9419bc9b7fd59be636c0d71484a23a6461ceee93610a9070943a084e7e29db6ddb719d569a3545a2e3d9e71a7ba99e8ec70ccf3a58951116a29e2
7
+ data.tar.gz: f91a37b4d5da486e197872982fe5696402de5da34df5eff55b3b411997fcb8c03a7407f023f28d3763787e38305b5233a0c3e1f4ea3e730249f39c7385d85bc9
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Tarpon
4
+ module Request
5
+ class Subscriber
6
+ class Attribute < Base
7
+ def initialize(subscriber_path:, **opts)
8
+ super(**opts)
9
+ @subscriber_path = subscriber_path
10
+ end
11
+
12
+ def update(**data)
13
+ body = {
14
+ attributes: data
15
+ }
16
+ perform(method: :post, path: path, key: :public, body: body)
17
+ end
18
+
19
+ private
20
+
21
+ def path
22
+ "#{@subscriber_path}/attributes"
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -24,6 +24,10 @@ module Tarpon
24
24
  )
25
25
  end
26
26
 
27
+ def attributes
28
+ self.class::Attribute.new(subscriber_path: path, client: @client)
29
+ end
30
+
27
31
  def offerings
28
32
  self.class::Offering.new(subscriber_path: path, client: @client)
29
33
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tarpon
4
- VERSION = '0.5.0'
4
+ VERSION = '0.5.1'
5
5
  end
data/lib/tarpon.rb CHANGED
@@ -7,6 +7,7 @@ require 'tarpon/entity/subscriber'
7
7
  require 'tarpon/errors'
8
8
  require 'tarpon/request/base'
9
9
  require 'tarpon/request/subscriber'
10
+ require 'tarpon/request/subscriber/attribute'
10
11
  require 'tarpon/request/subscriber/entitlement'
11
12
  require 'tarpon/request/subscriber/subscription'
12
13
  require 'tarpon/request/subscriber/offering'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tarpon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Belo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-01 00:00:00.000000000 Z
11
+ date: 2022-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -113,6 +113,7 @@ files:
113
113
  - lib/tarpon/request/base.rb
114
114
  - lib/tarpon/request/receipt.rb
115
115
  - lib/tarpon/request/subscriber.rb
116
+ - lib/tarpon/request/subscriber/attribute.rb
116
117
  - lib/tarpon/request/subscriber/entitlement.rb
117
118
  - lib/tarpon/request/subscriber/offering.rb
118
119
  - lib/tarpon/request/subscriber/subscription.rb