portatext 1.5.16 → 1.5.17

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: c9a613ab3f296136776a5b7bdca29f16175d1dd2
4
- data.tar.gz: 995f9d560be9fc24f7bc49fa23880ca3553e17af
3
+ metadata.gz: bf0d568fd18da974f3ea4d240b727d7bdd4d8089
4
+ data.tar.gz: 57694203d50a7c4dcbae000a9802d33b02f69580
5
5
  SHA512:
6
- metadata.gz: 062c2e0926f55403fe70721e5da14ccc90137fd747ebdeeca88411cccfd39211daf53f3e6c840a9959efcfd4e2a32a06e822199345fa578a847cbe159163792e
7
- data.tar.gz: 61a95f76b368bb6b665d315e8f1fb290493052937598459a92dc604699f68e9097f9c81857f4f2814a609130c7cc8d643d1ff8c67f66746a0f53b433feff9a7d
6
+ metadata.gz: 8f9147988070eced6bab02e1de2c175777b839947a0c7aaeaf5eee61f4979d0bb1d429a403cbab089fd65ad8072f6c5554e3afeceaf8713d693764d4c6c842be
7
+ data.tar.gz: b4c737e1100afb969fa03707d981e27f06c90dbee6eee9120afdf4831b026da7055c5539aa793b350cdf1c566cd4635efbe4ba45c55cdd66545937e87cc6da8b
@@ -54,6 +54,13 @@ module PortaText
54
54
  set :schedule, schedule
55
55
  end
56
56
 
57
+ def set_setting(name, value)
58
+ args = @args[:settings]
59
+ args ||= {}
60
+ args[name] = value
61
+ set :settings, args
62
+ end
63
+
57
64
  # rubocop:disable Metrics/MethodLength
58
65
  # rubocop:disable Metrics/AbcSize
59
66
  def endpoint(_method)
@@ -13,11 +13,12 @@ module PortaText
13
13
  end
14
14
 
15
15
  def use_template(template_id, variables)
16
- set :settings, template_id: template_id, variables: variables
16
+ set_setting :template_id, template_id
17
+ set_setting :variables, variables
17
18
  end
18
19
 
19
20
  def text(text)
20
- set :settings, text: text
21
+ set_setting :text, text
21
22
  end
22
23
 
23
24
  def initialize
@@ -0,0 +1,34 @@
1
+ module PortaText
2
+ module Command
3
+ module Api
4
+ # A Telephony campaign.
5
+ # https://github.com/PortaText/docs/wiki/REST-API#api_campaigns
6
+ #
7
+ # Author:: Marcelo Gornstein (mailto:marcelog@portatext.com)
8
+ # Copyright:: Copyright (c) 2015 PortaText
9
+ # License:: Apache-2.0
10
+ class TelCampaign < Campaigns
11
+ def iterations(iterations)
12
+ set_setting :iterations, iterations
13
+ end
14
+
15
+ def agents(agents)
16
+ set_setting :agents, agents
17
+ end
18
+
19
+ def post_call_work_duration(seconds)
20
+ set_setting :post_call_work_duration, seconds
21
+ end
22
+
23
+ def min_iteration_time(minutes)
24
+ set_setting :min_iteration_time, minutes
25
+ end
26
+
27
+ def initialize
28
+ super
29
+ set :type, 'telephony'
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
data/lib/portatext.rb CHANGED
@@ -46,6 +46,7 @@ require_relative 'portatext/command/api/simulate'
46
46
  require_relative 'portatext/command/api/summary'
47
47
  require_relative 'portatext/command/api/gsm_charset'
48
48
  require_relative 'portatext/command/api/sounds'
49
+ require_relative 'portatext/command/api/tel_campaign'
49
50
 
50
51
  # The PortaText namespace.
51
52
  #
data/portatext.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'portatext'
3
- s.version = '1.5.16'
3
+ s.version = '1.5.17'
4
4
  s.summary = 'Official PortaText API ruby client'
5
5
  s.description = 'This is the official PortaText API ruby client'
6
6
  s.authors = ['PortaText']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: portatext
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.16
4
+ version: 1.5.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - PortaText
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-25 00:00:00.000000000 Z
11
+ date: 2016-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simplecov
@@ -167,6 +167,7 @@ files:
167
167
  - lib/portatext/command/api/sounds.rb
168
168
  - lib/portatext/command/api/summary.rb
169
169
  - lib/portatext/command/api/tariffs.rb
170
+ - lib/portatext/command/api/tel_campaign.rb
170
171
  - lib/portatext/command/api/templates.rb
171
172
  - lib/portatext/command/api/timezones.rb
172
173
  - lib/portatext/command/api/trunks.rb