Class: Unit::Statement::GetHtmlByIdRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/unit/models/statement/get_html_by_id_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(statement_id, customer_id, language = nil) ⇒ GetHtmlByIdRequest

Returns a new instance of GetHtmlByIdRequest.

Parameters:

  • statement_id (String)
  • customer_id (String)
  • language (String) (defaults to: nil)


13
14
15
16
17
# File 'lib/unit/models/statement/get_html_by_id_request.rb', line 13

def initialize(statement_id, customer_id, language = nil)
  @statement_id = statement_id
  @customer_id = customer_id
  @language = language
end

Instance Attribute Details

#customer_idObject

Returns the value of attribute customer_id.



8
9
10
# File 'lib/unit/models/statement/get_html_by_id_request.rb', line 8

def customer_id
  @customer_id
end

#languageObject

Returns the value of attribute language.



8
9
10
# File 'lib/unit/models/statement/get_html_by_id_request.rb', line 8

def language
  @language
end

#statement_idObject

Returns the value of attribute statement_id.



8
9
10
# File 'lib/unit/models/statement/get_html_by_id_request.rb', line 8

def statement_id
  @statement_id
end

Instance Method Details

#to_hashObject



19
20
21
22
23
# File 'lib/unit/models/statement/get_html_by_id_request.rb', line 19

def to_hash
  params = { "filter[customerId]": customer_id,
             "language": language }
  params.compact
end