class Mercadopago::MerchantOrder

This class will allow you to create and manage your orders. You can attach one or more payments in your merchant order.

Public Instance Methods

create(merchant_order_data, request_options: nil) click to toggle source
# File lib/mercadopago/resources/merchant_order.rb, line 19
def create(merchant_order_data, request_options: nil)
  raise TypeError, 'Param merchant_orders_object must be a Hash' unless merchant_order_data.is_a?(Hash)

  _post(uri: '/merchant_orders', data: merchant_order_data, request_options: request_options)
end
get(merchant_order_id, request_options: nil) click to toggle source
# File lib/mercadopago/resources/merchant_order.rb, line 15
def get(merchant_order_id, request_options: nil)
  _get(uri: "/merchant_orders/#{merchant_order_id}", request_options: request_options)
end
update(merchant_order_id, merchant_order_data, request_options: nil) click to toggle source
# File lib/mercadopago/resources/merchant_order.rb, line 25
def update(merchant_order_id, merchant_order_data, request_options: nil)
  raise TypeError, 'Param merchant_orders_object must be a Hash' unless merchant_order_data.is_a?(Hash)

  _put(uri: "/merchant_orders/#{merchant_order_id}", data: merchant_order_data,
       request_options: request_options)
end