Module: Paggi::Rest::Cancel
- Included in:
- Charge
- Defined in:
- lib/paggi/rest/cancel.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 |
# File 'lib/paggi/rest/cancel.rb', line 5 def included(base) base.extend(ClassMethods) end |
Instance Method Details
#cancel ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/paggi/rest/cancel.rb', line 10 def cancel result = self.class.cancel(to_json) raise result if result.instance_of? StandardError if result.instance_of? PaggiError self.errors = result.errors return false end initialize(result.to_json) true end |