Class: DPay::BlikApp
- Inherits:
-
Object
- Object
- DPay::BlikApp
- Defined in:
- lib/dpay/blik/blik_app.rb,
sig/dpay/blik/blik_app.rbs
Instance Attribute Summary collapse
-
#key ⇒ String?
readonly
Returns the value of attribute key.
-
#label ⇒ String?
readonly
Returns the value of attribute label.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ BlikApp
constructor
A new instance of BlikApp.
Constructor Details
#initialize(data) ⇒ BlikApp
Returns a new instance of BlikApp.
11 12 13 14 15 |
# File 'lib/dpay/blik/blik_app.rb', line 11 def initialize(data) @key = data["key"].is_a?(String) ? data["key"] : nil @label = data["label"].is_a?(String) ? data["label"] : nil freeze end |
Instance Attribute Details
#key ⇒ String? (readonly)
Returns the value of attribute key.
5 6 7 |
# File 'lib/dpay/blik/blik_app.rb', line 5 def key @key end |
#label ⇒ String? (readonly)
Returns the value of attribute label.
5 6 7 |
# File 'lib/dpay/blik/blik_app.rb', line 5 def label @label end |
Class Method Details
.from_api(data) ⇒ BlikApp
7 8 9 |
# File 'lib/dpay/blik/blik_app.rb', line 7 def self.from_api(data) new(data) end |