Class: Authentise::Upload
- Inherits:
-
Object
- Object
- Authentise::Upload
- Defined in:
- lib/authentise/upload.rb
Overview
DEPRECATED
Instance Attribute Summary collapse
-
#cents ⇒ Object
readonly
Returns the value of attribute cents.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#stl_file ⇒ Object
readonly
Returns the value of attribute stl_file.
Instance Method Summary collapse
-
#initialize(stl_file: nil, email: nil, cents: nil, currency: nil, token: nil) ⇒ Upload
constructor
A new instance of Upload.
- #link_url ⇒ Object
- #status ⇒ Object
- #token ⇒ Object
Constructor Details
#initialize(stl_file: nil, email: nil, cents: nil, currency: nil, token: nil) ⇒ Upload
Returns a new instance of Upload.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/authentise/upload.rb', line 8 def initialize(stl_file: nil, email: nil, cents: nil, currency: nil, token: nil) @stl_file = stl_file @email = email @cents = cents @currency = currency @token = token end |
Instance Attribute Details
#cents ⇒ Object (readonly)
Returns the value of attribute cents.
6 7 8 |
# File 'lib/authentise/upload.rb', line 6 def cents @cents end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
6 7 8 |
# File 'lib/authentise/upload.rb', line 6 def currency @currency end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
6 7 8 |
# File 'lib/authentise/upload.rb', line 6 def email @email end |
#stl_file ⇒ Object (readonly)
Returns the value of attribute stl_file.
6 7 8 |
# File 'lib/authentise/upload.rb', line 6 def stl_file @stl_file end |
Instance Method Details
#link_url ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/authentise/upload.rb', line 24 def link_url @upload_url ||= API.upload_file(file: stl_file, token: token, email: email, cents: cents, currency: currency) end |
#status ⇒ Object
32 33 34 |
# File 'lib/authentise/upload.rb', line 32 def status @status ||= API.get_status(token: token) end |
#token ⇒ Object
20 21 22 |
# File 'lib/authentise/upload.rb', line 20 def token @token ||= API.create_token end |