Class: Signupto::Account

Inherits:
Object
  • Object
show all
Defined in:
lib/signupto/account.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#apihashObject (readonly)

Returns the value of attribute apihash.



4
5
6
# File 'lib/signupto/account.rb', line 4

def apihash
  @apihash
end

#customer_numberObject (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_httpObject



14
15
16
# File 'lib/signupto/account.rb', line 14

def to_http
  URI.encode("cid=#{@customer_number}&hash=#{@apihash}")
end