Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConfirmTransporationOptionsRequest Not found? #828

Open
luckdragon opened this issue Dec 4, 2024 · 1 comment
Open

ConfirmTransporationOptionsRequest Not found? #828

luckdragon opened this issue Dec 4, 2024 · 1 comment

Comments

@luckdragon
Copy link

I've been calling every Dto reference the same way for my FBAInboundV20240320 script, and they all work fine, until I get to here, when it tells me:

PHP Fatal error: Uncaught Error: Class "SellingPartnerApi\Seller\FBAInboundV20240320\Dto\ConfirmTransporationOptionsRequest" not found

  use SellingPartnerApi\SellingPartnerApi;
  use SellingPartnerApi\Enums\Endpoint;
  use SellingPartnerApi\Seller\FBAInboundV20240320\Dto;

/*
   A bunch more working code here
*/

    do {
      echo " . ";
      $result = $inboundApi->listTransportationOptions(inboundPlanId: $inboundPlanId, placementOptionId: $selected, pageSize: 20, paginationToken: $nextToken );
      $transportationOptions = $result->dto()->transportationOptions;
      foreach ($transportationOptions as $top) {
        if ($top->carrier->alphaCode == 'UPSN' && $top->carrier->name == "UPS") {
          $selTrans[] = new Dto\TransportationSelection(shipmentId: $top->shipmentId, transportationOptionId: $top->transportationOptionId );
        }
      }

      $pagination = $result->dto()->pagination;
      $nextToken = $pagination->nextToken;

    } while (!empty($nextToken));

    $body = new Dto\ConfirmTransporationOptionsRequest(transportationSelections: $selTrans);
    $result = $inboundApi->confirmTransportationOptions(inboundPlanId: $inboundPlanId, body: $body);


@NoxArt
Copy link

NoxArt commented Dec 4, 2024

You have a typo, it's ConfirmTransportationOptionsRequest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants