Module: Cobrato
- Defined in:
- lib/cobrato.rb,
lib/cobrato/http.rb,
lib/cobrato/client.rb,
lib/cobrato/request.rb,
lib/cobrato/version.rb,
lib/cobrato/response.rb,
lib/cobrato/exception.rb,
lib/cobrato/signature.rb,
lib/cobrato/configuration.rb,
lib/cobrato/entities/base.rb,
lib/cobrato/entities/cnab.rb,
lib/cobrato/entities/payee.rb,
lib/cobrato/entities/payer.rb,
lib/cobrato/resources/base.rb,
lib/cobrato/entities/charge.rb,
lib/cobrato/entities/person.rb,
lib/cobrato/resources/hooks.rb,
lib/cobrato/resources/payee.rb,
lib/cobrato/resources/payer.rb,
lib/cobrato/entities/payment.rb,
lib/cobrato/entities/webhook.rb,
lib/cobrato/resources/charge.rb,
lib/cobrato/resources/person.rb,
lib/cobrato/resources/payment.rb,
lib/cobrato/resources/webhook.rb,
lib/cobrato/entities/bank_billet.rb,
lib/cobrato/entities/credit_card.rb,
lib/cobrato/entities/bank_account.rb,
lib/cobrato/entities/regress_cnab.rb,
lib/cobrato/resources/credit_card.rb,
lib/cobrato/entities/charge_config.rb,
lib/cobrato/resources/bank_account.rb,
lib/cobrato/resources/regress_cnab.rb,
lib/cobrato/entities/payment_config.rb,
lib/cobrato/entities/payment_method.rb,
lib/cobrato/resources/charge_config.rb,
lib/cobrato/resources/charging_type.rb,
lib/cobrato/entities/charge_template.rb,
lib/cobrato/entities/remittance_cnab.rb,
lib/cobrato/resources/payment_config.rb,
lib/cobrato/resources/payment_method.rb,
lib/cobrato/resources/charge_template.rb,
lib/cobrato/resources/remittance_cnab.rb
Defined Under Namespace
Modules: Entities, Resources
Classes: Client, Configuration, Exception, Http, Request, Response, Signature
Constant Summary
collapse
- VERSION =
'1.1.7'
- RequestTimeout =
Class.new(Exception)
- RequestError =
Class.new(Exception)
Class Method Summary
collapse
Class Method Details
.client(token) ⇒ Object
55
56
57
|
# File 'lib/cobrato.rb', line 55
def self.client(token)
Client.new(token)
end
|
.configuration ⇒ Object
47
48
49
|
# File 'lib/cobrato.rb', line 47
def self.configuration
@configuration ||= Configuration.new
end
|
51
52
53
|
# File 'lib/cobrato.rb', line 51
def self.configure
yield(configuration) if block_given?
end
|
.signature(secret) ⇒ Object
63
64
65
|
# File 'lib/cobrato.rb', line 63
def self.signature(secret)
Signature.new(secret)
end
|
.subscribe(event, callback) ⇒ Object
59
60
61
|
# File 'lib/cobrato.rb', line 59
def self.subscribe(event, callback)
Wisper.subscribe(callback, on: event, with: :call)
end
|