Module: Oauth::StripeAccounts::Base
- Extended by:
- ActiveSupport::Concern
- Included in:
- Oauth::StripeAccount
- Defined in:
- app/models/concerns/oauth/stripe_accounts/base.rb
Instance Method Summary collapse
- #label_string ⇒ Object
-
#name ⇒ Object
TODO You should update this with an implementation appropriate for the provider you’re integrating with.
- #name_was ⇒ Object
- #update_from_oauth(auth) ⇒ Object
Instance Method Details
#label_string ⇒ Object
25 26 27 |
# File 'app/models/concerns/oauth/stripe_accounts/base.rb', line 25 def label_string name end |
#name ⇒ Object
TODO You should update this with an implementation appropriate for the provider you’re integrating with. This must return something, otherwise new installations won’t save.
31 32 33 34 35 |
# File 'app/models/concerns/oauth/stripe_accounts/base.rb', line 31 def name data.dig("info", "name").presence || "Stripe Account" rescue "Stripe Account" end |
#name_was ⇒ Object
37 38 39 |
# File 'app/models/concerns/oauth/stripe_accounts/base.rb', line 37 def name_was name end |
#update_from_oauth(auth) ⇒ Object
41 42 43 44 45 |
# File 'app/models/concerns/oauth/stripe_accounts/base.rb', line 41 def update_from_oauth(auth) self.uid = auth.uid self.data = auth save end |