Skip to content

Commit

Permalink
Fix issue with trial item missing attributes [sc-60155] (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
macharmi authored Jun 21, 2024
1 parent 698d3d7 commit dbfc98d
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions lib/chartmogul/csv/line_items/trial.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,35 @@ module LineItems
'Subscription set external ID', 'Type', 'Amount in cents', 'Plan', 'Service period start', 'Service period end', 'Quantity', 'Proration', 'Discount code', 'Discount amount', 'Tax amount', 'Description', 'Transaction fee', 'Account Code', 'Transaction fees currency', 'Discount description', 'Proration type', 'Event Order'].freeze

class Trial < Subscription
writeable_attr :invoice_external_id
writeable_attr :external_id
writeable_attr :subscription_external_id
writeable_attr :subscription_set_external_id
writeable_attr :type
writeable_attr :amount_in_cents
writeable_attr :plan_external_id
writeable_attr :service_period_start
writeable_attr :service_period_end
writeable_attr :quantity
writeable_attr :prorated
writeable_attr :discount_code
writeable_attr :discount_amount_in_cents
writeable_attr :tax_amount_in_cents
writeable_attr :description
writeable_attr :transaction_fees_in_cents
writeable_attr :account_code
writeable_attr :transaction_fees_currency
writeable_attr :discount_description
writeable_attr :proration_type
writeable_attr :event_order

def type
'trial'
end

def self.headers
ChartMogul::CSV::LineItems::SUBSCRIPTION_HEADERS
end
end
end
end
Expand Down

0 comments on commit dbfc98d

Please sign in to comment.