twilio-ruby 5.39.2 → 5.39.3

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.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/CHANGES.md +14 -0
  4. data/ISSUE_TEMPLATE.md +5 -1
  5. data/PULL_REQUEST_TEMPLATE.md +1 -1
  6. data/README.md +4 -2
  7. data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +79 -60
  8. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +14 -0
  9. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +14 -0
  10. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +14 -0
  11. data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +25 -3
  12. data/lib/twilio-ruby/rest/verify/v2/service.rb +21 -9
  13. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +10 -2
  14. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +4 -1
  15. data/lib/twilio-ruby/version.rb +1 -1
  16. data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +35 -36
  17. data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +39 -40
  18. data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +35 -36
  19. data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +25 -23
  20. data/spec/integration/api/v2010/account/message_spec.rb +37 -0
  21. data/spec/integration/conversations/v1/conversation/message_spec.rb +38 -0
  22. data/spec/integration/conversations/v1/conversation/participant_spec.rb +56 -0
  23. data/spec/integration/conversations/v1/conversation_spec.rb +30 -0
  24. data/spec/integration/verify/v2/service/access_token_spec.rb +1 -1
  25. data/spec/integration/verify/v2/service/entity/challenge_spec.rb +8 -8
  26. metadata +2 -2
@@ -100,6 +100,43 @@ describe 'Message' do
100
100
  expect(actual).to_not eq(nil)
101
101
  end
102
102
 
103
+ it "receives create_with_messaging_service responses" do
104
+ @holodeck.mock(Twilio::Response.new(
105
+ 201,
106
+ %q[
107
+ {
108
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
109
+ "api_version": "2010-04-01",
110
+ "body": "Hello! \ud83d\udc4d",
111
+ "date_created": "Thu, 30 Jul 2015 20:12:31 +0000",
112
+ "date_sent": "Thu, 30 Jul 2015 20:12:33 +0000",
113
+ "date_updated": "Thu, 30 Jul 2015 20:12:33 +0000",
114
+ "direction": "outbound-api",
115
+ "error_code": null,
116
+ "error_message": null,
117
+ "from": null,
118
+ "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
119
+ "num_media": "0",
120
+ "num_segments": "1",
121
+ "price": null,
122
+ "price_unit": null,
123
+ "sid": "SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
124
+ "status": "sent",
125
+ "subresource_uris": {
126
+ "media": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media.json"
127
+ },
128
+ "to": "+14155552345",
129
+ "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
130
+ }
131
+ ]
132
+ ))
133
+
134
+ actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
135
+ .messages.create(to: '+15558675310')
136
+
137
+ expect(actual).to_not eq(nil)
138
+ end
139
+
103
140
  it "can delete" do
104
141
  @holodeck.mock(Twilio::Response.new(500, ''))
105
142
 
@@ -109,6 +109,44 @@ describe 'Message' do
109
109
  expect(actual).to_not eq(nil)
110
110
  end
111
111
 
112
+ it "receives create_no_attributes responses" do
113
+ @holodeck.mock(Twilio::Response.new(
114
+ 201,
115
+ %q[
116
+ {
117
+ "sid": "IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
118
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
119
+ "conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
120
+ "body": "Hello",
121
+ "media": null,
122
+ "author": "message author",
123
+ "participant_sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
124
+ "attributes": "{}",
125
+ "date_created": "2020-07-01T22:18:37Z",
126
+ "date_updated": "2020-07-01T22:18:37Z",
127
+ "index": 0,
128
+ "delivery": {
129
+ "total": 2,
130
+ "sent": "all",
131
+ "delivered": "some",
132
+ "read": "some",
133
+ "failed": "none",
134
+ "undelivered": "none"
135
+ },
136
+ "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
137
+ "links": {
138
+ "delivery_receipts": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Receipts"
139
+ }
140
+ }
141
+ ]
142
+ ))
143
+
144
+ actual = @client.conversations.v1.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
145
+ .messages.create()
146
+
147
+ expect(actual).to_not eq(nil)
148
+ end
149
+
112
150
  it "can update" do
