def fields_from_json(json)
      fields = {
        :transaction_id => json['x_trans_id'],
        :invoice_num => json['x_invoice_num'],
        :subscription_id => json['x_subscription_id'],
        :subscription_paynum => json['x_subscription_paynum'],
        :transaction_type => json['x_type'],
        :card_type => json['x_card_type'],
        :account_number => json['x_account_number'],
        :description => json['x_description'],
        :response_reason_code => json['x_response_reason_code'],
        :response_reason_text => json['x_response_reason_text']
      }
      begin
        fields[:amount] = BigDecimal.new(json['x_amount'])
      rescue TypeError
        fields[:amount] = nil
      end
      return fields
    end
def fields_from_json(json)
      fields = {
        :transaction_id => json['x_trans_id'],
        :invoice_num => json['x_invoice_num'],
        :subscription_id => json['x_subscription_id'],
        :subscription_paynum => json['x_subscription_paynum'],
        :transaction_type => json['x_type'],
        :card_type => json['x_card_type'],
        :account_number => json['x_account_number'],
        :description => json['x_description'],
        :response_reason_code => json['x_response_reason_code'],
        :response_reason_text => json['x_response_reason_text']
      }
      begin
        fields[:amount] = BigDecimal.new(json['x_amount'])
      rescue TypeError
        fields[:amount] = nil
      end
      return fields
    end
Generate the AuthNetReceiver::Transaction model fields from the given JSON data