twilio-ruby 5.15.0 → 5.15.1

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
  SHA1:
3
- metadata.gz: 82c6b89bf22181ab4c74c1214738562fbfd45806
4
- data.tar.gz: 711415d89893d32bc5c8d35c3e2431a96e047d34
3
+ metadata.gz: a227849b2942687808bcf7cb51c513840576e503
4
+ data.tar.gz: 7c0cda0691761ffacc08e23488a132969b2064f1
5
5
  SHA512:
6
- metadata.gz: 3bd5ca81977cc69f73e9bfe379c17a569e6a8ef07ccdf3e5c3b0a9c1621dba9a91b4f9eefc4b29f8ea98e67fe83dad8b5d1a9eaf42ab230707646cc5a81422f2
7
- data.tar.gz: f04fdf23b7966d7dcdb33ad324d23087a1bdff8751049328094e734737c08b0e7635b03ce9b296ae853a8024ba95de196b29df598c17ba22b2cc5e98f9b071fe
6
+ metadata.gz: d876dfee60d643e27076ca5d0ebecc6e2c2c767caa0731d4a77e59e02d1a55dbee4ae93580cd2ea3e5412bc594a3555fba7a7d5da81abd086f34f544f3775d5e
7
+ data.tar.gz: c0113b1e3412e7a63aefaa4de7fc27c8f22b6ebab77603649e5cc011b76bbddc64176b4cd989a5c566ea4cf2beb2f1d34c829b2c80f7b98686b6fbf4f910c3fa
data/CHANGES.md CHANGED
@@ -1,6 +1,15 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2018-10-15] Version 5.15.1
5
+ ----------------------------
6
+ **Api**
7
+ - Add <Pay> Verb Transactions category to usage records
8
+
9
+ **Twiml**
10
+ - Add support for `Pay` verb
11
+
12
+
4
13
  [2018-10-15] Version 5.15.0
5
14
  ----------------------------
6
15
  **Library**
data/README.md CHANGED
@@ -27,13 +27,13 @@ in-line code documentation here in the library.
27
27
  To install using [Bundler][bundler] grab the latest stable version:
28
28
 
29
29
  ```ruby
30
- gem 'twilio-ruby', '~> 5.15.0'
30
+ gem 'twilio-ruby', '~> 5.15.1'
31
31
  ```
32
32
 
33
33
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
34
34
 
35
35
  ```bash
36
- gem install twilio-ruby -v 5.15.0
36
+ gem install twilio-ruby -v 5.15.1
37
37
  ```
38
38
 
39
39
  To build and install the development branch yourself from the latest source:
@@ -207,15 +207,109 @@ module Twilio
207
207
  def sms(message, to: nil, from: nil, action: nil, method: nil, status_callback: nil, **keyword_args)
208
208
  append(Sms.new(message, to: to, from: from, action: action, method: method, status_callback: status_callback, **keyword_args))
209
209
  end
210
+
211
+ ##
212
+ # Create a new <Pay> element
213
+ # input:: Input type Twilio should accept
214
+ # action:: Action URL
215
+ # status_callback:: Status callback URL
216
+ # status_callback_method:: Status callback method
217
+ # timeout:: Time to wait to gather input
218
+ # max_attempts:: Maximum number of allowed retries when gathering input
219
+ # security_code:: Prompt for security code
220
+ # postal_code:: Prompt for postal code and it should be true/false or default postal code
221
+ # payment_connector:: Unique name for payment connector
222
+ # token_type:: Type of token
223
+ # charge_amount:: Amount to process. If value is greater than 0 then make the payment else create a payment token
224
+ # currency:: Currency of the amount attribute
225
+ # credential_sid:: SID for API keys to communicate with payment provider
226
+ # description:: Details regarding the payment
227
+ # valid_card_types:: Comma separated accepted card types
228
+ # language:: Language to use
229
+ # keyword_args:: additional attributes
230
+ def pay(input: nil, action: nil, status_callback: nil, status_callback_method: nil, timeout: nil, max_attempts: nil, security_code: nil, postal_code: nil, payment_connector: nil, token_type: nil, charge_amount: nil, currency: nil, credential_sid: nil, description: nil, valid_card_types: nil, language: nil, **keyword_args)
231
+ pay = Pay.new(input: input, action: action, status_callback: status_callback, status_callback_method: status_callback_method, timeout: timeout, max_attempts: max_attempts, security_code: security_code, postal_code: postal_code, payment_connector: payment_connector, token_type: token_type, charge_amount: charge_amount, currency: currency, credential_sid: credential_sid, description: description, valid_card_types: valid_card_types, language: language, **keyword_args)
232
+
233
+ yield(pay) if block_given?
234
+ append(pay)
235
+ end
236
+
237
+ ##
238
+ # Create a new <Prompt> element
239
+ # for_:: Name of the credit card data element
240
+ # error_type:: Type of error
241
+ # card_type:: Type of the credit card
242
+ # attempt:: Current attempt count
243
+ # keyword_args:: additional attributes
244
+ def prompt(for_: nil, error_type: nil, card_type: nil, attempt: nil, **keyword_args)
245
+ prompt = Prompt.new(for_: for_, error_type: error_type, card_type: card_type, attempt: attempt, **keyword_args)
246
+
247
+ yield(prompt) if block_given?
248
+ append(prompt)
249
+ end
210
250
  end
