def get_inputs(self): if not self.params: raise Exception('Params must be set') request_data = generate_request_data(self.private_key, self.params) return [ self.INPUT_TEMPLATE.format(name=k, value=v) for k, v in sorted(request_data.items(), key=operator.itemgetter(0)) ]
def get_inputs(self): if not self.params: raise ValueError('Params must be set') request_data = generate_request_data(self.private_key, self.params) return [ self.INPUT_TEMPLATE.format(name=k, value=v) for k, v in sorted(request_data.items(), key=operator.itemgetter(0)) ]
def _get_request_data(self, params): params = Params(public_key=self.public_key, **params) params.require_fields(self.REQUIRED_FIELDS) return generate_request_data(self.private_key, params)
def _get_request_data(self, params): params = Params(public_key=self.public_key, **params) params.require_fields(self.REQUIRED_FIELDS) return generate_request_data(self.private_key, params)