Class: DPay::BlikApp

Inherits:
Object
  • Object
show all
Defined in:
lib/dpay/blik/blik_app.rb,
sig/dpay/blik/blik_app.rbs

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ BlikApp

Returns a new instance of BlikApp.

Parameters:

  • data (Hash[String, untyped])


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

#keyString? (readonly)

Returns the value of attribute key.

Returns:

  • (String, nil)


5
6
7
# File 'lib/dpay/blik/blik_app.rb', line 5

def key
  @key
end

#labelString? (readonly)

Returns the value of attribute label.

Returns:

  • (String, nil)


5
6
7
# File 'lib/dpay/blik/blik_app.rb', line 5

def label
  @label
end

Class Method Details

.from_api(data) ⇒ BlikApp

Parameters:

  • data (Hash[String, untyped])

Returns:



7
8
9
# File 'lib/dpay/blik/blik_app.rb', line 7

def self.from_api(data)
  new(data)
end