Skip to content

Missing root_id in Relationship object #88

@ajhar-euka

Description

@ajhar-euka

Description of the Bug

In src/Resources/Customer/Relationship.php, it appears that the root_id property has been removed or is no longer exposed. When calling:
CB::init()->subscription()->retrieve($subscriptionId)->customer

the resulting Relationship object does not include root_id, even though the raw API response does contain it under the customer relationship.

this is an intentional change or a bug?

Steps to reproduce

$subscription = CB::init()->subscription()->retrieve($subscriptionId);
$customer = $subscription->customer;

Observe that the root_id property is missing from the $customer relationship object.

Now retrieve the raw API response for the same subscription:
$rawData = CB::init()->subscription()->retrieve($subscriptionId)->getRawResponseData();

Observe that the root_id property is from the $customer relationship object.

Expected Behavior

root_id should be in customer relationship object

Code Snippets (if applicable)

Operating System

Ubuntu 24.04.1 LTS

Language version

PHP 8.2

Library version

v4.2.0

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions