Sha256: e7cbb3f2826aa770c6280cf5a22654b262df62163f95acc42726188212f4afe4

Contents?: true

Size: 627 Bytes

Versions: 1

Compression:

Stored size: 627 Bytes

Contents

module Sendle
  module Api
    module Actions
      module Create

        def create(params = {})
          check_for_missing_credentials
          validate_create_request!(params)

          request_params = rest_client_params
          request_params[:method] = :post
          request_params[:url] = url
          request_params[:payload] = params 

          process_create_response(request(request_params))
        end

        def self.included(base)
          base.extend(Sendle::Api::Sugars::Create)
        end

        protected

          def http_method
            :post
          end

      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sendle-api-0.0.11 lib/sendle/api/actions/create.rb