Method: Billomat::Models::Base#wrapped_data

Defined in:
lib/billomat/models/base.rb

#wrapped_dataHash

Wraps the data so the API accepts the request.

Examples:

some_invoice.wrapped_data
#=> { "invoice" => { "id" => "12345"  } }

Returns:

  • (Hash)

    the wrapped data



99
100
101
# File 'lib/billomat/models/base.rb', line 99

def wrapped_data
  { self.class.resource_name => @data.to_h }
end