Class: Authentise::Upload

Inherits:
Object
  • Object
show all
Defined in:
lib/authentise/upload.rb

Overview

DEPRECATED

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#centsObject (readonly)

Returns the value of attribute cents.



6
7
8
# File 'lib/authentise/upload.rb', line 6

def cents
  @cents
end

#currencyObject (readonly)

Returns the value of attribute currency.



6
7
8
# File 'lib/authentise/upload.rb', line 6

def currency
  @currency
end

#emailObject (readonly)

Returns the value of attribute email.



6
7
8
# File 'lib/authentise/upload.rb', line 6

def email
  @email
end

#stl_fileObject (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



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

#statusObject



32
33
34
# File 'lib/authentise/upload.rb', line 32

def status
  @status ||= API.get_status(token: token)
end

#tokenObject



20
21
22
# File 'lib/authentise/upload.rb', line 20

def token
  @token ||= API.create_token
end