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

"""
billbeeapi

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


class BillbeeInterfacesBillbeeAPIModelOrderUser(object):

    """Implementation of the 'Billbee.Interfaces.BillbeeAPI.Model.OrderUser' model.

    TODO: type model description here.

    Attributes:
        platform (string): The name of the platform from which this customer
            originated
        billbee_shop_name (string): The name of shop connection in Billbee
        billbee_shop_id (long|int): The Billbee internal id of the shop
            connection
        id (string): The Billbee internal id of this customer
        nick (string): The nick name (if available) from the original system
        first_name (string): The first name of this customer
        last_name (string): The last name of this customer
        full_name (string): The full name ("firstname lastname") of this
            customer
        email (string): The email address of this customer

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "platform": 'Platform',
        "billbee_shop_name": 'BillbeeShopName',
        "billbee_shop_id": 'BillbeeShopId',
        "id": 'Id',
        "nick": 'Nick',
        "first_name": 'FirstName',
        "last_name": 'LastName',
        "full_name": 'FullName',
        "email": 'Email'
    }

    def __init__(self,
                 platform=None,
                 billbee_shop_name=None,
                 billbee_shop_id=None,
                 id=None,
                 nick=None,
                 first_name=None,
                 last_name=None,
                 full_name=None,
                 email=None):
        """Constructor for the BillbeeInterfacesBillbeeAPIModelOrderUser class"""

        # Initialize members of the class
        self.platform = platform
        self.billbee_shop_name = billbee_shop_name
        self.billbee_shop_id = billbee_shop_id
        self.id = id
        self.nick = nick
        self.first_name = first_name
        self.last_name = last_name
        self.full_name = full_name
        self.email = email

    @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
        platform = dictionary.get('Platform')
        billbee_shop_name = dictionary.get('BillbeeShopName')
        billbee_shop_id = dictionary.get('BillbeeShopId')
        id = dictionary.get('Id')
        nick = dictionary.get('Nick')
        first_name = dictionary.get('FirstName')
        last_name = dictionary.get('LastName')
        full_name = dictionary.get('FullName')
        email = dictionary.get('Email')

        # Return an object of this model
        return cls(platform,
                   billbee_shop_name,
                   billbee_shop_id,
                   id,
                   nick,
                   first_name,
                   last_name,
                   full_name,
                   email)
