You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: billable.rb
    path of file: ./repos/pay/lib/pay/paddle_billing
    
    the code of the file until where you have to start completion: module Pay
  module PaddleBilling
    class Billable
      attr_reader :pay_customer

      delegate :processor_id,
        :processor_id?,
        :email,
        :customer_name,
        :card_token,
        to: :pay_customer

      def initialize(pay_customer)
        @pay_
    
      def charge(amount, options = {})
        return Pay::Error unless options

        items = options[:items]
        opts = options.except(:items).merge(customer_id: processor_id)
        transaction = ::Paddle::Transaction.create(items: items, **opts)

        attrs = {
          amount: transaction.details.totals.grand_total,
          created_at: transaction.created_at,
          currency: transaction.currency_code,
          metadata: transaction.details.line_items&.first&.id
        }

        charge = pay_customer.charges.find_or_initialize_by(processor_id: transaction.id)
        charge.update(attrs)
        charge
      rescue ::Paddle::Error => e
        raise Pay::PaddleBilling::Error, e
      end