Sha256: 38023058da94cb6242836e24d4917d9241467ebbc0df9ff4dcb59f332ea90c02

Contents?: true

Size: 730 Bytes

Versions: 8

Compression:

Stored size: 730 Bytes

Contents

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

module Razorpay
  # Payment Links are URLs that you can send to your customers 
  # through SMS and email to collect payments from them.
  class PaymentLink < Entity
    def self.request
      Razorpay::Request.new('payment_links')
    end

    def self.create(options)
      request.create options
    end

    def self.fetch(id)
      request.fetch id
    end

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

    def self.all(options = {})
      request.all options
    end

    def self.cancel(id)
      request.post "#{id}/cancel"
    end
    
    def self.notify_by(id,medium)
      request.post "#{id}/notify_by/#{medium}"
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
razorpay-3.2.2 lib/razorpay/payment_link.rb
razorpay-3.2.1 lib/razorpay/payment_link.rb
razorpay-3.2.0 lib/razorpay/payment_link.rb
razorpay-3.1.0 lib/razorpay/payment_link.rb
razorpay-3.0.1 lib/razorpay/payment_link.rb
razorruby-3.0.4 lib/razorpay/payment_link.rb
razorruby-3.0.1 lib/razorpay/payment_link.rb
razorpay-3.0.0 lib/razorpay/payment_link.rb