stannp 0.7.0 → 0.8.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: 9e29851d6d5a2f08247c7840729b21d9da1db101165deae90e43560fabd6db13
4
- data.tar.gz: 258c841164c6abd4312f156252b9087e6fdc75f55708d874dd99e82d7cf223f8
3
+ metadata.gz: e4fc37e08318f2d85aefc3cdcfedc1ce1a1f4656bfff9f40948113a8d99bd3f1
4
+ data.tar.gz: f219b6b64f689aac0861cfd752f886a0939db07953d3f1d0bdd3ed7a693222d4
5
5
  SHA512:
6
- metadata.gz: '0800d2c215fb73f6f5d559a5e1bd1ff4cc8025cdedd61d452088adc4efa5288c7221a7a35733d5a1a046e9fd96f1cf4f8527d793676560bbca6bedd1602f386b'
7
- data.tar.gz: 0b92c7ad6ae8f5d6dba704d85c6827e4f9aadd6e10ca9d5a4f5426e963465becc637f411bb2567b790e304d9b7d86f5a3180371c40c17c7b4c2e36f1c8e85618
6
+ metadata.gz: d98546cd10f13d495414db820f987a018a020ff6027441785e4ae36a47e6e47354dbbf41c8cc0e869c38f52fea4763d0359adb4c482b5273187444fb8530d7a1
7
+ data.tar.gz: 50fa03eb79e9bc8fba16d52392382d7e7415253a7cd4c06a62fb4c6447611d8e06685a7a3b8bad2182392a33af0524e83e18790a34c9514013a38cff67e10a36
data/CHANGELOG.md CHANGED
@@ -20,3 +20,6 @@
20
20
 
21
21
  ## [0.7.0] - 2022-04-22
22
22
  - Add support for the Campaigns API
23
+
24
+ ## [0.8.0] - 2022-05-04
25
+ - Add support for the Events API
data/lib/stannp/client.rb CHANGED
@@ -46,6 +46,10 @@ module Stannp
46
46
  CampaignsResource.new(client: self)
47
47
  end
48
48
 
49
+ def events
50
+ EventsResource.new(client: self)
51
+ end
52
+
49
53
  def connection
50
54
  @connection ||= Faraday.new do |conn|
51
55
  conn.url_prefix = BASE_URL
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Stannp
4
+ class EventsResource < Resource
5
+ def create(attributes:)
6
+ url = url_for(path: 'recipientEvents/create')
7
+ post_request(url, body: attributes).body['data']
8
+ end
9
+ end
10
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stannp
4
- VERSION = '0.7.0'
4
+ VERSION = '0.8.0'
5
5
  end
data/lib/stannp.rb CHANGED
@@ -17,6 +17,7 @@ module Stannp
17
17
  autoload :LettersResource, 'stannp/resources/letters'
18
18
  autoload :GroupsResource, 'stannp/resources/groups'
19
19
  autoload :CampaignsResource, 'stannp/resources/campaigns'
20
+ autoload :EventsResource, 'stannp/resources/events'
20
21
  # objects
21
22
  autoload :User, 'stannp/objects/user'
22
23
  autoload :Recipient, 'stannp/objects/recipient'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stannp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - k-p-jones
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-22 00:00:00.000000000 Z
11
+ date: 2022-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -71,6 +71,7 @@ files:
71
71
  - lib/stannp/resources/account.rb
72
72
  - lib/stannp/resources/addresses.rb
73
73
  - lib/stannp/resources/campaigns.rb
74
+ - lib/stannp/resources/events.rb
74
75
  - lib/stannp/resources/groups.rb
75
76
  - lib/stannp/resources/letters.rb
76
77
  - lib/stannp/resources/postcards.rb