Class: Invoiced::Transaction
- Defined in:
- lib/invoiced/transaction.rb
Instance Attribute Summary
Attributes inherited from Object
Instance Method Summary collapse
Methods included from Operations::Delete
Methods included from Operations::Update
Methods included from Operations::Create
Methods included from Operations::List
Methods inherited from Object
#[], #[]=, #add_accessors, #each, #endpoint, #endpoint_base, #initialize, #inspect, #keys, #load, #metaclass, #method_missing, #refresh_from, #remove_accessors, #retrieve, #set_endpoint_base, #to_hash, #to_json, #to_s, #values
Constructor Details
This class inherits a constructor from Invoiced::Object
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Invoiced::Object
Instance Method Details
#refund(opts = {}) ⇒ Object
16 17 18 19 20 |
# File 'lib/invoiced/transaction.rb', line 16 def refund(opts={}) response = @client.request(:post, "#{self.endpoint()}/refunds", opts) Util.convert_to_object(self, response[:body]) end |
#send(opts = {}) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/invoiced/transaction.rb', line 8 def send(opts={}) response = @client.request(:post, "#{self.endpoint()}/emails", opts) # build email objects email = Email.new(@client) Util.build_objects(email, response[:body]) end |