113
151
  @holodeck.mock(Twilio::Response.new(500, ''))
114
152
 
@@ -108,6 +108,62 @@ describe 'Participant' do
108
108
  expect(actual).to_not eq(nil)
109
109
  end
110
110
 
111
+ it "receives create_gmms_chat_no_attributes responses" do
112
+ @holodeck.mock(Twilio::Response.new(
113
+ 201,
114
+ %q[
115
+ {
116
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
117
+ "conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
118
+ "sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
119
+ "identity": "IDENTITY",
120
+ "attributes": "{}",
121
+ "messaging_binding": {
122
+ "type": "sms",
123
+ "projected_address": "+15017122661"
124
+ },
125
+ "role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
126
+ "date_created": "2020-07-01T22:18:37Z",
127
+ "date_updated": "2020-07-01T22:18:37Z",
128
+ "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
129
+ }
130
+ ]
131
+ ))
132
+
133
+ actual = @client.conversations.v1.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
134
+ .participants.create()
135
+
136
+ expect(actual).to_not eq(nil)
137
+ end
138
+
139
+ it "receives create_gmms_sms_no_attributes responses" do
140
+ @holodeck.mock(Twilio::Response.new(
141
+ 201,
142
+ %q[
143
+ {
144
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
145
+ "conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
146
+ "sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
147
+ "identity": "null",
148
+ "attributes": "{}",
149
+ "messaging_binding": {
150
+ "type": "sms",
151
+ "address": "+15017122661"
152
+ },
153
+ "role_sid": "null",
154
+ "date_created": "2020-07-01T22:18:37Z",
155
+ "date_updated": "2020-07-01T22:18:37Z",
156
+ "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
157
+ }
158
+ ]
159
+ ))
160
+
161
+ actual = @client.conversations.v1.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
162
+ .participants.create()
163
+
164
+ expect(actual).to_not eq(nil)
165
+ end
166
+
111
167
  it "can update" do
112
168
  @holodeck.mock(Twilio::Response.new(500, ''))
113
169
 
@@ -58,6 +58,36 @@ describe 'Conversation' do
58
58
  expect(actual).to_not eq(nil)
59
59
  end
60
60
 
61
+ it "receives create_no_timers_no_attributes responses" do
62
+ @holodeck.mock(Twilio::Response.new(
63
+ 201,
64
+ %q[
65
+ {
66
+ "sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
67
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
68
+ "chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
69
+ "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
70
+ "friendly_name": "friendly_name",
71
+ "attributes": "{}",
72
+ "date_created": "2020-07-01T22:18:37Z",
73
+ "date_updated": "2020-07-01T22:18:37Z",
74
+ "state": "active",
75
+ "timers": {},
76
+ "url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
77
+ "links": {
78
+ "participants": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
79
+ "messages": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages",
80
+ "webhooks": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks"
81
+ }
82
+ }
83
+ ]
84
+ ))
85
+
86
+ actual = @client.conversations.v1.conversations.create()
87
+
88
+ expect(actual).to_not eq(nil)
89
+ end
90
+
61
91
  it "can update" do
62
92
  @holodeck.mock(Twilio::Response.new(500, ''))
63
93
 
@@ -31,7 +31,7 @@ describe 'AccessToken' do
31
31
  201,
