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
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/gocardless_pro/resources/negative_balance_limit.rb', line 25 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.
18 19 20 |
# File 'lib/gocardless_pro/resources/negative_balance_limit.rb', line 18 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.
20 21 22 |
# File 'lib/gocardless_pro/resources/negative_balance_limit.rb', line 20 def currency @currency end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
21 22 23 |
# File 'lib/gocardless_pro/resources/negative_balance_limit.rb', line 21 def id @id end |
Instance Method Details
#api_response ⇒ Object
36 37 38 |
# File 'lib/gocardless_pro/resources/negative_balance_limit.rb', line 36 def api_response ApiResponse.new(@response) end |
#links ⇒ Object
Return the links that the resource has
41 42 43 |
# File 'lib/gocardless_pro/resources/negative_balance_limit.rb', line 41 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
46 47 48 |
# File 'lib/gocardless_pro/resources/negative_balance_limit.rb', line 46 def to_h @object end |