Class: GandiV5::Billing::Info::Prepaid
- Inherits:
-
Object
- Object
- GandiV5::Billing::Info::Prepaid
- Includes:
- Data
- Defined in:
- lib/gandi_v5/billing/info/prepaid.rb
Overview
Account’s prepaid information.
Instance Attribute Summary collapse
-
#amount ⇒ Numeric
readonly
Current amount available in the prepaid account.
-
#created_at ⇒ Time
readonly
Creation date of the prepaid account.
-
#currency ⇒ String
readonly
Currency in use for the prepaid account.
-
#updated_at ⇒ Time
readonly
Last modification date of the prepaid account.
-
#warning_threshold ⇒ Numeric
readonly
Amount under which a warning email is sent.
Instance Method Summary collapse
-
#warning? ⇒ Boolean
Check if current balance is below the warning threshold.
Methods included from Data
#from_gandi, included, #initialize, #to_gandi, #to_h, #values_at
Instance Attribute Details
#amount ⇒ Numeric (readonly)
Returns current amount available in the prepaid account.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/gandi_v5/billing/info/prepaid.rb', line 17 class Prepaid include GandiV5::Data members :amount, :currency, :warning_threshold member :created_at, converter: GandiV5::Data::Converter::Time member :updated_at, converter: GandiV5::Data::Converter::Time # Check if current balance is below the warning threshold. def warning? return nil if warning_threshold.nil? amount < warning_threshold end end |
#created_at ⇒ Time (readonly)
Returns creation date of the prepaid account.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/gandi_v5/billing/info/prepaid.rb', line 17 class Prepaid include GandiV5::Data members :amount, :currency, :warning_threshold member :created_at, converter: GandiV5::Data::Converter::Time member :updated_at, converter: GandiV5::Data::Converter::Time # Check if current balance is below the warning threshold. def warning? return nil if warning_threshold.nil? amount < warning_threshold end end |
#currency ⇒ String (readonly)
Returns currency in use for the prepaid account.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/gandi_v5/billing/info/prepaid.rb', line 17 class Prepaid include GandiV5::Data members :amount, :currency, :warning_threshold member :created_at, converter: GandiV5::Data::Converter::Time member :updated_at, converter: GandiV5::Data::Converter::Time # Check if current balance is below the warning threshold. def warning? return nil if warning_threshold.nil? amount < warning_threshold end end |
#updated_at ⇒ Time (readonly)
Returns last modification date of the prepaid account.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/gandi_v5/billing/info/prepaid.rb', line 17 class Prepaid include GandiV5::Data members :amount, :currency, :warning_threshold member :created_at, converter: GandiV5::Data::Converter::Time member :updated_at, converter: GandiV5::Data::Converter::Time # Check if current balance is below the warning threshold. def warning? return nil if warning_threshold.nil? amount < warning_threshold end end |
#warning_threshold ⇒ Numeric (readonly)
Returns amount under which a warning email is sent.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/gandi_v5/billing/info/prepaid.rb', line 17 class Prepaid include GandiV5::Data members :amount, :currency, :warning_threshold member :created_at, converter: GandiV5::Data::Converter::Time member :updated_at, converter: GandiV5::Data::Converter::Time # Check if current balance is below the warning threshold. def warning? return nil if warning_threshold.nil? amount < warning_threshold end end |
Instance Method Details
#warning? ⇒ Boolean
Check if current balance is below the warning threshold.
25 26 27 28 29 |
# File 'lib/gandi_v5/billing/info/prepaid.rb', line 25 def warning? return nil if warning_threshold.nil? amount < warning_threshold end |