#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json

from alipay.aop.api.constant.ParamConstants import *


class AlipayDataBillAccountbookereceiptApplyModel(object):

    def __init__(self):
        self._agreement_no = None
        self._key = None
        self._store_no = None
        self._type = None

    @property
    def agreement_no(self):
        return self._agreement_no

    @agreement_no.setter
    def agreement_no(self, value):
        self._agreement_no = value
    @property
    def key(self):
        return self._key

    @key.setter
    def key(self, value):
        self._key = value
    @property
    def store_no(self):
        return self._store_no

    @store_no.setter
    def store_no(self, value):
        self._store_no = value
    @property
    def type(self):
        return self._type

    @type.setter
    def type(self, value):
        self._type = value


    def to_alipay_dict(self):
        params = dict()
        if self.agreement_no:
            if hasattr(self.agreement_no, 'to_alipay_dict'):
                params['agreement_no'] = self.agreement_no.to_alipay_dict()
            else:
                params['agreement_no'] = self.agreement_no
        if self.key:
            if hasattr(self.key, 'to_alipay_dict'):
                params['key'] = self.key.to_alipay_dict()
            else:
                params['key'] = self.key
        if self.store_no:
            if hasattr(self.store_no, 'to_alipay_dict'):
                params['store_no'] = self.store_no.to_alipay_dict()
            else:
                params['store_no'] = self.store_no
        if self.type:
            if hasattr(self.type, 'to_alipay_dict'):
                params['type'] = self.type.to_alipay_dict()
            else:
                params['type'] = self.type
        return params

    @staticmethod
    def from_alipay_dict(d):
        if not d:
            return None
        o = AlipayDataBillAccountbookereceiptApplyModel()
        if 'agreement_no' in d:
            o.agreement_no = d['agreement_no']
        if 'key' in d:
            o.key = d['key']
        if 'store_no' in d:
            o.store_no = d['store_no']
        if 'type' in d:
            o.type = d['type']
        return o


