Class: Levelup::Requests::CreateCard
- Inherits:
-
Base
- Object
- Templates::DataParcel
- Base
- Levelup::Requests::CreateCard
- Includes:
- Templates::UserAuthenticated
- Defined in:
- lib/levelup/requests/create_card.rb
Overview
Represents a request to add the first credit card to a specified user account. User access token must have the create_first_credit_card permission.
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#encrypted_cvv ⇒ Object
Returns the value of attribute encrypted_cvv.
-
#encrypted_expiration_month ⇒ Object
Returns the value of attribute encrypted_expiration_month.
-
#encrypted_expiration_year ⇒ Object
Returns the value of attribute encrypted_expiration_year.
-
#encrypted_number ⇒ Object
Returns the value of attribute encrypted_number.
-
#postal_code ⇒ Object
Returns the value of attribute postal_code.
Attributes included from Templates::UserAuthenticated
Instance Method Summary collapse
Methods included from Templates::UserAuthenticated
Methods inherited from Base
#auth_type, #headers, instance_variables_excluded_from_hash, #send_to_api
Methods inherited from Templates::DataParcel
excluded?, #initialize, instance_variables_excluded_from_hash
Constructor Details
This class inherits a constructor from Levelup::Templates::DataParcel
Instance Attribute Details
#encrypted_cvv ⇒ Object
Returns the value of attribute encrypted_cvv.
8 9 10 |
# File 'lib/levelup/requests/create_card.rb', line 8 def encrypted_cvv @encrypted_cvv end |
#encrypted_expiration_month ⇒ Object
Returns the value of attribute encrypted_expiration_month.
8 9 10 |
# File 'lib/levelup/requests/create_card.rb', line 8 def encrypted_expiration_month @encrypted_expiration_month end |
#encrypted_expiration_year ⇒ Object
Returns the value of attribute encrypted_expiration_year.
8 9 10 |
# File 'lib/levelup/requests/create_card.rb', line 8 def encrypted_expiration_year @encrypted_expiration_year end |
#encrypted_number ⇒ Object
Returns the value of attribute encrypted_number.
8 9 10 |
# File 'lib/levelup/requests/create_card.rb', line 8 def encrypted_number @encrypted_number end |
#postal_code ⇒ Object
Returns the value of attribute postal_code.
8 9 10 |
# File 'lib/levelup/requests/create_card.rb', line 8 def postal_code @postal_code end |
Instance Method Details
#body ⇒ Object
11 12 13 |
# File 'lib/levelup/requests/create_card.rb', line 11 def body { credit_card: to_hash } end |
#response_from_hash(hash) ⇒ Object
15 16 17 |
# File 'lib/levelup/requests/create_card.rb', line 15 def response_from_hash(hash) Response::Success.new(hash['credit_card']) end |