Sha256: e7c2853fd755d71f922ca9ef3c78c0a64b8b73c1b1bc4edfcd2d7d3aaa1a3120
Contents?: true
Size: 469 Bytes
Versions: 2
Compression:
Stored size: 469 Bytes
Contents
require "gyoku" module Einvoice module Utils def serialize(object) object.serializable_hash(except: [:errors, :validation_context], include: [:invoice_item, :contact, :customer_defined]) end def wrap(hash) { invoice_root: { invoice: hash } } end def camelize(hash) hash.deep_transform_keys { |k| k.to_s.camelize } end def encode_xml(hash) ::Gyoku.xml(hash, key_converter: :none) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
einvoice-0.2.8 | lib/einvoice/utils.rb |
einvoice-0.2.0 | lib/einvoice/utils.rb |