Class: YandexCheckout::Response
- Inherits:
-
Object
- Object
- YandexCheckout::Response
show all
- Extended by:
- Dry::Initializer
- Defined in:
- lib/yandex-checkout/response.rb
Class Method Summary
collapse
Class Method Details
.build(*res) ⇒ Object
10
11
12
13
|
# File 'lib/yandex-checkout/response.rb', line 10
def build(*res)
body = res.last
new JSON.parse(body.first)
end
|
.new(opts) ⇒ Object
15
16
17
|
# File 'lib/yandex-checkout/response.rb', line 15
def new(opts)
super opts.each_with_object({}) { |(key, val), obj| obj[key.to_sym] = val }
end
|