Sha256: 4e65e4ffe00e6386bbdcf0f156f11306eee6f29757fc4a8317f3de872915bb86

Contents?: true

Size: 825 Bytes

Versions: 6

Compression:

Stored size: 825 Bytes

Contents

module EasyPayULatam
  module RApi
    class Subscription < Request
      attr_reader :url, :plan, :customer, :card
      attr_accessor :resource, :params

      def initialize(customer)
        @customer = customer
        @customer = customer.response if !customer.nil?
        # @callback_url = callback_url
        @params = {}
        return if @customer.nil?
        # load("")
      end

      def invoice_url
        @url = RApi.base_url + "/rest/#{RApi.api_version}/recurringBill?customerId=#{@customer['id']}"
      end

      def url
        @url = RApi.base_url + "/rest/#{RApi.api_version}/subscriptions/"
      end

      def create!
        url
        super
      end

      def load(id)
        invoice_url
        super
      end

      def delete(id)
        url
        super
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
easy_pay_u_latam-0.1.32 lib/easy_pay_u_latam/r_api/subscription.rb
easy_pay_u_latam-0.1.31 lib/easy_pay_u_latam/r_api/subscription.rb
easy_pay_u_latam-0.1.29 lib/easy_pay_u_latam/r_api/subscription.rb
easy_pay_u_latam-0.1.28 lib/easy_pay_u_latam/r_api/subscription.rb
easy_pay_u_latam-0.1.27 lib/easy_pay_u_latam/r_api/subscription.rb
easy_pay_u_latam-0.1.26 lib/easy_pay_u_latam/r_api/subscription.rb