Sha256: 1b556f0d82eb622e7a9b7b0f93ce9c45010bc84a5ad11450de5df9a019004614
Contents?: true
Size: 1.28 KB
Versions: 22
Compression:
Stored size: 1.28 KB
Contents
module Paypal module Payment class Recurring::Billing < Base attr_optional :period, :frequency, :paid, :currency_code, :total_cycles, :trial_period, :trial_frequency, :trial_total_cycles, :trial_amount, :trial_amount_paid attr_accessor :amount def initialize(attributes = {}) @amount = if attributes[:amount].is_a?(Common::Amount) attributes[:amount] else Common::Amount.new( :total => attributes[:amount], :tax => attributes[:tax_amount], :shipping => attributes[:shipping_amount] ) end super end def to_params { :BILLINGPERIOD => self.period, :BILLINGFREQUENCY => self.frequency, :TOTALBILLINGCYCLES => self.total_cycles, :AMT => Util.formatted_amount(self.amount.total), :TRIALBILLINGPERIOD => self.trial_period, :TRIALBILLINGFREQUENCY => self.trial_frequency, :TRIALTOTALBILLINGCYCLES => self.trial_total_cycles, :TRIALAMT => Util.formatted_amount(self.trial_amount), :CURRENCYCODE => self.currency_code, :SHIPPINGAMT => Util.formatted_amount(self.amount.shipping), :TAXAMT => Util.formatted_amount(self.amount.tax) } end end end end
Version data entries
22 entries across 22 versions & 1 rubygems