Class: Zaala::API::Token
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Zaala::API::Token
- Defined in:
- lib/zaala/api/types.rb
Overview
Contains token information for authorizations with payment method ONACCOUNT.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_message(h) ⇒ Object
447 448 449 450 451 452 453 |
# File 'lib/zaala/api/types.rb', line 447 def self.(h) Token.new({ id: h[:tokenId], secret: h[:tokenSecret], expiry_date: h[:tokenExpiryDate], }) end |
Instance Method Details
#to_message ⇒ Object
455 456 457 458 459 460 461 462 |
# File 'lib/zaala/api/types.rb', line 455 def m = { tokenId: id, tokenSecret: secret, } m[:tokenExpiryDate] = expiry_date unless expiry_date.nil? m end |