Hi is first time I use Xero API module, well I was trying to use xero_make() for generate invoice structure just the same as the docs say:

$invoice = xero_make('invoice', 'recommended', array('name', 2));

Well the returned array is always the same minimal arrya, it just has type and contact, it returns the minimal $size, I tried changing the $size to 'all' but did not work, I did a dpm($size) in xero.make.inc in the function xero_make_invoice and the $size is always 'minimal'

so I had to hack the file and add 'recommended' as default instead of 'minimal'

Please how to fix this?

Comments

mradcliffe’s picture

Project: Commerce Xero » Xero API
Status: Active » Needs review
StatusFileSize
new933 bytes

Thank you for the bug report. It looks like there are two issues:

1. The documentation I wrote is incorrect and xero_make_invoice is only "all" or "minimal.
2. xero_make is always passing in minimal.

I need to run this patch through my automated tests, but this should work.

mradcliffe’s picture

Passes validation test. Could you apply the patch and see if it works for you, @ssoulless?

ssoulless’s picture

Status: Needs review » Reviewed & tested by the community

Yup worked like a charm please commit it so I can delete my hacked solution jeje thanks!

  • mradcliffe committed 740a703 on 7.x-1.x
    Iuessy #2466443 by mradcliffe, ssouless: Fix xero make to not always...
mradcliffe’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.