lib/twilio-ruby/rest/verify/v2/form.rb in twilio-ruby-5.38.0 vs lib/twilio-ruby/rest/verify/v2/form.rb in twilio-ruby-5.39.0

- old
+ new

@@ -66,33 +66,27 @@ # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com. class FormContext < InstanceContext ## # Initialize the FormContext # @param [Version] version Version that contains the resource - # @param [form.FormTypes] form_type The Type of this Form. One of `form-app-push`, - # `form-sms` or `form-totp`. + # @param [form.FormTypes] form_type The Type of this Form. Currently only + # `form-push` is supported. # @return [FormContext] FormContext def initialize(version, form_type) super(version) # Path Solution @solution = {form_type: form_type, } @uri = "/Forms/#{@solution[:form_type]}" end ## - # Fetch a FormInstance + # Fetch the FormInstance # @return [FormInstance] Fetched FormInstance def fetch - params = Twilio::Values.of({}) + payload = @version.fetch('GET', @uri) - payload = @version.fetch( - 'GET', - @uri, - params, - ) - FormInstance.new(@version, payload, form_type: @solution[:form_type], ) end ## # Provide a user friendly representation @@ -114,12 +108,12 @@ class FormInstance < InstanceResource ## # Initialize the FormInstance # @param [Version] version Version that contains the resource # @param [Hash] payload payload that contains response from Twilio - # @param [form.FormTypes] form_type The Type of this Form. One of `form-app-push`, - # `form-sms` or `form-totp`. + # @param [form.FormTypes] form_type The Type of this Form. Currently only + # `form-push` is supported. # @return [FormInstance] FormInstance def initialize(version, payload, form_type: nil) super(version) # Marshaled Properties @@ -169,10 +163,10 @@ def url @properties['url'] end ## - # Fetch a FormInstance + # Fetch the FormInstance # @return [FormInstance] Fetched FormInstance def fetch context.fetch end \ No newline at end of file