Module: MoIP

Defined in:
lib/moip.rb,
lib/moip/client.rb,
lib/moip/direct_payment.rb

Defined Under Namespace

Classes: Client, DirectPayment, MissingPayerError, MissingPaymentTypeError, MissingTokenError, WebServerResponseError

Constant Summary collapse

STATUS =
{1 => "authorized", 2 => "started", 3 => "printed", 4 => "completed", 5 => "canceled", 6 => "analysing"}
@@uri =
'https://www.moip.com.br'

Class Method Summary collapse

Class Method Details

.checkout(attributes = {}) ⇒ Object



27
28
29
30
# File 'lib/moip.rb', line 27

def checkout(attributes = {})
  ActiveSupport::Deprecation.warn("MoIP.checkout has been deprecated. Use MoIP::Client.checkout instead", caller)
  MoIP::Client.checkout(attributes)
end

.moip_page(token) ⇒ Object



37
38
39
40
# File 'lib/moip.rb', line 37

def moip_page(token)
  ActiveSupport::Deprecation.warn("MoIP.moip_page has been deprecated. use MoIP::Client.moip_page instead", caller)
  MoIP::Client.moip_page(token)
end

.notification(params) ⇒ Object



42
43
44
45
# File 'lib/moip.rb', line 42

def notification(params)
  ActiveSupport::Deprecation.warn("MoIP.notification has been deprecated. use MoIP::Client.notification instead", caller)
  MoIP::Client.moip_page(token)
end

.query(token) ⇒ Object



32
33
34
35
# File 'lib/moip.rb', line 32

def query(token)
  ActiveSupport::Deprecation.warn("MoIP.query has been deprecated. Use MoIP::Client.query instead", caller)
  MoIP::Client.query(token)
end

.setup {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (MoIP)

    the object that the method was called on



20
21
22
# File 'lib/moip.rb', line 20

def self.setup
  yield self
end