mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 22:45:27 +01:00
feat: added listoffers grpc command
This commit is contained in:
parent
d1052e3924
commit
317cf4d430
10 changed files with 366 additions and 90 deletions
55
.msggen.json
55
.msggen.json
|
@ -1120,6 +1120,21 @@
|
||||||
"ListnodesResponse": {
|
"ListnodesResponse": {
|
||||||
"ListNodes.nodes[]": 1
|
"ListNodes.nodes[]": 1
|
||||||
},
|
},
|
||||||
|
"ListoffersOffers": {
|
||||||
|
"ListOffers.offers[].active": 2,
|
||||||
|
"ListOffers.offers[].bolt12": 4,
|
||||||
|
"ListOffers.offers[].label": 6,
|
||||||
|
"ListOffers.offers[].offer_id": 1,
|
||||||
|
"ListOffers.offers[].single_use": 3,
|
||||||
|
"ListOffers.offers[].used": 5
|
||||||
|
},
|
||||||
|
"ListoffersRequest": {
|
||||||
|
"ListOffers.active_only": 2,
|
||||||
|
"ListOffers.offer_id": 1
|
||||||
|
},
|
||||||
|
"ListoffersResponse": {
|
||||||
|
"ListOffers.offers[]": 1
|
||||||
|
},
|
||||||
"ListpaysPays": {
|
"ListpaysPays": {
|
||||||
"ListPays.pays[].amount_msat": 8,
|
"ListPays.pays[].amount_msat": 8,
|
||||||
"ListPays.pays[].amount_sent_msat": 9,
|
"ListPays.pays[].amount_sent_msat": 9,
|
||||||
|
@ -4242,6 +4257,46 @@
|
||||||
"added": "pre-v0.10.1",
|
"added": "pre-v0.10.1",
|
||||||
"deprecated": false
|
"deprecated": false
|
||||||
},
|
},
|
||||||
|
"ListOffers": {
|
||||||
|
"added": "pre-v0.10.1",
|
||||||
|
"deprecated": null
|
||||||
|
},
|
||||||
|
"ListOffers.active_only": {
|
||||||
|
"added": "pre-v0.10.1",
|
||||||
|
"deprecated": false
|
||||||
|
},
|
||||||
|
"ListOffers.offer_id": {
|
||||||
|
"added": "pre-v0.10.1",
|
||||||
|
"deprecated": false
|
||||||
|
},
|
||||||
|
"ListOffers.offers[]": {
|
||||||
|
"added": "pre-v0.10.1",
|
||||||
|
"deprecated": false
|
||||||
|
},
|
||||||
|
"ListOffers.offers[].active": {
|
||||||
|
"added": "pre-v0.10.1",
|
||||||
|
"deprecated": false
|
||||||
|
},
|
||||||
|
"ListOffers.offers[].bolt12": {
|
||||||
|
"added": "pre-v0.10.1",
|
||||||
|
"deprecated": false
|
||||||
|
},
|
||||||
|
"ListOffers.offers[].label": {
|
||||||
|
"added": "pre-v0.10.1",
|
||||||
|
"deprecated": false
|
||||||
|
},
|
||||||
|
"ListOffers.offers[].offer_id": {
|
||||||
|
"added": "pre-v0.10.1",
|
||||||
|
"deprecated": false
|
||||||
|
},
|
||||||
|
"ListOffers.offers[].single_use": {
|
||||||
|
"added": "pre-v0.10.1",
|
||||||
|
"deprecated": false
|
||||||
|
},
|
||||||
|
"ListOffers.offers[].used": {
|
||||||
|
"added": "pre-v0.10.1",
|
||||||
|
"deprecated": false
|
||||||
|
},
|
||||||
"ListPays": {
|
"ListPays": {
|
||||||
"added": "pre-v0.10.1",
|
"added": "pre-v0.10.1",
|
||||||
"deprecated": null
|
"deprecated": null
|
||||||
|
|
19
cln-grpc/proto/node.proto
generated
19
cln-grpc/proto/node.proto
generated
|
@ -56,6 +56,7 @@ service Node {
|
||||||
rpc FundChannel(FundchannelRequest) returns (FundchannelResponse) {}
|
rpc FundChannel(FundchannelRequest) returns (FundchannelResponse) {}
|
||||||
rpc GetRoute(GetrouteRequest) returns (GetrouteResponse) {}
|
rpc GetRoute(GetrouteRequest) returns (GetrouteResponse) {}
|
||||||
rpc ListForwards(ListforwardsRequest) returns (ListforwardsResponse) {}
|
rpc ListForwards(ListforwardsRequest) returns (ListforwardsResponse) {}
|
||||||
|
rpc ListOffers(ListoffersRequest) returns (ListoffersResponse) {}
|
||||||
rpc ListPays(ListpaysRequest) returns (ListpaysResponse) {}
|
rpc ListPays(ListpaysRequest) returns (ListpaysResponse) {}
|
||||||
rpc ListHtlcs(ListhtlcsRequest) returns (ListhtlcsResponse) {}
|
rpc ListHtlcs(ListhtlcsRequest) returns (ListhtlcsResponse) {}
|
||||||
rpc Offer(OfferRequest) returns (OfferResponse) {}
|
rpc Offer(OfferRequest) returns (OfferResponse) {}
|
||||||
|
@ -1737,6 +1738,24 @@ message ListforwardsForwards {
|
||||||
optional Amount out_msat = 8;
|
optional Amount out_msat = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message ListoffersRequest {
|
||||||
|
optional bytes offer_id = 1;
|
||||||
|
optional bool active_only = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ListoffersResponse {
|
||||||
|
repeated ListoffersOffers offers = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ListoffersOffers {
|
||||||
|
bytes offer_id = 1;
|
||||||
|
bool active = 2;
|
||||||
|
bool single_use = 3;
|
||||||
|
string bolt12 = 4;
|
||||||
|
bool used = 5;
|
||||||
|
optional string label = 6;
|
||||||
|
}
|
||||||
|
|
||||||
message ListpaysRequest {
|
message ListpaysRequest {
|
||||||
// ListPays.status
|
// ListPays.status
|
||||||
enum ListpaysStatus {
|
enum ListpaysStatus {
|
||||||
|
|
44
cln-grpc/src/convert.rs
generated
44
cln-grpc/src/convert.rs
generated
|
@ -1637,6 +1637,30 @@ impl From<responses::ListforwardsResponse> for pb::ListforwardsResponse {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
impl From<responses::ListoffersOffers> for pb::ListoffersOffers {
|
||||||
|
fn from(c: responses::ListoffersOffers) -> Self {
|
||||||
|
Self {
|
||||||
|
offer_id: <Sha256 as AsRef<[u8]>>::as_ref(&c.offer_id).to_vec(), // Rule #2 for type hash
|
||||||
|
active: c.active, // Rule #2 for type boolean
|
||||||
|
single_use: c.single_use, // Rule #2 for type boolean
|
||||||
|
bolt12: c.bolt12, // Rule #2 for type string
|
||||||
|
used: c.used, // Rule #2 for type boolean
|
||||||
|
label: c.label, // Rule #2 for type string?
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
impl From<responses::ListoffersResponse> for pb::ListoffersResponse {
|
||||||
|
fn from(c: responses::ListoffersResponse) -> Self {
|
||||||
|
Self {
|
||||||
|
// Field: ListOffers.offers[]
|
||||||
|
offers: c.offers.into_iter().map(|i| i.into()).collect(), // Rule #3 for type ListoffersOffers
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[allow(unused_variables)]
|
#[allow(unused_variables)]
|
||||||
impl From<responses::ListpaysPays> for pb::ListpaysPays {
|
impl From<responses::ListpaysPays> for pb::ListpaysPays {
|
||||||
fn from(c: responses::ListpaysPays) -> Self {
|
fn from(c: responses::ListpaysPays) -> Self {
|
||||||
|
@ -2482,6 +2506,16 @@ impl From<requests::ListforwardsRequest> for pb::ListforwardsRequest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
impl From<requests::ListoffersRequest> for pb::ListoffersRequest {
|
||||||
|
fn from(c: requests::ListoffersRequest) -> Self {
|
||||||
|
Self {
|
||||||
|
offer_id: c.offer_id.map(|v| <Sha256 as AsRef<[u8]>>::as_ref(&v).to_vec()), // Rule #2 for type hash?
|
||||||
|
active_only: c.active_only, // Rule #2 for type boolean?
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[allow(unused_variables)]
|
#[allow(unused_variables)]
|
||||||
impl From<requests::ListpaysRequest> for pb::ListpaysRequest {
|
impl From<requests::ListpaysRequest> for pb::ListpaysRequest {
|
||||||
fn from(c: requests::ListpaysRequest) -> Self {
|
fn from(c: requests::ListpaysRequest) -> Self {
|
||||||
|
@ -3283,6 +3317,16 @@ impl From<pb::ListforwardsRequest> for requests::ListforwardsRequest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unused_variables)]
|
||||||
|
impl From<pb::ListoffersRequest> for requests::ListoffersRequest {
|
||||||
|
fn from(c: pb::ListoffersRequest) -> Self {
|
||||||
|
Self {
|
||||||
|
offer_id: c.offer_id.map(|v| Sha256::from_slice(&v).unwrap()), // Rule #1 for type hash?
|
||||||
|
active_only: c.active_only, // Rule #1 for type boolean?
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[allow(unused_variables)]
|
#[allow(unused_variables)]
|
||||||
impl From<pb::ListpaysRequest> for requests::ListpaysRequest {
|
impl From<pb::ListpaysRequest> for requests::ListpaysRequest {
|
||||||
fn from(c: pb::ListpaysRequest) -> Self {
|
fn from(c: pb::ListpaysRequest) -> Self {
|
||||||
|
|
|
@ -1562,6 +1562,38 @@ async fn list_forwards(
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async fn list_offers(
|
||||||
|
&self,
|
||||||
|
request: tonic::Request<pb::ListoffersRequest>,
|
||||||
|
) -> Result<tonic::Response<pb::ListoffersResponse>, tonic::Status> {
|
||||||
|
let req = request.into_inner();
|
||||||
|
let req: requests::ListoffersRequest = req.into();
|
||||||
|
debug!("Client asked for list_offers");
|
||||||
|
trace!("list_offers request: {:?}", req);
|
||||||
|
let mut rpc = ClnRpc::new(&self.rpc_path)
|
||||||
|
.await
|
||||||
|
.map_err(|e| Status::new(Code::Internal, e.to_string()))?;
|
||||||
|
let result = rpc.call(Request::ListOffers(req))
|
||||||
|
.await
|
||||||
|
.map_err(|e| Status::new(
|
||||||
|
Code::Unknown,
|
||||||
|
format!("Error calling method ListOffers: {:?}", e)))?;
|
||||||
|
match result {
|
||||||
|
Response::ListOffers(r) => {
|
||||||
|
trace!("list_offers response: {:?}", r);
|
||||||
|
Ok(tonic::Response::new(r.into()))
|
||||||
|
},
|
||||||
|
r => Err(Status::new(
|
||||||
|
Code::Internal,
|
||||||
|
format!(
|
||||||
|
"Unexpected result {:?} to method call ListOffers",
|
||||||
|
r
|
||||||
|
)
|
||||||
|
)),
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
async fn list_pays(
|
async fn list_pays(
|
||||||
&self,
|
&self,
|
||||||
request: tonic::Request<pb::ListpaysRequest>,
|
request: tonic::Request<pb::ListpaysRequest>,
|
||||||
|
|
54
cln-rpc/src/model.rs
generated
54
cln-rpc/src/model.rs
generated
|
@ -65,6 +65,7 @@ pub enum Request {
|
||||||
FundChannel(requests::FundchannelRequest),
|
FundChannel(requests::FundchannelRequest),
|
||||||
GetRoute(requests::GetrouteRequest),
|
GetRoute(requests::GetrouteRequest),
|
||||||
ListForwards(requests::ListforwardsRequest),
|
ListForwards(requests::ListforwardsRequest),
|
||||||
|
ListOffers(requests::ListoffersRequest),
|
||||||
ListPays(requests::ListpaysRequest),
|
ListPays(requests::ListpaysRequest),
|
||||||
ListHtlcs(requests::ListhtlcsRequest),
|
ListHtlcs(requests::ListhtlcsRequest),
|
||||||
Offer(requests::OfferRequest),
|
Offer(requests::OfferRequest),
|
||||||
|
@ -134,6 +135,7 @@ pub enum Response {
|
||||||
FundChannel(responses::FundchannelResponse),
|
FundChannel(responses::FundchannelResponse),
|
||||||
GetRoute(responses::GetrouteResponse),
|
GetRoute(responses::GetrouteResponse),
|
||||||
ListForwards(responses::ListforwardsResponse),
|
ListForwards(responses::ListforwardsResponse),
|
||||||
|
ListOffers(responses::ListoffersResponse),
|
||||||
ListPays(responses::ListpaysResponse),
|
ListPays(responses::ListpaysResponse),
|
||||||
ListHtlcs(responses::ListhtlcsResponse),
|
ListHtlcs(responses::ListhtlcsResponse),
|
||||||
Offer(responses::OfferResponse),
|
Offer(responses::OfferResponse),
|
||||||
|
@ -1817,6 +1819,31 @@ pub mod requests {
|
||||||
"listforwards"
|
"listforwards"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
|
pub struct ListoffersRequest {
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub offer_id: Option<Sha256>,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub active_only: Option<bool>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl From<ListoffersRequest> for Request {
|
||||||
|
fn from(r: ListoffersRequest) -> Self {
|
||||||
|
Request::ListOffers(r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl IntoRequest for ListoffersRequest {
|
||||||
|
type Response = super::responses::ListoffersResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
impl TypedRequest for ListoffersRequest {
|
||||||
|
type Response = super::responses::ListoffersResponse;
|
||||||
|
|
||||||
|
fn method(&self) -> &str {
|
||||||
|
"listoffers"
|
||||||
|
}
|
||||||
|
}
|
||||||
#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
|
#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
|
||||||
pub enum ListpaysStatus {
|
pub enum ListpaysStatus {
|
||||||
#[serde(rename = "pending")]
|
#[serde(rename = "pending")]
|
||||||
|
@ -5586,6 +5613,33 @@ pub mod responses {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
|
pub struct ListoffersOffers {
|
||||||
|
pub offer_id: Sha256,
|
||||||
|
pub active: bool,
|
||||||
|
pub single_use: bool,
|
||||||
|
pub bolt12: String,
|
||||||
|
pub used: bool,
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub label: Option<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||||
|
pub struct ListoffersResponse {
|
||||||
|
pub offers: Vec<ListoffersOffers>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl TryFrom<Response> for ListoffersResponse {
|
||||||
|
type Error = super::TryFromResponseError;
|
||||||
|
|
||||||
|
fn try_from(response: Response) -> Result<Self, Self::Error> {
|
||||||
|
match response {
|
||||||
|
Response::ListOffers(response) => Ok(response),
|
||||||
|
_ => Err(TryFromResponseError)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// status of the payment
|
/// status of the payment
|
||||||
#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
|
#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
|
||||||
pub enum ListpaysPaysStatus {
|
pub enum ListpaysPaysStatus {
|
||||||
|
|
|
@ -82,7 +82,7 @@ def load_jsonrpc_service(schema_dir: str):
|
||||||
# "getlog",
|
# "getlog",
|
||||||
"GetRoute",
|
"GetRoute",
|
||||||
"ListForwards",
|
"ListForwards",
|
||||||
# "listoffers",
|
"ListOffers",
|
||||||
"ListPays",
|
"ListPays",
|
||||||
"ListHtlcs",
|
"ListHtlcs",
|
||||||
# "multifundchannel",
|
# "multifundchannel",
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -254,6 +254,11 @@ class NodeStub(object):
|
||||||
request_serializer=node__pb2.ListforwardsRequest.SerializeToString,
|
request_serializer=node__pb2.ListforwardsRequest.SerializeToString,
|
||||||
response_deserializer=node__pb2.ListforwardsResponse.FromString,
|
response_deserializer=node__pb2.ListforwardsResponse.FromString,
|
||||||
)
|
)
|
||||||
|
self.ListOffers = channel.unary_unary(
|
||||||
|
'/cln.Node/ListOffers',
|
||||||
|
request_serializer=node__pb2.ListoffersRequest.SerializeToString,
|
||||||
|
response_deserializer=node__pb2.ListoffersResponse.FromString,
|
||||||
|
)
|
||||||
self.ListPays = channel.unary_unary(
|
self.ListPays = channel.unary_unary(
|
||||||
'/cln.Node/ListPays',
|
'/cln.Node/ListPays',
|
||||||
request_serializer=node__pb2.ListpaysRequest.SerializeToString,
|
request_serializer=node__pb2.ListpaysRequest.SerializeToString,
|
||||||
|
@ -622,6 +627,12 @@ class NodeServicer(object):
|
||||||
context.set_details('Method not implemented!')
|
context.set_details('Method not implemented!')
|
||||||
raise NotImplementedError('Method not implemented!')
|
raise NotImplementedError('Method not implemented!')
|
||||||
|
|
||||||
|
def ListOffers(self, request, context):
|
||||||
|
"""Missing associated documentation comment in .proto file."""
|
||||||
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||||
|
context.set_details('Method not implemented!')
|
||||||
|
raise NotImplementedError('Method not implemented!')
|
||||||
|
|
||||||
def ListPays(self, request, context):
|
def ListPays(self, request, context):
|
||||||
"""Missing associated documentation comment in .proto file."""
|
"""Missing associated documentation comment in .proto file."""
|
||||||
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||||
|
@ -955,6 +966,11 @@ def add_NodeServicer_to_server(servicer, server):
|
||||||
request_deserializer=node__pb2.ListforwardsRequest.FromString,
|
request_deserializer=node__pb2.ListforwardsRequest.FromString,
|
||||||
response_serializer=node__pb2.ListforwardsResponse.SerializeToString,
|
response_serializer=node__pb2.ListforwardsResponse.SerializeToString,
|
||||||
),
|
),
|
||||||
|
'ListOffers': grpc.unary_unary_rpc_method_handler(
|
||||||
|
servicer.ListOffers,
|
||||||
|
request_deserializer=node__pb2.ListoffersRequest.FromString,
|
||||||
|
response_serializer=node__pb2.ListoffersResponse.SerializeToString,
|
||||||
|
),
|
||||||
'ListPays': grpc.unary_unary_rpc_method_handler(
|
'ListPays': grpc.unary_unary_rpc_method_handler(
|
||||||
servicer.ListPays,
|
servicer.ListPays,
|
||||||
request_deserializer=node__pb2.ListpaysRequest.FromString,
|
request_deserializer=node__pb2.ListpaysRequest.FromString,
|
||||||
|
@ -1856,6 +1872,23 @@ class Node(object):
|
||||||
options, channel_credentials,
|
options, channel_credentials,
|
||||||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def ListOffers(request,
|
||||||
|
target,
|
||||||
|
options=(),
|
||||||
|
channel_credentials=None,
|
||||||
|
call_credentials=None,
|
||||||
|
insecure=False,
|
||||||
|
compression=None,
|
||||||
|
wait_for_ready=None,
|
||||||
|
timeout=None,
|
||||||
|
metadata=None):
|
||||||
|
return grpc.experimental.unary_unary(request, target, '/cln.Node/ListOffers',
|
||||||
|
node__pb2.ListoffersRequest.SerializeToString,
|
||||||
|
node__pb2.ListoffersResponse.FromString,
|
||||||
|
options, channel_credentials,
|
||||||
|
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def ListPays(request,
|
def ListPays(request,
|
||||||
target,
|
target,
|
||||||
|
|
|
@ -1378,6 +1378,23 @@ def listforwards2py(m):
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
def listoffers_offers2py(m):
|
||||||
|
return remove_default({
|
||||||
|
"offer_id": hexlify(m.offer_id), # PrimitiveField in generate_composite
|
||||||
|
"active": m.active, # PrimitiveField in generate_composite
|
||||||
|
"single_use": m.single_use, # PrimitiveField in generate_composite
|
||||||
|
"bolt12": m.bolt12, # PrimitiveField in generate_composite
|
||||||
|
"used": m.used, # PrimitiveField in generate_composite
|
||||||
|
"label": m.label, # PrimitiveField in generate_composite
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
def listoffers2py(m):
|
||||||
|
return remove_default({
|
||||||
|
"offers": [listoffers_offers2py(i) for i in m.offers], # ArrayField[composite] in generate_composite
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
def listpays_pays2py(m):
|
def listpays_pays2py(m):
|
||||||
return remove_default({
|
return remove_default({
|
||||||
"payment_hash": hexlify(m.payment_hash), # PrimitiveField in generate_composite
|
"payment_hash": hexlify(m.payment_hash), # PrimitiveField in generate_composite
|
||||||
|
|
16
doc/schemas/listoffers.request.json
Normal file
16
doc/schemas/listoffers.request.json
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"type": "object",
|
||||||
|
"required": [],
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"offer_id": {
|
||||||
|
"type": "hash",
|
||||||
|
"description": "Only return offers matching this ID"
|
||||||
|
},
|
||||||
|
"active_only": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "f active_only is set and is true, only offers with active true are returned."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue