smsapi / smsapi-php-client

SMSAPI PHP client that allows you to send messages, manage Short URLs and administrate your SMSAPI account.
https://www.smsapi.pl
Other
64 stars 39 forks source link

Custom Contact fields cannot be set. #76

Closed dudzio12 closed 4 years ago

dudzio12 commented 6 years ago

As long as I can define new - custom fields for Contact from Smsapi's back office - I should be able to set those via Api. Magic getter/setter should be implemented.

pdzieniszewski commented 6 years ago

Hi, did you try class FieldAdd ? It should be helpful. https://github.com/smsapi/smsapi-php-client/blob/master/smsapi/Api/Action/Contacts/FieldAdd.php

dudzio12 commented 6 years ago

Sorry - I might not explain it good enough.

I'm currently writing Magento <-> Smsapi newsletter subscribers synchronization.

I have database of newsletter recipients which I want to send to SMSApi. I created custom field "customer_id"(from back office) and I want to send(create) customer_id values too - not only those implemented here: https://github.com/smsapi/smsapi-php-client/blob/master/smsapi/Api/Action/Contacts/ContactAdd.php

Tried with simple setCustomerId($int), but it returns Exception as expected. I now how to fix it for my needs - but since you can create custom fields - you should be able to send it by Api.

pdzieniszewski commented 6 years ago

Thanks for explanation. We will fix it soon.

dudzio12 commented 6 years ago

Thanks.

Please check other issue #77 which is more trivial, but also more problematic at the moment.