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

"""
paypalserversdk

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


class VaultInstruction(object):

    """Implementation of the 'Vault Instruction' model.

    Base vaulting specification. The object can be extended for specific use
    cases within each payment_source that supports vaulting.

    Attributes:
        store_in_vault (StoreInVaultInstruction): Defines how and when the
            payment source gets vaulted.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "store_in_vault": 'store_in_vault'
    }

    def __init__(self,
                 store_in_vault=None):
        """Constructor for the VaultInstruction class"""

        # Initialize members of the class
        self.store_in_vault = store_in_vault 

    @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
        store_in_vault = dictionary.get("store_in_vault") if dictionary.get("store_in_vault") else None
        # Return an object of this model
        return cls(store_in_vault)
