class Mercadopago::Customer
This will allow your customer to complete their purchases much faster and easily when used in conjunction with the Cards class. [Click here for more infos](mercadopago.com.br/developers/en/guides/online-payments/web-tokenize-checkout/customers-and-cards)
Public Instance Methods
create(customer_data, request_options: nil)
click to toggle source
# File lib/mercadopago/resources/customer.rb, line 20 def create(customer_data, request_options: nil) raise TypeError, 'Param customer_data must be a Hash' unless customer_data.is_a?(Hash) _post(uri: '/v1/customers', data: customer_data, request_options: request_options) end
delete(customer_id, request_options: nil)
click to toggle source
# File lib/mercadopago/resources/customer.rb, line 32 def delete(customer_id, request_options: nil) _delete(uri: "/v1/customers/#{customer_id}", request_options: request_options) end
get(customer_id, request_options: nil)
click to toggle source
# File lib/mercadopago/resources/customer.rb, line 16 def get(customer_id, request_options: nil) _get(uri: "/v1/customers/#{customer_id}", request_options: request_options) end
search(filters: nil, request_options: nil)
click to toggle source
# File lib/mercadopago/resources/customer.rb, line 12 def search(filters: nil, request_options: nil) _get(uri: '/v1/customers/search', filters: filters, request_options: request_options) end
update(customer_id, customer_data, request_options: nil)
click to toggle source
# File lib/mercadopago/resources/customer.rb, line 26 def update(customer_id, customer_data, request_options: nil) raise TypeError, 'Param customer_data must be a Hash' unless customer_data.is_a?(Hash) _put(uri: "/v1/customers/#{customer_id}", data: customer_data, request_options: request_options) end