## # This code was generated by # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ # # Twilio - Numbers # This is the public Twilio REST API. # # NOTE: This class is auto generated by OpenAPI Generator. # https://openapi-generator.tech # Do not edit the class manually. # module Twilio module REST class Numbers < NumbersBase class V2 < Version class RegulatoryComplianceList < ListResource class BundleContext < InstanceContext class ReplaceItemsList < ListResource ## # Initialize the ReplaceItemsList # @param [Version] version Version that contains the resource # @return [ReplaceItemsList] ReplaceItemsList def initialize(version, bundle_sid: nil) super(version) # Path Solution @solution = { bundle_sid: bundle_sid } @uri = "/RegulatoryCompliance/Bundles/#{@solution[:bundle_sid]}/ReplaceItems" end ## # Create the ReplaceItemsInstance # @param [String] from_bundle_sid The source bundle sid to copy the item assignments from. # @return [ReplaceItemsInstance] Created ReplaceItemsInstance def create( from_bundle_sid: nil ) data = Twilio::Values.of({ 'FromBundleSid' => from_bundle_sid, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.create('POST', @uri, data: data, headers: headers) ReplaceItemsInstance.new( @version, payload, bundle_sid: @solution[:bundle_sid], ) end # Provide a user friendly representation def to_s '#' end end class ReplaceItemsPage < Page ## # Initialize the ReplaceItemsPage # @param [Version] version Version that contains the resource # @param [Response] response Response from the API # @param [Hash] solution Path solution for the resource # @return [ReplaceItemsPage] ReplaceItemsPage def initialize(version, response, solution) super(version, response) # Path Solution @solution = solution end ## # Build an instance of ReplaceItemsInstance # @param [Hash] payload Payload response from the API # @return [ReplaceItemsInstance] ReplaceItemsInstance def get_instance(payload) ReplaceItemsInstance.new(@version, payload, bundle_sid: @solution[:bundle_sid]) end ## # Provide a user friendly representation def to_s '' end end class ReplaceItemsInstance < InstanceResource ## # Initialize the ReplaceItemsInstance # @param [Version] version Version that contains the resource # @param [Hash] payload payload that contains response from Twilio # @param [String] account_sid The SID of the # {Account}[https://www.twilio.com/docs/iam/api/account] that created this ReplaceItems # resource. # @param [String] sid The SID of the Call resource to fetch. # @return [ReplaceItemsInstance] ReplaceItemsInstance def initialize(version, payload , bundle_sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'regulation_sid' => payload['regulation_sid'], 'friendly_name' => payload['friendly_name'], 'status' => payload['status'], 'valid_until' => Twilio.deserialize_iso8601_datetime(payload['valid_until']), 'email' => payload['email'], 'status_callback' => payload['status_callback'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), } end ## # @return [String] The unique string that we created to identify the Bundle resource. def sid @properties['sid'] end ## # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Bundle resource. def account_sid @properties['account_sid'] end ## # @return [String] The unique string of a regulation that is associated to the Bundle resource. def regulation_sid @properties['regulation_sid'] end ## # @return [String] The string that you assigned to describe the resource. def friendly_name @properties['friendly_name'] end ## # @return [Status] def status @properties['status'] end ## # @return [Time] The date and time in GMT in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format when the resource will be valid until. def valid_until @properties['valid_until'] end ## # @return [String] The email address that will receive updates when the Bundle resource changes status. def email @properties['email'] end ## # @return [String] The URL we call to inform your application of status changes. def status_callback @properties['status_callback'] end ## # @return [Time] The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. def date_created @properties['date_created'] end ## # @return [Time] The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. def date_updated @properties['date_updated'] end ## # Provide a user friendly representation def to_s "" end ## # Provide a detailed, user friendly representation def inspect "" end end end end end end end end