Class: Einvoice::Neweb::Model::Query

Inherits:
Base
  • Object
show all
Defined in:
lib/einvoice/neweb/model/query.rb

Constant Summary collapse

VALID_OPTIONS_KEYS =
[
  :invoice_date_time_s,
  :invoice_date_time_e,
  :data_number_s,
  :data_number_e,
  :sync_status_update
].freeze

Instance Method Summary collapse

Methods inherited from Base

#attributes

Methods included from Validator

#valid_float?

Constructor Details

#initializeQuery

Returns a new instance of Query.



21
22
23
# File 'lib/einvoice/neweb/model/query.rb', line 21

def initialize
  # overwritten
end

Instance Method Details

#attributes=(hash) ⇒ Object



25
26
27
28
29
# File 'lib/einvoice/neweb/model/query.rb', line 25

def attributes=(hash)
  hash.each do |key, value|
    send("#{key}=", value)
  end
end

#payloadObject



31
32
33
# File 'lib/einvoice/neweb/model/query.rb', line 31

def payload
  serializable_hash(except: [:errors, :validation_context])
end

#wrapped_payloadObject



35
36
37
38
39
# File 'lib/einvoice/neweb/model/query.rb', line 35

def wrapped_payload
  { invoice_map_root:
    { invoice_map: payload }
  }
end