Class: Squeegee::OrangeUK
Overview
OrangeUK - Mobile network
Constant Summary collapse
- LOGIN_URL =
"https://web.orange.co.uk/r/login/"
- BILLS_URL =
"https://www.youraccount.orange.co.uk/sss/jfn?mfunc=63&jfnRC=1"
- LOGIN_POST_URL =
"https://web.orange.co.uk/id/signin.php?rm=StandardSubmit"
- FIELD =
{ username: 'LOGIN', password: 'PASSWORD' }
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#accounts ⇒ Object
Returns the value of attribute accounts.
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#due_at ⇒ Object
Returns the value of attribute due_at.
-
#paid ⇒ Object
Returns the value of attribute paid.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ OrangeUK
constructor
A new instance of OrangeUK.
Methods inherited from Base
Constructor Details
#initialize(args = {}) ⇒ OrangeUK
Returns a new instance of OrangeUK.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/squeegee/orange_uk.rb', line 17 def initialize(args = {}) @keys = %w(username password) @accounts = [] @agent = Mechanize.new # NOTE: Orange websites redirects though insecure servers. @agent.agent.http.verify_mode = OpenSSL::SSL::VERIFY_NONE params(args) @username = args.delete(:username) @password = args.delete(:password) authenticate! get_statement end |
Instance Attribute Details
#account_id ⇒ Object
Returns the value of attribute account_id.
15 16 17 |
# File 'lib/squeegee/orange_uk.rb', line 15 def account_id @account_id end |
#accounts ⇒ Object
Returns the value of attribute accounts.
15 16 17 |
# File 'lib/squeegee/orange_uk.rb', line 15 def accounts @accounts end |
#amount ⇒ Object
Returns the value of attribute amount.
15 16 17 |
# File 'lib/squeegee/orange_uk.rb', line 15 def amount @amount end |
#due_at ⇒ Object
Returns the value of attribute due_at.
15 16 17 |
# File 'lib/squeegee/orange_uk.rb', line 15 def due_at @due_at end |
#paid ⇒ Object
Returns the value of attribute paid.
15 16 17 |
# File 'lib/squeegee/orange_uk.rb', line 15 def paid @paid end |