Class: Twilio::REST::Webhooks::V1::SettingInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Webhooks::V1::SettingInstance
- Defined in:
- lib/twilio-ruby/rest/webhooks/v1/setting.rb
Instance Method Summary collapse
- #auth ⇒ AuthSetting
- #code ⇒ String
-
#connection ⇒ ConnectionSetting
HTTP connection settings.
-
#context ⇒ SettingContext
Generate an instance context for the instance, the context is capable of performing various actions.
- #created_at ⇒ Time
-
#delete ⇒ Boolean
Delete the SettingInstance.
-
#description ⇒ String
Optional description of the Setting's purpose and usage.
- #detail ⇒ String
-
#edge_zones ⇒ EdgeZones
Edge zone configuration for webhook delivery.
-
#fetch ⇒ SettingInstance
Fetch the SettingInstance.
-
#friendly_name ⇒ String
Human-readable name.
-
#id ⇒ String
Unique Setting identifier (TypeID/TTID format).
-
#initialize(version, payload, setting_id: nil) ⇒ SettingInstance
constructor
Initialize the SettingInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#patch(patch_setting: nil) ⇒ SettingInstance
Patch the SettingInstance.
- #signature ⇒ SignatureSetting
- #status ⇒ String
- #title ⇒ String
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#type ⇒ String
Setting ownership (read-only): - system: Managed by Twilio - Twilio provides managed Settings to simplify your onboarding journey - Cannot be modified or deleted - Used for default account configuration - customer: Created by you - Can update friendlyName via PATCH - Can delete via DELETE (if not in use) - Core config (auth, signature) is immutable.
- #updated_at ⇒ Time
Constructor Details
#initialize(version, payload, setting_id: nil) ⇒ SettingInstance
Initialize the SettingInstance
859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 |
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 859 def initialize(version, payload , setting_id: nil) apiV1Version = ApiV1Version.new version.domain, version super(apiV1Version) # Marshaled Properties @properties = { 'id' => payload['id'], 'type' => payload['type'], 'friendly_name' => payload['friendly_name'], 'description' => payload['description'], 'auth' => payload['auth'], 'signature' => payload['signature'], 'connection' => payload['connection'], 'edge_zones' => payload['edge_zones'], 'created_at' => Twilio.deserialize_iso8601_datetime(payload['created_at']), 'updated_at' => Twilio.deserialize_iso8601_datetime(payload['updated_at']), 'title' => payload['title'], 'status' => payload['status'] == nil ? payload['status'] : payload['status'].to_i, 'detail' => payload['detail'], 'code' => payload['code'] == nil ? payload['code'] : payload['code'].to_i, } # Context @instance_context = nil @params = { 'setting_id' => setting_id || @properties['setting_id'] , } end |
Instance Method Details
#auth ⇒ AuthSetting
924 925 926 |
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 924 def auth @properties['auth'] end |
#code ⇒ String
978 979 980 |
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 978 def code @properties['code'] end |
#connection ⇒ ConnectionSetting
Returns HTTP connection settings. If omitted, system defaults are applied.
936 937 938 |
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 936 def connection @properties['connection'] end |
#context ⇒ SettingContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
891 892 893 894 895 896 |
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 891 def context unless @instance_context @instance_context = SettingContext.new(@version , @params['setting_id']) end @instance_context end |
#created_at ⇒ Time
948 949 950 |
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 948 def created_at @properties['created_at'] end |
#delete ⇒ Boolean
Delete the SettingInstance
985 986 987 988 |
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 985 def delete context.delete end |
#description ⇒ String
Returns Optional description of the Setting's purpose and usage.
918 919 920 |
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 918 def description @properties['description'] end |
#detail ⇒ String
972 973 974 |
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 972 def detail @properties['detail'] end |
#edge_zones ⇒ EdgeZones
Returns Edge zone configuration for webhook delivery. When omitted, all zones are eligible and Twilio selects freely. When set, zones lists preferred zones in priority order.
942 943 944 |
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 942 def edge_zones @properties['edge_zones'] end |
#fetch ⇒ SettingInstance
Fetch the SettingInstance
993 994 995 996 |
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 993 def fetch context.fetch end |
#friendly_name ⇒ String
Returns Human-readable name.
912 913 914 |
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 912 def friendly_name @properties['friendly_name'] end |
#id ⇒ String
Returns Unique Setting identifier (TypeID/TTID format).
900 901 902 |
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 900 def id @properties['id'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
1019 1020 1021 1022 |
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 1019 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Webhooks.V1.SettingInstance #{values}>" end |
#patch(patch_setting: nil) ⇒ SettingInstance
Patch the SettingInstance
1002 1003 1004 1005 1006 1007 1008 |
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 1002 def patch(patch_setting: nil ) context.patch( patch_setting: patch_setting, ) end |
#signature ⇒ SignatureSetting
930 931 932 |
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 930 def signature @properties['signature'] end |
#status ⇒ String
966 967 968 |
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 966 def status @properties['status'] end |
#title ⇒ String
960 961 962 |
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 960 def title @properties['title'] end |
#to_s ⇒ Object
Provide a user friendly representation
1012 1013 1014 1015 |
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 1012 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Webhooks.V1.SettingInstance #{values}>" end |
#type ⇒ String
Returns Setting ownership (read-only): - system: Managed by Twilio - Twilio provides managed Settings to simplify your onboarding journey - Cannot be modified or deleted - Used for default account configuration - customer: Created by you - Can update friendlyName via PATCH - Can delete via DELETE (if not in use) - Core config (auth, signature) is immutable.
906 907 908 |
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 906 def type @properties['type'] end |
#updated_at ⇒ Time
954 955 956 |
# File 'lib/twilio-ruby/rest/webhooks/v1/setting.rb', line 954 def updated_at @properties['updated_at'] end |