Class: Crefo::Service::Report

Inherits:
Crefo::Service show all
Defined in:
lib/crefo/service/report.rb,
lib/crefo/service/report/request.rb,
lib/crefo/service/report/response.rb

Defined Under Namespace

Classes: Request, Response

Instance Attribute Summary

Attributes inherited from Crefo::Service

#log, #options

Instance Method Summary collapse

Methods inherited from Crefo::Service

#process

Constructor Details

#initialize(options) ⇒ Report

Returns a new instance of Report.



4
5
6
7
8
9
10
11
12
13
# File 'lib/crefo/service/report.rb', line 4

def initialize(options)
  raise 'identificationnumber is missing' unless options[:identificationnumber]
  raise 'legitimateinterest is missing' unless options[:legitimateinterest]
  raise 'producttype is missing' unless options[:producttype] || options[:productid]

  options[:reportlanguage] ||= Crefo.config.communicationlanguage
  options[:producttype] ||= "PRTY-#{options.delete(:productid)}"

  super(options)
end