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.
60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/mixin_bot/errors.rb', line 60 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.
58 59 60 |
# File 'lib/mixin_bot/errors.rb', line 58 def app_id @app_id end |
#cost ⇒ Object (readonly)
Returns the value of attribute cost.
58 59 60 |
# File 'lib/mixin_bot/errors.rb', line 58 def cost @cost end |
#credit ⇒ Object (readonly)
Returns the value of attribute credit.
58 59 60 |
# File 'lib/mixin_bot/errors.rb', line 58 def credit @credit end |
#increment ⇒ Object (readonly)
Returns the value of attribute increment.
58 59 60 |
# File 'lib/mixin_bot/errors.rb', line 58 def increment @increment end |