Change summary
lib/tel_selections.rb | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
Detailed changes
@@ -242,22 +242,14 @@ class TelSelections
def transaction(customer)
Transaction.new(
customer_id: customer.customer_id,
- transaction_id: transaction_id(customer),
+ transaction_id:
+ "#{customer.customer_id}-bill-#{@tel}-at-#{Time.now.to_i}",
amount: -price,
- note: transaction_note,
+ note: "One-time charge for number: #{formatted_tel}",
ignore_duplicate: false
)
end
- # @param customer [Customer] the customer to charge
- def transaction_id(customer)
- "#{customer.customer_id}-bill-#{customer.plan}-at-#{Time.now.to_i}"
- end
-
- def transaction_note
- "One-time charge for number: #{formatted_tel}"
- end
-
def initialize(tel)
@tel = tel
end