Class: Twilio::REST::Numbers::V2::BulkHostedNumberOrderContext

Inherits:
InstanceContext
  • Object
show all
Defined in:
lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb

Overview

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Instance Method Summary collapse

Constructor Details

#initialize(version, bulk_hosting_sid) ⇒ BulkHostedNumberOrderContext

Initialize the BulkHostedNumberOrderContext

Parameters:

  • version (Version)

    Version that contains the resource

  • bulk_hosting_sid (String)

    A 34 character string that uniquely identifies this BulkHostedNumberOrder.



50
51
52
53
54
55
56
57
58
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 50

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

Parameters:

Returns:



63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 63

def fetch(
    order_status: :unset
)

    params = Twilio::Values.of({
        'OrderStatus' => order_status,
    })
    payload = @version.fetch('GET', @uri, params: params)
    BulkHostedNumberOrderInstance.new(
        @version,
        payload,
        bulk_hosting_sid: @solution[:bulk_hosting_sid],
    )
end

#inspectObject

Provide a detailed, user friendly representation



88
89
90
91
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 88

def inspect
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Numbers.V2.BulkHostedNumberOrderContext #{context}>"
end

#to_sObject

Provide a user friendly representation



81
82
83
84
# File 'lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb', line 81

def to_s
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.Numbers.V2.BulkHostedNumberOrderContext #{context}>"
end