- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PHP API - Setting Billing Phone & Company in a Subscription
I can't seem to find the right API methods to allow me to set a customer's billing company and billing phone number. When I used the CustomerAddressType and called setPhoneNumber(), I received an error about it not being a valid child of that namespace.
When subscriptions are created via the API, I see the "phone" and "company" are blank - how can I set them into an ARB subscription via the API?
The email field is also blank and I would like to populate that progamatically with the newly created subscription.
โ07-26-2019 05:52 AM - edited โ07-26-2019 05:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is the exact error
The element 'billTo' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'phoneNumber' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.
From this code;
...
$customerAddress->setCountry($countryCode);
$customerAddress->setPhoneNumber($phoneNumber);
$subscription->setBillTo($customerAddress);
โ07-26-2019 06:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The phone number goes in as a property of a customerDataType object, if I remember correctly. You are putting in the company correctly.
โ07-27-2019 11:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
โ07-27-2019 11:54 AM