Sha256: 16c8a57f86c939dc5d806c21666e2bf9a580c78158944f3aa5f1a36936f0aee6

Contents?: true

Size: 1.57 KB

Versions: 14

Compression:

Stored size: 1.57 KB

Contents

# bandwidth
#
# This file was automatically generated by APIMATIC v2.0
# ( https://apimatic.io ).

module Bandwidth
  # The request has been accepted for processing but not yet finished and in a
  # terminal state (COMPLETE, PARTIAL_COMPLETE, or FAILED)
  class OrderResponse < BaseModel
    SKIP = Object.new
    private_constant :SKIP

    # TODO: Write general description for this method
    # @return [String]
    attr_accessor :request_id

    # TODO: Write general description for this method
    # @return [String]
    attr_accessor :status

    # A mapping from model property names to API property names.
    def self.names
      @_hash = {} if @_hash.nil?
      @_hash['request_id'] = 'requestId'
      @_hash['status'] = 'status'
      @_hash
    end

    # An array for optional fields
    def optionals
      %w[
        request_id
        status
      ]
    end

    # An array for nullable fields
    def nullables
      []
    end

    def initialize(request_id = nil,
                   status = nil)
      @request_id = request_id unless request_id == SKIP
      @status = status unless status == SKIP
    end

    # Creates an instance of the object from a hash.
    def self.from_hash(hash)
      return nil unless hash

      # Extract variables from the hash.
      request_id = hash.key?('requestId') ? hash['requestId'] : SKIP
      status = hash.key?('status') ? hash['status'] : SKIP

      # Create object from extracted values.
      OrderResponse.new(request_id,
                        status)
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
bandwidth-sdk-10.5.0 lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_response.rb
bandwidth-sdk-10.4.0 lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_response.rb
bandwidth-sdk-10.3.0 lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_response.rb
bandwidth-sdk-10.2.0 lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_response.rb
bandwidth-sdk-10.1.0 lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_response.rb
bandwidth-sdk-10.0.0 lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_response.rb
bandwidth-sdk-9.4.1 lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_response.rb
bandwidth-sdk-9.4.0 lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_response.rb
bandwidth-sdk-9.3.0 lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_response.rb
bandwidth-sdk-9.2.0 lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_response.rb
bandwidth-sdk-9.1.2 lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_response.rb
bandwidth-sdk-9.1.1 lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_response.rb
bandwidth-sdk-9.1.0 lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_response.rb
bandwidth-sdk-9.0.0 lib/bandwidth/phone_number_lookup_lib/phone_number_lookup/models/order_response.rb