Sha256: b6412a9e2072c25f5d55690509032f446def81249b57509cbaadda206d91c284

Contents?: true

Size: 360 Bytes

Versions: 7

Compression:

Stored size: 360 Bytes

Contents

module Paymill
  module Operations
    module Create
      module ClassMethods
        def create(attributes)
          response = Paymill.request(:post, "#{self.name.split("::").last.downcase}s", attributes)
          self.new(response["data"])
        end
      end

      def self.included(base)
        base.extend(ClassMethods)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
paymill-0.2.2 lib/paymill/operations/create.rb
paymill-0.2.1 lib/paymill/operations/create.rb
paymill-0.2.0 lib/paymill/operations/create.rb
paymill-0.1.0 lib/paymill/operations/create.rb
paymill-0.0.3 lib/paymill/operations/create.rb
paymill-0.0.2 lib/paymill/operations/create.rb
paymill-0.0.1 lib/paymill/operations/create.rb