class Mercadopago::Card
This class must be used in conjunction with the Customer
class. [Click here for more infos](www.mercadopago.com/developers/en/guides/online-payments/web-tokenize-checkout/customers-and-cards)
Public Instance Methods
create(customer_id, card_data, request_options: nil)
click to toggle source
# File lib/mercadopago/resources/card.rb, line 17 def create(customer_id, card_data, request_options: nil) raise TypeError, 'Param card_data must be a Hash' if card_data.nil? || !card_data.is_a?(Hash) _post(uri: "/v1/customers/#{customer_id}/cards/", data: card_data, request_options: request_options) end
delete(customer_id, card_id, request_options: nil)
click to toggle source
# File lib/mercadopago/resources/card.rb, line 23 def delete(customer_id, card_id, request_options: nil) _delete(uri: "/v1/customers/#{customer_id}/cards/#{card_id}", request_options: request_options) end
get(customer_id, card_id, request_options: nil)
click to toggle source
# File lib/mercadopago/resources/card.rb, line 13 def get(customer_id, card_id, request_options: nil) _get(uri: "/v1/customers/#{customer_id}/cards/#{card_id}", request_options: request_options) end
list(customer_id, request_options: nil)
click to toggle source
# File lib/mercadopago/resources/card.rb, line 27 def list(customer_id, request_options: nil) _get(uri: "/v1/customers/#{customer_id}/cards", request_options: request_options) end