Sha256: 148612e72731626292672a5be8308f5aac3957d30c8e5a0d3c4def8d505ace7d

Contents?: true

Size: 543 Bytes

Versions: 13

Compression:

Stored size: 543 Bytes

Contents

module Payjp
  class Card < APIResource
    include Payjp::APIOperations::Create
    include Payjp::APIOperations::Update
    include Payjp::APIOperations::Delete
    include Payjp::APIOperations::List

    def url
      if respond_to?(:customer)
        "#{Customer.url}/#{CGI.escape(customer)}/cards/#{CGI.escape(id)}"
      end
    end

    def self.retrieve(_id, _opts = nil)
      raise NotImplementedError.new("Cards cannot be retrieved without a customer ID. Retrieve a card using customer.cards.retrieve('card_id')")
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
payjp-0.0.16 lib/payjp/card.rb
payjp-0.0.14 lib/payjp/card.rb
payjp-0.0.13 lib/payjp/card.rb
payjp-0.0.12 lib/payjp/card.rb
payjp-0.0.10 lib/payjp/card.rb
payjp-0.0.9 lib/payjp/card.rb
payjp-0.0.8 lib/payjp/card.rb
payjp-0.0.7 lib/payjp/card.rb
payjp-0.0.6 lib/payjp/card.rb
payjp-0.0.5 lib/payjp/card.rb
payjp-0.0.4 lib/payjp/card.rb
payjp-0.0.3 lib/payjp/card.rb
payjp-0.0.2 lib/payjp/card.rb