module Uphold::API::Card
Public Instance Methods
all_cards()
click to toggle source
# File lib/uphold/api/card.rb, line 4 def all_cards Request.perform_with_objects(:get, cards_request_data) end
create_card(label: nil, currency: nil)
click to toggle source
# File lib/uphold/api/card.rb, line 12 def create_card(label: nil, currency: nil) Request.perform_with_object(:post, cards_request_data(label: label, currency: currency)) end
find_card(id: nil)
click to toggle source
# File lib/uphold/api/card.rb, line 8 def find_card(id: nil) Request.perform_with_object(:get, card_request_data(id)) end
Private Instance Methods
card_request_data(id)
click to toggle source
# File lib/uphold/api/card.rb, line 27 def card_request_data(id) RequestData.new( Endpoints::CARD + "/#{id}", Entities::Card, authorization_header ) end
cards_request_data(payload = nil)
click to toggle source
# File lib/uphold/api/card.rb, line 18 def cards_request_data(payload = nil) RequestData.new( Endpoints::CARD, Entities::Card, authorization_header, payload ) end