Class: PensioAPI::Responses::SubscriptionCharge

Inherits:
Transaction show all
Extended by:
Forwardable
Defined in:
lib/pensio_api/responses/subscription_charge.rb

Instance Attribute Summary

Attributes inherited from Base

#raw

Instance Method Summary collapse

Methods inherited from Transaction

#initialize

Methods included from Mixins::HasTransactions

included, #last

Methods inherited from Base

#initialize, #success?

Methods included from Mixins::MethodMissing

#method_missing

Constructor Details

This class inherits a constructor from PensioAPI::Responses::Transaction

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class PensioAPI::Mixins::MethodMissing

Instance Method Details

#eachObject



8
9
10
# File 'lib/pensio_api/responses/subscription_charge.rb', line 8

def each
  [existing, new].each { |t| yield t }
end

#existingObject



12
13
14
# File 'lib/pensio_api/responses/subscription_charge.rb', line 12

def existing
  @transactions.first
end

#newObject



16
17
18
# File 'lib/pensio_api/responses/subscription_charge.rb', line 16

def new
  @transactions.last
end