Class: SpreeStripe::CustomerPresenter
- Inherits:
-
Object
- Object
- SpreeStripe::CustomerPresenter
- Defined in:
- app/presenters/spree_stripe/customer_presenter.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(address: nil, email: nil, name: nil) ⇒ CustomerPresenter
constructor
A new instance of CustomerPresenter.
Constructor Details
#initialize(address: nil, email: nil, name: nil) ⇒ CustomerPresenter
Returns a new instance of CustomerPresenter.
3 4 5 6 7 |
# File 'app/presenters/spree_stripe/customer_presenter.rb', line 3 def initialize(address: nil, email: nil, name: nil) @email = email @name = name @address = address end |
Instance Method Details
#call ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'app/presenters/spree_stripe/customer_presenter.rb', line 9 def call hash = {} hash[:address] = address_payload if address.present? hash[:email] = email if email.present? hash[:name] = name if name.present? hash end |