• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sanmai / shipandco-sdk / 19461631584

18 Nov 2025 09:49AM UTC coverage: 91.489% (-8.5%) from 100.0%
19461631584

push

github

web-flow
Add carrier registration support (#43)

2 of 6 new or added lines in 3 files covered. (33.33%)

43 of 47 relevant lines covered (91.49%)

9.45 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Requests/Types/Carrier/Credentials.php
1
<?php
2
/**
3
 * This code is licensed under the MIT License.
4
 *
5
 * Copyright (c) 2020 Alexey Kopytko <alexey@kopytko.com>
6
 *
7
 * Permission is hereby granted, free of charge, to any person obtaining a copy
8
 * of this software and associated documentation files (the "Software"), to deal
9
 * in the Software without restriction, including without limitation the rights
10
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
 * copies of the Software, and to permit persons to whom the Software is
12
 * furnished to do so, subject to the following conditions:
13
 *
14
 * The above copyright notice and this permission notice shall be included in
15
 * all copies or substantial portions of the Software.
16
 *
17
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
 * THE SOFTWARE.
24
 */
25

26
declare(strict_types=1);
27

28
namespace ShipAndCoSDK\Requests\Types\Carrier;
29

30
use CommonSDK\Concerns\ObjectPropertyRead;
31
use CommonSDK\Concerns\PropertyWrite;
32
use CommonSDK\Contracts\ReadableRequestProperty;
33
use JMS\Serializer\Annotation as JMS;
34
use ShipAndCoSDK\Common\Carrier\Credentials as CommonCredentials;
35

36
/**
37
 * @property-write string|null $account_number
38
 * @property-write string|null $site_id
39
 * @property-write string|null $password
40
 * @property-write string|null $import_acc_number
41
 * @property-write string|null $access_key
42
 * @property-write string|null $user_name
43
 * @property-write string[]|null $customer_numbers
44
 * @property-write string|null $key
45
 * @property-write string|null $freight_number
46
 * @property-write string|null $user_id
47
 * @property-write string|null $niokurinin
48
 * @property-read CredentialsAddress $address
49
 * @property-read Invoice2fa $invoice_2fa
50
 */
51
final class Credentials extends CommonCredentials implements ReadableRequestProperty
52
{
53
    use PropertyWrite;
54
    use ObjectPropertyRead;
55

56
    /**
57
     * @JMS\Type("ShipAndCoSDK\Requests\Types\Carrier\CredentialsAddress")
58
     *
59
     * @var CredentialsAddress
60
     */
61
    private $address;
62

63
    /**
64
     * Invoice details for FedEx 2FA verification.
65
     *
66
     * @JMS\Type("ShipAndCoSDK\Requests\Types\Carrier\Invoice2fa")
67
     *
68
     * @var Invoice2fa
69
     */
70
    protected $invoice_2fa;
71

72
    /**
73
     * @phan-suppress PhanAccessReadOnlyMagicProperty
74
     */
75
    public function __construct(?CredentialsAddress $address = null, ?Invoice2fa $invoice_2fa = null)
76
    {
NEW
77
        $this->address = $address ?? new CredentialsAddress();
×
NEW
78
        $this->invoice_2fa = $invoice_2fa ?? new Invoice2fa();
×
79
    }
80
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc