Skip to content

Instantly share code, notes, and snippets.

@philiplambok
Created September 18, 2020 08:55
Show Gist options
  • Save philiplambok/31a7a80f9748bfb6697a02c9c2edb069 to your computer and use it in GitHub Desktop.
Save philiplambok/31a7a80f9748bfb6697a02c9c2edb069 to your computer and use it in GitHub Desktop.
expected_response = {
data: [
{
start_date: '2020-01-01',
end_date: '2020-01-01',
total_items: 1,
amount: 40_000,
amount_formatted: 'Rp 40.000,00'
},
{
start_date: '2020-01-02',
end_date: '2020-01-02',
total_items: 0,
amount: 0,
amount_formatted: 'Rp 0,00'
},
{
start_date: '2020-01-03',
end_date: '2020-01-03',
total_items: 1,
amount: 50_000,
amount_formatted: 'Rp 50.000,00'
}
],
meta: {
total_pages: 1,
total_items: 2,
total_amounts: 90_000,
total_amounts_formatted: 'Rp 90.000,00'
}
}.with_indifferent_access
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment