def pair(self, request, pk=None): """ Pair a taxlot to this property --- parameter_strategy: replace parameters: - name: organization_id description: The organization_id for this user's organization required: true paramType: query - name: taxlot_id description: The taxlot id to pair up with this property required: true paramType: query - name: pk description: pk (property ID) required: true paramType: path """ # TODO: Call with PUT /api/v2/properties/1/pair/?taxlot_id=1&organization_id=1 organization_id = int(request.query_params.get('organization_id')) property_id = int(pk) taxlot_id = int(request.query_params.get('taxlot_id')) return pair_unpair_property_taxlot(property_id, taxlot_id, organization_id, True)
def unpair(self, request, pk=None): """ Unpair a property from this taxlot --- parameter_strategy: replace parameters: - name: organization_id description: The organization_id for this user's organization required: true paramType: query - name: property_id description: The property id to unpair from this taxlot required: true paramType: query - name: pk description: pk (taxlot ID) required: true paramType: path """ # TODO: Call with PUT /api/v2/taxlots/1/unpair/?property_id=1&organization_id=1 organization_id = int(request.query_params.get('organization_id')) property_id = int(request.query_params.get('property_id')) taxlot_id = int(pk) return pair_unpair_property_taxlot(property_id, taxlot_id, organization_id, False)
def unpair(self, request, pk=None): """ Unpair a property from this taxlot """ organization_id = int(request.query_params.get('organization_id')) property_id = int(request.query_params.get('property_id')) taxlot_id = int(pk) return pair_unpair_property_taxlot(property_id, taxlot_id, organization_id, False)