Class: Finix::Authorization

Inherits:
Object
  • Object
show all
Includes:
HypermediaRegistry, Resource
Defined in:
lib/finix/resources/authorization.rb

Instance Attribute Summary

Attributes included from HalResource

#attributes, #hyperlinks

Instance Method Summary collapse

Methods included from HypermediaRegistry

included

Methods included from Resource

#copy_from, #fetch, #hydrate, included, #initialize, #refresh, #sanitize, #save, #to_s

Methods included from HalResource

#load_page_from_response!, #method_missing

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Finix::HalResource

Instance Method Details

#capture(attrs = {}) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/finix/resources/authorization.rb', line 13

def capture(attrs={})
  if attrs['capture_amount'].nil?
    attrs['capture_amount'] = self.amount
  end
  self.attributes = self.attributes.merge attrs
  self.save
end

#voidObject



8
9
10
11
# File 'lib/finix/resources/authorization.rb', line 8

def void
  self.void_me = true
  self.save
end