class Ecko::Plugins::Sponsor::Parser::Stripe
Attributes
account[R]
package[R]
Public Class Methods
build(package, account)
click to toggle source
# File lib/ecko/plugins/sponsor/parser/stripe.rb, line 35 def build(package, account) new(package, account).build end
new(package, account)
click to toggle source
# File lib/ecko/plugins/sponsor/parser/stripe.rb, line 10 def initialize(package, account) @package = package @account = account end
Public Instance Methods
build()
click to toggle source
# File lib/ecko/plugins/sponsor/parser/stripe.rb, line 15 def build { submit_type: 'donate', success_message: 'Thanks for being part of our community, Your donation was well received', # Need to add translation options, callback: 'Ecko::Plugins::Sponsor::Donated', package_id: package.id, payable_type: account.class.name, payable_id: account.id, line_items: [ { quantity: 1, amount: package.amount, name: "#{package.title} Donation", description: 'Donation for the instance', } ] } end