Class: Squeegee::BritishGas
Overview
BritishGas - Energy Supplier
-
can have more than one account.
Constant Summary collapse
- HOST =
"https://www.britishgas.co.uk"
- LOGIN_URL =
"#{HOST}/Login/Login-Verify/"
- ACCOUNTS_URL =
"#{HOST}/apps/britishgas/components/GetAccountDetails/GET.servlet"
- ACCOUNT_URL =
"#{HOST}/YourAccount/PaymentHistory"
- FIELD =
{ email: "emailAddress", password: "password" }
Instance Attribute Summary collapse
-
#accounts ⇒ Object
Returns the value of attribute accounts.
Attributes inherited from Base
#agent, #amount, #due_at, #keys, #paid
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ BritishGas
constructor
A new instance of BritishGas.
Methods inherited from Base
Constructor Details
#initialize(args = {}) ⇒ BritishGas
Returns a new instance of BritishGas.
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/squeegee/british_gas.rb', line 19 def initialize(args = {}) @keys = %w(email password) params(args) @email = args.delete(:email) @password = args.delete(:password) @accounts = [] authenticate! get_accounts end |
Instance Attribute Details
#accounts ⇒ Object
Returns the value of attribute accounts.
12 13 14 |
# File 'lib/squeegee/british_gas.rb', line 12 def accounts @accounts end |