import firebase_admin
from firebase_admin import credentials
from firebase_admin import firestore

class Customer:
    def __init__(self, name, phone, email):
        self.name = name
        self.phone = phone
        self.email = email

    def showCustomerDetails(self):
        print(">>Name: {}  Phone: {} Email: {}".format(self.name, self.phone, self.email))


# Use a service account
cred = credentials.Certificate("serviceAccountKey.json")
firebase_admin.initialize_app(cred)

db = firestore.client()

cRef = Customer("Fionna", "+91 99999 88888", "fionna@example.com")
data = cRef.__dict__

db.collection("Customer").document().set(data)
print(">> ", cRef.name, "Saved in Firebase")

6a3be3a318232956b5a108745833957b950b21fb
<mask token>


class Customer:
    <mask token>

    def showCustomerDetails(self):
        print('>>Name: {}  Phone: {} Email: {}'.format(self.name, self.
            phone, self.email))


<mask token>

<mask token>


class Customer:

    def __init__(self, name, phone, email):
        self.name = name
        self.phone = phone
        self.email = email

    def showCustomerDetails(self):
        print('>>Name: {}  Phone: {} Email: {}'.format(self.name, self.
            phone, self.email))


<mask token>
firebase_admin.initialize_app(cred)
<mask token>
db.collection('Customer').document().set(data)
print('>> ', cRef.name, 'Saved in Firebase')

<mask token>


class Customer:

    def __init__(self, name, phone, email):
        self.name = name
        self.phone = phone
        self.email = email

    def showCustomerDetails(self):
        print('>>Name: {}  Phone: {} Email: {}'.format(self.name, self.
            phone, self.email))


cred = credentials.Certificate('serviceAccountKey.json')
firebase_admin.initialize_app(cred)
db = firestore.client()
cRef = Customer('Fionna', '+91 99999 88888', 'fionna@example.com')
data = cRef.__dict__
db.collection('Customer').document().set(data)
print('>> ', cRef.name, 'Saved in Firebase')

import firebase_admin
from firebase_admin import credentials
from firebase_admin import firestore


class Customer:

    def __init__(self, name, phone, email):
        self.name = name
        self.phone = phone
        self.email = email

    def showCustomerDetails(self):
        print('>>Name: {}  Phone: {} Email: {}'.format(self.name, self.
            phone, self.email))


cred = credentials.Certificate('serviceAccountKey.json')
firebase_admin.initialize_app(cred)
db = firestore.client()
cRef = Customer('Fionna', '+91 99999 88888', 'fionna@example.com')
data = cRef.__dict__
db.collection('Customer').document().set(data)
print('>> ', cRef.name, 'Saved in Firebase')

import firebase_admin
from firebase_admin import credentials
from firebase_admin import firestore

class Customer:
    def __init__(self, name, phone, email):
        self.name = name
        self.phone = phone
        self.email = email

    def showCustomerDetails(self):
        print(">>Name: {}  Phone: {} Email: {}".format(self.name, self.phone, self.email))


# Use a service account
cred = credentials.Certificate("serviceAccountKey.json")
firebase_admin.initialize_app(cred)

db = firestore.client()

cRef = Customer("Fionna", "+91 99999 88888", "fionna@example.com")
data = cRef.__dict__

db.collection("Customer").document().set(data)
print(">> ", cRef.name, "Saved in Firebase")
