wetcat-studios / fortie

Laravel 5 package for Fortnox API
Apache License 2.0
19 stars 20 forks source link

How to make a customer - "Active": false #62

Closed Darrrren closed 4 years ago

Darrrren commented 4 years ago

I'm struggling to find how to change a Customer from "Active": true to "Active": false.

I've tried: $params = ['Active' => 0 ] and $params = ['Active' => false] whilst doing an update() but no luck. Everything else is updating fine.

I can see that the boolean Active field details in the API documentation is not included in the Customers Provider. Has it not been implemented for some reason or is there a method to toggle their status that I haven't found yet? Thanks

agoransson commented 4 years ago

Hi @Darrrren, it could be that the parameter isn't included in the provider - most likely then it's either a) I forgot =) or b) it's more recent than the past few years.

I think it would be a small thing to add though; a PR for changes would be very welcome. =)

Darrrren commented 4 years ago

Hi @agoransson, yeah it's not in the provider unfortunately. I've got around the problem now by connecting directly to the API and using CURL to do that when I need to so I'm up and running again anyway. If I get time for a PR I'll certainly jump in ;-) Thanks for all your hard work on this and greetings from Sätila, just down the road from you!

agoransson commented 4 years ago

I like Sätila, it's a nice area for excursions, a lot of interesting places there to see =)

I'll close this for now then.