class PortaText::Command::Api::CreditCards

The credit_cards/:id endpoint. github.com/PortaText/docs/wiki/REST-API#api_credit_cards

Author

Marcelo Gornstein (marcelog@portatext.com)

Copyright

Copyright © 2015 PortaText

License

Apache-2.0

Public Instance Methods

address(street_address, city, state, zip, country) click to toggle source
# File lib/portatext/command/api/credit_cards.rb, line 26
def address(street_address, city, state, zip, country)
  set :address, street_address
  set :city, city
  set :state, state
  set :zip, zip
  set :country, country
end
card_info(number, expiration_date, code) click to toggle source
# File lib/portatext/command/api/credit_cards.rb, line 20
def card_info(number, expiration_date, code)
  set :card_number, number
  set :card_expiration_date, expiration_date
  set :card_code, code
end
endpoint(_method) click to toggle source
# File lib/portatext/command/api/credit_cards.rb, line 34
def endpoint(_method)
  return 'credit_cards' if @args[:id].nil?
  id = @args[:id]
  @args.delete :id
  "credit_cards/#{id}"
end
id(id) click to toggle source
# File lib/portatext/command/api/credit_cards.rb, line 11
def id(id)
  set :id, id
end
name_on_card(first, last) click to toggle source
# File lib/portatext/command/api/credit_cards.rb, line 15
def name_on_card(first, last)
  set :first_name, first
  set :last_name, last
end