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: stripe_invoice_getter.rb
    path of file: ./repos/forest-rails/app/services/forest_liana
    
    the code of the file until where you have to start completion: module ForestLiana
  class StripeInvoiceGetter < StripeBaseGetter
    attr_accessor :record

    de
    
    def perform
      query = {}
      @record = ::Stripe::Invoice.retrieve(@params[:invoice_id])

      @record.due_date = Time.at(@record.due_date).to_datetime unless @record.due_date.nil?
      @record.period_start = Time.at(@record.period_start).to_datetime
      @record.period_end = Time.at(@record.period_end).to_datetime
      @record.subtotal /= 100.00
      @record.total /= 100.00
      @record.amount_due /= 100.00

      query[field] = @record.customer
      if collection
        @record.customer = collection.find_by(query)
      else
        @record.customer = nil
      end