portatext 1.4.4 → 1.5.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
  SHA1:
3
- metadata.gz: b42f5e4feb846bc80a9d909e3af60cb9973c36b0
4
- data.tar.gz: 4505c8bca5a32bfb8a39583ff8598873cadc0e38
3
+ metadata.gz: 1ba8963769a0501401b0f08e6728ba2a42aa7ab8
4
+ data.tar.gz: 72f185c49d033e2e9e4a004bd6370bd43fdcfd92
5
5
  SHA512:
6
- metadata.gz: fd716695dc6a3d7e6d30e7db34c5936295cb50a174503a4cbbe43ecdb11da20612e004a14f0b4c9e28d5114ac80033deb0f47d04482646754e47536123b46a2a
7
- data.tar.gz: 04b4fdfe7f0aea8849db235378eff1ae942818e21ebbf451c2a2c86c7a0d7e1044616777c402ac6f041fb45996d966f4c8c6de7d6cb2daf79c77bb0e43664783
6
+ metadata.gz: 98c03cb4add5c6a623c0a7d5c19ac15103f2c63b4106c180e1abe7ddbd7fd49205cb38c24fe6b71e01cb53f6b9a574c80ead83105b7255756147bcb385d8bdfa
7
+ data.tar.gz: dc72e182946554cf52b72a94398297bb553d701ad83821e68ec940380eab10acadcaaa3a8c8016fa029b401516827d43cd177d4b7a5b496f2ae5660db4473d84
@@ -32,18 +32,6 @@ module PortaText
32
32
  set :file, file
33
33
  end
34
34
 
35
- def use_template(template_id, variables)
36
- set :settings, template_id: template_id, variables: variables
37
- end
38
-
39
- def text(text)
40
- set :settings, text: text
41
- end
42
-
43
- def from_service(service_id)
44
- set :service_id, service_id
45
- end
46
-
47
35
  def all_subscribers
48
36
  set :all_subscribers, true
49
37
  end
@@ -0,0 +1,30 @@
1
+ module PortaText
2
+ module Command
3
+ module Api
4
+ # An SMS 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 SmsCampaign < Campaigns
11
+ def from_service(service_id)
12
+ set :service_id, service_id
13
+ end
14
+
15
+ def use_template(template_id, variables)
16
+ set :settings, template_id: template_id, variables: variables
17
+ end
18
+
19
+ def text(text)
20
+ set :settings, text: text
21
+ end
22
+
23
+ def initialize
24
+ super
25
+ set :type, 'sms'
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
data/lib/portatext.rb CHANGED
@@ -31,6 +31,7 @@ require_relative 'portatext/command/api/contact_lists'
31
31
  require_relative 'portatext/command/api/did_search'
32
32
  require_relative 'portatext/command/api/blacklist'
33
33
  require_relative 'portatext/command/api/campaigns'
34
+ require_relative 'portatext/command/api/sms_campaign'
34
35
  require_relative 'portatext/command/api/campaign_lifecycle'
35
36
  require_relative 'portatext/command/api/my_password'
36
37
  require_relative 'portatext/command/api/contacts'
data/portatext.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'portatext'
3
- s.version = '1.4.4'
3
+ s.version = '1.5.0'
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.4.4
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - PortaText
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-13 00:00:00.000000000 Z
11
+ date: 2016-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simplecov
@@ -158,6 +158,7 @@ files:
158
158
  - lib/portatext/command/api/services.rb
159
159
  - lib/portatext/command/api/settings.rb
160
160
  - lib/portatext/command/api/sms.rb
161
+ - lib/portatext/command/api/sms_campaign.rb
161
162
  - lib/portatext/command/api/tariffs.rb
162
163
  - lib/portatext/command/api/templates.rb
163
164
  - lib/portatext/command/api/timezones.rb