class Tenios::API::Number
Constants
- NUMBER_TYPES
- ORDER_OPTIONS
Attributes
client[R]
Public Class Methods
new(client)
click to toggle source
# File lib/tenios/api/number.rb, line 8 def initialize(client) @client = client end
Public Instance Methods
cancel(phone_number:)
click to toggle source
# File lib/tenios/api/number.rb, line 21 def cancel(phone_number:) client.post("/number/cancel", phone_number: phone_number) end
order(verification_id:, number_type: GEOGRAPHICAL, **options)
click to toggle source
# File lib/tenios/api/number.rb, line 16 def order(verification_id:, number_type: GEOGRAPHICAL, **options) payload = order_payload(verification_id: verification_id, number_type: number_type, **options) client.post("/number/order", **payload) end
Private Instance Methods
order_payload(**options)
click to toggle source
# File lib/tenios/api/number.rb, line 36 def order_payload(**options) options.slice(*ORDER_OPTIONS) end