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

"""
zypev1

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


class TransactionRequest(object):

    """Implementation of the 'TransactionRequest' model.

    TODO: type model description here.

    Attributes:
        consumer_id (string): TODO: type description here.
        video_id (string): TODO: type description here.
        playlist_id (string): TODO: type description here.
        pass_plan_id (string): TODO: type description here.
        currency (string): TODO: type description here.
        description (string): TODO: type description here.
        transaction_type (string): Must be one of:     + purchase     + rental
            + pass
        payment_nonce_tok_1_azt_ek_chy_l_vk_xdp_8_s_wnuw_ae_w (string): TODO:
            type description here.
        roku_id (string): TODO: type description here.
        apple_id (string): TODO: type description here.
        third_party_id (string): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "consumer_id": 'consumer_id',
        "video_id": 'video_id',
        "playlist_id": 'playlist_id',
        "pass_plan_id": 'pass_plan_id',
        "currency": 'currency',
        "description": 'description',
        "transaction_type": 'transaction_type',
        "payment_nonce_tok_1_azt_ek_chy_l_vk_xdp_8_s_wnuw_ae_w": 'payment_nonce: tok_1AztEkChyLVkXdp8SWnuwAeW',
        "roku_id": 'roku_id',
        "apple_id": 'apple_id',
        "third_party_id": 'third_party_id'
    }

    def __init__(self,
                 consumer_id=None,
                 video_id=None,
                 playlist_id=None,
                 pass_plan_id=None,
                 currency=None,
                 description=None,
                 transaction_type=None,
                 payment_nonce_tok_1_azt_ek_chy_l_vk_xdp_8_s_wnuw_ae_w=None,
                 roku_id=None,
                 apple_id=None,
                 third_party_id=None):
        """Constructor for the TransactionRequest class"""

        # Initialize members of the class
        self.consumer_id = consumer_id
        self.video_id = video_id
        self.playlist_id = playlist_id
        self.pass_plan_id = pass_plan_id
        self.currency = currency
        self.description = description
        self.transaction_type = transaction_type
        self.payment_nonce_tok_1_azt_ek_chy_l_vk_xdp_8_s_wnuw_ae_w = payment_nonce_tok_1_azt_ek_chy_l_vk_xdp_8_s_wnuw_ae_w
        self.roku_id = roku_id
        self.apple_id = apple_id
        self.third_party_id = third_party_id

    @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')
        video_id = dictionary.get('video_id')
        playlist_id = dictionary.get('playlist_id')
        pass_plan_id = dictionary.get('pass_plan_id')
        currency = dictionary.get('currency')
        description = dictionary.get('description')
        transaction_type = dictionary.get('transaction_type')
        payment_nonce_tok_1_azt_ek_chy_l_vk_xdp_8_s_wnuw_ae_w = dictionary.get('payment_nonce: tok_1AztEkChyLVkXdp8SWnuwAeW')
        roku_id = dictionary.get('roku_id')
        apple_id = dictionary.get('apple_id')
        third_party_id = dictionary.get('third_party_id')

        # Return an object of this model
        return cls(consumer_id,
                   video_id,
                   playlist_id,
                   pass_plan_id,
                   currency,
                   description,
                   transaction_type,
                   payment_nonce_tok_1_azt_ek_chy_l_vk_xdp_8_s_wnuw_ae_w,
                   roku_id,
                   apple_id,
                   third_party_id)
