Sha256: e0f4d9fe212a942492cd98f7d3b6f1d2ef89e96baaefe8def7fe3ac87f0ebcbf

Contents?: true

Size: 702 Bytes

Versions: 8

Compression:

Stored size: 702 Bytes

Contents

require_relative 'models/model_base'
require_relative 'utils/requestor'
require 'base64'

module CorePro
  class CustomerDocument < Models::ModelBase

    attr_accessor :customerId
    attr_accessor :documentType
    attr_accessor :documentName
    attr_accessor :documentContent
    attr_accessor :reasonType

    def upload(connection = nil, loggingObject = nil)
      # NOTE: documentContent is assumed to be raw content bytes.
      #       corepro API expects base64 encoded string. so we convert that here.
      self.documentContent = Base64.encode64(self.documentContent)
      CorePro::Utils::Requestor.post('/customerdocument/upload', nil, self, connection, loggingObject)
    end

  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
corepro_fvr-1.0.9 lib/corepro/customer_document.rb
corepro_eg-1.0.8 lib/corepro/customer_document.rb
corepro_eg-1.0.7 lib/corepro/customer_document.rb
corepro_eg-1.0.6 lib/corepro/customer_document.rb
corepro_eg-1.0.5 lib/corepro/customer_document.rb
corepro_eg-1.0.4 lib/corepro/customer_document.rb
corepro_eg-1.0.3 lib/corepro/customer_document.rb
corepro_eg-1.0.2 lib/corepro/customer_document.rb