Class: Signupto::Account
- Inherits:
-
Object
- Object
- Signupto::Account
- Defined in:
- lib/signupto/account.rb
Instance Attribute Summary collapse
-
#apihash ⇒ Object
readonly
Returns the value of attribute apihash.
-
#customer_number ⇒ Object
readonly
Returns the value of attribute customer_number.
Instance Method Summary collapse
-
#initialize(apihash, customer_number) ⇒ Account
constructor
Pass in your account details to create an account object.
- #to_http ⇒ Object
Constructor Details
#initialize(apihash, customer_number) ⇒ Account
Pass in your account details to create an account object. Your apihash
and cid
which will both be found on the signup.to dashboard interface.
10 11 12 |
# File 'lib/signupto/account.rb', line 10 def initialize(apihash, customer_number) @apihash, @customer_number = apihash, customer_number end |
Instance Attribute Details
#apihash ⇒ Object (readonly)
Returns the value of attribute apihash.
4 5 6 |
# File 'lib/signupto/account.rb', line 4 def apihash @apihash end |
#customer_number ⇒ Object (readonly)
Returns the value of attribute customer_number.
5 6 7 |
# File 'lib/signupto/account.rb', line 5 def customer_number @customer_number end |
Instance Method Details
#to_http ⇒ Object
14 15 16 |
# File 'lib/signupto/account.rb', line 14 def to_http URI.encode("cid=#{@customer_number}&hash=#{@apihash}") end |