Class: Twilio::REST::Numbers::V2::BulkHostedNumberOrderContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Numbers::V2::BulkHostedNumberOrderContext
- Defined in:
- lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb
Instance Method Summary collapse
-
#fetch(order_status: :unset) ⇒ BulkHostedNumberOrderInstance
Fetch the BulkHostedNumberOrderInstance.
-
#initialize(version, bulk_hosting_sid) ⇒ BulkHostedNumberOrderContext
constructor
Initialize the BulkHostedNumberOrderContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, bulk_hosting_sid) ⇒ BulkHostedNumberOrderContext
Initialize the BulkHostedNumberOrderContext
69 70 71 72 73 74 75 76 77 |
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 69 def initialize(version, bulk_hosting_sid) super(version) # Path Solution @solution = { bulk_hosting_sid: bulk_hosting_sid, } @uri = "/HostedNumber/Orders/Bulk/#{@solution[:bulk_hosting_sid]}" end |
Instance Method Details
#fetch(order_status: :unset) ⇒ BulkHostedNumberOrderInstance
Fetch the BulkHostedNumberOrderInstance
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 82 def fetch( order_status: :unset ) params = Twilio::Values.of({ 'OrderStatus' => order_status, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, params: params, headers: headers) BulkHostedNumberOrderInstance.new( @version, payload, bulk_hosting_sid: @solution[:bulk_hosting_sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
113 114 115 116 |
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 113 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V2.BulkHostedNumberOrderContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
106 107 108 109 |
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 106 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V2.BulkHostedNumberOrderContext #{context}>" end |