Sha256: d77a25836c4af4aeeab12638fda076b76e894311f8823501659fb26681022c26

Contents?: true

Size: 428 Bytes

Versions: 10

Compression:

Stored size: 428 Bytes

Contents

module Conekta
  module Operations
    module Create
      module ClassMethods
        def create(params)
          url = Util.types[self.class_name.downcase].url
          response = Requestor.new.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

10 entries across 10 versions & 1 rubygems

Version Path
conekta-0.5.6 lib/conekta/operations/create.rb
conekta-0.5.5 lib/conekta/operations/create.rb
conekta-0.5.4 lib/conekta/operations/create.rb
conekta-0.5.3 lib/conekta/operations/create.rb
conekta-0.5.2 lib/conekta/operations/create.rb
conekta-0.5.1 lib/conekta/operations/create.rb
conekta-0.4.8 lib/conekta/operations/create.rb
conekta-0.4.7 lib/conekta/operations/create.rb
conekta-0.4.6 lib/conekta/operations/create.rb
conekta-0.4.5 lib/conekta/operations/create.rb