Class: AtPay::Token::Registration
- Inherits:
-
Struct
- Object
- Struct
- AtPay::Token::Registration
- Defined in:
- lib/atpay/token/registration.rb
Instance Attribute Summary collapse
-
#session ⇒ Object
Returns the value of attribute session.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(*args) ⇒ Registration
constructor
A new instance of Registration.
- #qrcode_url ⇒ Object
- #short ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(*args) ⇒ Registration
Returns a new instance of Registration.
6 7 8 9 |
# File 'lib/atpay/token/registration.rb', line 6 def initialize(*args) super(*args) registration # The registration should occur even if we don't access a url or id end |
Instance Attribute Details
#session ⇒ Object
Returns the value of attribute session
5 6 7 |
# File 'lib/atpay/token/registration.rb', line 5 def session @session end |
#token ⇒ Object
Returns the value of attribute token
5 6 7 |
# File 'lib/atpay/token/registration.rb', line 5 def token @token end |
Instance Method Details
#id ⇒ Object
19 20 21 |
# File 'lib/atpay/token/registration.rb', line 19 def id registration['id'] end |
#qrcode_url ⇒ Object
15 16 17 |
# File 'lib/atpay/token/registration.rb', line 15 def qrcode_url "#{session.endpoint}/offers/#{registration['id']}.png" end |
#short ⇒ Object
23 24 25 |
# File 'lib/atpay/token/registration.rb', line 23 def short "atpay://#{id}" end |
#url ⇒ Object
11 12 13 |
# File 'lib/atpay/token/registration.rb', line 11 def url registration['url'] end |