diff --git a/config.dhall.sample b/config.dhall.sample index e8b9fd2b549d432204899cbfe92ecf715c065db5..370932a8e1aef0e2a33504bf29a0defb4aaefae4 100644 --- a/config.dhall.sample +++ b/config.dhall.sample @@ -26,6 +26,7 @@ from = "jmp-register@localhost" }, bandwidth_site = "", + bandwidth_peer = "", braintree = { environment = "sandbox", merchant_id = "", diff --git a/lib/bandwidth_tn_order.rb b/lib/bandwidth_tn_order.rb index 7bea69bb46be74dfcc3f070dc331e58d54aaf488..fc8b0011764883f3e4922ec8c649a20a5ed2ceb9 100644 --- a/lib/bandwidth_tn_order.rb +++ b/lib/bandwidth_tn_order.rb @@ -18,13 +18,13 @@ class BandwidthTNOrder end def self.create(tel, name: "sgx-jmp order #{tel}") - bw_tel = tel.sub(/^\+?1?/, "") EM.promise_fiber do Received.new(BandwidthIris::Order.create( name: name, site_id: CONFIG[:bandwidth_site], + peer_id: CONFIG[:bandwidth_peer], existing_telephone_number_order_type: { - telephone_number_list: { telephone_number: [bw_tel] } + telephone_number_list: { telephone_number: [tel.sub(/^\+?1?/, "")] } } )) end