bandwidth-sdk 9.0.0 → 9.1.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: ee8c7426138e841e2fea1dbff5d5e3c79372a5cd30c20fe6f2b271104d9101d6
4
- data.tar.gz: d6463c59e3d52f560968494124e4563a61d7f2aa0b2b0f04f23e92f65f97247a
3
+ metadata.gz: 72d08e72e19066da912c18946e2bcb7e38c3da78f58005388dd2a6d1b8bc98da
4
+ data.tar.gz: 26a7f5cd86a6a3ea974062f66de43b7edee59bf1e7f74fb2ec6e5272a22cdbea
5
5
  SHA512:
6
- metadata.gz: 255385a80dbc57bccc6dab0f124b9588481eb8075dadce183677b9ca5c7f7d62a65512b876d076d51f051a7de96ca920948e70c4d9b4c1be01cbda03b37f8898
7
- data.tar.gz: 755608aac58ac160de2711c5c3e8b0e57426a023f32c80dc047a2d3c7ee3d345eeb3188dfdfdaeec315690dac6cb377253799119a816a5ae3d34f3135686e24c
6
+ metadata.gz: cfa230d51fe36a6c513821b05975e1d28a0a14f70e326cd802c20788cbc966f20405f9d3c82e478e2c0095b7ffedda699050d981986e50eecad4716c4c525453
7
+ data.tar.gz: e99889889de6d0893da79e616aa9cce33dcc76395c692258c0dfb98f0cde7e38d7901579dd9542acd1e0594ebf0dde25407a5c06be09307fea30ea07197ba04e
data/README.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Bandwidth Ruby SDK
2
2
 
3
+ [![Test](https://github.com/Bandwidth/ruby-sdk/actions/workflows/test.yml/badge.svg)](https://github.com/Bandwidth/ruby-sdk/actions/workflows/test.yml)
4
+
5
+
6
+ | **OS** | **Ruby** |
7
+ |:---:|:---:|
8
+ | Windows 2016 | 2.6, 2.7, 3.0 |
9
+ | Windows 2019 | 2.6, 2.7, 3.0 |
10
+ | Ubuntu 18.04 | 2.6, 2.7, 3.0 |
11
+ | Ubuntu 20.04 | 2.6, 2.7, 3.0 |
12
+
3
13
  ## Getting Started
4
14
 
5
15
  ### Installation
@@ -7,7 +7,8 @@ module Bandwidth
7
7
 
8
8
  def to_bxml(xml)
9
9
  xml.Ring(compact_hash({
10
- 'duration' => duration
10
+ 'duration' => duration,
11
+ 'answerCall' => answer_call
11
12
  }))
12
13
  end
13
14
  end
@@ -3,6 +3,7 @@
3
3
  # A simple integration test against Bandwidth's APIs
4
4
 
5
5
  require 'test/unit'
6
+ require 'securerandom'
6
7
  require_relative '../../lib/bandwidth.rb'
7
8
 
8
9
  include Bandwidth
@@ -66,16 +67,16 @@ class IntegrationTest < Test::Unit::TestCase
66
67
 
67
68
  def test_upload_download_media
68
69
  #define constants for upload media and download media
69
- media_file_name = 'ruby_integration' #future update to add special symbols
70
- media_file = '12345' #todo: check a binary string
70
+ media_id = "text-media-id-" + SecureRandom.uuid
71
+ media = "Hello world"
71
72
 
72
73
  #media upload
73
- @bandwidth_client.messaging_client.client.upload_media(BW_ACCOUNT_ID, media_file_name, media_file, :content_type => "application/octet-stream", :cache_control => "no-cache")
74
+ @bandwidth_client.messaging_client.client.upload_media(BW_ACCOUNT_ID, media_id, media, :content_type => "application/octet-stream", :cache_control => "no-cache")
74
75
 
75
76
  #media download
76
- downloaded_media_file = @bandwidth_client.messaging_client.client.get_media(BW_ACCOUNT_ID, media_file_name).data
77
+ downloaded_media = @bandwidth_client.messaging_client.client.get_media(BW_ACCOUNT_ID, media_id).data
77
78
 
78
- assert_equal(downloaded_media_file, media_file, "Downloaded media file not equal to upload")
79
+ assert_equal(downloaded_media, media, "Downloaded media file not equal to upload")
79
80
  end
80
81
 
81
82
  def test_create_call_and_get_call_state
@@ -515,7 +516,7 @@ class IntegrationTest < Test::Unit::TestCase
515
516
 
516
517
  def test_mfa_verify
517
518
  body = TwoFactorVerifyRequestSchema.new
518
- body.to = USER_NUMBER
519
+ body.to = "+1000" + rand(1111111..9999999).to_s
519
520
  body.application_id = BW_VOICE_APPLICATION_ID
520
521
  body.scope = "scope"
521
522
  body.code = "123456"
@@ -554,13 +555,14 @@ class IntegrationTest < Test::Unit::TestCase
554
555
 
555
556
  def test_ring
556
557
  ring = Bandwidth::Voice::Ring.new({
557
- :duration => 5
558
+ :duration => 5,
559
+ :answer_call => false
558
560
  })
559
561
 
560
562
  response = Bandwidth::Voice::Response.new()
561
563
  response.push(ring)
562
564
 
563
- expected = '<?xml version="1.0" encoding="UTF-8"?><Response><Ring duration="5"/></Response>'
565
+ expected = '<?xml version="1.0" encoding="UTF-8"?><Response><Ring duration="5" answerCall="false"/></Response>'
564
566
  actual = response.to_bxml()
565
567
  assert_equal(expected, actual)
566
568
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bandwidth-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.0
4
+ version: 9.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - APIMatic SDK Generator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-28 00:00:00.000000000 Z
11
+ date: 2021-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logging
@@ -305,5 +305,5 @@ requirements: []
305
305
  rubygems_version: 3.2.22
306
306
  signing_key:
307
307
  specification_version: 4
308
- summary: bandwidth
308
+ summary: Bandwidth
309
309
  test_files: []