object @payment_history

child :sale do
  attributes :id, :recurly_invoice_id, :recurly_subtotal_in_cents, :recurly_tax_in_cents, :recurly_total_in_cents, :recurly_currency, :sale_type, :recurly_invoice_number, :state, :created_at, :source

  child(:sale_line_items => :line_items) {
    attributes :id, :product_info
  }

end

child(:recurly_transaction_web_hook => :transaction) do
  attributes :id, :transaction_type, :subscription_id, :amount_in_cents, :invoice_id, :admin_description, :message, :transaction_at, :admin_description
end
