Class: Avmtrf1::Red::Profile

Inherits:
Object
  • Object
show all
Includes:
Helper
Defined in:
lib/avmtrf1/red/profile.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Helper

#post, #post_xml, #xml_content, #xml_path

Constructor Details

#initialize(client, metadados) ⇒ Object

Parameters:



25
# File 'lib/avmtrf1/red/profile.rb', line 25

common_constructor :client, :metadados

Class Method Details

.by_ini_profile(ini_profile) ⇒ Object



14
15
16
17
18
19
# File 'lib/avmtrf1/red/profile.rb', line 14

def by_ini_profile(ini_profile)
  new(
    ::Avmtrf1::Red::Client.by_ini_profile(ini_profile),
    ini_profile.to_h('metadados.')
  )
end

Instance Method Details

#put_file(file_path) ⇒ Object



27
28
29
30
31
# File 'lib/avmtrf1/red/profile.rb', line 27

def put_file(file_path)
  auth_url = client.authorization_url
  infov 'Authorization URL', auth_url
  put_file_request(auth_url, file_path)
end