~singpolyma/sgx-jmp

1e8eef21b75ce11b2368b2fbd43009a85ba94f31 — Stephen Paul Weber 9 months ago 5b36a8c
Set location (API calls it "SipPeer") on new TN orders
2 files changed, 3 insertions(+), 2 deletions(-)

M config.dhall.sample
M lib/bandwidth_tn_order.rb
M config.dhall.sample => config.dhall.sample +1 -0
@@ 26,6 26,7 @@
		from = "jmp-register@localhost"
	},
	bandwidth_site = "",
	bandwidth_peer = "",
	braintree = {
		environment = "sandbox",
		merchant_id = "",

M lib/bandwidth_tn_order.rb => lib/bandwidth_tn_order.rb +2 -2
@@ 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