portatext 1.5.6 → 1.5.7

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
  SHA1:
3
- metadata.gz: 91148dc34ca940883fad967d7587d14ddb6f248a
4
- data.tar.gz: 0f1c15b00933c0023419ac59dee491b0e51c7410
3
+ metadata.gz: 816dab987d21987f3583aa2d2e91bd5abc9d743b
4
+ data.tar.gz: 671096c8839d59631ad36d11081bb3f7d7f0184c
5
5
  SHA512:
6
- metadata.gz: 67f5daca080c389fe3c025010a2f60d9811a41bc9dd7c6ba881dd88141840eddb31b8e2440ccaf1f0bee13a13f0ad3c541225a68e6bd7d3acb4d5e8e27762f8e
7
- data.tar.gz: d7365a601bbe19eb32909581d702934d72d6db8693782edfe38f0314b9f2cbfae97a35506b47db04ea51d4eb5c6a76a365ecafdd66f4653e986686df55bbd210
6
+ metadata.gz: 13c0172664c5040aa245d29d73edca32d3a15c7fffef165571498483eccdbfef6ca4c8d220da94b8e8a8cb0825a96d4519f002ee8632449ee8caec3465378363
7
+ data.tar.gz: 42f52741b8250873e4aa11154077cb9627d90d02bff875cb70832b3ae55cdfd4572e74616ad3726f33ef7d11e9feebbc55b974d324826ea41f3f2cdec2fa6a45
@@ -0,0 +1,30 @@
1
+ module PortaText
2
+ module Command
3
+ module Api
4
+ # The simulate endpoint.
5
+ # https://github.com/PortaText/docs/wiki/REST-API#api_simulate
6
+ #
7
+ # Author:: Marcelo Gornstein (mailto:marcelog@portatext.com)
8
+ # Copyright:: Copyright (c) 2015 PortaText
9
+ # License:: Apache-2.0
10
+ class Simulate < Base
11
+ def country(country)
12
+ set :country, country
13
+ end
14
+
15
+ def use_template(id, variables = {})
16
+ set :template_id, id
17
+ set :variables, variables
18
+ end
19
+
20
+ def text(text)
21
+ set :text, text
22
+ end
23
+
24
+ def endpoint(_method)
25
+ 'simulate'
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
data/lib/portatext.rb CHANGED
@@ -42,6 +42,7 @@ require_relative 'portatext/command/api/version'
42
42
  require_relative 'portatext/command/api/inspect'
43
43
  require_relative 'portatext/command/api/operators'
44
44
  require_relative 'portatext/command/api/destinations'
45
+ require_relative 'portatext/command/api/simulate'
45
46
 
46
47
  # The PortaText namespace.
47
48
  #
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.6'
3
+ s.version = '1.5.7'
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.6
4
+ version: 1.5.7
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-30 00:00:00.000000000 Z
11
+ date: 2016-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simplecov
@@ -160,6 +160,7 @@ files:
160
160
  - lib/portatext/command/api/recharge.rb
161
161
  - lib/portatext/command/api/services.rb
162
162
  - lib/portatext/command/api/settings.rb
163
+ - lib/portatext/command/api/simulate.rb
163
164
  - lib/portatext/command/api/sms.rb
164
165
  - lib/portatext/command/api/sms_campaign.rb
165
166
  - lib/portatext/command/api/tariffs.rb