eniyismsapi 0.1.3
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 +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +34 -0
- data/lib/eniyismsapi.rb +28 -0
- data/lib/eniyismsapi/report.rb +55 -0
- data/lib/eniyismsapi/request.rb +28 -0
- data/lib/eniyismsapi/send.rb +120 -0
- data/lib/eniyismsapi/version.rb +3 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/javascripts/smstest.js +2 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/assets/stylesheets/smstest.css +4 -0
- data/test/dummy/app/controllers/application_controller.rb +7 -0
- data/test/dummy/app/controllers/smstest_controller.rb +37 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/smstest_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/smstest/home.html.erb +13 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +29 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +26 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +41 -0
- data/test/dummy/config/environments/production.rb +79 -0
- data/test/dummy/config/environments/test.rb +42 -0
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +58 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +1455 -0
- data/test/dummy/log/test.log +12 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/test/controllers/smstest_controller_test.rb +9 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/2V/2VCmtLBHaDkxVeAF1OHps3p_cSWA_kL9gqO5o14lrZw.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/4g/4gsBiByraB2GGxpwGfYZ-FDTg-55g1SuqQQexyxLkUM.cache +2 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/4m/4mNRBrNByIZhSIGrZoatOzthEypSxNaxYIaqcAfIMFY.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/56/561SK9MVmpHjuvyhsNK0VPzkdTMIBj6mLaSrYLbq-sE.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/5L/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache +2 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/5x/5xIQaRt4Sl1iPdJjVQ2UNLiJdoAgevhEYV5cTdwBESM.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/C-/C-jYWXUZB3Qyk2L4QAkiyr1lsdTz1VkWkNO5dpA2xbY.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/DS/DSOLSc6A5RVSmvM415eEWAWG_AgOvZcLZOXQjsXyWQA.cache +2 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Ex/Ex6RtOPSE5cmYvinvwk2aHXFdtVVxCyiX9WguJlkaw8.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/HC/HC73CMLvVlZSNgBAErDvjAvcP845em3U4hu1vZFcd4U.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Hu/HuhpBocRlFIzJAKry69L7u7cyXA1ex5Mo7lFWBF1o8E.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/JL/JL9h1NrP3CM_njOMpJ9FNR1NtQu-iOfwV5LLA4IyeNA.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/Kq/Kq_WbQm_5sn1FFQEVMrxiYIptkc7MwMIkqGwtsvXYNU.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/ML/MLI8cujXvep44vCHddPC3T9LFlWMDUyrB3traB8ph8o.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/MM/MMyL06F3k4oLEkWQjlXTVgLnA5pGogQgC7sXv6BefFY.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/OI/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache +2 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/PD/PD6mKQx9w43RGMmoAYqbot64WOc_YnRkZ8abCO76PSQ.cache +3 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/XK/XKMMBuV58Vh_YTkgNybz2HKlit1yGIUfmBM-cnSSCwM.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/bI/bITz7EBRX5iKH56NzayOaNB2e43pEYwcBiUXCOTGl_s.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/bs/bs0s2uDj_xLnObaFd3fT0Q4SZCgZGhzw0VV6dUapex4.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/f0/f08zZ1vPja7lfHw9lzC1VmyULRsF20l-fR7rnk22vcw.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/gZ/gZp3uXMHuYQC4hzCr7bQfetKNdJAtbQmg3so2KpW1Dw.cache +2 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/gr/grRICJEifEGENnBOXkiFMpk1jXFX5d5VAaeRLgo2jHs.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/hF/hFq8B-JgJk4NouMdZ_g6VC-RKO6b_g3ARLFfh7pM8dU.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/hZ/hZi1k6tpxxCGYxRe7zY74ItcOI8gZrREOpGuA8JSpGg.cache +2 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/kC/kCZpeAfimeyRythEHL7sxye9VYD-8ROsB2qjiDD88j8.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/oT/oTgCpfeuEaXyN2WrPzXpV2tXbr1cPRMCBgHpVe3JxSI.cache +1 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/pE/pEhaat2KBd5SrT7szC_8R1_6hK17FTpvoRFkmCRSD3M.cache +2 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/u0/u05BwImVFoX77OZegOjIqgXEWo-BJWRl5HXudNP1wOs.cache +0 -0
- data/test/dummy/tmp/cache/assets/sprockets/v3.0/yS/ySVb-wjRslagAHSDFJi0j-gNo8SHrdXG_8tV-fhodcg.cache +3 -0
- data/test/dummy/tmp/pids/server.pid +1 -0
- data/test/eniyismsapi_test.rb +7 -0
- data/test/test_helper.rb +20 -0
- metadata +266 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: dde1c248dec79e0bef33612b5bb193ad1cc44740
|
|
4
|
+
data.tar.gz: 94afe7b966b8f749676d6126830a51c297720a67
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: e1a033fd7ffb5788bcfbaa8ac80e8de422c0da2202de62880d7b7963760f536eb8b31c360d81f73cfe33a1d11252c9c3234bea497d860df05797273574dce0f3
|
|
7
|
+
data.tar.gz: ffed3f5f7094e323860eb6fec393921785cbbb6a10a5d1a29f9b7cf619f7162f94f33fe8167e607c4d51ae8167f322abb95b199b553f8a0d066faf15d0aa7bd4
|
data/MIT-LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright 2016 wemrekurt
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
data/Rakefile
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
begin
|
|
2
|
+
require 'bundler/setup'
|
|
3
|
+
rescue LoadError
|
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
require 'rdoc/task'
|
|
8
|
+
|
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
|
11
|
+
rdoc.title = 'Eniyismsapi'
|
|
12
|
+
rdoc.options << '--line-numbers'
|
|
13
|
+
rdoc.rdoc_files.include('README.rdoc')
|
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
Bundler::GemHelper.install_tasks
|
|
23
|
+
|
|
24
|
+
require 'rake/testtask'
|
|
25
|
+
|
|
26
|
+
Rake::TestTask.new(:test) do |t|
|
|
27
|
+
t.libs << 'lib'
|
|
28
|
+
t.libs << 'test'
|
|
29
|
+
t.pattern = 'test/**/*_test.rb'
|
|
30
|
+
t.verbose = false
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
task default: :test
|
data/lib/eniyismsapi.rb
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
require File.expand_path('../eniyismsapi/send', __FILE__)
|
|
4
|
+
require File.expand_path('../eniyismsapi/report', __FILE__)
|
|
5
|
+
require File.expand_path('../eniyismsapi/request', __FILE__)
|
|
6
|
+
|
|
7
|
+
module Eniyismsapi
|
|
8
|
+
|
|
9
|
+
def self.report username, password, argv
|
|
10
|
+
sms = REPORT.new username, password
|
|
11
|
+
sms.report argv
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def self.balance username, password
|
|
15
|
+
sms = REPORT.new username, password
|
|
16
|
+
sms.balance
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def self.send username, password, params
|
|
20
|
+
sms = SMS.new username, password
|
|
21
|
+
sms.send params
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.multi_send username, password, params
|
|
25
|
+
sms = SMS.new username, password
|
|
26
|
+
sms.multi_send params
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
require "eniyismsapi/request"
|
|
4
|
+
require 'nokogiri'
|
|
5
|
+
|
|
6
|
+
module Eniyismsapi
|
|
7
|
+
class REPORT
|
|
8
|
+
def initialize username, password
|
|
9
|
+
@username = username
|
|
10
|
+
@password = password
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def report argv
|
|
14
|
+
path = "Query"
|
|
15
|
+
|
|
16
|
+
ns = {
|
|
17
|
+
"xmlns:i" => "http://www.w3.org/2001/XMLSchema-instance" ,
|
|
18
|
+
"xmlns"=>'SmsApi'
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
xml_build = Nokogiri::XML::Builder.new do |xml|
|
|
22
|
+
xml.Query(ns){
|
|
23
|
+
xml.Credential {
|
|
24
|
+
xml.Password @password
|
|
25
|
+
xml.Username @username
|
|
26
|
+
}
|
|
27
|
+
xml.MSISDN argv[:msisdn]
|
|
28
|
+
xml.MessageId argv[:id]
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
r = REQUEST.new path,xml_build.to_xml
|
|
32
|
+
return r.request
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def balance
|
|
36
|
+
path = "GetBalance"
|
|
37
|
+
ns = {
|
|
38
|
+
"xmlns:i" => "http://www.w3.org/2001/XMLSchema-instance" ,
|
|
39
|
+
"xmlns"=>'SmsApi'
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
xml_build = Nokogiri::XML::Builder.new do |xml|
|
|
43
|
+
xml.GetBalance(ns) {
|
|
44
|
+
xml.Credential {
|
|
45
|
+
xml.Password @password
|
|
46
|
+
xml.Username @username
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
r = REQUEST.new path, xml_build.to_xml
|
|
51
|
+
return r.request
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
require 'rest-client'
|
|
4
|
+
require 'crack/xml'
|
|
5
|
+
|
|
6
|
+
module Eniyismsapi
|
|
7
|
+
class REQUEST
|
|
8
|
+
def initialize path, params
|
|
9
|
+
@params = params
|
|
10
|
+
@api_base_url = "http://eniyisms.com/Api/#{path}"
|
|
11
|
+
@path = path
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def request
|
|
15
|
+
begin
|
|
16
|
+
resource = RestClient::Resource.new(@api_base_url, timeout: 30, open_timeout: 30)
|
|
17
|
+
response = resource.post @params, content_type: :xml, accept: :xml
|
|
18
|
+
rescue RestClient::ExceptionWithResponse => err
|
|
19
|
+
response = err.response
|
|
20
|
+
end
|
|
21
|
+
if @path != 'Query'
|
|
22
|
+
return Crack::XML.parse(response.body)
|
|
23
|
+
else
|
|
24
|
+
return response.body.split
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
|
|
3
|
+
require 'nokogiri'
|
|
4
|
+
require "eniyismsapi/request"
|
|
5
|
+
|
|
6
|
+
module Eniyismsapi
|
|
7
|
+
class SMS
|
|
8
|
+
def initialize username, password
|
|
9
|
+
@username = username
|
|
10
|
+
@password = password
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# Usage: sms = Eniyismsapi::SMS.new("5444059964","123456")
|
|
14
|
+
# sms.send({sender: "GLOBALMEDIA", message: "Lorem Ipsum ...",
|
|
15
|
+
# numbers: ["05xxxxxxxxx", "5xxxxxxxxx"]})
|
|
16
|
+
# Description: Single Message to Multiple Recipients
|
|
17
|
+
def send params
|
|
18
|
+
path = "Submit"
|
|
19
|
+
params = {sendDateTime: Time.now.strftime("%d/%m/%Y %H:%M")}.merge(params)
|
|
20
|
+
|
|
21
|
+
ns = {
|
|
22
|
+
"xmlns:i" => "http://www.w3.org/2001/XMLSchema-instance" ,
|
|
23
|
+
"xmlns"=>'SmsApi'
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
ms = {
|
|
27
|
+
'xmlns:d2p1' => 'http://schemas.microsoft.com/2003/10/Serialization/Arrays'
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
build_xml = Nokogiri::XML::Builder.new do |xml|
|
|
31
|
+
xml.Submit(ns) {
|
|
32
|
+
xml.Credential {
|
|
33
|
+
xml.Username @username
|
|
34
|
+
xml.Password @password
|
|
35
|
+
}
|
|
36
|
+
xml.DataCoding params[:coding]
|
|
37
|
+
xml.Header{
|
|
38
|
+
xml.From params[:originator]
|
|
39
|
+
xml.ScheduledDeliveryTime params[:sendDateTime]
|
|
40
|
+
}
|
|
41
|
+
xml.Message params[:message]
|
|
42
|
+
xml.To(ms){
|
|
43
|
+
params[:numbers].each do |nmb|
|
|
44
|
+
xml['d2p1'].string nmb
|
|
45
|
+
end
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
r = REQUEST.new path, build_xml.to_xml
|
|
50
|
+
return r.request
|
|
51
|
+
# return build_xml.to_xml
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Usage: sms = IletimerkeziSMS::SMS.new("5545967632","5173539")
|
|
55
|
+
# sms.send({sender: "ILETI MRKZI",
|
|
56
|
+
# messages: [
|
|
57
|
+
# {text: "Message_one", numbers: ["905xxxxxxxxx"," +90 5xx xxx xx xx", "5xxxxxxxxx"]},
|
|
58
|
+
# {text: "Message_two", numbers: ["905xxxxxxxxx"," +90 5xx xxx xx xx"]},
|
|
59
|
+
# {text: "Message_there", numbers: ["905xxxxxxxxx"]}
|
|
60
|
+
# ]
|
|
61
|
+
# })
|
|
62
|
+
# Description: Multi Message => Multi Number (Birden fazla farklı mesajı birden fazla farklı kişiye göndermeye yarar.)
|
|
63
|
+
|
|
64
|
+
def multi_send params
|
|
65
|
+
path = "SubmitMulti"
|
|
66
|
+
params = {sendDateTime: Time.now.strftime("%d/%m/%Y %H:%M")}.merge(params)
|
|
67
|
+
|
|
68
|
+
ns = {
|
|
69
|
+
"xmlns:i" => "http://www.w3.org/2001/XMLSchema-instance" ,
|
|
70
|
+
"xmlns"=>'SmsApi'
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
multi_xml = Nokogiri::XML::Builder.new do |xml|
|
|
74
|
+
xml.SubmitMulti(ns) {
|
|
75
|
+
xml.Credential {
|
|
76
|
+
xml.Password @password
|
|
77
|
+
xml.Username @username
|
|
78
|
+
}
|
|
79
|
+
xml.DataCoding params[:coding]
|
|
80
|
+
xml.Header {
|
|
81
|
+
xml.From params[:originator]
|
|
82
|
+
xml.ScheduledDeliveryTime params[:sendDateTime]
|
|
83
|
+
}
|
|
84
|
+
xml.Envelopes {
|
|
85
|
+
params[:messages].each do |msg|
|
|
86
|
+
xml.Envelope{
|
|
87
|
+
xml.Message msg[:message]
|
|
88
|
+
xml.To msg[:number]
|
|
89
|
+
}
|
|
90
|
+
end
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
end
|
|
94
|
+
r = REQUEST.new path, multi_xml.to_xml
|
|
95
|
+
return r.request
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Usage: sms = IletimerkeziSMS::SMS.new("5545967632","5173539")
|
|
99
|
+
# sms.cancel("4152")
|
|
100
|
+
# Description: Gönderilen sms paketini iptal etmeye yarar.
|
|
101
|
+
# def cancel(order_id)
|
|
102
|
+
# path = "cancel-order"
|
|
103
|
+
# xml_build = Nokogiri::XML::Builder.new do |xlm|
|
|
104
|
+
# xlm.request {
|
|
105
|
+
# xlm.authentication {
|
|
106
|
+
# xlm.username @username
|
|
107
|
+
# xlm.password @password
|
|
108
|
+
# }
|
|
109
|
+
# xlm.order {
|
|
110
|
+
# xlm.id_ order_id.to_s
|
|
111
|
+
# }
|
|
112
|
+
# }
|
|
113
|
+
# end
|
|
114
|
+
# r = REQUEST.new(path,xml_build.to_xml)
|
|
115
|
+
# return r.request
|
|
116
|
+
# end
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
end
|
|
120
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
== README
|
|
2
|
+
|
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
|
4
|
+
application up and running.
|
|
5
|
+
|
|
6
|
+
Things you may want to cover:
|
|
7
|
+
|
|
8
|
+
* Ruby version
|
|
9
|
+
|
|
10
|
+
* System dependencies
|
|
11
|
+
|
|
12
|
+
* Configuration
|
|
13
|
+
|
|
14
|
+
* Database creation
|
|
15
|
+
|
|
16
|
+
* Database initialization
|
|
17
|
+
|
|
18
|
+
* How to run the test suite
|
|
19
|
+
|
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
|
21
|
+
|
|
22
|
+
* Deployment instructions
|
|
23
|
+
|
|
24
|
+
* ...
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
|
28
|
+
<tt>rake doc:app</tt>.
|
data/test/dummy/Rakefile
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
|
2
|
+
// listed below.
|
|
3
|
+
//
|
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
|
5
|
+
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
|
6
|
+
//
|
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
|
8
|
+
// compiled file.
|
|
9
|
+
//
|
|
10
|
+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
|
11
|
+
// about supported directives.
|
|
12
|
+
//
|
|
13
|
+
//= require_tree .
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
|
3
|
+
* listed below.
|
|
4
|
+
*
|
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
|
7
|
+
*
|
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any styles
|
|
10
|
+
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
|
11
|
+
* file per style scope.
|
|
12
|
+
*
|
|
13
|
+
*= require_tree .
|
|
14
|
+
*= require_self
|
|
15
|
+
*/
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
class SmstestController < ApplicationController
|
|
2
|
+
require 'eniyismsapi'
|
|
3
|
+
|
|
4
|
+
def home
|
|
5
|
+
# 64335
|
|
6
|
+
report_object = Eniyismsapi::REPORT.new '5444059964', '123456'
|
|
7
|
+
rep = {msisdn: ' ', id:'64335'}
|
|
8
|
+
@a = report_object.report rep
|
|
9
|
+
|
|
10
|
+
bal = Eniyismsapi::REPORT.new '5444059964', '123456'
|
|
11
|
+
@b = bal.balance
|
|
12
|
+
#
|
|
13
|
+
# sen = Eniyismsapi::SMS.new '5444059964', '123456'
|
|
14
|
+
# params = {
|
|
15
|
+
# coding: 'Default',
|
|
16
|
+
# originator: 'EMRE KURT',
|
|
17
|
+
# message: 'Ruby Gem Test API',
|
|
18
|
+
# numbers: ['5444059964']
|
|
19
|
+
# }
|
|
20
|
+
# @send = sen.send params
|
|
21
|
+
|
|
22
|
+
multi = Eniyismsapi::SMS.new '5444059964', '123456'
|
|
23
|
+
params = {
|
|
24
|
+
coding: 'Default',
|
|
25
|
+
originator: 'EMRE KURT',
|
|
26
|
+
messages: [
|
|
27
|
+
{number: '5444059964', message: 'Emre Ruby GEM Api Test'},
|
|
28
|
+
{number: '5424891217', message: 'Samet Ruby GEM Api Test (Mesaj ulastiysa eline haber ver bana)'}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@mul = multi.multi_send params
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
end
|
|
37
|
+
end
|