telesign 2.2.4 → 2.3.0

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: 14fe933bd033c1db40c1f993d6345d7c60a1ce40ac1aa769f35365d9793a3ec1
4
- data.tar.gz: 2356df3c1a727c2f79847b78e8eb670e99400aac92ba6f40df38d42fd61edc88
3
+ metadata.gz: 822e4153765235c2df6654fade600bf0e16c99a3e7b0d580f11486f4c588f827
4
+ data.tar.gz: 25939bc63b42193b44fc983d377a6daec3fb06627abf7421ee8f18936a485355
5
5
  SHA512:
6
- metadata.gz: e53412a5532e6d59ee5cb82e00edcd5646fdf60007d0f86857261f47e5e29dc3bb37aba1049bf2ef1fb1253efee63f2d43403111434b715f5e451eeec83077f9
7
- data.tar.gz: 26c0497d23fb9cbf37887eebdfe8ee85acb24798ca13f20b167ab8e62095b091bbf4954497bbe07cbd8f7684fca41111fb1908b00873b90dba0f610e80d8f70f
6
+ metadata.gz: 977cf4ea3bbc288742df0d0c5b4c8b09fc5f6fbe7150e1978062a662eebb1b32727b782c4a0e8a2e9d5e4cb46ac498480d21a25b1f336b18398d3ef0b641e0f1
7
+ data.tar.gz: dd556115195b9ac6f14efceaa45956345fee0bbce5262189221eea79ad563b928a9421c2944351645e3426f6708ebc03049e0fa70d84202a5036ebc69eef9eeb
@@ -9,7 +9,7 @@ module Telesign
9
9
  # or you can send verification messages containing one-time passcodes (OTP).
10
10
  class MessagingClient < RestClient
11
11
 
12
- # Send a message to the target phone_number.
12
+ # Send an SMS message to the target phone number.
13
13
  #
14
14
  # See https://developer.telesign.com/docs/messaging-api for detailed API documentation.
15
15
  def message(phone_number, message, message_type, **params)
@@ -21,7 +21,7 @@ module Telesign
21
21
  **params)
22
22
  end
23
23
 
24
- # Retrieves the current status of the message.
24
+ # Retrieve the status of an SMS transaction.
25
25
  #
26
26
  # See https://developer.telesign.com/docs/messaging-api for detailed API documentation.
27
27
  def status(reference_id, **params)
data/lib/telesign/rest.rb CHANGED
@@ -7,7 +7,7 @@ require 'securerandom'
7
7
  require 'net/http/persistent'
8
8
 
9
9
  module Telesign
10
- SDK_VERSION = '2.2.4'
10
+ SDK_VERSION = '2.3.0'
11
11
 
12
12
  # The TeleSign RestClient is a generic HTTP REST client that can be extended to make requests against any of
13
13
  # TeleSign's REST API endpoints.
@@ -18,8 +18,6 @@ module Telesign
18
18
  # See https://developer.telesign.com for detailed API documentation.
19
19
  class RestClient
20
20
 
21
- @@user_agent = "TeleSignSDK/ruby-{#{SDK_VERSION} #{RUBY_DESCRIPTION} net/http/persistent"
22
-
23
21
  # A simple HTTP Response object to abstract the underlying net/http library response.
24
22
 
25
23
  # * +http_response+ - A net/http response object.
@@ -51,12 +49,21 @@ module Telesign
51
49
  api_key,
52
50
  rest_endpoint: 'https://rest-api.telesign.com',
53
51
  proxy: nil,
54
- timeout: 10)
52
+ timeout: 10,
53
+ source: 'ruby_telesign',
54
+ sdk_version_origin: SDK_VERSION,
55
+ sdk_version_dependency: nil)
55
56
 
56
57
  @customer_id = customer_id
57
58
  @api_key = api_key
58
59
  @rest_endpoint = rest_endpoint
59
60
 
61
+ @user_agent = "TeleSignSDK/ruby Ruby/#{RUBY_VERSION} net:http:persistent/#{Net::HTTP::VERSION} OriginatingSDK/#{source} SDKVersion/#{sdk_version_origin}"
62
+
63
+ if (source != 'ruby_telesign' && sdk_version_dependency.nil?)
64
+ @user_agent += " DependencySDKVersion/#{sdk_version_dependency}"
65
+ end
66
+
60
67
  @http = Net::HTTP::Persistent.new(name: 'telesign', proxy: proxy)
61
68
 
62
69
  unless timeout.nil?
@@ -216,7 +223,7 @@ module Telesign
216
223
  resource,
217
224
  content_type,
218
225
  encoded_fields,
219
- user_agent: @@user_agent)
226
+ user_agent: @user_agent)
220
227
 
221
228
  headers.each do |k, v|
222
229
  request[k] = v
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telesign
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.4
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - TeleSign
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2017-05-25 00:00:00.000000000 Z
@@ -146,7 +146,7 @@ homepage: http://rubygems.org/gems/telesign
146
146
  licenses:
147
147
  - MIT
148
148
  metadata: {}
149
- post_install_message:
149
+ post_install_message:
150
150
  rdoc_options: []
151
151
  require_paths:
152
152
  - lib
@@ -161,8 +161,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
161
  - !ruby/object:Gem::Version
162
162
  version: '0'
163
163
  requirements: []
164
- rubygems_version: 3.2.28
165
- signing_key:
164
+ rubygems_version: 3.0.3.1
165
+ signing_key:
166
166
  specification_version: 4
167
167
  summary: TeleSign Ruby SDK
168
168
  test_files: []