211
251
 
212
252
  ##
213
- # <Sms> TwiML Noun
214
- class Sms < TwiML
215
- def initialize(message, **keyword_args)
253
+ # <Prompt> Twiml Verb
254
+ class Prompt < TwiML
255
+ def initialize(**keyword_args)
216
256
  super(**keyword_args)
217
- @name = 'Sms'
218
- @value = message
257
+ @name = 'Prompt'
258
+
259
+ yield(self) if block_given?
260
+ end
261
+
262
+ ##
263
+ # Create a new <Say> element
264
+ # message:: Message to say
265
+ # voice:: Voice to use
266
+ # loop:: Times to loop message
267
+ # language:: Message langauge
268
+ # keyword_args:: additional attributes
269
+ def say(message: nil, voice: nil, loop: nil, language: nil, **keyword_args)
270
+ say = Say.new(message: message, voice: voice, loop: loop, language: language, **keyword_args)
271
+
272
+ yield(say) if block_given?
273
+ append(say)
274
+ end
275
+
276
+ ##
277
+ # Create a new <Play> element
278
+ # url:: Media URL
279
+ # loop:: Times to loop media
280
+ # digits:: Play DTMF tones for digits
281
+ # keyword_args:: additional attributes
282
+ def play(url: nil, loop: nil, digits: nil, **keyword_args)
283
+ append(Play.new(url: url, loop: loop, digits: digits, **keyword_args))
284
+ end
285
+
286
+ ##
287
+ # Create a new <Pause> element
288
+ # length:: Length in seconds to pause
289
+ # keyword_args:: additional attributes
290
+ def pause(length: nil, **keyword_args)
291
+ append(Pause.new(length: length, **keyword_args))
292
+ end
293
+ end
294
+
295
+ ##
296
+ # <Pause> TwiML Verb
297
+ class Pause < TwiML
298
+ def initialize(**keyword_args)
299
+ super(**keyword_args)
300
+ @name = 'Pause'
301
+
302
+ yield(self) if block_given?
303
+ end
304
+ end
305
+
306
+ ##
307
+ # <Play> TwiML Verb
308
+ class Play < TwiML
309
+ def initialize(url: nil, **keyword_args)
310
+ super(**keyword_args)
311
+ @name = 'Play'
312
+ @value = url unless url.nil?
219
313
  yield(self) if block_given?
220
314
  end
221
315
  end
@@ -433,6 +527,42 @@ module Twilio
433
527
  end
434
528
  end
435
529
 
530
+ ##
531
+ # <Pay> Twiml Verb
532
+ class Pay < TwiML
533
+ def initialize(**keyword_args)
534
+ super(**keyword_args)
535
+ @name = 'Pay'
536
+
537
+ yield(self) if block_given?
538
+ end
539
+
540
+ ##
541
+ # Create a new <Prompt> element
542
+ # for_:: Name of the credit card data element
543
+ # error_type:: Type of error
544
+ # card_type:: Type of the credit card
545
+ # attempt:: Current attempt count
546
+ # keyword_args:: additional attributes
547
+ def prompt(for_: nil, error_type: nil, card_type: nil, attempt: nil, **keyword_args)
548
+ prompt = Prompt.new(for_: for_, error_type: error_type, card_type: card_type, attempt: attempt, **keyword_args)
549
+
550
+ yield(prompt) if block_given?
551
+ append(prompt)
552
+ end
553
+ end
554
+
555
+ ##
556
+ # <Sms> TwiML Noun
557
+ class Sms < TwiML
558
+ def initialize(message, **keyword_args)
559
+ super(**keyword_args)
560
+ @name = 'Sms'
561
+ @value = message
562
+ yield(self) if block_given?
563
+ end
564
+ end
565
+
436
566
  ##
437
567
  # <Reject> TwiML Verb
438
568
  class Reject < TwiML
@@ -477,28 +607,6 @@ module Twilio
477
607
  end
478
608
  end
479
609
 
480
- ##
481
- # <Play> TwiML Verb
482
- class Play < TwiML
483
- def initialize(url: nil, **keyword_args)
484
- super(**keyword_args)
485
- @name = 'Play'
486
- @value = url unless url.nil?
487
- yield(self) if block_given?
488
- end
489
- end
490
-
491
- ##
492
- # <Pause> TwiML Verb
493
- class Pause < TwiML
494
- def initialize(**keyword_args)
495
- super(**keyword_args)
496
- @name = 'Pause'
497
-
498
- yield(self) if block_given?
499
- end
500
- end
501
-
502
610
  ##
503
611
  # <Leave> TwiML Verb
504
612
  class Leave < TwiML
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.15.0'
2
+ VERSION = '5.15.1'
3
3
  end
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.15.0
4
+ version: 5.15.1
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: 2018-10-15 00:00:00.000000000 Z
11
+ date: 2018-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt