twi 0.3.5 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e73b4423acd7d63164371b1b07d13105d88086f447a5c028480bbcaa70d4a5d
4
- data.tar.gz: 9ba48ff41e2aa89da55a625ed1d17db93a4a38a178d080da9aaf7c8dea52c428
3
+ metadata.gz: 8f766ffc7ee7dc2752c40e064832d07016e1622039a3b33c452540a541c92372
4
+ data.tar.gz: 5d80d22f39434d654325319b51e14ead96615dd0ce47854d12b374e1ac160ebf
5
5
  SHA512:
6
- metadata.gz: 8c3cee0bbf42e1e877973e13fd4766d5f0dc7881e7fdc1ea0cf7e77e916e1ce818a8e035fd79ea9c39f307acaab504638a8a3e0b3049e133722bdcd0f4bd045d
7
- data.tar.gz: 398a2e7b30149f845836438074c4f5a14d194689c5d5b82e4c15a82ccd71a669fcafa539379aec2e6c2ad607e869c20111af902bb3ee8385b8d1495bc944b118
6
+ metadata.gz: 49839e92242ad8ca602bf0b0a227335b257eaf1ead198a43a258e6bb24fa32e0da814d07a4a346d4d8c90118a364fa53bb8a359c011a1d55895e10b3bf860fe8
7
+ data.tar.gz: dd399e942f3452016d9fcf06da3a69e876feba4c977c5b16342d0ea6db82f99f469da34ee2df0adac9843038def364e6a36f21df73486b761aeb3ede587dbab3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [0.3.6] - 2026-06-01
2
+
3
+ - [Fix] Expose Twi::Conversation#id and #status
4
+
1
5
  ## [0.3.5] - 2026-06-01
2
6
 
3
7
  - [Fix] Ignore 404 on conversation.delete
@@ -8,8 +8,7 @@ module Twi
8
8
  params = create_params_for participants
9
9
  conversation = conversation_service.conversation_with_participants.create **params
10
10
 
11
- @id = conversation.sid
12
- @status = conversation.state
11
+ @params = { id: conversation.sid, status: conversation.state }
13
12
  rescue Twilio::REST::RestError => error
14
13
  case error.code
15
14
  when 50438 then raise ExistingConversationError.new(code: error.code, message: error.error_message)
@@ -56,10 +55,14 @@ module Twi
56
55
  JSON(response.body)['sid']
57
56
  end
58
57
 
58
+ def id = @params[:id]
59
+
60
+ def status = @params[:status]
61
+
59
62
  private
60
63
 
61
64
  def conversation
62
- conversation_service.conversations @params[:id]
65
+ conversation_service.conversations id
63
66
  end
64
67
 
65
68
  def create_params_for(participants)
@@ -8,8 +8,7 @@ module Twi
8
8
  when 50214 then raise TooManyConversationsError.new(error)
9
9
  end
10
10
  elsif Twi.mock.conversation
11
- @id = Twi.mock.conversation[:id]
12
- @status = Twi.mock.conversation[:status]
11
+ @params = { id: Twi.mock.conversation[:id], status: Twi.mock.conversation[:status] }
13
12
  end
14
13
  end
15
14
 
data/lib/twi/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Twi
4
- VERSION = '0.3.5'
4
+ VERSION = '0.3.6'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Baccigalupo