Class: Levelup::Endpoints::CreditCards

Inherits:
Base
  • Object
show all
Defined in:
lib/levelup/endpoints/credit_cards.rb

Overview

The endpoint holding all functions related to managing users’ credit cards.

Instance Method Summary collapse

Instance Method Details

#create(credit_card_request) ⇒ Object

Adds a credit card to a user’s account. Requires a user access token with create_first_credit_card permission. This request will fail unless the user account has no credit card on it.



8
9
10
11
# File 'lib/levelup/endpoints/credit_cards.rb', line 8

def create(credit_card_request)
  build_request(credit_card_request, Requests::CreateCard).
    send_to_api(:get, endpoint_path)
end