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

"""
zypev1

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


class SubscriptionRequest(object):

    """Implementation of the 'SubscriptionRequest' model.

    TODO: type model description here.

    Attributes:
        consumer_id (string): TODO: type description here.
        plan_id (string): TODO: type description here.
        stripe_card_token (string): TODO: type description here.
        stripe_id_sub_cl_hnbh_4_h_jpoi_abz (string): TODO: type description
            here.
        braintree_payment_nonce (string): TODO: type description here.
        braintree_id (string): TODO: type description here.
        status (string): TODO: type description here.
        cancelled_at (string): TODO: type description here.
        cancel_at_period_end (bool): TODO: type description here.
        coupon_code (string): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "consumer_id": 'consumer_id',
        "plan_id": 'plan_id',
        "stripe_card_token": 'stripe_card_token',
        "stripe_id_sub_cl_hnbh_4_h_jpoi_abz": 'stripe_id: sub_ClHNBH4hJPOIAbz',
        "braintree_payment_nonce": 'braintree_payment_nonce',
        "braintree_id": 'braintree_id',
        "status": 'status',
        "cancelled_at": 'cancelled_at',
        "cancel_at_period_end": 'cancel_at_period_end',
        "coupon_code": 'coupon_code'
    }

    def __init__(self,
                 consumer_id=None,
                 plan_id=None,
                 stripe_card_token=None,
                 stripe_id_sub_cl_hnbh_4_h_jpoi_abz=None,
                 braintree_payment_nonce=None,
                 braintree_id=None,
                 status=None,
                 cancelled_at=None,
                 cancel_at_period_end=None,
                 coupon_code=None):
        """Constructor for the SubscriptionRequest class"""

        # Initialize members of the class
        self.consumer_id = consumer_id
        self.plan_id = plan_id
        self.stripe_card_token = stripe_card_token
        self.stripe_id_sub_cl_hnbh_4_h_jpoi_abz = stripe_id_sub_cl_hnbh_4_h_jpoi_abz
        self.braintree_payment_nonce = braintree_payment_nonce
        self.braintree_id = braintree_id
        self.status = status
        self.cancelled_at = cancelled_at
        self.cancel_at_period_end = cancel_at_period_end
        self.coupon_code = coupon_code

    @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
        consumer_id = dictionary.get('consumer_id')
        plan_id = dictionary.get('plan_id')
        stripe_card_token = dictionary.get('stripe_card_token')
        stripe_id_sub_cl_hnbh_4_h_jpoi_abz = dictionary.get('stripe_id: sub_ClHNBH4hJPOIAbz')
        braintree_payment_nonce = dictionary.get('braintree_payment_nonce')
        braintree_id = dictionary.get('braintree_id')
        status = dictionary.get('status')
        cancelled_at = dictionary.get('cancelled_at')
        cancel_at_period_end = dictionary.get('cancel_at_period_end')
        coupon_code = dictionary.get('coupon_code')

        # Return an object of this model
        return cls(consumer_id,
                   plan_id,
                   stripe_card_token,
                   stripe_id_sub_cl_hnbh_4_h_jpoi_abz,
                   braintree_payment_nonce,
                   braintree_id,
                   status,
                   cancelled_at,
                   cancel_at_period_end,
                   coupon_code)
