Class: GoCardlessPro::Resources::NegativeBalanceLimit
- Inherits:
-
Object
- Object
- GoCardlessPro::Resources::NegativeBalanceLimit
- Defined in:
- lib/gocardless_pro/resources/negative_balance_limit.rb
Overview
The negative balance limit is a threshold for the creditor balance beyond which refunds are not permitted. The default limit is zero — refunds are not permitted if the creditor has a negative balance. The limit can be changed on a per-creditor basis.
Defined Under Namespace
Classes: Links
Instance Attribute Summary collapse
-
#balance_limit ⇒ Object
readonly
Returns the value of attribute balance_limit.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #api_response ⇒ Object
-
#initialize(object, response = nil) ⇒ NegativeBalanceLimit
constructor
Initialize a negative_balance_limit resource instance.
-
#links ⇒ Object
Return the links that the resource has.
-
#to_h ⇒ Object
Provides the negative_balance_limit resource as a hash of all its readable attributes.
Constructor Details
#initialize(object, response = nil) ⇒ NegativeBalanceLimit
Initialize a negative_balance_limit resource instance
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/gocardless_pro/resources/negative_balance_limit.rb', line 23 def initialize(object, response = nil) @object = object @balance_limit = object['balance_limit'] @created_at = object['created_at'] @currency = object['currency'] @id = object['id'] @links = object['links'] @response = response end |
Instance Attribute Details
#balance_limit ⇒ Object (readonly)
Returns the value of attribute balance_limit.
19 20 21 |
# File 'lib/gocardless_pro/resources/negative_balance_limit.rb', line 19 def balance_limit @balance_limit end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
19 20 21 |
# File 'lib/gocardless_pro/resources/negative_balance_limit.rb', line 19 def created_at @created_at end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
19 20 21 |
# File 'lib/gocardless_pro/resources/negative_balance_limit.rb', line 19 def currency @currency end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
19 20 21 |
# File 'lib/gocardless_pro/resources/negative_balance_limit.rb', line 19 def id @id end |
Instance Method Details
#api_response ⇒ Object
34 35 36 |
# File 'lib/gocardless_pro/resources/negative_balance_limit.rb', line 34 def api_response ApiResponse.new(@response) end |
#links ⇒ Object
Return the links that the resource has
39 40 41 |
# File 'lib/gocardless_pro/resources/negative_balance_limit.rb', line 39 def links @negative_balance_limit_links ||= Links.new(@links) end |
#to_h ⇒ Object
Provides the negative_balance_limit resource as a hash of all its readable attributes
44 45 46 |
# File 'lib/gocardless_pro/resources/negative_balance_limit.rb', line 44 def to_h @object end |