Sha256: 4960b32911ff02ca66a9f1de49beddd76e38f740d59ceb07c382afea3d06058e

Contents?: true

Size: 789 Bytes

Versions: 5

Compression:

Stored size: 789 Bytes

Contents

module Braintree
  class DocumentUpload
    include BaseModule

    module Kind
      IdentityDocument          = "identity_document"
      EvidenceDocument          = "evidence_document"
      PayoutInvoiceDocument     = "payout_invoice_document"
    end

    attr_reader :id, :kind, :content_type, :name, :size

    def self.create(attributes)
      Configuration.gateway.document_upload.create(attributes)
    end

    def initialize(attributes) # :nodoc:
      set_instance_variables_from_hash(attributes)
    end

    # True if <tt>other</tt> has the same id.
    def ==(other)
      return false unless other.is_a?(DocumentUpload)
      id == other.id
    end

    class << self
      protected :new
      def _new(*args) # :nodoc:
        self.new *args
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
braintree-2.80.1 lib/braintree/document_upload.rb
braintree-2.80.0 lib/braintree/document_upload.rb
braintree-2.79.0 lib/braintree/document_upload.rb
braintree-2.78.0 lib/braintree/document_upload.rb
braintree-2.77.0 lib/braintree/document_upload.rb