Sha256: a00ee6889d4c0e6325eb0b5d71f5137d861487d44068d99adea3cd25a4224659

Contents?: true

Size: 460 Bytes

Versions: 8

Compression:

Stored size: 460 Bytes

Contents

module Conekta
  module Operations
    module Create
      module ClassMethods
        def create(params)
          requestor = Requestor.new
          url = Util.types[self.class_name.downcase].url
          response = requestor.request(:post, url, params)
          instance = self.new
          instance.load_from(response)
          instance
        end
      end
      def self.included(base)
        base.extend(ClassMethods)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
conekta-0.4.4 lib/conekta/operations/create.rb
conekta-0.4.3 lib/conekta/operations/create.rb
conekta-0.4.2 lib/conekta/operations/create.rb
conekta-0.4.1 lib/conekta/operations/create.rb
conekta-0.4.0 lib/conekta/operations/create.rb
conekta-0.3.7 lib/conekta/operations/create.rb
conekta-0.3.6 lib/conekta/operations/create.rb
conekta-0.3.5 lib/conekta/operations/create.rb