32
32
  %q[
33
33
  {
34
- "token": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
34
+ "token": "eyJ6aXAiOiJERUYiLCJraWQiOiJTQVNfUzNfX19LTVNfdjEiLCJjdHkiOiJ0d2lsaW8tZnBhO3Y9MSIsImVuYyI6IkEyNTZHQ00iLCJhbGciOiJkaXIifQ..qjltWfIgQaTwp2De.81Z_6W4kR-hdlAUvJQCbwS8CQ7QAoFRkOvNMoySEj8zEB4BAY3MXhPARfaK4Lnr4YceA2cXEmrzPKQ7bPm0XZMGYm1fqLYzAR8YAqUetI9WEdQLFytg1h4XnJnXhgd99eNXsLkpKHhsCnFkchV9eGpRrdrfB0STR5Xq0fdakomb98iuIFt1XtP0_iqxvxQZKe1O4035XhK_ELVwQBz_qdI77XRZBFM0REAzlnEOe61nOcQxkaIM9Qel9L7RPhcndcCPFAyYjxo6Ri5c4vOnszLDiHmeK9Ep9fRE5-Oz0px0ZEg_FgTUEPFPo2OHQj076H1plJnFr-qPINDJkUL_i7loqG1IlapOi1JSlflPH-Ebj4hhpBdMIcs-OX7jhqzmVqkIKWkpPyPEmfvY2-eA5Zpoo08YpqAJ3G1l_xEcHl28Ijkefj1mdb6E8POx41skAwXCpdfIbzWzV_VjFpmwhacS3JZNt9C4hVG4Yp-RGPEl1C7aJHRIUavAmoRHaXbfG20zzv5Zu0P5PcopDszzoqVfZpzc.GCt35DWTurtP-QaIL5aBSQ"
35
35
  }
36
36
  ]
37
37
  ))
@@ -46,8 +46,8 @@ describe 'Challenge' do
46
46
  "expiration_date": "2015-07-30T20:00:00Z",
47
47
  "status": "pending",
48
48
  "responded_reason": "none",
49
- "details": "Hi! Mr. John Doe, would you like to sign up?",
50
- "hidden_details": "Hidden details about the sign up",
49
+ "details": "{\\"message\\": \\"Hi! Mr. John Doe, would you like to sign up?\\", \\"date\\":\\"2020-07-01T12:13:14Z\\", \\"fields\\": [{\\"label\\": \\"Action\\", \\"value\\": \\"Sign up in portal\\"}]}",
50
+ "hidden_details": "{\\"ip\\": \\"172.168.1.234\\"}",
51
51
  "factor_type": "push",
52
52
  "url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
53
53
  }
@@ -96,8 +96,8 @@ describe 'Challenge' do
96
96
  "expiration_date": "2015-07-30T20:00:00Z",
97
97
  "status": "pending",
98
98
  "responded_reason": "none",
99
- "details": "details",
100
- "hidden_details": "hidden_details",
99
+ "details": "{\\"message\\": \\"Hi! Mr. John Doe, would you like to sign up?\\", \\"fields\\": [{\\"label\\": \\"Action\\", \\"value\\": \\"Sign up in portal\\"}]}",
100
+ "hidden_details": "{\\"ip\\": \\"172.168.1.234\\"}",
101
101
  "factor_type": "push",
102
102
  "url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
103
103
  }
@@ -174,8 +174,8 @@ describe 'Challenge' do
174
174
  "expiration_date": "2015-07-30T20:00:00Z",
175
175
  "status": "pending",
176
176
  "responded_reason": "none",
177
- "details": "details",
178
- "hidden_details": "hidden_details",
177
+ "details": "{\\"message\\": \\"Hi! Mr. John Doe, would you like to sign up?\\", \\"fields\\": [{\\"label\\": \\"Action\\", \\"value\\": \\"Sign up in portal\\"}]}",
178
+ "hidden_details": "{\\"ip\\": \\"172.168.1.234\\"}",
179
179
  "factor_type": "push",
180
180
  "url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
181
181
  }
@@ -235,8 +235,8 @@ describe 'Challenge' do
235
235
  "expiration_date": "2015-07-30T20:00:00Z",
236
236
  "status": "approved",
237
237
  "responded_reason": "none",
238
- "details": "Hi! Mr. John Doe, would you like to sign up?",
239
- "hidden_details": "Hidden details about the sign up",
238
+ "details": "{\\"message\\": \\"Hi! Mr. John Doe, would you like to sign up?\\", \\"fields\\": [{\\"label\\": \\"Action\\", \\"value\\": \\"Sign up in portal\\"}]}",
239
+ "hidden_details": "{\\"ip\\": \\"172.168.1.234\\"}",
240
240
  "factor_type": "push",
241
241
  "url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
242
242
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twilio-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.39.2
4
+ version: 5.39.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Twilio API Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-22 00:00:00.000000000 Z
11
+ date: 2020-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt