Sha256: d794391122ed9adf44fea07cddc38f46246ddc246283e2b87206ef306f8479a9
Contents?: true
Size: 476 Bytes
Versions: 11
Compression:
Stored size: 476 Bytes
Contents
require "omise/list" module Omise class CardList < List def retrieve(id, attributes = {}) if !defined?(Card) require "omise/card" end Card.new self.class.resource(location(id), attributes).get(attributes) end def create(attributes = {}) if !defined?(Token) require "omise/token" end token = Token.create(card: attributes) parent.update(card: token.id) retrieve(token.card.id) end end end
Version data entries
11 entries across 11 versions & 1 rubygems