Sha256: 5afaaf9917905e6cee4cdb7be1ce41c20363ee4bdcdabc11ea9d5cbf6e850e2e

Contents?: true

Size: 816 Bytes

Versions: 4

Compression:

Stored size: 816 Bytes

Contents

require 'razorpay/request'
require 'razorpay/entity'

module Razorpay
  # Account API allows you to create a sub-merchant account.  
  class Account < Entity
    
    @@versions = "v2"

    def self.request
      Razorpay::Request.new('accounts')
    end

    def self.create(options)
      request.create options, @@versions
    end

    def self.fetch(id)
      request.fetch id, @@versions
    end

    def self.edit(id, options = {})
      request.patch id, options, @@versions
    end

    def self.delete(id)
      request.delete "#{id}", @@versions
    end

    def self.upload_account_doc(id,options)
      r = request
      r.request :post, "/#{@@versions}/accounts/#{id}/documents", options
    end
    
    def self.fetch_account_doc(id)
      request.fetch "#{id}/documents", @@versions
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
razorpay-3.2.2 lib/razorpay/account.rb
razorpay-3.2.1 lib/razorpay/account.rb
razorpay-3.2.0 lib/razorpay/account.rb
razorpay-3.1.0 lib/razorpay/account.rb