# -*- coding: utf-8 -*-

"""
zypev1

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""


class PlanMetadata(object):

    """Implementation of the 'PlanMetadata' model.

    TODO: type model description here.

    Attributes:
        id (string): TODO: type description here.
        active (string): TODO: type description here.
        amount (string): TODO: type description here.
        created_at (string): TODO: type description here.
        currency (string): TODO: type description here.
        description (string): TODO: type description here.
        interval (string): TODO: type description here.
        name (string): TODO: type description here.
        stripe_id (string): monthly
        stripe_public_key (string): TODO: type description here.
        trial_period_days (string): TODO: type description here.
        updated_at (string): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "id": 'id',
        "active": 'active',
        "amount": 'amount',
        "created_at": 'created_at',
        "currency": 'currency',
        "description": 'description',
        "interval": 'interval',
        "name": 'name',
        "stripe_id": 'stripe_id',
        "stripe_public_key": 'stripe_public_key',
        "trial_period_days": 'trial_period_days',
        "updated_at": 'updated_at'
    }

    def __init__(self,
                 id=None,
                 active=None,
                 amount=None,
                 created_at=None,
                 currency=None,
                 description=None,
                 interval=None,
                 name=None,
                 stripe_id=None,
                 stripe_public_key=None,
                 trial_period_days=None,
                 updated_at=None):
        """Constructor for the PlanMetadata class"""

        # Initialize members of the class
        self.id = id
        self.active = active
        self.amount = amount
        self.created_at = created_at
        self.currency = currency
        self.description = description
        self.interval = interval
        self.name = name
        self.stripe_id = stripe_id
        self.stripe_public_key = stripe_public_key
        self.trial_period_days = trial_period_days
        self.updated_at = updated_at

    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Creates an instance of this model from a dictionary

        Args:
            dictionary (dictionary): A dictionary representation of the object
            as obtained from the deserialization of the server's response. The
            keys MUST match property names in the API description.

        Returns:
            object: An instance of this structure class.

        """
        if dictionary is None:
            return None

        # Extract variables from the dictionary
        id = dictionary.get('id')
        active = dictionary.get('active')
        amount = dictionary.get('amount')
        created_at = dictionary.get('created_at')
        currency = dictionary.get('currency')
        description = dictionary.get('description')
        interval = dictionary.get('interval')
        name = dictionary.get('name')
        stripe_id = dictionary.get('stripe_id')
        stripe_public_key = dictionary.get('stripe_public_key')
        trial_period_days = dictionary.get('trial_period_days')
        updated_at = dictionary.get('updated_at')

        # Return an object of this model
        return cls(id,
                   active,
                   amount,
                   created_at,
                   currency,
                   description,
                   interval,
                   name,
                   stripe_id,
                   stripe_public_key,
                   trial_period_days,
                   updated_at)
