Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.8.0"
".": "0.9.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 40
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sent%2Fsent-dm-38aaadafbb2bf0c5d5bb9330a0a5e7a89052fe3e791569c8a12051e040193edf.yml
openapi_spec_hash: 2d35c1223beebaf2c1b8d8a474cbf7c2
config_hash: 17e6614cece9c3c0bd77591c75fd4351
config_hash: ad652575976c2c8db09e4575778f0e77
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.9.0 (2026-03-11)

Full Changelog: [v0.8.0...v0.9.0](https://github.com/sentdm/sent-dm-php/compare/v0.8.0...v0.9.0)

### Features

* **api:** manual updates ([5b7e7f4](https://github.com/sentdm/sent-dm-php/commit/5b7e7f43256893878fb4e7e62a97693dd7bc131d))

## 0.8.0 (2026-03-11)

Full Changelog: [v0.7.0...v0.8.0](https://github.com/sentdm/sent-dm-php/compare/v0.7.0...v0.8.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The REST API documentation can be found on [docs.sent.dm](https://docs.sent.dm).
<!-- x-release-please-start-version -->

```
composer require "sentdm/sent-dm-php 0.8.0"
composer require "sentdm/sent-dm-php 0.9.0"
```

<!-- x-release-please-end -->
Expand Down
54 changes: 27 additions & 27 deletions src/Profiles/BrandsBrandData.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,18 @@
use SentDm\Core\Attributes\Required;
use SentDm\Core\Concerns\SdkModel;
use SentDm\Core\Contracts\BaseModel;
use SentDm\Profiles\BrandsBrandData\Business;
use SentDm\Profiles\BrandsBrandData\Compliance;
use SentDm\Profiles\BrandsBrandData\Contact;

/**
* Brand and KYC data grouped into contact, business, and compliance sections.
*
* @phpstan-import-type ComplianceShape from \SentDm\Profiles\BrandsBrandData\Compliance
* @phpstan-import-type ContactShape from \SentDm\Profiles\BrandsBrandData\Contact
* @phpstan-import-type BusinessShape from \SentDm\Profiles\BrandsBrandData\Business
* @phpstan-import-type SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfoShape from \SentDm\Profiles\SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo
* @phpstan-import-type SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfoShape from \SentDm\Profiles\SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo
* @phpstan-import-type SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfoShape from \SentDm\Profiles\SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo
*
* @phpstan-type BrandsBrandDataShape = array{
* compliance: Compliance|ComplianceShape,
* contact: Contact|ContactShape,
* business?: null|Business|BusinessShape,
* compliance: SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo|SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfoShape,
* contact: SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo|SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfoShape,
* business?: null|SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo|SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfoShape,
* }
*/
final class BrandsBrandData implements BaseModel
Expand All @@ -34,19 +31,19 @@ final class BrandsBrandData implements BaseModel
* Compliance and TCR-related information.
*/
#[Required]
public Compliance $compliance;
public SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo $compliance;

/**
* Contact information for the brand.
*/
#[Required]
public Contact $contact;
public SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo $contact;

/**
* Business details and address information.
*/
#[Optional(nullable: true)]
public ?Business $business;
public ?SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo $business;

/**
* `new BrandsBrandData()` is missing required properties by the API.
Expand All @@ -72,14 +69,14 @@ public function __construct()
*
* You must use named parameters to construct any parameters with a default value.
*
* @param Compliance|ComplianceShape $compliance
* @param Contact|ContactShape $contact
* @param Business|BusinessShape|null $business
* @param SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo|SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfoShape $compliance
* @param SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo|SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfoShape $contact
* @param SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo|SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfoShape|null $business
*/
public static function with(
Compliance|array $compliance,
Contact|array $contact,
Business|array|null $business = null,
SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo|array $compliance,
SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo|array $contact,
SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo|array|null $business = null,
): self {
$self = new self;

Expand All @@ -94,10 +91,11 @@ public static function with(
/**
* Compliance and TCR-related information.
*
* @param Compliance|ComplianceShape $compliance
* @param SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo|SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfoShape $compliance
*/
public function withCompliance(Compliance|array $compliance): self
{
public function withCompliance(
SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo|array $compliance,
): self {
$self = clone $this;
$self['compliance'] = $compliance;

Expand All @@ -107,10 +105,11 @@ public function withCompliance(Compliance|array $compliance): self
/**
* Contact information for the brand.
*
* @param Contact|ContactShape $contact
* @param SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo|SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfoShape $contact
*/
public function withContact(Contact|array $contact): self
{
public function withContact(
SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandContactInfo|array $contact,
): self {
$self = clone $this;
$self['contact'] = $contact;

Expand All @@ -120,10 +119,11 @@ public function withContact(Contact|array $contact): self
/**
* Business details and address information.
*
* @param Business|BusinessShape|null $business
* @param SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo|SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfoShape|null $business
*/
public function withBusiness(Business|array|null $business): self
{
public function withBusiness(
SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo|array|null $business,
): self {
$self = clone $this;
$self['business'] = $business;

Expand Down
15 changes: 8 additions & 7 deletions src/Profiles/Campaigns/CampaignData.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,17 @@
use SentDm\Core\Attributes\Required;
use SentDm\Core\Concerns\SdkModel;
use SentDm\Core\Contracts\BaseModel;
use SentDm\Profiles\Campaigns\CampaignData\UseCase;

/**
* Campaign data for create or update operation.
*
* @phpstan-import-type UseCaseShape from \SentDm\Profiles\Campaigns\CampaignData\UseCase
* @phpstan-import-type SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseDataShape from \SentDm\Profiles\Campaigns\SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData
*
* @phpstan-type CampaignDataShape = array{
* description: string,
* name: string,
* type: string,
* useCases: list<UseCase|UseCaseShape>,
* useCases: list<SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData|SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseDataShape>,
* helpKeywords?: string|null,
* helpMessage?: string|null,
* messageFlow?: string|null,
Expand Down Expand Up @@ -57,9 +56,11 @@ final class CampaignData implements BaseModel
/**
* List of use cases with sample messages.
*
* @var list<UseCase> $useCases
* @var list<SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData> $useCases
*/
#[Required(list: UseCase::class)]
#[Required(
list: SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData::class,
)]
public array $useCases;

/**
Expand Down Expand Up @@ -144,7 +145,7 @@ public function __construct()
*
* You must use named parameters to construct any parameters with a default value.
*
* @param list<UseCase|UseCaseShape> $useCases
* @param list<SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData|SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseDataShape> $useCases
*/
public static function with(
string $description,
Expand Down Expand Up @@ -217,7 +218,7 @@ public function withType(string $type): self
/**
* List of use cases with sample messages.
*
* @param list<UseCase|UseCaseShape> $useCases
* @param list<SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData|SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseDataShape> $useCases
*/
public function withUseCases(array $useCases): self
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,25 @@

declare(strict_types=1);

namespace SentDm\Profiles\Campaigns\CampaignData;
namespace SentDm\Profiles\Campaigns;

use SentDm\Core\Attributes\Required;
use SentDm\Core\Concerns\SdkModel;
use SentDm\Core\Contracts\BaseModel;
use SentDm\Profiles\Campaigns\MessagingUseCaseUs;

/**
* Campaign use case with sample messages.
*
* @phpstan-type UseCaseShape = array{
* @phpstan-type SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseDataShape = array{
* messagingUseCaseUs: MessagingUseCaseUs|value-of<MessagingUseCaseUs>,
* sampleMessages: list<string>,
* }
*/
final class UseCase implements BaseModel
final class SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData implements BaseModel
{
/** @use SdkModel<UseCaseShape> */
/**
* @use SdkModel<SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseDataShape>
*/
use SdkModel;

/**
Expand All @@ -39,17 +40,21 @@ final class UseCase implements BaseModel
public array $sampleMessages;

/**
* `new UseCase()` is missing required properties by the API.
* `new SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData()` is missing required properties by the API.
*
* To enforce required parameters use
* ```
* UseCase::with(messagingUseCaseUs: ..., sampleMessages: ...)
* SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData::with(
* messagingUseCaseUs: ..., sampleMessages: ...
* )
* ```
*
* Otherwise ensure the following setters are called
*
* ```
* (new UseCase)->withMessagingUseCaseUs(...)->withSampleMessages(...)
* (new SentDmServicesEndpointsCustomerApIv3ContractsRequestsCampaignsCampaignUseCaseData)
* ->withMessagingUseCaseUs(...)
* ->withSampleMessages(...)
* ```
*/
public function __construct()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

declare(strict_types=1);

namespace SentDm\Profiles\BrandsBrandData;
namespace SentDm\Profiles;

use SentDm\Core\Attributes\Optional;
use SentDm\Core\Concerns\SdkModel;
use SentDm\Core\Contracts\BaseModel;
use SentDm\Profiles\BrandsBrandData\Business\EntityType;
use SentDm\Profiles\SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo\EntityType;

/**
* Business details and address information.
* Business details and address for brand KYC.
*
* @phpstan-type BusinessShape = array{
* @phpstan-type SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfoShape = array{
* city?: string|null,
* country?: string|null,
* countryOfRegistration?: string|null,
Expand All @@ -26,9 +26,11 @@
* url?: string|null,
* }
*/
final class Business implements BaseModel
final class SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo implements BaseModel
{
/** @use SdkModel<BusinessShape> */
/**
* @use SdkModel<SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfoShape>
*/
use SdkModel;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace SentDm\Profiles\BrandsBrandData\Business;
namespace SentDm\Profiles\SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandBusinessInfo;

/**
* Business entity type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,19 @@

declare(strict_types=1);

namespace SentDm\Profiles\BrandsBrandData;
namespace SentDm\Profiles;

use SentDm\Core\Attributes\Optional;
use SentDm\Core\Attributes\Required;
use SentDm\Core\Concerns\SdkModel;
use SentDm\Core\Contracts\BaseModel;
use SentDm\Profiles\DestinationCountry;
use SentDm\Profiles\TcrBrandRelationship;
use SentDm\Profiles\TcrVertical;

/**
* Compliance and TCR-related information.
* Compliance and TCR information for brand registration.
*
* @phpstan-import-type DestinationCountryShape from \SentDm\Profiles\DestinationCountry
*
* @phpstan-type ComplianceShape = array{
* @phpstan-type SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfoShape = array{
* brandRelationship: TcrBrandRelationship|value-of<TcrBrandRelationship>,
* vertical: TcrVertical|value-of<TcrVertical>,
* destinationCountries?: list<DestinationCountry|DestinationCountryShape>|null,
Expand All @@ -28,9 +25,11 @@
* primaryUseCase?: string|null,
* }
*/
final class Compliance implements BaseModel
final class SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo implements BaseModel
{
/** @use SdkModel<ComplianceShape> */
/**
* @use SdkModel<SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfoShape>
*/
use SdkModel;

/**
Expand Down Expand Up @@ -88,17 +87,21 @@ final class Compliance implements BaseModel
public ?string $primaryUseCase;

/**
* `new Compliance()` is missing required properties by the API.
* `new SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo()` is missing required properties by the API.
*
* To enforce required parameters use
* ```
* Compliance::with(brandRelationship: ..., vertical: ...)
* SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo::with(
* brandRelationship: ..., vertical: ...
* )
* ```
*
* Otherwise ensure the following setters are called
*
* ```
* (new Compliance)->withBrandRelationship(...)->withVertical(...)
* (new SentDmServicesEndpointsCustomerApIv3ContractsRequestsBrandsBrandComplianceInfo)
* ->withBrandRelationship(...)
* ->withVertical(...)
* ```
*/
public function __construct()
Expand Down
Loading
Loading