vonage 7.19.0.exp.0.1.0 → 7.20.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: 72c07b64fdfe3cdc62e2ee5a8e1d9669d3636f4cc4a875e239598633978b39c3
4
- data.tar.gz: 98b503219aef2a6ad1257eef48afa310eb8ab9d656d5663645b866317cb8da52
3
+ metadata.gz: e62d74b123d37c098faef65853320aa4860642c2c483da541480a39bdfd4da6d
4
+ data.tar.gz: d7717268228d1d05a627164a1355265e071b094ffe4667fdc508afcc15580657
5
5
  SHA512:
6
- metadata.gz: d42da6c1edafffe6e0b63a5a09ca685be3e894e827a2ab08f25f893faca8ce7b41dda650b43484f09019a2db88a0b4e8734daa5bd962ebd55f9c764c2d0eac60
7
- data.tar.gz: d8f6ae648a6b76eced66204bf7a96a2c06b8d3be436a572eecadec8233e0c36f3e302cbf0bdcb4b52199e188380436c178439919fcb46ffa5795cbd00af674eb
6
+ metadata.gz: 38310bd39902127226b3fd48bc0cc675ed958c33b816493926e8379dfc3460f03fedaa0d6a2f080195cca50cc539411ba0082ec26bc77343b8b523b52b2bc946
7
+ data.tar.gz: 69de80f50b4d1add808f1a9225c2881dfce85fe0285afce01da9a750f8ceec2e1caba03e1c0c30fa02c3039a6d6b1e1dc050c32fb8884d5873af0579c4b57013
@@ -2,7 +2,6 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'net/http'
5
- require 'net/http/persistent'
6
5
  require 'net/http/post/multipart'
7
6
  require 'json'
8
7
 
@@ -13,7 +12,8 @@ module Vonage
13
12
 
14
13
  @host = set_host
15
14
 
16
- @http = Net::HTTP::Persistent.new
15
+ @http = Net::HTTP.new(@host, Net::HTTP.https_default_port, p_addr = nil)
16
+ @http.use_ssl = true
17
17
 
18
18
  @config.http.set(@http) unless @config.http.nil?
19
19
  end
@@ -94,8 +94,7 @@ module Vonage
94
94
  def make_request!(request, &block)
95
95
  logger.log_request_info(request)
96
96
 
97
- uri = URI("https://" + @host + request.path)
98
- response = @http.request(uri, request, &block)
97
+ response = @http.request(request, &block)
99
98
 
100
99
  logger.log_response_info(response, @host)
101
100
 
@@ -144,7 +143,7 @@ module Vonage
144
143
 
145
144
  uri = override_uri ? URI(override_uri) : URI('https://' + @host + path)
146
145
 
147
- http = Net::HTTP.new(uri.host, Net::HTTP.https_default_port, p_addr = nil)
146
+ http = override_uri ? Net::HTTP.new(uri.host, Net::HTTP.https_default_port, p_addr = nil) : @http
148
147
  http.use_ssl = true
149
148
  http.set_debug_output($stdout)
150
149
 
@@ -6,7 +6,7 @@ module Vonage
6
6
  class Verify2::Channels::SMS
7
7
  APP_HASH_LENGTH = 11
8
8
 
9
- attr_reader :channel, :to, :app_hash
9
+ attr_reader :channel, :to, :from, :entity_id, :content_id, :app_hash
10
10
 
11
11
  def initialize(to:, app_hash: nil)
12
12
  self.channel = 'sms'
@@ -19,6 +19,20 @@ module Vonage
19
19
  @to = to
20
20
  end
21
21
 
22
+ def from=(from)
23
+ @from = from
24
+ end
25
+
26
+ def entity_id=(entity_id)
27
+ raise ArgumentError, "Invalid 'entity_id' value #{entity_id}. Length must be between 1 and 20 characters." unless entity_id.length.between?(1, 20)
28
+ @entity_id = entity_id
29
+ end
30
+
31
+ def content_id=(content_id)
32
+ raise ArgumentError, "Invalid 'content_id' value #{content_id}. Length must be between 1 and 20 characters ." unless content_id.length.between?(1, 20)
33
+ @content_id = content_id
34
+ end
35
+
22
36
  def app_hash=(app_hash)
23
37
  raise ArgumentError, "Invalid 'app_hash' value #{app_hash}. Length must be #{APP_HASH_LENGTH}" unless app_hash.length == APP_HASH_LENGTH
24
38
  @app_hash = app_hash
@@ -1,5 +1,5 @@
1
1
  # typed: strong
2
2
 
3
3
  module Vonage
4
- VERSION = '7.19.0.exp.0.1.0'
4
+ VERSION = '7.20.0'
5
5
  end
data/vonage.gemspec CHANGED
@@ -16,7 +16,6 @@ Gem::Specification.new do |s|
16
16
  s.add_dependency('zeitwerk', '~> 2', '>= 2.2')
17
17
  s.add_dependency('sorbet-runtime', '~> 0.5')
18
18
  s.add_dependency('multipart-post', '~> 2.0')
19
- s.add_dependency('net-http-persistent', '~> 4.0', '>= 4.0.2')
20
19
  s.add_runtime_dependency('rexml')
21
20
  s.add_runtime_dependency('phonelib')
22
21
  s.require_path = 'lib'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vonage
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.19.0.exp.0.1.0
4
+ version: 7.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vonage
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-15 00:00:00.000000000 Z
11
+ date: 2024-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: vonage-jwt
@@ -72,26 +72,6 @@ dependencies:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
74
  version: '2.0'
75
- - !ruby/object:Gem::Dependency
76
- name: net-http-persistent
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: '4.0'
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- version: 4.0.2
85
- type: :runtime
86
- prerelease: false
87
- version_requirements: !ruby/object:Gem::Requirement
88
- requirements:
89
- - - "~>"
90
- - !ruby/object:Gem::Version
91
- version: '4.0'
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- version: 4.0.2
95
75
  - !ruby/object:Gem::Dependency
96
76
  name: rexml
97
77
  requirement: !ruby/object:Gem::Requirement