Class: Chargify::Subscription::Transaction
- Inherits:
-
Base
- Object
- ActiveResource::Base
- Base
- Chargify::Subscription::Transaction
- Defined in:
- lib/chargify_api_ares.rb
Instance Method Summary collapse
Methods inherited from Base
Methods inherited from ActiveResource::Base
Instance Method Details
#full_refund(attrs = {}) ⇒ Object
189 190 191 192 193 194 |
# File 'lib/chargify_api_ares.rb', line 189 def full_refund(attrs = {}) return false if self.transaction_type != 'payment' attrs.merge!(:amount_in_cents => self.amount_in_cents) self.refund(attrs) end |
#refund(attrs = {}) ⇒ Object
196 197 198 199 200 201 |
# File 'lib/chargify_api_ares.rb', line 196 def refund(attrs = {}) return false if self.transaction_type != 'payment' attrs.merge!(:payment_id => self.id) Subscription.find(self.[:subscription_id]).refund(attrs) end |