Ejemplo n.º 1
0
from sharpy.product import CheddarProduct

# Get a product instance to work with
product = CheddarProduct(
    username = CHEDDAR_USERNAME,
    password = CHEDDAR_PASSWORD,
    product_code = CHEDDAR_PRODUCT,
)

# Create the customer
customer = product.create_customer(
    code = 'cust-id-1', # An unique identifier for the customer
    first_name = 'Philip',
    last_name = 'Fry',
    email = '*****@*****.**',
    plan_code = 'FREE_MONTHLY', # The code for plan to subscribe the customer to
)
Ejemplo n.º 2
0
    def get_product(self):
        ''' Helper method for getting product. '''
        product = CheddarProduct(**self.client_defaults)

        return product