sms_masking 0.3.0 → 0.4.0

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: d8c1b75613814811f7aa561bc1a3cc5cb2312f02
4
- data.tar.gz: c14c72aefa8b6db1490fe27e6b10c4900ed5ab91
3
+ metadata.gz: ea4c3a0de5cce566418d9ac19305baa9d847487b
4
+ data.tar.gz: 3daca64958406a3daf3844235f29adc5f23b3156
5
5
  SHA512:
6
- metadata.gz: b7201f9d55bf9cad485d3b6da16284c49e569e55afe919325e69418ce63787a2ee4898c838cb16362d5262685b24560eca027a5084192976a949688138b771cf
7
- data.tar.gz: ae58b2d9bbee812c2c97136427d625193e740cd2599f66104488abec0cdc4afa58d6ebab5a8645eb403cb180a0c8c88740db9e9a86c6bff28d65e274adf108d9
6
+ metadata.gz: 0d3be90537425df0764d6a8a7c7c9526de16ef6207b6491573ff5b3174c794adbb14a34586f5636e9afdb14d040fa52074a7358f9fb4a654467c05a3a282ab57
7
+ data.tar.gz: ba45f3cfb89f1e0a6b51316b92723a45f1c5b324354ab8b995736b1b7e1099f1aa8dc777e8aef218d69750adb8ea7e2a61f4f6cb74a4131453c92d919b3d3787
data/.DS_Store CHANGED
Binary file
data/README.md CHANGED
@@ -25,6 +25,8 @@ This is not official gem of [www.smsmasking.co.id](http://www.smsmasking.co.id/)
25
25
  * [Delete Group](https://github.com/yunanhelmy/sms_masking#delete-group)
26
26
  * [Get List of Group](https://github.com/yunanhelmy/sms_masking#get-list-of-group)
27
27
  * [Find Group](https://github.com/yunanhelmy/sms_masking#find-group)
28
+ * [Checking Customer Account Balance](https://github.com/yunanhelmy/sms_masking#checking-customer-account-balance)
29
+ * [Change Password](https://github.com/yunanhelmy/sms_masking#change-password)
28
30
 
29
31
  ## Installation
30
32
 
@@ -286,6 +288,26 @@ Parameters :
286
288
 
287
289
  * `group` : Name to search
288
290
 
291
+ ### Checking Customer Account Balance
292
+
293
+ Purpose : Retrieve account balance
294
+
295
+ ```ruby
296
+ sms.balance
297
+ ```
298
+
299
+ ### Change Password
300
+
301
+ Purpose : To change password
302
+
303
+ ```ruby
304
+ sms.change_password({newpasw: "myS3crEt"})
305
+ ```
306
+
307
+ Parameters :
308
+
309
+ * `newpasw` : New Password
310
+
289
311
  ## Development
290
312
 
291
313
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -0,0 +1,28 @@
1
+ module SmsMasking
2
+ module Account
3
+
4
+ # ==== Example
5
+ # sms.balance
6
+ #
7
+ def balance(params = {})
8
+ params[:username] = @username
9
+ params[:auth] = auth(@username.to_s+@password.to_s)
10
+ res = self.class.get(@base_path+"/creditsleft.aspx", query: params)
11
+ print_response res
12
+ end
13
+
14
+ # ==== Attributes
15
+ # * +newpass+ : New Password
16
+ #
17
+ # ==== Example
18
+ # sms.change_password({newpass: "password123"})
19
+ #
20
+ def change_password(params = {})
21
+ params[:username] = @username
22
+ params[:auth] = auth(@username.to_s+@password.to_s)
23
+ params[:msg] = params.delete :message
24
+ res = self.class.get(@base_path+"/ChangePassword.aspx", query: params)
25
+ print_response res
26
+ end
27
+ end
28
+ end
@@ -3,6 +3,7 @@ require 'sms_masking/response'
3
3
  require 'sms_masking/send_sms'
4
4
  require 'sms_masking/phone_book'
5
5
  require 'sms_masking/group'
6
+ require 'sms_masking/account'
6
7
 
7
8
  module SmsMasking
8
9
  class Base
@@ -16,6 +17,7 @@ module SmsMasking
16
17
  include SmsMasking::PhoneBook
17
18
  include SmsMasking::Group
18
19
  include SmsMasking::Response
20
+ include SmsMasking::Account
19
21
 
20
22
  base_uri 'http://send.smsmasking.co.id:8080'
21
23
 
@@ -1,3 +1,3 @@
1
1
  module SmsMasking
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sms_masking
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - yunanhelmy
@@ -85,6 +85,7 @@ files:
85
85
  - bin/console
86
86
  - bin/setup
87
87
  - lib/sms_masking.rb
88
+ - lib/sms_masking/account.rb
88
89
  - lib/sms_masking/auth.rb
89
90
  - lib/sms_masking/base.rb
90
91
  - lib/sms_masking/group.rb