Class: GoCardlessPro::Resources::FundsAvailability
- Inherits:
-
Object
- Object
- GoCardlessPro::Resources::FundsAvailability
- Defined in:
- lib/gocardless_pro/resources/funds_availability.rb
Overview
Checks if the payer's current balance is sufficient to cover the amount the merchant wants to charge within the consent parameters defined on the mandate.
Instance Attribute Summary collapse
-
#available ⇒ Object
readonly
Returns the value of attribute available.
Instance Method Summary collapse
- #api_response ⇒ Object
-
#initialize(object, response = nil) ⇒ FundsAvailability
constructor
Initialize a funds_availability resource instance.
-
#to_h ⇒ Object
Provides the funds_availability resource as a hash of all its readable attributes.
Constructor Details
#initialize(object, response = nil) ⇒ FundsAvailability
Initialize a funds_availability resource instance
21 22 23 24 25 26 |
# File 'lib/gocardless_pro/resources/funds_availability.rb', line 21 def initialize(object, response = nil) @object = object @available = object['available'] @response = response end |
Instance Attribute Details
#available ⇒ Object (readonly)
Returns the value of attribute available.
17 18 19 |
# File 'lib/gocardless_pro/resources/funds_availability.rb', line 17 def available @available end |
Instance Method Details
#api_response ⇒ Object
28 29 30 |
# File 'lib/gocardless_pro/resources/funds_availability.rb', line 28 def api_response ApiResponse.new(@response) end |
#to_h ⇒ Object
Provides the funds_availability resource as a hash of all its readable attributes
33 34 35 |
# File 'lib/gocardless_pro/resources/funds_availability.rb', line 33 def to_h @object end |