Class: PensioAPI::Responses::ReservationCapture
- Defined in:
- lib/pensio_api/responses/reservation_capture.rb
Instance Attribute Summary collapse
-
#capture_amount ⇒ Object
readonly
Returns the value of attribute capture_amount.
-
#capture_currency ⇒ Object
readonly
Returns the value of attribute capture_currency.
-
#transaction ⇒ Object
readonly
Returns the value of attribute transaction.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(request) ⇒ ReservationCapture
constructor
A new instance of ReservationCapture.
Methods inherited from Base
Methods included from Mixins::MethodMissing
Constructor Details
#initialize(request) ⇒ ReservationCapture
Returns a new instance of ReservationCapture.
6 7 8 9 10 11 12 13 14 |
# File 'lib/pensio_api/responses/reservation_capture.rb', line 6 def initialize(request) super(request) @transaction = PensioAPI::Transaction.new( transactions['Transaction'] ) @capture_amount = BigDecimal(@raw['CaptureAmount']) @capture_currency = @raw['CaptureCurrency'].to_i end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class PensioAPI::Mixins::MethodMissing
Instance Attribute Details
#capture_amount ⇒ Object (readonly)
Returns the value of attribute capture_amount.
4 5 6 |
# File 'lib/pensio_api/responses/reservation_capture.rb', line 4 def capture_amount @capture_amount end |
#capture_currency ⇒ Object (readonly)
Returns the value of attribute capture_currency.
4 5 6 |
# File 'lib/pensio_api/responses/reservation_capture.rb', line 4 def capture_currency @capture_currency end |
#transaction ⇒ Object (readonly)
Returns the value of attribute transaction.
4 5 6 |
# File 'lib/pensio_api/responses/reservation_capture.rb', line 4 def transaction @transaction end |