Class: AkamaiApi::ECCU::FindResponse
- Inherits:
-
Object
- Object
- AkamaiApi::ECCU::FindResponse
- Defined in:
- lib/akamai_api/eccu/find_response.rb
Overview
FindResponse exposes the response received when requesting the details of an Akamai ECCU request
Instance Attribute Summary collapse
-
#raw ⇒ Hash
readonly
Raw response object.
Instance Method Summary collapse
-
#code ⇒ Fixnum
Request code.
-
#email ⇒ String
(also: #status_change_email)
Email to be notified when the request becomes completed.
-
#file ⇒ Hash
Uploaded file details.
-
#initialize(raw) ⇒ FindResponse
constructor
A new instance of FindResponse.
-
#notes ⇒ String
Notes of the request.
-
#property ⇒ Hash
Digital property details.
-
#status ⇒ Hash
Request status.
-
#updated_at ⇒ String
(also: #update_date)
Last time the request was updated.
-
#uploaded_at ⇒ String
(also: #upload_date)
Time the request was uploaded.
-
#uploaded_by ⇒ String
User that submitted the request.
-
#version ⇒ String
(also: #version_string)
version of the request.
Constructor Details
#initialize(raw) ⇒ FindResponse
Returns a new instance of FindResponse.
11 12 13 |
# File 'lib/akamai_api/eccu/find_response.rb', line 11 def initialize raw @raw = raw end |
Instance Attribute Details
#raw ⇒ Hash (readonly)
Raw response object
8 9 10 |
# File 'lib/akamai_api/eccu/find_response.rb', line 8 def raw @raw end |
Instance Method Details
#code ⇒ Fixnum
Request code
17 18 19 |
# File 'lib/akamai_api/eccu/find_response.rb', line 17 def code raw[:file_id] end |
#email ⇒ String Also known as: status_change_email
Email to be notified when the request becomes completed
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/akamai_api/eccu/find_response.rb', line 39 { :notes => :notes, :email => :status_change_email, :updated_at => :update_date, :uploaded_at => :upload_date, :uploaded_by => :uploaded_by, :version => :version_string }.each do |local_field, soap_field| define_method local_field do get_if_handleable(raw[soap_field]) end end |
#file ⇒ Hash
Uploaded file details
63 64 65 66 67 68 69 70 71 |
# File 'lib/akamai_api/eccu/find_response.rb', line 63 def file content64 = get_if_handleable(raw[:contents]) { :content => content64 ? Base64.decode64(content64) : nil, :size => raw[:file_size].to_i, :name => get_if_handleable(raw[:filename]), :md5 => get_if_handleable(raw[:md5_digest]) }.reject { |k, v| v.nil? } end |
#notes ⇒ String
Notes of the request
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/akamai_api/eccu/find_response.rb', line 39 { :notes => :notes, :email => :status_change_email, :updated_at => :update_date, :uploaded_at => :upload_date, :uploaded_by => :uploaded_by, :version => :version_string }.each do |local_field, soap_field| define_method local_field do get_if_handleable(raw[soap_field]) end end |
#property ⇒ Hash
Digital property details
93 94 95 96 97 98 99 |
# File 'lib/akamai_api/eccu/find_response.rb', line 93 def property { :name => get_if_handleable(raw[:property_name]), :exact_match => (raw[:property_name_exact_match] == true), :type => get_if_handleable(raw[:property_type]) }.reject { |k, v| v.nil? } end |
#status ⇒ Hash
Request status
79 80 81 82 83 84 85 86 |
# File 'lib/akamai_api/eccu/find_response.rb', line 79 def status { :extended => get_if_handleable(raw[:extended_status_message]), :code => raw[:status_code].to_i, :message => get_if_handleable(raw[:status_message]), :updated_at => get_if_handleable(raw[:status_update_date]) }.reject { |k, v| v.nil? } end |
#updated_at ⇒ String Also known as: update_date
Last time the request was updated
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/akamai_api/eccu/find_response.rb', line 39 { :notes => :notes, :email => :status_change_email, :updated_at => :update_date, :uploaded_at => :upload_date, :uploaded_by => :uploaded_by, :version => :version_string }.each do |local_field, soap_field| define_method local_field do get_if_handleable(raw[soap_field]) end end |
#uploaded_at ⇒ String Also known as: upload_date
Time the request was uploaded
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/akamai_api/eccu/find_response.rb', line 39 { :notes => :notes, :email => :status_change_email, :updated_at => :update_date, :uploaded_at => :upload_date, :uploaded_by => :uploaded_by, :version => :version_string }.each do |local_field, soap_field| define_method local_field do get_if_handleable(raw[soap_field]) end end |
#uploaded_by ⇒ String
User that submitted the request
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/akamai_api/eccu/find_response.rb', line 39 { :notes => :notes, :email => :status_change_email, :updated_at => :update_date, :uploaded_at => :upload_date, :uploaded_by => :uploaded_by, :version => :version_string }.each do |local_field, soap_field| define_method local_field do get_if_handleable(raw[soap_field]) end end |
#version ⇒ String Also known as: version_string
version of the request
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/akamai_api/eccu/find_response.rb', line 39 { :notes => :notes, :email => :status_change_email, :updated_at => :update_date, :uploaded_at => :upload_date, :uploaded_by => :uploaded_by, :version => :version_string }.each do |local_field, soap_field| define_method local_field do get_if_handleable(raw[soap_field]) end end |