Sha256: 998cfeef507fb9760ba2a87ccd7d236cc3463820828870dd8d83933256cf0d3d

Contents?: true

Size: 1008 Bytes

Versions: 6

Compression:

Stored size: 1008 Bytes

Contents

module Leetchi
  # A payment card.
  class Card < Leetchi::Ressource

    # Create a payment card
    #
    # * *Args*    :
    #   - +data+ -> A JSON with the following attributes (Square brackets for optionals):
    #               * [Tag]
    #               * OwnerID
    #               * ReturnURL
    #               * [TemplateURL]
    # * *Returns* :
    #   - A payment card object
    #
    def self.create(data)
      post_request('cards', data)
    end

    # Get a payment card
    #
    # * *Args*    :
    #   - +card_id+ -> The id of the card you want to retrieve
    # * *Returns* :
    #   - A payment card object
    #
    def self.details(card_id)
      get_request(File.join('cards', card_id.to_s))
    end

    # Delete a payment card
    #
    # * *Args*    :
    #   - +card_id+ -> The id of the card you want to delete
    # * *Returns* :
    #   - A "OK" string on success
    #
    def self.delete(card_id)
      delete_request(File.join('cards', card_id.to_s))
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
leetchi-wallet-services-1.2.1 lib/leetchi/card.rb
leetchi-wallet-services-1.2.0 lib/leetchi/card.rb
leetchi-wallet-services-1.1.1 lib/leetchi/card.rb
leetchi-wallet-services-1.1.0 lib/leetchi/card.rb
leetchi-wallet-services-1.0.0 lib/leetchi/card.rb
leetchi-wallet-services-0.0.1 lib/leetchi/card.rb