getShippingLabel method

Future<GetShippingLabelOutput> getShippingLabel({
  1. required List<String> jobIds,
  2. String? aPIVersion,
  3. String? city,
  4. String? company,
  5. String? country,
  6. String? name,
  7. String? phoneNumber,
  8. String? postalCode,
  9. String? stateOrProvince,
  10. String? street1,
  11. String? street2,
  12. String? street3,
})

This operation generates a pre-paid UPS shipping label that you will use to ship your device to AWS for processing.

May throw InvalidJobIdException. May throw ExpiredJobIdException. May throw CanceledJobIdException. May throw InvalidAccessKeyIdException. May throw InvalidAddressException. May throw InvalidVersionException. May throw InvalidParameterException.

Implementation

Future<GetShippingLabelOutput> getShippingLabel({
  required List<String> jobIds,
  String? aPIVersion,
  String? city,
  String? company,
  String? country,
  String? name,
  String? phoneNumber,
  String? postalCode,
  String? stateOrProvince,
  String? street1,
  String? street2,
  String? street3,
}) async {
  ArgumentError.checkNotNull(jobIds, 'jobIds');
  final $request = <String, dynamic>{};
  $request['jobIds'] = jobIds;
  aPIVersion?.also((arg) => $request['APIVersion'] = arg);
  city?.also((arg) => $request['city'] = arg);
  company?.also((arg) => $request['company'] = arg);
  country?.also((arg) => $request['country'] = arg);
  name?.also((arg) => $request['name'] = arg);
  phoneNumber?.also((arg) => $request['phoneNumber'] = arg);
  postalCode?.also((arg) => $request['postalCode'] = arg);
  stateOrProvince?.also((arg) => $request['stateOrProvince'] = arg);
  street1?.also((arg) => $request['street1'] = arg);
  street2?.also((arg) => $request['street2'] = arg);
  street3?.also((arg) => $request['street3'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'GetShippingLabel',
    version: '2010-06-01',
    method: 'POST',
    requestUri: '/?Operation=GetShippingLabel',
    exceptionFnMap: _exceptionFns,
    shape: shapes['GetShippingLabelInput'],
    shapes: shapes,
    resultWrapper: 'GetShippingLabelResult',
  );
  return GetShippingLabelOutput.fromXml($result);
}