mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
Upgrade to latest API versions + code regen
This commit is contained in:
@@ -293,15 +293,20 @@ impl<'n> Engine<'n> {
|
||||
|
||||
let type_info: Option<(&'static str, JsonTypeInfo)> =
|
||||
match &temp_cursor.to_string()[..] {
|
||||
"reason" => Some(("reason", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"amount-pretax.currency" => Some(("amountPretax.currency", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"amount-pretax.value" => Some(("amountPretax.value", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"quantity" => Some(("quantity", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
|
||||
"amount.currency" => Some(("amount.currency", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"amount.value" => Some(("amount.value", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"reason" => Some(("reason", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"reason-text" => Some(("reasonText", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"line-item-id" => Some(("lineItemId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"amount-tax.currency" => Some(("amountTax.currency", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"amount-tax.value" => Some(("amountTax.value", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"operation-id" => Some(("operationId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"quantity" => Some(("quantity", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
|
||||
"product-id" => Some(("productId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
_ => {
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["amount", "currency", "line-item-id", "operation-id", "quantity", "reason", "reason-text", "value"]);
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["amount", "amount-pretax", "amount-tax", "currency", "line-item-id", "operation-id", "product-id", "quantity", "reason", "reason-text", "value"]);
|
||||
err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string()))));
|
||||
None
|
||||
}
|
||||
@@ -388,6 +393,7 @@ impl<'n> Engine<'n> {
|
||||
"test-order.customer.full-name" => Some(("testOrder.customer.fullName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"test-order.customer.email" => Some(("testOrder.customer.email", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"test-order.kind" => Some(("testOrder.kind", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"test-order.notification-mode" => Some(("testOrder.notificationMode", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"test-order.predefined-delivery-address" => Some(("testOrder.predefinedDeliveryAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"test-order.shipping-cost.currency" => Some(("testOrder.shippingCost.currency", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"test-order.shipping-cost.value" => Some(("testOrder.shippingCost.value", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
@@ -401,7 +407,7 @@ impl<'n> Engine<'n> {
|
||||
"test-order.payment-method.predefined-billing-address" => Some(("testOrder.paymentMethod.predefinedBillingAddress", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"template-name" => Some(("templateName", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
_ => {
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["currency", "customer", "email", "expiration-month", "expiration-year", "explicit-marketing-preference", "full-name", "kind", "last-four-digits", "payment-method", "predefined-billing-address", "predefined-delivery-address", "shipping-cost", "shipping-cost-tax", "shipping-option", "template-name", "test-order", "type", "value"]);
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["currency", "customer", "email", "expiration-month", "expiration-year", "explicit-marketing-preference", "full-name", "kind", "last-four-digits", "notification-mode", "payment-method", "predefined-billing-address", "predefined-delivery-address", "shipping-cost", "shipping-cost-tax", "shipping-option", "template-name", "test-order", "type", "value"]);
|
||||
err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string()))));
|
||||
None
|
||||
}
|
||||
@@ -798,13 +804,17 @@ impl<'n> Engine<'n> {
|
||||
|
||||
let type_info: Option<(&'static str, JsonTypeInfo)> =
|
||||
match &temp_cursor.to_string()[..] {
|
||||
"amount-pretax.currency" => Some(("amountPretax.currency", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"amount-pretax.value" => Some(("amountPretax.value", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"amount.currency" => Some(("amount.currency", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"amount.value" => Some(("amount.value", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"reason-text" => Some(("reasonText", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"reason" => Some(("reason", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"amount-tax.currency" => Some(("amountTax.currency", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"amount-tax.value" => Some(("amountTax.value", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"operation-id" => Some(("operationId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
_ => {
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["amount", "currency", "operation-id", "reason", "reason-text", "value"]);
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["amount", "amount-pretax", "amount-tax", "currency", "operation-id", "reason", "reason-text", "value"]);
|
||||
err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string()))));
|
||||
None
|
||||
}
|
||||
@@ -887,13 +897,14 @@ impl<'n> Engine<'n> {
|
||||
|
||||
let type_info: Option<(&'static str, JsonTypeInfo)> =
|
||||
match &temp_cursor.to_string()[..] {
|
||||
"quantity" => Some(("quantity", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
|
||||
"operation-id" => Some(("operationId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"reason" => Some(("reason", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"reason-text" => Some(("reasonText", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"line-item-id" => Some(("lineItemId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"operation-id" => Some(("operationId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"product-id" => Some(("productId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"quantity" => Some(("quantity", JsonTypeInfo { jtype: JsonType::Int, ctype: ComplexType::Pod })),
|
||||
_ => {
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["line-item-id", "operation-id", "quantity", "reason", "reason-text"]);
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["line-item-id", "operation-id", "product-id", "quantity", "reason", "reason-text"]);
|
||||
err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string()))));
|
||||
None
|
||||
}
|
||||
@@ -953,6 +964,93 @@ impl<'n> Engine<'n> {
|
||||
}
|
||||
}
|
||||
|
||||
fn _orders_setlineitemmetadata(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
|
||||
-> Result<(), DoitError> {
|
||||
|
||||
let mut field_cursor = FieldCursor::default();
|
||||
let mut object = json::value::Value::Object(Default::default());
|
||||
|
||||
for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
|
||||
let last_errc = err.issues.len();
|
||||
let (key, value) = parse_kv_arg(&*kvarg, err, false);
|
||||
let mut temp_cursor = field_cursor.clone();
|
||||
if let Err(field_err) = temp_cursor.set(&*key) {
|
||||
err.issues.push(field_err);
|
||||
}
|
||||
if value.is_none() {
|
||||
field_cursor = temp_cursor.clone();
|
||||
if err.issues.len() > last_errc {
|
||||
err.issues.remove(last_errc);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
let type_info: Option<(&'static str, JsonTypeInfo)> =
|
||||
match &temp_cursor.to_string()[..] {
|
||||
"product-id" => Some(("productId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"line-item-id" => Some(("lineItemId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"operation-id" => Some(("operationId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
_ => {
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["line-item-id", "operation-id", "product-id"]);
|
||||
err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string()))));
|
||||
None
|
||||
}
|
||||
};
|
||||
if let Some((field_cursor_str, type_info)) = type_info {
|
||||
FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor);
|
||||
}
|
||||
}
|
||||
let mut request: api::OrdersSetLineItemMetadataRequest = json::value::from_value(object).unwrap();
|
||||
let mut call = self.hub.orders().setlineitemmetadata(request, opt.value_of("merchant-id").unwrap_or(""), opt.value_of("order-id").unwrap_or(""));
|
||||
for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
|
||||
let (key, value) = parse_kv_arg(&*parg, err, false);
|
||||
match key {
|
||||
_ => {
|
||||
let mut found = false;
|
||||
for param in &self.gp {
|
||||
if key == *param {
|
||||
found = true;
|
||||
call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
err.issues.push(CLIError::UnknownParameter(key.to_string(),
|
||||
{let mut v = Vec::new();
|
||||
v.extend(self.gp.iter().map(|v|*v));
|
||||
v } ));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let protocol = CallType::Standard;
|
||||
if dry_run {
|
||||
Ok(())
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
|
||||
call = call.add_scope(scope);
|
||||
}
|
||||
let mut ostream = match writer_from_opts(opt.value_of("out")) {
|
||||
Ok(mut f) => f,
|
||||
Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)),
|
||||
};
|
||||
match match protocol {
|
||||
CallType::Standard => call.doit(),
|
||||
_ => unreachable!()
|
||||
} {
|
||||
Err(api_err) => Err(DoitError::ApiError(api_err)),
|
||||
Ok((mut response, output_schema)) => {
|
||||
let mut value = json::value::to_value(&output_schema).expect("serde to work");
|
||||
remove_json_null_values(&mut value);
|
||||
json::to_writer_pretty(&mut ostream, &value).unwrap();
|
||||
ostream.flush().unwrap();
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn _orders_shiplineitems(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
|
||||
-> Result<(), DoitError> {
|
||||
|
||||
@@ -1041,6 +1139,95 @@ impl<'n> Engine<'n> {
|
||||
}
|
||||
}
|
||||
|
||||
fn _orders_updatelineitemshippingdetails(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
|
||||
-> Result<(), DoitError> {
|
||||
|
||||
let mut field_cursor = FieldCursor::default();
|
||||
let mut object = json::value::Value::Object(Default::default());
|
||||
|
||||
for kvarg in opt.values_of("kv").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
|
||||
let last_errc = err.issues.len();
|
||||
let (key, value) = parse_kv_arg(&*kvarg, err, false);
|
||||
let mut temp_cursor = field_cursor.clone();
|
||||
if let Err(field_err) = temp_cursor.set(&*key) {
|
||||
err.issues.push(field_err);
|
||||
}
|
||||
if value.is_none() {
|
||||
field_cursor = temp_cursor.clone();
|
||||
if err.issues.len() > last_errc {
|
||||
err.issues.remove(last_errc);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
let type_info: Option<(&'static str, JsonTypeInfo)> =
|
||||
match &temp_cursor.to_string()[..] {
|
||||
"deliver-by-date" => Some(("deliverByDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"ship-by-date" => Some(("shipByDate", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"product-id" => Some(("productId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"line-item-id" => Some(("lineItemId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
"operation-id" => Some(("operationId", JsonTypeInfo { jtype: JsonType::String, ctype: ComplexType::Pod })),
|
||||
_ => {
|
||||
let suggestion = FieldCursor::did_you_mean(key, &vec!["deliver-by-date", "line-item-id", "operation-id", "product-id", "ship-by-date"]);
|
||||
err.issues.push(CLIError::Field(FieldError::Unknown(temp_cursor.to_string(), suggestion, value.map(|v| v.to_string()))));
|
||||
None
|
||||
}
|
||||
};
|
||||
if let Some((field_cursor_str, type_info)) = type_info {
|
||||
FieldCursor::from(field_cursor_str).set_json_value(&mut object, value.unwrap(), type_info, err, &temp_cursor);
|
||||
}
|
||||
}
|
||||
let mut request: api::OrdersUpdateLineItemShippingDetailsRequest = json::value::from_value(object).unwrap();
|
||||
let mut call = self.hub.orders().updatelineitemshippingdetails(request, opt.value_of("merchant-id").unwrap_or(""), opt.value_of("order-id").unwrap_or(""));
|
||||
for parg in opt.values_of("v").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
|
||||
let (key, value) = parse_kv_arg(&*parg, err, false);
|
||||
match key {
|
||||
_ => {
|
||||
let mut found = false;
|
||||
for param in &self.gp {
|
||||
if key == *param {
|
||||
found = true;
|
||||
call = call.param(self.gpm.iter().find(|t| t.0 == key).unwrap_or(&("", key)).1, value.unwrap_or("unset"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
err.issues.push(CLIError::UnknownParameter(key.to_string(),
|
||||
{let mut v = Vec::new();
|
||||
v.extend(self.gp.iter().map(|v|*v));
|
||||
v } ));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
let protocol = CallType::Standard;
|
||||
if dry_run {
|
||||
Ok(())
|
||||
} else {
|
||||
assert!(err.issues.len() == 0);
|
||||
for scope in self.opt.values_of("url").map(|i|i.collect()).unwrap_or(Vec::new()).iter() {
|
||||
call = call.add_scope(scope);
|
||||
}
|
||||
let mut ostream = match writer_from_opts(opt.value_of("out")) {
|
||||
Ok(mut f) => f,
|
||||
Err(io_err) => return Err(DoitError::IoError(opt.value_of("out").unwrap_or("-").to_string(), io_err)),
|
||||
};
|
||||
match match protocol {
|
||||
CallType::Standard => call.doit(),
|
||||
_ => unreachable!()
|
||||
} {
|
||||
Err(api_err) => Err(DoitError::ApiError(api_err)),
|
||||
Ok((mut response, output_schema)) => {
|
||||
let mut value = json::value::to_value(&output_schema).expect("serde to work");
|
||||
remove_json_null_values(&mut value);
|
||||
json::to_writer_pretty(&mut ostream, &value).unwrap();
|
||||
ostream.flush().unwrap();
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn _orders_updatemerchantorderid(&self, opt: &ArgMatches<'n>, dry_run: bool, err: &mut InvalidOptionsError)
|
||||
-> Result<(), DoitError> {
|
||||
|
||||
@@ -1259,9 +1446,15 @@ impl<'n> Engine<'n> {
|
||||
("returnlineitem", Some(opt)) => {
|
||||
call_result = self._orders_returnlineitem(opt, dry_run, &mut err);
|
||||
},
|
||||
("setlineitemmetadata", Some(opt)) => {
|
||||
call_result = self._orders_setlineitemmetadata(opt, dry_run, &mut err);
|
||||
},
|
||||
("shiplineitems", Some(opt)) => {
|
||||
call_result = self._orders_shiplineitems(opt, dry_run, &mut err);
|
||||
},
|
||||
("updatelineitemshippingdetails", Some(opt)) => {
|
||||
call_result = self._orders_updatelineitemshippingdetails(opt, dry_run, &mut err);
|
||||
},
|
||||
("updatemerchantorderid", Some(opt)) => {
|
||||
call_result = self._orders_updatemerchantorderid(opt, dry_run, &mut err);
|
||||
},
|
||||
@@ -1356,14 +1549,14 @@ impl<'n> Engine<'n> {
|
||||
fn main() {
|
||||
let mut exit_status = 0i32;
|
||||
let arg_data = [
|
||||
("orders", "methods: 'acknowledge', 'advancetestorder', 'cancel', 'cancellineitem', 'createtestorder', 'custombatch', 'get', 'getbymerchantorderid', 'gettestordertemplate', 'list', 'refund', 'returnlineitem', 'shiplineitems', 'updatemerchantorderid' and 'updateshipment'", vec![
|
||||
("orders", "methods: 'acknowledge', 'advancetestorder', 'cancel', 'cancellineitem', 'createtestorder', 'custombatch', 'get', 'getbymerchantorderid', 'gettestordertemplate', 'list', 'refund', 'returnlineitem', 'setlineitemmetadata', 'shiplineitems', 'updatelineitemshippingdetails', 'updatemerchantorderid' and 'updateshipment'", vec![
|
||||
("acknowledge",
|
||||
Some(r##"Marks an order as acknowledged. This method can only be called for non-multi-client accounts."##),
|
||||
Some(r##"Marks an order as acknowledged."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli/orders_acknowledge",
|
||||
vec![
|
||||
(Some(r##"merchant-id"##),
|
||||
None,
|
||||
Some(r##"The ID of the managing account."##),
|
||||
Some(r##"The ID of the account that manages the order. This cannot be a multi-client account."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
@@ -1392,12 +1585,12 @@ fn main() {
|
||||
Some(false)),
|
||||
]),
|
||||
("advancetestorder",
|
||||
Some(r##"Sandbox only. Moves a test order from state "inProgress" to state "pendingShipment". This method can only be called for non-multi-client accounts."##),
|
||||
Some(r##"Sandbox only. Moves a test order from state "inProgress" to state "pendingShipment"."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli/orders_advancetestorder",
|
||||
vec![
|
||||
(Some(r##"merchant-id"##),
|
||||
None,
|
||||
Some(r##"The ID of the managing account."##),
|
||||
Some(r##"The ID of the account that manages the order. This cannot be a multi-client account."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
@@ -1420,12 +1613,12 @@ fn main() {
|
||||
Some(false)),
|
||||
]),
|
||||
("cancel",
|
||||
Some(r##"Cancels all line items in an order, making a full refund. This method can only be called for non-multi-client accounts."##),
|
||||
Some(r##"Cancels all line items in an order, making a full refund."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli/orders_cancel",
|
||||
vec![
|
||||
(Some(r##"merchant-id"##),
|
||||
None,
|
||||
Some(r##"The ID of the managing account."##),
|
||||
Some(r##"The ID of the account that manages the order. This cannot be a multi-client account."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
@@ -1454,12 +1647,12 @@ fn main() {
|
||||
Some(false)),
|
||||
]),
|
||||
("cancellineitem",
|
||||
Some(r##"Cancels a line item, making a full refund. This method can only be called for non-multi-client accounts."##),
|
||||
Some(r##"Cancels a line item, making a full refund."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli/orders_cancellineitem",
|
||||
vec![
|
||||
(Some(r##"merchant-id"##),
|
||||
None,
|
||||
Some(r##"The ID of the managing account."##),
|
||||
Some(r##"The ID of the account that manages the order. This cannot be a multi-client account."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
@@ -1488,12 +1681,12 @@ fn main() {
|
||||
Some(false)),
|
||||
]),
|
||||
("createtestorder",
|
||||
Some(r##"Sandbox only. Creates a test order. This method can only be called for non-multi-client accounts."##),
|
||||
Some(r##"Sandbox only. Creates a test order."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli/orders_createtestorder",
|
||||
vec![
|
||||
(Some(r##"merchant-id"##),
|
||||
None,
|
||||
Some(r##"The ID of the managing account."##),
|
||||
Some(r##"The ID of the account that should manage the order. This cannot be a multi-client account."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
@@ -1516,7 +1709,7 @@ fn main() {
|
||||
Some(false)),
|
||||
]),
|
||||
("custombatch",
|
||||
Some(r##"Retrieves or modifies multiple orders in a single request. This method can only be called for non-multi-client accounts."##),
|
||||
Some(r##"Retrieves or modifies multiple orders in a single request."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli/orders_custombatch",
|
||||
vec![
|
||||
(Some(r##"kv"##),
|
||||
@@ -1538,12 +1731,12 @@ fn main() {
|
||||
Some(false)),
|
||||
]),
|
||||
("get",
|
||||
Some(r##"Retrieves an order from your Merchant Center account. This method can only be called for non-multi-client accounts."##),
|
||||
Some(r##"Retrieves an order from your Merchant Center account."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli/orders_get",
|
||||
vec![
|
||||
(Some(r##"merchant-id"##),
|
||||
None,
|
||||
Some(r##"The ID of the managing account."##),
|
||||
Some(r##"The ID of the account that manages the order. This cannot be a multi-client account."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
@@ -1566,12 +1759,12 @@ fn main() {
|
||||
Some(false)),
|
||||
]),
|
||||
("getbymerchantorderid",
|
||||
Some(r##"Retrieves an order using merchant order id. This method can only be called for non-multi-client accounts."##),
|
||||
Some(r##"Retrieves an order using merchant order id."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli/orders_getbymerchantorderid",
|
||||
vec![
|
||||
(Some(r##"merchant-id"##),
|
||||
None,
|
||||
Some(r##"The ID of the managing account."##),
|
||||
Some(r##"The ID of the account that manages the order. This cannot be a multi-client account."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
@@ -1594,12 +1787,12 @@ fn main() {
|
||||
Some(false)),
|
||||
]),
|
||||
("gettestordertemplate",
|
||||
Some(r##"Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox. This method can only be called for non-multi-client accounts."##),
|
||||
Some(r##"Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli/orders_gettestordertemplate",
|
||||
vec![
|
||||
(Some(r##"merchant-id"##),
|
||||
None,
|
||||
Some(r##"The ID of the managing account."##),
|
||||
Some(r##"The ID of the account that should manage the order. This cannot be a multi-client account."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
@@ -1622,12 +1815,12 @@ fn main() {
|
||||
Some(false)),
|
||||
]),
|
||||
("list",
|
||||
Some(r##"Lists the orders in your Merchant Center account. This method can only be called for non-multi-client accounts."##),
|
||||
Some(r##"Lists the orders in your Merchant Center account."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli/orders_list",
|
||||
vec![
|
||||
(Some(r##"merchant-id"##),
|
||||
None,
|
||||
Some(r##"The ID of the managing account."##),
|
||||
Some(r##"The ID of the account that manages the order. This cannot be a multi-client account."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
@@ -1644,12 +1837,12 @@ fn main() {
|
||||
Some(false)),
|
||||
]),
|
||||
("refund",
|
||||
Some(r##"Refund a portion of the order, up to the full amount paid. This method can only be called for non-multi-client accounts."##),
|
||||
Some(r##"Refund a portion of the order, up to the full amount paid."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli/orders_refund",
|
||||
vec![
|
||||
(Some(r##"merchant-id"##),
|
||||
None,
|
||||
Some(r##"The ID of the managing account."##),
|
||||
Some(r##"The ID of the account that manages the order. This cannot be a multi-client account."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
@@ -1678,12 +1871,46 @@ fn main() {
|
||||
Some(false)),
|
||||
]),
|
||||
("returnlineitem",
|
||||
Some(r##"Returns a line item. This method can only be called for non-multi-client accounts."##),
|
||||
Some(r##"Returns a line item."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli/orders_returnlineitem",
|
||||
vec![
|
||||
(Some(r##"merchant-id"##),
|
||||
None,
|
||||
Some(r##"The ID of the managing account."##),
|
||||
Some(r##"The ID of the account that manages the order. This cannot be a multi-client account."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
(Some(r##"order-id"##),
|
||||
None,
|
||||
Some(r##"The ID of the order."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
(Some(r##"kv"##),
|
||||
Some(r##"r"##),
|
||||
Some(r##"Set various fields of the request structure, matching the key=value form"##),
|
||||
Some(true),
|
||||
Some(true)),
|
||||
|
||||
(Some(r##"v"##),
|
||||
Some(r##"p"##),
|
||||
Some(r##"Set various optional parameters, matching the key=value form"##),
|
||||
Some(false),
|
||||
Some(true)),
|
||||
|
||||
(Some(r##"out"##),
|
||||
Some(r##"o"##),
|
||||
Some(r##"Specify the file into which to write the program's output"##),
|
||||
Some(false),
|
||||
Some(false)),
|
||||
]),
|
||||
("setlineitemmetadata",
|
||||
Some(r##"Sets (overrides) merchant provided annotations on the line item."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli/orders_setlineitemmetadata",
|
||||
vec![
|
||||
(Some(r##"merchant-id"##),
|
||||
None,
|
||||
Some(r##"The ID of the account that manages the order. This cannot be a multi-client account."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
@@ -1712,12 +1939,46 @@ fn main() {
|
||||
Some(false)),
|
||||
]),
|
||||
("shiplineitems",
|
||||
Some(r##"Marks line item(s) as shipped. This method can only be called for non-multi-client accounts."##),
|
||||
Some(r##"Marks line item(s) as shipped."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli/orders_shiplineitems",
|
||||
vec![
|
||||
(Some(r##"merchant-id"##),
|
||||
None,
|
||||
Some(r##"The ID of the managing account."##),
|
||||
Some(r##"The ID of the account that manages the order. This cannot be a multi-client account."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
(Some(r##"order-id"##),
|
||||
None,
|
||||
Some(r##"The ID of the order."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
(Some(r##"kv"##),
|
||||
Some(r##"r"##),
|
||||
Some(r##"Set various fields of the request structure, matching the key=value form"##),
|
||||
Some(true),
|
||||
Some(true)),
|
||||
|
||||
(Some(r##"v"##),
|
||||
Some(r##"p"##),
|
||||
Some(r##"Set various optional parameters, matching the key=value form"##),
|
||||
Some(false),
|
||||
Some(true)),
|
||||
|
||||
(Some(r##"out"##),
|
||||
Some(r##"o"##),
|
||||
Some(r##"Specify the file into which to write the program's output"##),
|
||||
Some(false),
|
||||
Some(false)),
|
||||
]),
|
||||
("updatelineitemshippingdetails",
|
||||
Some(r##"Updates ship by and delivery by dates for a line item."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli/orders_updatelineitemshippingdetails",
|
||||
vec![
|
||||
(Some(r##"merchant-id"##),
|
||||
None,
|
||||
Some(r##"The ID of the account that manages the order. This cannot be a multi-client account."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
@@ -1746,12 +2007,12 @@ fn main() {
|
||||
Some(false)),
|
||||
]),
|
||||
("updatemerchantorderid",
|
||||
Some(r##"Updates the merchant order ID for a given order. This method can only be called for non-multi-client accounts."##),
|
||||
Some(r##"Updates the merchant order ID for a given order."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli/orders_updatemerchantorderid",
|
||||
vec![
|
||||
(Some(r##"merchant-id"##),
|
||||
None,
|
||||
Some(r##"The ID of the managing account."##),
|
||||
Some(r##"The ID of the account that manages the order. This cannot be a multi-client account."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
@@ -1780,12 +2041,12 @@ fn main() {
|
||||
Some(false)),
|
||||
]),
|
||||
("updateshipment",
|
||||
Some(r##"Updates a shipment's status, carrier, and/or tracking ID. This method can only be called for non-multi-client accounts."##),
|
||||
Some(r##"Updates a shipment's status, carrier, and/or tracking ID."##),
|
||||
"Details at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli/orders_updateshipment",
|
||||
vec![
|
||||
(Some(r##"merchant-id"##),
|
||||
None,
|
||||
Some(r##"The ID of the managing account."##),
|
||||
Some(r##"The ID of the account that manages the order. This cannot be a multi-client account."##),
|
||||
Some(true),
|
||||
Some(false)),
|
||||
|
||||
@@ -1819,7 +2080,7 @@ fn main() {
|
||||
|
||||
let mut app = App::new("content2-sandbox")
|
||||
.author("Sebastian Thiel <byronimo@gmail.com>")
|
||||
.version("1.0.6+20170926")
|
||||
.version("1.0.6+20171207")
|
||||
.about("Manages product items, inventory, and Merchant Center accounts for Google Shopping.")
|
||||
.after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_content2_sandbox_cli")
|
||||
.arg(Arg::with_name("url")
|
||||
|
||||
Reference in New Issue
Block a user