Class: AMarmita::Payment

Inherits:
ClientModule show all
Defined in:
lib/a_marmita/payment.rb

Instance Attribute Summary

Attributes inherited from ClientModule

#client

Instance Method Summary collapse

Methods inherited from ClientModule

#initialize

Constructor Details

This class inherits a constructor from AMarmita::ClientModule

Instance Method Details

#end_of_monthObject



12
13
14
15
16
17
18
# File 'lib/a_marmita/payment.rb', line 12

def end_of_month
  return :bad_login if cant_log_in?
  
  server_response = get_page_body("http://www.amarmita.com/enc.php?op=8&te=2&pg=N")
  
  server_response == "-1" ? :error : :ok
end

#through_mbObject



4
5
6
7
8
9
10
# File 'lib/a_marmita/payment.rb', line 4

def through_mb
  return :bad_login if cant_log_in?
  
  server_response = get_page_body("http://www.amarmita.com/enc.php?op=8&te=1&tp=M&pg=N")

  server_response == "-1" ? :error : :ok
end