@@ -84,13 +84,13 @@ export default class AvaTaxClient {
8484 } ,
8585 body : JSON . stringify ( payload )
8686 } ) . then ( res => {
87- var contentType = res . headers . _headers [ 'content-type' ] [ 0 ] ;
87+ var contentType = res . headers . _headers [ 'content-type' ] [ 0 ] ;
8888
8989 if ( contentType === 'application/vnd.ms-excel' || contentType === 'text/csv' ) {
90- {
91- return res ;
90+ return res ;
91+ } else {
92+ return res . json ( ) ;
9293 }
93- return res . json ( ) ;
9494 } )
9595 . then ( json => {
9696 // handle error
@@ -1870,7 +1870,7 @@ export default class AvaTaxClient {
18701870 *
18711871 * @return FetchResult
18721872 */
1873- listMrsCompanies ( { } = { } ) {
1873+ listMrsCompanies ( { } = { } ) {
18741874 var path = this . buildUrl ( {
18751875 url : `/api/v2/companies/mrs` ,
18761876 parameters : { }
@@ -3200,7 +3200,7 @@ export default class AvaTaxClient {
32003200 *
32013201 * @return FetchResult
32023202 */
3203- listCrossBorderSections ( { } = { } ) {
3203+ listCrossBorderSections ( { } = { } ) {
32043204 var path = this . buildUrl ( {
32053205 url : `/api/v2/definitions/crossborder/sections` ,
32063206 parameters : { }
@@ -9745,7 +9745,7 @@ export default class AvaTaxClient {
97459745 *
97469746 * @return FetchResult
97479747 */
9748- listMySubscriptions ( { } = { } ) {
9748+ listMySubscriptions ( { } = { } ) {
97499749 var path = this . buildUrl ( {
97509750 url : `/api/v2/utilities/subscriptions` ,
97519751 parameters : { }
@@ -9780,7 +9780,7 @@ export default class AvaTaxClient {
97809780 *
97819781 * @return object
97829782 */
9783- ping ( { } = { } ) {
9783+ ping ( { } = { } ) {
97849784 var path = this . buildUrl ( {
97859785 url : `/api/v2/utilities/ping` ,
97869786 parameters : { }
0 commit comments