Skip to content

Commit

Permalink
Regenerate libraries with latest defintions
Browse files Browse the repository at this point in the history
  • Loading branch information
jingming committed Sep 15, 2016
1 parent 5f022e3 commit b37bfe8
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 25 deletions.
8 changes: 4 additions & 4 deletions lib/twilio-ruby/jwt/access_token.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ def key
def payload
payload = {}

if @service_sid
payload['service_sid'] = @service_sid
if service_sid
payload['service_sid'] = service_sid
end
if @endpoint_id
payload['endpoint_id'] = @endpoint_id
if endpoint_id
payload['endpoint_id'] = endpoint_id
end

payload
Expand Down
14 changes: 7 additions & 7 deletions lib/twilio-ruby/rest/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def initialize(username=nil, password=nil, account_sid=nil, http_client=Twilio::

# Domains
@api = nil
@ip_messaging = nil
@chat = nil
@ip_messaging = nil
@lookups = nil
@monitor = nil
@notify = nil
Expand Down Expand Up @@ -72,18 +72,18 @@ def api
@api ||= Api.new self
end

##
# Access the IpMessaging Twilio Domain
def ip_messaging
@ip_messaging ||= IpMessaging.new self
end

##
# Access the Chat Twilio Domain
def chat
@chat ||= Chat.new self
end

##
# Access the IpMessaging Twilio Domain
def ip_messaging
@ip_messaging ||= IpMessaging.new self
end

##
# Access the Lookups Twilio Domain
def lookups
Expand Down
18 changes: 9 additions & 9 deletions lib/twilio-ruby/rest/preview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,8 @@ def initialize(twilio)
@port = 443

# Versions
@sync = nil
@wireless = nil
end

##
# Version sync of preview
def sync
@sync ||= Sync.new self
@sync = nil
end

##
Expand All @@ -33,8 +27,10 @@ def wireless
@wireless ||= Wireless.new self
end

def services
self.sync.services
##
# Version sync of preview
def sync
@sync ||= Sync.new self
end

def commands
Expand All @@ -49,6 +45,10 @@ def rate_plans
self.wireless.rate_plans
end

def services
self.sync.services
end

##
# Provide a user friendly representation
def to_s
Expand Down
17 changes: 14 additions & 3 deletions lib/twilio-ruby/rest/preview/sync/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ def initialize(version)
# Request is executed immediately.
# @param [String] friendly_name The friendly_name
# @param [String] webhook_url The webhook_url
# @param [Boolean] reachability_webhooks_enabled The reachability_webhooks_enabled
# @return [ServiceInstance] Newly created ServiceInstance
def create(friendly_name: nil, webhook_url: nil)
def create(friendly_name: nil, webhook_url: nil, reachability_webhooks_enabled: nil)
data = {
'FriendlyName' => friendly_name,
'WebhookUrl' => webhook_url,
'ReachabilityWebhooksEnabled' => reachability_webhooks_enabled,
}

payload = @version.create(
Expand Down Expand Up @@ -217,11 +219,13 @@ def delete
# Update the ServiceInstance
# @param [String] webhook_url The webhook_url
# @param [String] friendly_name The friendly_name
# @param [Boolean] reachability_webhooks_enabled The reachability_webhooks_enabled
# @return [ServiceInstance] Updated ServiceInstance
def update(webhook_url: nil, friendly_name: nil)
def update(webhook_url: nil, friendly_name: nil, reachability_webhooks_enabled: nil)
data = {
'WebhookUrl' => webhook_url,
'FriendlyName' => friendly_name,
'ReachabilityWebhooksEnabled' => reachability_webhooks_enabled,
}

payload = @version.update(
Expand Down Expand Up @@ -330,6 +334,7 @@ def initialize(version, payload, sid: nil)
'date_updated' => Twilio.deserialize_iso8601(payload['date_updated']),
'url' => payload['url'],
'webhook_url' => payload['webhook_url'],
'reachability_webhooks_enabled' => payload['reachability_webhooks_enabled'],
'links' => payload['links'],
}

Expand Down Expand Up @@ -383,6 +388,10 @@ def webhook_url
@properties['webhook_url']
end

def reachability_webhooks_enabled
@properties['reachability_webhooks_enabled']
end

def links
@properties['links']
end
Expand All @@ -405,11 +414,13 @@ def delete
# Update the ServiceInstance
# @param [String] webhook_url The webhook_url
# @param [String] friendly_name The friendly_name
# @param [Boolean] reachability_webhooks_enabled The reachability_webhooks_enabled
# @return [ServiceInstance] Updated ServiceInstance
def update(webhook_url: nil, friendly_name: nil)
def update(webhook_url: nil, friendly_name: nil, reachability_webhooks_enabled: nil)
context.update(
webhook_url: webhook_url,
friendly_name: friendly_name,
reachability_webhooks_enabled: reachability_webhooks_enabled,
)
end

Expand Down
8 changes: 6 additions & 2 deletions lib/twilio-ruby/rest/preview/wireless/device.rb
Original file line number Diff line number Diff line change
Expand Up @@ -245,17 +245,19 @@ def fetch
# @param [String] callback_method The callback_method
# @param [String] callback_url The callback_url
# @param [String] friendly_name The friendly_name
# @param [String] rate_plan The rate_plan
# @param [String] sim_identifier The sim_identifier
# @param [String] status The status
# @param [String] commands_callback_method The commands_callback_method
# @param [String] commands_callback_url The commands_callback_url
# @return [DeviceInstance] Updated DeviceInstance
def update(alias_: nil, callback_method: nil, callback_url: nil, friendly_name: nil, sim_identifier: nil, status: nil, commands_callback_method: nil, commands_callback_url: nil)
def update(alias_: nil, callback_method: nil, callback_url: nil, friendly_name: nil, rate_plan: nil, sim_identifier: nil, status: nil, commands_callback_method: nil, commands_callback_url: nil)
data = {
'Alias' => alias_,
'CallbackMethod' => callback_method,
'CallbackUrl' => callback_url,
'FriendlyName' => friendly_name,
'RatePlan' => rate_plan,
'SimIdentifier' => sim_identifier,
'Status' => status,
'CommandsCallbackMethod' => commands_callback_method,
Expand Down Expand Up @@ -407,17 +409,19 @@ def fetch
# @param [String] callback_method The callback_method
# @param [String] callback_url The callback_url
# @param [String] friendly_name The friendly_name
# @param [String] rate_plan The rate_plan
# @param [String] sim_identifier The sim_identifier
# @param [String] status The status
# @param [String] commands_callback_method The commands_callback_method
# @param [String] commands_callback_url The commands_callback_url
# @return [DeviceInstance] Updated DeviceInstance
def update(alias_: nil, callback_method: nil, callback_url: nil, friendly_name: nil, sim_identifier: nil, status: nil, commands_callback_method: nil, commands_callback_url: nil)
def update(alias_: nil, callback_method: nil, callback_url: nil, friendly_name: nil, rate_plan: nil, sim_identifier: nil, status: nil, commands_callback_method: nil, commands_callback_url: nil)
context.update(
alias_: alias_,
callback_method: callback_method,
callback_url: callback_url,
friendly_name: friendly_name,
rate_plan: rate_plan,
sim_identifier: sim_identifier,
status: status,
commands_callback_method: commands_callback_method,
Expand Down

0 comments on commit b37bfe8

Please sign in to comment.