Class: AppnexusApi::LogLevelDataResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/appnexusapi/log_level_data_resource.rb

Instance Attribute Summary

Attributes inherited from Resource

#dbg_info

Instance Method Summary collapse

Methods inherited from Resource

#delete, #initialize, #method_missing, #raw_json, #to_s, #update

Constructor Details

This class inherits a constructor from AppnexusApi::Resource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class AppnexusApi::Resource

Instance Method Details

#download_paramsObject

Extract an array of hashes of params to pass to the LogLevelDownloadService



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/appnexusapi/log_level_data_resource.rb', line 3

def download_params
  fail 'Missing necessaray information!' unless name && hour && timestamp && splits

  splits.map do |split_part|
    # In the case of regenerated files, there should be no checksum.  These replaced hourly files should not be downloaded.
    next nil if split_part['checksum'].blank?

    {
      split_part: split_part['part'],
      siphon_name: name,
      timestamp: timestamp,
      hour: hour,
      checksum: split_part['checksum']
    }
  end.compact
end