Class: Twilio::REST::Trusthub::V1::CustomerProfilesProvisionalCopyContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Trusthub::V1::CustomerProfilesProvisionalCopyContext
- Defined in:
- lib/twilio-ruby/rest/trusthub/v1/customer_profiles_provisional_copy.rb
Instance Method Summary collapse
-
#create ⇒ CustomerProfilesProvisionalCopyInstance
Create the CustomerProfilesProvisionalCopyInstance.
-
#create_with_metadata ⇒ CustomerProfilesProvisionalCopyInstance
Create the CustomerProfilesProvisionalCopyInstanceMetadata.
-
#fetch ⇒ CustomerProfilesProvisionalCopyInstance
Fetch the CustomerProfilesProvisionalCopyInstance.
-
#fetch_with_metadata ⇒ CustomerProfilesProvisionalCopyInstance
Fetch the CustomerProfilesProvisionalCopyInstanceMetadata.
-
#initialize(version, customer_profile_sid) ⇒ CustomerProfilesProvisionalCopyContext
constructor
Initialize the CustomerProfilesProvisionalCopyContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, customer_profile_sid) ⇒ CustomerProfilesProvisionalCopyContext
Initialize the CustomerProfilesProvisionalCopyContext
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles_provisional_copy.rb', line 50 def initialize(version, customer_profile_sid) super(version) # Path Solution @solution = { customer_profile_sid: customer_profile_sid, } @uri = "/CustomerProfiles/#{@solution[:customer_profile_sid]}/ProvisionalCopy" end |
Instance Method Details
#create ⇒ CustomerProfilesProvisionalCopyInstance
Create the CustomerProfilesProvisionalCopyInstance
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles_provisional_copy.rb', line 63 def create headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.create('POST', @uri, headers: headers) CustomerProfilesProvisionalCopyInstance.new( @version, payload, customer_profile_sid: @solution[:customer_profile_sid], ) end |
#create_with_metadata ⇒ CustomerProfilesProvisionalCopyInstance
Create the CustomerProfilesProvisionalCopyInstanceMetadata
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles_provisional_copy.rb', line 82 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('POST', @uri, headers: headers) customer_profiles_provisional_copy_instance = CustomerProfilesProvisionalCopyInstance.new( @version, response.body, customer_profile_sid: @solution[:customer_profile_sid], ) CustomerProfilesProvisionalCopyInstanceMetadata.new( @version, customer_profiles_provisional_copy_instance, response.headers, response.status_code ) end |
#fetch ⇒ CustomerProfilesProvisionalCopyInstance
Fetch the CustomerProfilesProvisionalCopyInstance
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles_provisional_copy.rb', line 107 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) CustomerProfilesProvisionalCopyInstance.new( @version, payload, customer_profile_sid: @solution[:customer_profile_sid], ) end |
#fetch_with_metadata ⇒ CustomerProfilesProvisionalCopyInstance
Fetch the CustomerProfilesProvisionalCopyInstanceMetadata
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles_provisional_copy.rb', line 126 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('GET', @uri, headers: headers) customer_profiles_provisional_copy_instance = CustomerProfilesProvisionalCopyInstance.new( @version, response.body, customer_profile_sid: @solution[:customer_profile_sid], ) CustomerProfilesProvisionalCopyInstanceMetadata.new( @version, customer_profiles_provisional_copy_instance, response.headers, response.status_code ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
158 159 160 161 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles_provisional_copy.rb', line 158 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Trusthub.V1.CustomerProfilesProvisionalCopyContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
151 152 153 154 |
# File 'lib/twilio-ruby/rest/trusthub/v1/customer_profiles_provisional_copy.rb', line 151 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Trusthub.V1.CustomerProfilesProvisionalCopyContext #{context}>" end |