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 +4 -4
- data/lib/portatext/command/api/simulate.rb +30 -0
- data/lib/portatext.rb +1 -0
- data/portatext.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 816dab987d21987f3583aa2d2e91bd5abc9d743b
|
4
|
+
data.tar.gz: 671096c8839d59631ad36d11081bb3f7d7f0184c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
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.
|
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-
|
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
|