Here, invoice1 is the parent of invoice2:
invoice1 = Fortnox::API::Model::Invoice.new(customer_number: '1')
invoice2 = invoice1.update(due_date: '2023-01-01')
We have:
puts invoice2.customer_number # 1
puts invoice2.due_date # 2023-01-01
However, when saving invoice2:
Fortnox::API::Repository::Invoice.new.save(invoice2)
the following data is posted via POST /3/invoices/:
{"Invoice": {"DueDate": "2023-01-01"}}
but shouldn't the following data be posted or am I missing something?:
{"Invoice"=>{"CustomerNumber"=>"1", "DueDate"=>"2023-01-01"}}