Exception: MixinBot::InsufficientAppBillingError
- Defined in:
- lib/mixin_bot/errors.rb
Overview
Raised when app prepaid billing credit lacks headroom for a billed operation.
Instance Attribute Summary collapse
-
#app_id ⇒ Object
readonly
Returns the value of attribute app_id.
-
#cost ⇒ Object
readonly
Returns the value of attribute cost.
-
#credit ⇒ Object
readonly
Returns the value of attribute credit.
-
#increment ⇒ Object
readonly
Returns the value of attribute increment.
Instance Method Summary collapse
-
#initialize(app_id:, credit:, cost:, increment:) ⇒ InsufficientAppBillingError
constructor
A new instance of InsufficientAppBillingError.
Constructor Details
#initialize(app_id:, credit:, cost:, increment:) ⇒ InsufficientAppBillingError
Returns a new instance of InsufficientAppBillingError.
222 223 224 225 226 227 228 229 230 231 232 233 |
# File 'lib/mixin_bot/errors.rb', line 222 def initialize(app_id:, credit:, cost:, increment:) @app_id = app_id @credit = credit @cost = cost @increment = increment super( format( 'app billing insufficient: credit %<credit>s <= cost %<cost>s + increment %<increment>s (app_id=%<app_id>s)', credit:, cost:, increment:, app_id: ) ) end |
Instance Attribute Details
#app_id ⇒ Object (readonly)
Returns the value of attribute app_id.
220 221 222 |
# File 'lib/mixin_bot/errors.rb', line 220 def app_id @app_id end |
#cost ⇒ Object (readonly)
Returns the value of attribute cost.
220 221 222 |
# File 'lib/mixin_bot/errors.rb', line 220 def cost @cost end |
#credit ⇒ Object (readonly)
Returns the value of attribute credit.
220 221 222 |
# File 'lib/mixin_bot/errors.rb', line 220 def credit @credit end |
#increment ⇒ Object (readonly)
Returns the value of attribute increment.
220 221 222 |
# File 'lib/mixin_bot/errors.rb', line 220 def increment @increment end |