Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't order multiple number #63

Open
klals opened this issue Dec 1, 2023 · 4 comments
Open

Don't order multiple number #63

klals opened this issue Dec 1, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@klals
Copy link

klals commented Dec 1, 2023

Description

I Try to create order with multiple number using this library but i order only one order.
herer is my sample code snippet:-
var order = {
name:"A Test Order",
siteId: selectedSite,
existingTelephoneNumberOrderType: {
telephoneNumberList: [
{ telephoneNumber: number },
{ telephoneNumber: number }
]
}
};

numbers.Order.create(order, function (err, res) {
if (err) {
console.log("Error: " + err);
} else {
console.log("Order successfully created");
}
});

so, please give some suggestion or help to resolve this issue.

@klals klals added the bug Something isn't working label Dec 1, 2023
@klals klals closed this as completed Dec 1, 2023
@klals klals closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2023
@klals
Copy link
Author

klals commented Dec 1, 2023

.

@ajrice6713
Copy link
Contributor

ajrice6713 commented Dec 1, 2023

Hey @klals - looks like you closed this issue, do you still need help getting set up with number ordering?

@klals
Copy link
Author

klals commented Dec 6, 2023

Hey @ajrice6713,
I resolve above issue but i want to create E911 order using this library but in documentation i didn't found so please help me of sample code.
in bandwidth documentation i check all data pass in xml format but i want to create order using this library

https://dev.bandwidth.com/apis/numbers/#tag/E911/operation/CreateE911Order

@klals klals reopened this Dec 6, 2023
@ckoegel
Copy link
Contributor

ckoegel commented Dec 6, 2023

Hi @klals The ability to create an E911 order is not currently supported by this SDK. I've added this to our backlog. For the time being, I'd recommend using axios to make the request, following the example payload shown in the spec. I've provided a code snippet below.

const axios = require('axios');
const accountId = 'your account id';

const instance = axios.create({
    baseURL: 'https://dashboard.bandwidth.com/api/v1/',
    timeout: 1000,
    headers: {'Content-Type': 'application/xml'}
});

instance.post(`/accounts/${accountId}/e911s`, `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<E911Order>
  <CustomerOrderId>CustomOrderId1</CustomerOrderId>
  <TelephoneNumbers>
    <TelephoneNumber>9706542332</TelephoneNumber>
    <TelephoneNumber>9706542333</TelephoneNumber>
  </TelephoneNumbers>
  <DeleteTNSpecificE911Address>true</DeleteTNSpecificE911Address>
</E911Order>`);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants