Sha256: ca3630bf0e7055955e36dda9225639a95ba4f9ef44c45c740c80d6b37f714bbe
Contents?: true
Size: 837 Bytes
Versions: 1
Compression:
Stored size: 837 Bytes
Contents
module Conekta module APIOperations module Create module ClassMethods def create_member(member, params={}, api_key=nil) path = "/customers/#{self.id}/#{member}" response, api_key = Conekta.request(:post, path, api_key, params) obj = Util.convert_to_conekta_object(response, api_key) if obj.class == ConektaObject count = self.cards.count self.cards[count] = obj else self.subscription = obj end obj end def create(params={}, api_key=nil) response, api_key = Conekta.request(:post, self.url, api_key, params) Util.convert_to_conekta_object(response, api_key) end end def self.included(base) base.extend(ClassMethods) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
conekta-0.3.3 | lib/conekta/api_operations/create.rb~ |