diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 26c419a0..7608e453 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,8 +1,8 @@ ### New Features - - Implement V2 Get Order and Get all Orders +- Implement V2 Order Products API +- Implement V2 Order Shipping Addresses API (read-only) + -### Fixes - - Fixed error where amount was `int` instead of `float` in price rules diff --git a/docs/classes/BigCommerce-ApiV2-Api-Generic-V2Api.html b/docs/classes/BigCommerce-ApiV2-Api-Generic-V2Api.html index 547d418d..74060d61 100644 --- a/docs/classes/BigCommerce-ApiV2-Api-Generic-V2Api.html +++ b/docs/classes/BigCommerce-ApiV2-Api-Generic-V2Api.html @@ -122,7 +122,7 @@

getClient() -  : V2ApiClient +  : BaseApiClient
@@ -164,7 +164,7 @@

public - __construct(V2ApiClient $client[, int|null $resourceId = null ][, int|null $parentResourceId = null ]) : mixed + __construct(BaseApiClient $client[, int|null $resourceId = null ][, int|null $parentResourceId = null ]) : mixed
@@ -172,7 +172,7 @@

Parameters
$client - : V2ApiClient + : BaseApiClient
@@ -224,7 +224,7 @@

public - getClient() : V2ApiClient + getClient() : BaseApiClient
@@ -232,7 +232,7 @@

Return values
- V2ApiClient + BaseApiClient — diff --git a/docs/classes/BigCommerce-ApiV2-Api-Generic-V2ApiBase.html b/docs/classes/BigCommerce-ApiV2-Api-Generic-V2ApiBase.html index df37c51c..ed98e180 100644 --- a/docs/classes/BigCommerce-ApiV2-Api-Generic-V2ApiBase.html +++ b/docs/classes/BigCommerce-ApiV2-Api-Generic-V2ApiBase.html @@ -140,7 +140,7 @@

getClient() -  : V2ApiClient +  : BaseApiClient
@@ -191,7 +191,7 @@

public - __construct(V2ApiClient $client[, int|null $resourceId = null ][, int|null $parentResourceId = null ]) : mixed + __construct(BaseApiClient $client[, int|null $resourceId = null ][, int|null $parentResourceId = null ]) : mixed
@@ -199,7 +199,7 @@

Parameters
$client - : V2ApiClient + : BaseApiClient
@@ -251,7 +251,7 @@

public - getClient() : V2ApiClient + getClient() : BaseApiClient
@@ -259,7 +259,7 @@

Return values
- V2ApiClient + BaseApiClient — diff --git a/docs/classes/BigCommerce-ApiV2-Api-Orders-OrderProductsApi.html b/docs/classes/BigCommerce-ApiV2-Api-Orders-OrderProductsApi.html new file mode 100644 index 00000000..c3cd0034 --- /dev/null +++ b/docs/classes/BigCommerce-ApiV2-Api-Orders-OrderProductsApi.html @@ -0,0 +1,600 @@ + + + + + Documentation + + + + + + + + + + + + + + + + + + + +
+

Documentation

+ + + + + +
+ +
+
+ + + + +
+ + +
+

+ OrderProductsApi + + + extends V2ApiBase + + + + +

+ + + +

Order Products v2 API

+ +

For listing the products in an order.

+

Example

+

Get Order Products

+
$api = new BigCommerce\ApiV2\V2ApiClient($_ENV['hash'], $_ENV['CLIENT_ID'], $_ENV['ACCESS_TOKEN']);
+$orderId = 231;
+$products = $api->order($orderId)->products();
+
+$productNamesOrdered = array_column('name', $products);
+
+
+ + + + + + + + +

+ Table of Contents + +

+ +
+
+ __construct() + +  : mixed +
+
+ +
+ get() + +  : OrderProduct +
+
+ +
+ getAll() + +  : array<string|int, OrderProduct> +
+
+ +
+ getClient() + +  : BaseApiClient +
+
+ +
+ getParentResourceId() + +  : int|null +
+
+ +
+ getResourceId() + +  : int|null +
+
+ +
+ multipleResourceUrl() + +  : string +
+
+ +
+ singleResourceUrl() + +  : string +
+
+ +
+ + + + + + + +
+

+ Methods + +

+
+

+ __construct() + +

+ + + + + public + __construct(BaseApiClient $client[, int|null $resourceId = null ][, int|null $parentResourceId = null ]) : mixed + +
+ +
Parameters
+
+
+ $client + : BaseApiClient +
+
+
+ +
+
+ $resourceId + : int|null + = null
+
+
+ +
+
+ $parentResourceId + : int|null + = null
+
+
+ +
+
+ + + +
Return values
+ mixed + — + + +
+ +
+

+ getAll() + +

+ + + + + public + getAll([int $page = 1 ][, int $limit = 250 ]) : array<string|int, OrderProduct> + + +
Parameters
+
+
+ $page + : int + = 1
+
+
+ +
+
+ $limit + : int + = 250
+
+
+ +
+
+ + + +
Return values
+ array<string|int, OrderProduct> + — + + +
+ +
+

+ getParentResourceId() + +

+ + + + + public + getParentResourceId() : int|null + +
+ + + + +
Return values
+ int|null + — + + +
+
+

+ getResourceId() + +

+ + + + + public + getResourceId() : int|null + +
+ + + + +
Return values
+ int|null + — + + +
+
+

+ multipleResourceUrl() + +

+ + + + + public + multipleResourceUrl() : string + +
+ + + + +
Return values
+ string + — + + +
+
+

+ singleResourceUrl() + +

+ + + + + public + singleResourceUrl() : string + +
+ + + + +
Return values
+ string + — + + +
+
+ + + + +
+
+
+
+

Search results

+ +
+
+
    +
    +
    +
    +
    +
    + + +
    + + + + + + + + diff --git a/docs/classes/BigCommerce-ApiV2-Api-Orders-OrderShippingAddressesApi.html b/docs/classes/BigCommerce-ApiV2-Api-Orders-OrderShippingAddressesApi.html new file mode 100644 index 00000000..f95f39d9 --- /dev/null +++ b/docs/classes/BigCommerce-ApiV2-Api-Orders-OrderShippingAddressesApi.html @@ -0,0 +1,588 @@ + + + + + Documentation + + + + + + + + + + + + + + + + + + + +
    +

    Documentation

    + + + + + +
    + +
    +
    + + + + +
    + + +
    +

    + OrderShippingAddressesApi + + + extends V2ApiBase + + + + +

    + + + + +
    + + + + + + + + +

    + Table of Contents + +

    + +
    +
    + __construct() + +  : mixed +
    +
    + +
    + get() + +  : ShippingAddress +
    +
    + +
    + getAll() + +  : array<string|int, ShippingAddress> +
    +
    + +
    + getClient() + +  : BaseApiClient +
    +
    + +
    + getParentResourceId() + +  : int|null +
    +
    + +
    + getResourceId() + +  : int|null +
    +
    + +
    + multipleResourceUrl() + +  : string +
    +
    + +
    + singleResourceUrl() + +  : string +
    +
    + +
    + + + + + + + +
    +

    + Methods + +

    +
    +

    + __construct() + +

    + + + + + public + __construct(BaseApiClient $client[, int|null $resourceId = null ][, int|null $parentResourceId = null ]) : mixed + +
    + +
    Parameters
    +
    +
    + $client + : BaseApiClient +
    +
    +
    + +
    +
    + $resourceId + : int|null + = null
    +
    +
    + +
    +
    + $parentResourceId + : int|null + = null
    +
    +
    + +
    +
    + + + +
    Return values
    + mixed + — + + +
    + +
    +

    + getAll() + +

    + + + + + public + getAll([int $page = 1 ][, int $limit = 250 ]) : array<string|int, ShippingAddress> + + +
    Parameters
    +
    +
    + $page + : int + = 1
    +
    + +
    +
    + $limit + : int + = 250
    +
    + +
    +
    + + + +
    Return values
    + array<string|int, ShippingAddress> + — + + +
    + +
    +

    + getParentResourceId() + +

    + + + + + public + getParentResourceId() : int|null + +
    + + + + +
    Return values
    + int|null + — + + +
    +
    +

    + getResourceId() + +

    + + + + + public + getResourceId() : int|null + +
    + + + + +
    Return values
    + int|null + — + + +
    +
    +

    + multipleResourceUrl() + +

    + + + + + public + multipleResourceUrl() : string + +
    + + + + +
    Return values
    + string + — + + +
    +
    +

    + singleResourceUrl() + +

    + + + + + public + singleResourceUrl() : string + +
    + + + + +
    Return values
    + string + — + + +
    +
    + + + + +
    +
    +
    +
    +

    Search results

    + +
    +
    +
      +
      +
      +
      +
      +
      + + +
      + + + + + + + + diff --git a/docs/classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html b/docs/classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html index 86ac9e23..4f10d7f3 100644 --- a/docs/classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html +++ b/docs/classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html @@ -121,6 +121,16 @@
      OrdersApi

      for the V3 API

      +
      + +
      +
      + see +
      +
      + OrderProductsApi + +

      for listing the products in an order

      Example

      Create an Order

      $api = new BigCommerce\ApiV2\V2ApiClient($_ENV['hash'], $_ENV['CLIENT_ID'], $_ENV['ACCESS_TOKEN']);
      @@ -196,7 +206,7 @@ 

      getClient() -  : V2ApiClient +  : BaseApiClient
      @@ -219,6 +229,34 @@

       : string +
      + +
      + product() + +  : OrderProductsApi +
      +
      + +
      + products() + +  : OrderProductsApi +
      +
      + +
      + shippingAddress() + +  : OrderShippingAddressesApi +
      +
      + +
      + shippingAddresses() + +  : OrderShippingAddressesApi +
      @@ -261,7 +299,7 @@

      public - __construct(V2ApiClient $client[, int|null $resourceId = null ][, int|null $parentResourceId = null ]) : mixed + __construct(BaseApiClient $client[, int|null $resourceId = null ][, int|null $parentResourceId = null ]) : mixed
      @@ -269,7 +307,7 @@

      Parameters
      $client - : V2ApiClient + : BaseApiClient
      @@ -490,7 +528,7 @@

      public - getClient() : V2ApiClient + getClient() : BaseApiClient
      @@ -498,7 +536,7 @@

      Return values
      - V2ApiClient + BaseApiClient — @@ -601,6 +639,160 @@
      Return values
      — + +
      +

      + product() + +

      + + + + + public + product(int $orderProductId) : OrderProductsApi + +
      + +
      Parameters
      +
      +
      + $orderProductId + : int +
      +
      +
      + +
      +
      + + + +
      Return values
      + OrderProductsApi + — + + +
      + + +
      getClient() -  : V2ApiClient +  : BaseApiClient
      @@ -194,7 +194,7 @@

      public - __construct(V2ApiClient $client[, int|null $resourceId = null ][, int|null $parentResourceId = null ]) : mixed + __construct(BaseApiClient $client[, int|null $resourceId = null ][, int|null $parentResourceId = null ]) : mixed
      @@ -202,7 +202,7 @@

      Parameters
      $client - : V2ApiClient + : BaseApiClient
      @@ -254,7 +254,7 @@

      public - getClient() : V2ApiClient + getClient() : BaseApiClient
      @@ -262,7 +262,7 @@

      Return values
      - V2ApiClient + BaseApiClient — diff --git a/docs/classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html b/docs/classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html new file mode 100644 index 00000000..4595a2f7 --- /dev/null +++ b/docs/classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html @@ -0,0 +1,2042 @@ + + + + + Documentation + + + + + + + + + + + + + + + + + + + +
      +

      Documentation

      + + + + + +
      + +
      +
      + + + + +
      + + +
      +

      + OrderProduct + + + extends ResourceModel + + + + +

      + + + + +
      + + + + + + + + +

      + Table of Contents + +

      + +
      +
      + $applied_discounts + +  : array<string|int, mixed> +
      +
      + +
      + $base_cost_price + +  : string +
      +
      + +
      + $base_price + +  : string +
      +
      + +
      + $base_wrapping_cost + +  : string +
      +
      + +
      + $bin_picking_number + +  : string|null +
      +
      + +
      + $cost_price_ex_tax + +  : string +
      +
      + +
      + $cost_price_inc_tax + +  : string +
      +
      + +
      + $cost_price_tax + +  : string +
      +
      + +
      + $ebay_item_id + +  : string|null +
      +
      + +
      + $ebay_transaction_id + +  : string|null +
      +
      + +
      + $event_date + +  : string|null +
      +
      + +
      + $event_name + +  : string|null +
      +
      + +
      + $external_id + +  : string|null +
      +
      + +
      + $fixed_shipping_cost + +  : string +
      +
      + +
      + $id + +  : int +
      +
      + +
      + $is_bundled_product + +  : bool +
      +
      + +
      + $is_refunded + +  : bool +
      +
      + +
      + $name + +  : string +
      +
      + +
      + $name_customer + +  : string +
      +
      + +
      + $name_merchant + +  : string +
      +
      + +
      + $option_set_id + +  : int|null +
      +
      + +
      + $order_address_id + +  : int +
      +
      + +
      + $order_id + +  : int +
      +
      + +
      + $parent_order_product_id + +  : int|null +
      +
      + +
      + $price_ex_tax + +  : string +
      +
      + +
      + $price_inc_tax + +  : string +
      +
      + +
      + $price_tax + +  : string +
      +
      + +
      + $product_options + +  : array<string|int, mixed> +
      +
      + +
      + $quantity + +  : float +
      +
      + +
      + $quantity_shipped + +  : int +
      +
      + +
      + $refunded_amount + +  : string +
      +
      + +
      + $return_id + +  : int +
      +
      + +
      + $sku + +  : string +
      +
      + +
      + $type + +  : string +
      +
      + +
      + $upc + +  : string|null +
      +
      + +
      + $variant_id + +  : int|null +
      +
      + +
      + $weight + +  : string +
      +
      + +
      + $wrapping_cost_ex_tax + +  : string +
      +
      + +
      + $wrapping_cost_inc_tax + +  : string +
      +
      + +
      + $wrapping_cost_tax + +  : string +
      +
      + +
      + $wrapping_message + +  : string|null +
      +
      + +
      + $wrapping_name + +  : string|null +
      +
      + +
      + __construct() + +  : mixed +
      +
      + +
      + jsonSerialize() + +  : array<string|int, mixed> +
      +
      + +
      + + + + + + +
      +

      + Properties + +

      +
      +

      + $applied_discounts + + + +

      + + + + + public + array<string|int, mixed> + $applied_discounts + + +
      + +
      + + + +
      +
      +

      + $base_cost_price + + + +

      + + + + + public + string + $base_cost_price + + +
      + +
      + + + +
      +
      +

      + $base_price + + + +

      + + + + + public + string + $base_price + + +
      + +
      + + + +
      +
      +

      + $base_wrapping_cost + + + +

      + + + + + public + string + $base_wrapping_cost + + +
      + +
      + + + +
      +
      +

      + $bin_picking_number + + + +

      + + + + + public + string|null + $bin_picking_number + + +
      + +
      + + + +
      +
      +

      + $cost_price_ex_tax + + + +

      + + + + + public + string + $cost_price_ex_tax + + +
      + +
      + + + +
      +
      +

      + $cost_price_inc_tax + + + +

      + + + + + public + string + $cost_price_inc_tax + + +
      + +
      + + + +
      +
      +

      + $cost_price_tax + + + +

      + + + + + public + string + $cost_price_tax + + +
      + +
      + + + +
      +
      +

      + $ebay_item_id + + + +

      + + + + + public + string|null + $ebay_item_id + + +
      + +
      + + + +
      +
      +

      + $ebay_transaction_id + + + +

      + + + + + public + string|null + $ebay_transaction_id + + +
      + +
      + + + +
      +
      +

      + $event_date + + + +

      + + + + + public + string|null + $event_date + + +
      + +
      + + + +
      +
      +

      + $event_name + + + +

      + + + + + public + string|null + $event_name + + +
      + +
      + + + +
      +
      +

      + $external_id + + + +

      + + + + + public + string|null + $external_id + + +
      + +
      + + + +
      +
      +

      + $fixed_shipping_cost + + + +

      + + + + + public + string + $fixed_shipping_cost + + +
      + +
      + + + +
      +
      +

      + $id + + + +

      + + + + + public + int + $id + + +
      + +
      + + + +
      +
      +

      + $is_bundled_product + + + +

      + + + + + public + bool + $is_bundled_product + + +
      + +
      + + + +
      +
      +

      + $is_refunded + + + +

      + + + + + public + bool + $is_refunded + + +
      + +
      + + + +
      +
      +

      + $name + + + +

      + + + + + public + string + $name + + +
      + +
      + + + +
      +
      +

      + $name_customer + + + +

      + + + + + public + string + $name_customer + + +
      + +
      + + + +
      +
      +

      + $name_merchant + + + +

      + + + + + public + string + $name_merchant + + +
      + +
      + + + +
      +
      +

      + $option_set_id + + + +

      + + + + + public + int|null + $option_set_id + + +
      + +
      + + + +
      +
      +

      + $order_address_id + + + +

      + + + + + public + int + $order_address_id + + +
      + +
      + + + +
      +
      +

      + $order_id + + + +

      + + + + + public + int + $order_id + + +
      + +
      + + + +
      +
      +

      + $parent_order_product_id + + + +

      + + + + + public + int|null + $parent_order_product_id + + +
      + +
      + + + +
      +
      +

      + $price_ex_tax + + + +

      + + + + + public + string + $price_ex_tax + + +
      + +
      + + + +
      +
      +

      + $price_inc_tax + + + +

      + + + + + public + string + $price_inc_tax + + +
      + +
      + + + +
      +
      +

      + $price_tax + + + +

      + + + + + public + string + $price_tax + + +
      + +
      + + + +
      +
      +

      + $product_options + + + +

      + + + + + public + array<string|int, mixed> + $product_options + + + + + + +
      +
      +

      + $quantity + + + +

      + + + + + public + float + $quantity + + +
      + +
      + + + +
      +
      +

      + $quantity_shipped + + + +

      + + + + + public + int + $quantity_shipped + + +
      + +
      + + + +
      +
      +

      + $refunded_amount + + + +

      + + + + + public + string + $refunded_amount + + +
      + +
      + + + +
      +
      +

      + $return_id + + + +

      + + + + + public + int + $return_id + + +
      + +
      + + + +
      +
      +

      + $sku + + + +

      + + + + + public + string + $sku + + +
      + +
      + + + +
      +
      +

      + $type + + + +

      + + + + + public + string + $type + + +
      + +
      + + + +
      +
      +

      + $upc + + + +

      + + + + + public + string|null + $upc + + +
      + +
      + + + +
      +
      +

      + $variant_id + + + +

      + + + + + public + int|null + $variant_id + + +
      + +
      + + + +
      +
      +

      + $weight + + + +

      + + + + + public + string + $weight + + +
      + +
      + + + +
      +
      +

      + $wrapping_cost_ex_tax + + + +

      + + + + + public + string + $wrapping_cost_ex_tax + + +
      + +
      + + + +
      +
      +

      + $wrapping_cost_inc_tax + + + +

      + + + + + public + string + $wrapping_cost_inc_tax + + +
      + +
      + + + +
      +
      +

      + $wrapping_cost_tax + + + +

      + + + + + public + string + $wrapping_cost_tax + + +
      + +
      + + + +
      +
      +

      + $wrapping_message + + + +

      + + + + + public + string|null + $wrapping_message + + +
      + +
      + + + +
      +
      +

      + $wrapping_name + + + +

      + + + + + public + string|null + $wrapping_name + + +
      + +
      + + + +
      +
      + +
      +

      + Methods + +

      +
      +

      + __construct() + +

      + + + + + public + __construct([stdClass|null $optionObject = null ]) : mixed + +
      + +
      Parameters
      +
      +
      + $optionObject + : stdClass|null + = null
      +
      +
      + +
      +
      + + + +
      Return values
      + mixed + — + + +
      +
      +

      + jsonSerialize() + +

      + + + + + public + jsonSerialize() : array<string|int, mixed> + +
      + + + + +
      Return values
      + array<string|int, mixed> + — + + +
      +
      + + + + +
      +
      +
      +
      +

      Search results

      + +
      +
      +
        +
        +
        +
        +
        +
        + + +
        + + + + + + + + diff --git a/docs/classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProductOption.html b/docs/classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProductOption.html new file mode 100644 index 00000000..d405917e --- /dev/null +++ b/docs/classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProductOption.html @@ -0,0 +1,896 @@ + + + + + Documentation + + + + + + + + + + + + + + + + + + + +
        +

        Documentation

        + + + + + +
        + +
        +
        + + + + +
        + + +
        +

        + OrderProductOption + + + extends ResourceModel + + + + +

        + + + + +
        + + + + + + + + +

        + Table of Contents + +

        + +
        +
        + $display_name + +  : string +
        +
        + +
        + $display_name_customer + +  : string +
        +
        + +
        + $display_name_merchant + +  : string +
        +
        + +
        + $display_style + +  : string +
        +
        + +
        + $display_value + +  : string +
        +
        + +
        + $display_value_customer + +  : string +
        +
        + +
        + $display_value_merchant + +  : string +
        +
        + +
        + $id + +  : int +
        +
        + +
        + $name + +  : string +
        +
        + +
        + $option_id + +  : int +
        +
        + +
        + $order_product_id + +  : int +
        +
        + +
        + $product_option_id + +  : int +
        +
        + +
        + $type + +  : string +
        +
        + +
        + $value + +  : string +
        +
        + +
        + __construct() + +  : mixed +
        +
        + +
        + jsonSerialize() + +  : array<string|int, mixed> +
        +
        + +
        + + + + + + +
        +

        + Properties + +

        +
        +

        + $display_name + + + +

        + + + + + public + string + $display_name + + +
        + +
        + + + +
        +
        +

        + $display_name_customer + + + +

        + + + + + public + string + $display_name_customer + + +
        + +
        + + + +
        +
        +

        + $display_name_merchant + + + +

        + + + + + public + string + $display_name_merchant + + +
        + +
        + + + +
        +
        +

        + $display_style + + + +

        + + + + + public + string + $display_style + + +
        + +
        + + + +
        +
        +

        + $display_value + + + +

        + + + + + public + string + $display_value + + +
        + +
        + + + +
        +
        +

        + $display_value_customer + + + +

        + + + + + public + string + $display_value_customer + + +
        + +
        + + + +
        +
        +

        + $display_value_merchant + + + +

        + + + + + public + string + $display_value_merchant + + +
        + +
        + + + +
        + + +
        +

        + $option_id + + + +

        + + + + + public + int + $option_id + + +
        + +
        + + + +
        +
        +

        + $order_product_id + + + +

        + + + + + public + int + $order_product_id + + +
        + +
        + + + +
        +
        +

        + $product_option_id + + + +

        + + + + + public + int + $product_option_id + + +
        + +
        + + + +
        + +
        +

        + $value + + + +

        + + + + + public + string + $value + + +
        + +
        + + + +
        +
        + +
        +

        + Methods + +

        +
        +

        + __construct() + +

        + + + + + public + __construct([stdClass|null $optionObject = null ]) : mixed + +
        + +
        Parameters
        +
        +
        + $optionObject + : stdClass|null + = null
        +
        +
        + +
        +
        + + + +
        Return values
        + mixed + — + + +
        +
        +

        + jsonSerialize() + +

        + + + + + public + jsonSerialize() : array<string|int, mixed> + +
        + + + + +
        Return values
        + array<string|int, mixed> + — + + +
        +
        + + + + +
        +
        +
        +
        +

        Search results

        + +
        +
        +
          +
          +
          +
          +
          +
          + + +
          + + + + + + + + diff --git a/docs/classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html b/docs/classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html new file mode 100644 index 00000000..557b9e3b --- /dev/null +++ b/docs/classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html @@ -0,0 +1,1593 @@ + + + + + Documentation + + + + + + + + + + + + + + + + + + + +
          +

          Documentation

          + + + + + +
          + +
          +
          + + + + +
          + + +
          +

          + ShippingAddress + + + extends ResourceModel + + + + +

          + + + + +
          + + + + + + + + +

          + Table of Contents + +

          + +
          +
          + $base_cost + +  : string +
          +
          + +
          + $base_handling_cost + +  : string +
          +
          + +
          + $city + +  : string +
          +
          + +
          + $company + +  : string|null +
          +
          + +
          + $cost_ex_tax + +  : string +
          +
          + +
          + $cost_inc_tax + +  : string +
          +
          + +
          + $cost_tax + +  : string +
          +
          + +
          + $cost_tax_class_id + +  : int +
          +
          + +
          + $country + +  : string +
          +
          + +
          + $country_iso2 + +  : string +
          +
          + +
          + $email + +  : string +
          +
          + +
          + $first_name + +  : string +
          +
          + +
          + $form_fields + +  : array<string|int, mixed> +
          +
          + +
          + $handling_cost_ex_tax + +  : string +
          +
          + +
          + $handling_cost_inc_tax + +  : string +
          +
          + +
          + $handling_cost_tax + +  : string +
          +
          + +
          + $handling_cost_tax_class_id + +  : int +
          +
          + +
          + $id + +  : int +
          +
          + +
          + $items_shipped + +  : int +
          +
          + +
          + $items_total + +  : int +
          +
          + +
          + $last_name + +  : string +
          +
          + +
          + $order_id + +  : int +
          +
          + +
          + $phone + +  : string +
          +
          + +
          + $shipping_method + +  : string +
          +
          + +
          + $shipping_quotes + +  : object +
          +
          + +
          + $shipping_zone_id + +  : int +
          +
          + +
          + $shipping_zone_name + +  : string +
          +
          + +
          + $state + +  : string +
          +
          + +
          + $street_1 + +  : string +
          +
          + +
          + $street_2 + +  : string +
          +
          + +
          + $zip + +  : string +
          +
          + +
          + __construct() + +  : mixed +
          +
          + +
          + jsonSerialize() + +  : array<string|int, mixed> +
          +
          + +
          + + + + + + +
          +

          + Properties + +

          +
          +

          + $base_cost + + + +

          + + + + + public + string + $base_cost + + +
          + +
          + + + +
          +
          +

          + $base_handling_cost + + + +

          + + + + + public + string + $base_handling_cost + + +
          + +
          + + + +
          +
          +

          + $city + + + +

          + + + + + public + string + $city + + +
          + +
          + + + +
          +
          +

          + $company + + + +

          + + + + + public + string|null + $company + + +
          + +
          + + + +
          +
          +

          + $cost_ex_tax + + + +

          + + + + + public + string + $cost_ex_tax + + +
          + +
          + + + +
          +
          +

          + $cost_inc_tax + + + +

          + + + + + public + string + $cost_inc_tax + + +
          + +
          + + + +
          +
          +

          + $cost_tax + + + +

          + + + + + public + string + $cost_tax + + +
          + +
          + + + +
          +
          +

          + $cost_tax_class_id + + + +

          + + + + + public + int + $cost_tax_class_id + + +
          + +
          + + + +
          +
          +

          + $country + + + +

          + + + + + public + string + $country + + +
          + +
          + + + +
          +
          +

          + $country_iso2 + + + +

          + + + + + public + string + $country_iso2 + + +
          + +
          + + + +
          +
          +

          + $email + + + +

          + + + + + public + string + $email + + +
          + +
          + + + +
          +
          +

          + $first_name + + + +

          + + + + + public + string + $first_name + + +
          + +
          + + + +
          +
          +

          + $form_fields + + + +

          + + + + + public + array<string|int, mixed> + $form_fields + + +
          + +
          + + + +
          +
          +

          + $handling_cost_ex_tax + + + +

          + + + + + public + string + $handling_cost_ex_tax + + +
          + +
          + + + +
          +
          +

          + $handling_cost_inc_tax + + + +

          + + + + + public + string + $handling_cost_inc_tax + + +
          + +
          + + + +
          +
          +

          + $handling_cost_tax + + + +

          + + + + + public + string + $handling_cost_tax + + +
          + +
          + + + +
          +
          +

          + $handling_cost_tax_class_id + + + +

          + + + + + public + int + $handling_cost_tax_class_id + + +
          + +
          + + + +
          +
          +

          + $id + + + +

          + + + + + public + int + $id + + +
          + +
          + + + +
          +
          +

          + $items_shipped + + + +

          + + + + + public + int + $items_shipped + + +
          + +
          + + + +
          +
          +

          + $items_total + + + +

          + + + + + public + int + $items_total + + +
          + +
          + + + +
          +
          +

          + $last_name + + + +

          + + + + + public + string + $last_name + + +
          + +
          + + + +
          +
          +

          + $order_id + + + +

          + + + + + public + int + $order_id + + +
          + +
          + + + +
          +
          +

          + $phone + + + +

          + + + + + public + string + $phone + + +
          + +
          + + + +
          +
          +

          + $shipping_method + + + +

          + + + + + public + string + $shipping_method + + +
          + +
          + + + +
          +
          +

          + $shipping_quotes + + + +

          + + + + + public + object + $shipping_quotes + + +
          + +
          + + + +
          +
          +

          + $shipping_zone_id + + + +

          + + + + + public + int + $shipping_zone_id + + +
          + +
          + + + +
          +
          +

          + $shipping_zone_name + + + +

          + + + + + public + string + $shipping_zone_name + + +
          + +
          + + + +
          +
          +

          + $state + + + +

          + + + + + public + string + $state + + +
          + +
          + + + +
          +
          +

          + $street_1 + + + +

          + + + + + public + string + $street_1 + + +
          + +
          + + + +
          +
          +

          + $street_2 + + + +

          + + + + + public + string + $street_2 + + +
          + +
          + + + +
          +
          +

          + $zip + + + +

          + + + + + public + string + $zip + + +
          + +
          + + + +
          +
          + +
          +

          + Methods + +

          +
          +

          + __construct() + +

          + + + + + public + __construct([stdClass|null $optionObject = null ]) : mixed + +
          + +
          Parameters
          +
          +
          + $optionObject + : stdClass|null + = null
          +
          +
          + +
          +
          + + + +
          Return values
          + mixed + — + + +
          +
          +

          + jsonSerialize() + +

          + + + + + public + jsonSerialize() : array<string|int, mixed> + +
          + + + + +
          Return values
          + array<string|int, mixed> + — + + +
          +
          + + + + +
          +
          +
          +
          +

          Search results

          + +
          +
          +
            +
            +
            +
            +
            +
            + + +
            + + + + + + + + diff --git a/docs/files/bigcommercelegacyapi-api-orders-orderproductsapi.html b/docs/files/bigcommercelegacyapi-api-orders-orderproductsapi.html new file mode 100644 index 00000000..20ee5213 --- /dev/null +++ b/docs/files/bigcommercelegacyapi-api-orders-orderproductsapi.html @@ -0,0 +1,139 @@ + + + + + Documentation + + + + + + + + + + + + + + + + + + + +
            +

            Documentation

            + + + + + +
            + +
            +
            + + + + +
            +
              +
            + +
            +

            OrderProductsApi.php

            + + +
            + + + + + + +

            + Interfaces, Classes and Traits + +

            + +
            + +
            OrderProductsApi
            +
            Order Products v2 API
            + +
            + + + + + + + + +
            +
            +
            +
            +

            Search results

            + +
            +
            +
              +
              +
              +
              +
              +
              + + +
              + + + + + + + + diff --git a/docs/files/bigcommercelegacyapi-api-orders-ordershippingaddressesapi.html b/docs/files/bigcommercelegacyapi-api-orders-ordershippingaddressesapi.html new file mode 100644 index 00000000..83bbfbb0 --- /dev/null +++ b/docs/files/bigcommercelegacyapi-api-orders-ordershippingaddressesapi.html @@ -0,0 +1,139 @@ + + + + + Documentation + + + + + + + + + + + + + + + + + + + +
              +

              Documentation

              + + + + + +
              + +
              +
              + + + + +
              +
                +
              + +
              +

              OrderShippingAddressesApi.php

              + + +
              + + + + + + +

              + Interfaces, Classes and Traits + +

              + +
              + +
              OrderShippingAddressesApi
              +
              + +
              + + + + + + + + +
              +
              +
              +
              +

              Search results

              + +
              +
              +
                +
                +
                +
                +
                +
                + + +
                + + + + + + + + diff --git a/docs/files/bigcommercelegacyapi-responsemodels-order-orderproduct.html b/docs/files/bigcommercelegacyapi-responsemodels-order-orderproduct.html new file mode 100644 index 00000000..5054dc4b --- /dev/null +++ b/docs/files/bigcommercelegacyapi-responsemodels-order-orderproduct.html @@ -0,0 +1,139 @@ + + + + + Documentation + + + + + + + + + + + + + + + + + + + +
                +

                Documentation

                + + + + + +
                + +
                +
                + + + + +
                +
                  +
                + +
                +

                OrderProduct.php

                + + +
                + + + + + + +

                + Interfaces, Classes and Traits + +

                + +
                + +
                OrderProduct
                +
                + +
                + + + + + + + + +
                +
                +
                +
                +

                Search results

                + +
                +
                +
                  +
                  +
                  +
                  +
                  +
                  + + +
                  + + + + + + + + diff --git a/docs/files/bigcommercelegacyapi-responsemodels-order-orderproductoption.html b/docs/files/bigcommercelegacyapi-responsemodels-order-orderproductoption.html new file mode 100644 index 00000000..141cabdf --- /dev/null +++ b/docs/files/bigcommercelegacyapi-responsemodels-order-orderproductoption.html @@ -0,0 +1,139 @@ + + + + + Documentation + + + + + + + + + + + + + + + + + + + +
                  +

                  Documentation

                  + + + + + +
                  + +
                  +
                  + + + + +
                  +
                    +
                  + +
                  +

                  OrderProductOption.php

                  + + +
                  + + + + + + +

                  + Interfaces, Classes and Traits + +

                  + +
                  + +
                  OrderProductOption
                  +
                  + +
                  + + + + + + + + +
                  +
                  +
                  +
                  +

                  Search results

                  + +
                  +
                  +
                    +
                    +
                    +
                    +
                    +
                    + + +
                    + + + + + + + + diff --git a/docs/files/bigcommercelegacyapi-responsemodels-order-shippingaddress.html b/docs/files/bigcommercelegacyapi-responsemodels-order-shippingaddress.html new file mode 100644 index 00000000..3e650812 --- /dev/null +++ b/docs/files/bigcommercelegacyapi-responsemodels-order-shippingaddress.html @@ -0,0 +1,139 @@ + + + + + Documentation + + + + + + + + + + + + + + + + + + + +
                    +

                    Documentation

                    + + + + + +
                    + +
                    +
                    + + + + +
                    +
                      +
                    + +
                    +

                    ShippingAddress.php

                    + + +
                    + + + + + + +

                    + Interfaces, Classes and Traits + +

                    + +
                    + +
                    ShippingAddress
                    +
                    + +
                    + + + + + + + + +
                    +
                    +
                    +
                    +

                    Search results

                    + +
                    +
                    +
                      +
                      +
                      +
                      +
                      +
                      + + +
                      + + + + + + + + diff --git a/docs/indices/files.html b/docs/indices/files.html index 4fa18c89..f77e009e 100644 --- a/docs/indices/files.html +++ b/docs/indices/files.html @@ -226,8 +226,12 @@

                      O

                    • OrderMetafieldsApi.php
                    • OrderMetafieldsResponse.php
                    • OrderProduct.php
                    • +
                    • OrderProduct.php
                    • +
                    • OrderProductOption.php
                    • +
                    • OrderProductsApi.php
                    • OrderRefundItem.php
                    • OrderShippingAddress.php
                    • +
                    • OrderShippingAddressesApi.php
                    • OrderStatusCount.php
                    • OrdersApi.php
                    • OrdersApi.php
                    • @@ -331,6 +335,7 @@

                      S

                    • ScriptResponse.php
                    • ScriptsApi.php
                    • ScriptsResponse.php
                    • +
                    • ShippingAddress.php
                    • SingleResourceResponse.php
                    • StoreInformation.php
                    • StoreInformationApi.php
                    • diff --git a/docs/js/searchIndex.js b/docs/js/searchIndex.js index 6db9c07a..0dcd6b9a 100644 --- a/docs/js/searchIndex.js +++ b/docs/js/searchIndex.js @@ -7175,6 +7175,26 @@ Search.appendIndex( "name": "count", "summary": "", "url": "classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html#method_count" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\Api\\Orders\\OrdersApi\u003A\u003Aproducts\u0028\u0029", + "name": "products", + "summary": "", + "url": "classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html#method_products" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\Api\\Orders\\OrdersApi\u003A\u003Aproduct\u0028\u0029", + "name": "product", + "summary": "", + "url": "classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html#method_product" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\Api\\Orders\\OrdersApi\u003A\u003AshippingAddresses\u0028\u0029", + "name": "shippingAddresses", + "summary": "", + "url": "classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html#method_shippingAddresses" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\Api\\Orders\\OrdersApi\u003A\u003AshippingAddress\u0028\u0029", + "name": "shippingAddress", + "summary": "", + "url": "classes/BigCommerce-ApiV2-Api-Orders-OrdersApi.html#method_shippingAddress" }, { "fqsen": "\\BigCommerce\\ApiV2\\ResourceModels\\Order\\Order", "name": "Order", @@ -8240,6 +8260,511 @@ Search.appendIndex( "name": "sort_order", "summary": "", "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderStatusCount.html#property_sort_order" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\Api\\Orders\\OrderProductsApi", + "name": "OrderProductsApi", + "summary": "Order\u0020Products\u0020v2\u0020API", + "url": "classes/BigCommerce-ApiV2-Api-Orders-OrderProductsApi.html" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\Api\\Orders\\OrderProductsApi\u003A\u003AmultipleResourceUrl\u0028\u0029", + "name": "multipleResourceUrl", + "summary": "", + "url": "classes/BigCommerce-ApiV2-Api-Orders-OrderProductsApi.html#method_multipleResourceUrl" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\Api\\Orders\\OrderProductsApi\u003A\u003AsingleResourceUrl\u0028\u0029", + "name": "singleResourceUrl", + "summary": "", + "url": "classes/BigCommerce-ApiV2-Api-Orders-OrderProductsApi.html#method_singleResourceUrl" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\Api\\Orders\\OrderProductsApi\u003A\u003Aget\u0028\u0029", + "name": "get", + "summary": "", + "url": "classes/BigCommerce-ApiV2-Api-Orders-OrderProductsApi.html#method_get" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\Api\\Orders\\OrderProductsApi\u003A\u003AgetAll\u0028\u0029", + "name": "getAll", + "summary": "", + "url": "classes/BigCommerce-ApiV2-Api-Orders-OrderProductsApi.html#method_getAll" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\Api\\Orders\\OrderShippingAddressesApi", + "name": "OrderShippingAddressesApi", + "summary": "", + "url": "classes/BigCommerce-ApiV2-Api-Orders-OrderShippingAddressesApi.html" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\Api\\Orders\\OrderShippingAddressesApi\u003A\u003AmultipleResourceUrl\u0028\u0029", + "name": "multipleResourceUrl", + "summary": "", + "url": "classes/BigCommerce-ApiV2-Api-Orders-OrderShippingAddressesApi.html#method_multipleResourceUrl" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\Api\\Orders\\OrderShippingAddressesApi\u003A\u003AsingleResourceUrl\u0028\u0029", + "name": "singleResourceUrl", + "summary": "", + "url": "classes/BigCommerce-ApiV2-Api-Orders-OrderShippingAddressesApi.html#method_singleResourceUrl" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\Api\\Orders\\OrderShippingAddressesApi\u003A\u003Aget\u0028\u0029", + "name": "get", + "summary": "", + "url": "classes/BigCommerce-ApiV2-Api-Orders-OrderShippingAddressesApi.html#method_get" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\Api\\Orders\\OrderShippingAddressesApi\u003A\u003AgetAll\u0028\u0029", + "name": "getAll", + "summary": "", + "url": "classes/BigCommerce-ApiV2-Api-Orders-OrderShippingAddressesApi.html#method_getAll" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct", + "name": "OrderProduct", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A__construct\u0028\u0029", + "name": "__construct", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#method___construct" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024id", + "name": "id", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_id" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024order_id", + "name": "order_id", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_order_id" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024order_address_id", + "name": "order_address_id", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_order_address_id" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024name", + "name": "name", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_name" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024name_customer", + "name": "name_customer", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_name_customer" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024sku", + "name": "sku", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_sku" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024type", + "name": "type", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_type" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024base_price", + "name": "base_price", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_base_price" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024price_ex_tax", + "name": "price_ex_tax", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_price_ex_tax" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024price_inc_tax", + "name": "price_inc_tax", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_price_inc_tax" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024price_tax", + "name": "price_tax", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_price_tax" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024quantity", + "name": "quantity", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_quantity" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024base_cost_price", + "name": "base_cost_price", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_base_cost_price" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024cost_price_inc_tax", + "name": "cost_price_inc_tax", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_cost_price_inc_tax" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024cost_price_ex_tax", + "name": "cost_price_ex_tax", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_cost_price_ex_tax" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024weight", + "name": "weight", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_weight" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024cost_price_tax", + "name": "cost_price_tax", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_cost_price_tax" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024is_refunded", + "name": "is_refunded", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_is_refunded" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024refunded_amount", + "name": "refunded_amount", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_refunded_amount" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024return_id", + "name": "return_id", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_return_id" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024wrapping_name", + "name": "wrapping_name", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_wrapping_name" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024base_wrapping_cost", + "name": "base_wrapping_cost", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_base_wrapping_cost" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024wrapping_cost_ex_tax", + "name": "wrapping_cost_ex_tax", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_wrapping_cost_ex_tax" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024wrapping_cost_inc_tax", + "name": "wrapping_cost_inc_tax", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_wrapping_cost_inc_tax" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024wrapping_cost_tax", + "name": "wrapping_cost_tax", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_wrapping_cost_tax" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024wrapping_message", + "name": "wrapping_message", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_wrapping_message" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024quantity_shipped", + "name": "quantity_shipped", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_quantity_shipped" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024event_name", + "name": "event_name", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_event_name" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024event_date", + "name": "event_date", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_event_date" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024fixed_shipping_cost", + "name": "fixed_shipping_cost", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_fixed_shipping_cost" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024ebay_item_id", + "name": "ebay_item_id", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_ebay_item_id" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024ebay_transaction_id", + "name": "ebay_transaction_id", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_ebay_transaction_id" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024option_set_id", + "name": "option_set_id", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_option_set_id" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024parent_order_product_id", + "name": "parent_order_product_id", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_parent_order_product_id" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024is_bundled_product", + "name": "is_bundled_product", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_is_bundled_product" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024bin_picking_number", + "name": "bin_picking_number", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_bin_picking_number" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024applied_discounts", + "name": "applied_discounts", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_applied_discounts" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024product_options", + "name": "product_options", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_product_options" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024external_id", + "name": "external_id", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_external_id" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024upc", + "name": "upc", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_upc" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024variant_id", + "name": "variant_id", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_variant_id" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProduct\u003A\u003A\u0024name_merchant", + "name": "name_merchant", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProduct.html#property_name_merchant" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProductOption", + "name": "OrderProductOption", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProductOption.html" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProductOption\u003A\u003A\u0024id", + "name": "id", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProductOption.html#property_id" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProductOption\u003A\u003A\u0024option_id", + "name": "option_id", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProductOption.html#property_option_id" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProductOption\u003A\u003A\u0024order_product_id", + "name": "order_product_id", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProductOption.html#property_order_product_id" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProductOption\u003A\u003A\u0024product_option_id", + "name": "product_option_id", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProductOption.html#property_product_option_id" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProductOption\u003A\u003A\u0024display_name", + "name": "display_name", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProductOption.html#property_display_name" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProductOption\u003A\u003A\u0024display_value", + "name": "display_value", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProductOption.html#property_display_value" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProductOption\u003A\u003A\u0024value", + "name": "value", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProductOption.html#property_value" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProductOption\u003A\u003A\u0024type", + "name": "type", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProductOption.html#property_type" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProductOption\u003A\u003A\u0024name", + "name": "name", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProductOption.html#property_name" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProductOption\u003A\u003A\u0024display_style", + "name": "display_style", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProductOption.html#property_display_style" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProductOption\u003A\u003A\u0024display_name_customer", + "name": "display_name_customer", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProductOption.html#property_display_name_customer" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProductOption\u003A\u003A\u0024display_name_merchant", + "name": "display_name_merchant", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProductOption.html#property_display_name_merchant" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProductOption\u003A\u003A\u0024display_value_customer", + "name": "display_value_customer", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProductOption.html#property_display_value_customer" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\OrderProductOption\u003A\u003A\u0024display_value_merchant", + "name": "display_value_merchant", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-OrderProductOption.html#property_display_value_merchant" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress", + "name": "ShippingAddress", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024id", + "name": "id", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_id" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024order_id", + "name": "order_id", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_order_id" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024items_total", + "name": "items_total", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_items_total" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024items_shipped", + "name": "items_shipped", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_items_shipped" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024base_cost", + "name": "base_cost", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_base_cost" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024cost_ex_tax", + "name": "cost_ex_tax", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_cost_ex_tax" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024cost_inc_tax", + "name": "cost_inc_tax", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_cost_inc_tax" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024cost_tax", + "name": "cost_tax", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_cost_tax" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024cost_tax_class_id", + "name": "cost_tax_class_id", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_cost_tax_class_id" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024base_handling_cost", + "name": "base_handling_cost", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_base_handling_cost" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024handling_cost_ex_tax", + "name": "handling_cost_ex_tax", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_handling_cost_ex_tax" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024handling_cost_inc_tax", + "name": "handling_cost_inc_tax", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_handling_cost_inc_tax" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024handling_cost_tax", + "name": "handling_cost_tax", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_handling_cost_tax" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024handling_cost_tax_class_id", + "name": "handling_cost_tax_class_id", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_handling_cost_tax_class_id" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024shipping_zone_id", + "name": "shipping_zone_id", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_shipping_zone_id" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024shipping_zone_name", + "name": "shipping_zone_name", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_shipping_zone_name" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024form_fields", + "name": "form_fields", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_form_fields" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024shipping_quotes", + "name": "shipping_quotes", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_shipping_quotes" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024first_name", + "name": "first_name", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_first_name" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024last_name", + "name": "last_name", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_last_name" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024company", + "name": "company", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_company" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024street_1", + "name": "street_1", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_street_1" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024street_2", + "name": "street_2", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_street_2" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024city", + "name": "city", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_city" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024state", + "name": "state", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_state" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024zip", + "name": "zip", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_zip" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024country", + "name": "country", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_country" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024country_iso2", + "name": "country_iso2", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_country_iso2" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024phone", + "name": "phone", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_phone" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024email", + "name": "email", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_email" + }, { + "fqsen": "\\BigCommerce\\ApiV2\\ResponseModels\\Order\\ShippingAddress\u003A\u003A\u0024shipping_method", + "name": "shipping_method", + "summary": "", + "url": "classes/BigCommerce-ApiV2-ResponseModels-Order-ShippingAddress.html#property_shipping_method" }, { "fqsen": "\\", "name": "\\", diff --git a/docs/namespaces/bigcommerce-apiv2-api-orders.html b/docs/namespaces/bigcommerce-apiv2-api-orders.html index ad442c29..53d83b6c 100644 --- a/docs/namespaces/bigcommerce-apiv2-api-orders.html +++ b/docs/namespaces/bigcommerce-apiv2-api-orders.html @@ -97,6 +97,10 @@

                      OrdersApi
                      Orders v2 API
                      +
                      OrderProductsApi
                      +
                      Order Products v2 API
                      +
                      OrderShippingAddressesApi
                      +

                      diff --git a/docs/namespaces/bigcommerce-apiv2-responsemodels-order.html b/docs/namespaces/bigcommerce-apiv2-responsemodels-order.html index 961c0eeb..b3177ba5 100644 --- a/docs/namespaces/bigcommerce-apiv2-responsemodels-order.html +++ b/docs/namespaces/bigcommerce-apiv2-responsemodels-order.html @@ -101,6 +101,12 @@

                      OrderStatusCount
                      +
                      OrderProduct
                      +
                      +
                      OrderProductOption
                      +
                      +
                      ShippingAddress
                      +

                      diff --git a/docs/packages/BigCommerce.html b/docs/packages/BigCommerce.html index 816b7c32..d944893f 100644 --- a/docs/packages/BigCommerce.html +++ b/docs/packages/BigCommerce.html @@ -587,6 +587,16 @@

                      OrderStatusCount
                      +
                      OrderProductsApi
                      +
                      Order Products v2 API
                      +
                      OrderShippingAddressesApi
                      +
                      +
                      OrderProduct
                      +
                      +
                      OrderProductOption
                      +
                      +
                      ShippingAddress
                      +
                      ProductsSubResourceApi
                      diff --git a/docs/reports/markers.html b/docs/reports/markers.html index 010e6d81..0c31ea27 100644 --- a/docs/reports/markers.html +++ b/docs/reports/markers.html @@ -130,6 +130,10 @@

                      Table of Contents

                      BigCommerceLegacyApi/V2ApiClient.php 3 + + + BigCommerceLegacyApi/ResponseModels/Order/OrderProduct.php + 1 @@ -395,6 +399,24 @@

                      V2ApiClient.phpapi.bigcommerce.com/stores/%s/v2/'; + + +

                      OrderProduct.php

                      + + + + + + + + + + + + + + +
                      TypeLineDescription
                      15physical, digital
                      diff --git a/src/BigCommerceLegacyApi/Api/Generic/V2Api.php b/src/BigCommerceLegacyApi/Api/Generic/V2Api.php index f1f14444..19c7c175 100644 --- a/src/BigCommerceLegacyApi/Api/Generic/V2Api.php +++ b/src/BigCommerceLegacyApi/Api/Generic/V2Api.php @@ -2,11 +2,11 @@ namespace BigCommerce\ApiV2\Api\Generic; -use BigCommerce\ApiV2\V2ApiClient; +use BigCommerce\ApiV3\BaseApiClient; interface V2Api { - public function __construct(V2ApiClient $client, ?int $resourceId = null, ?int $parentResourceId = null); + public function __construct(BaseApiClient $client, ?int $resourceId = null, ?int $parentResourceId = null); public function getResourceId(): ?int; - public function getClient(): V2ApiClient; + public function getClient(): BaseApiClient; } diff --git a/src/BigCommerceLegacyApi/Api/Generic/V2ApiBase.php b/src/BigCommerceLegacyApi/Api/Generic/V2ApiBase.php index 54d98f4e..a9f08df1 100644 --- a/src/BigCommerceLegacyApi/Api/Generic/V2ApiBase.php +++ b/src/BigCommerceLegacyApi/Api/Generic/V2ApiBase.php @@ -2,15 +2,15 @@ namespace BigCommerce\ApiV2\Api\Generic; -use BigCommerce\ApiV2\V2ApiClient; +use BigCommerce\ApiV3\BaseApiClient; class V2ApiBase implements V2Api { - private V2ApiClient $client; + private BaseApiClient $client; private ?int $resourceId; private ?int $parentResourceId; - public function __construct(V2ApiClient $client, ?int $resourceId = null, ?int $parentResourceId = null) + public function __construct(BaseApiClient $client, ?int $resourceId = null, ?int $parentResourceId = null) { $this->client = $client; $this->resourceId = $resourceId; @@ -27,7 +27,7 @@ public function getParentResourceId(): ?int return $this->parentResourceId; } - public function getClient(): V2ApiClient + public function getClient(): BaseApiClient { return $this->client; } diff --git a/src/BigCommerceLegacyApi/Api/Orders/OrderProductsApi.php b/src/BigCommerceLegacyApi/Api/Orders/OrderProductsApi.php new file mode 100644 index 00000000..e812483b --- /dev/null +++ b/src/BigCommerceLegacyApi/Api/Orders/OrderProductsApi.php @@ -0,0 +1,60 @@ +order($orderId)->products(); + * + * $productNamesOrdered = array_column('name', $products); + * ``` + */ +class OrderProductsApi extends V2ApiBase +{ + use GetResource; + use GetAllResources; + + private const ORDER_PRODUCTS_ENDPOINT = 'orders/%d/products'; + private const ORDER_PRODUCT_ENDPOINT = 'orders/%d/products/%d'; + + public function multipleResourceUrl(): string + { + return sprintf(self::ORDER_PRODUCTS_ENDPOINT, $this->getParentResourceId()); + } + + public function singleResourceUrl(): string + { + return sprintf(self::ORDER_PRODUCT_ENDPOINT, $this->getParentResourceId(), $this->getResourceId()); + } + + public function get(): OrderProduct + { + $response = $this->getResource(); + + return new OrderProduct(json_decode($response->getBody())); + } + + /** + * @return OrderProduct[] + */ + public function getAll(int $page = 1, int $limit = 250): array + { + $response = $this->getAllResources([], $page, $limit); + + return array_map(fn($p) => new OrderProduct($p), json_decode($response->getBody())); + } +} diff --git a/src/BigCommerceLegacyApi/Api/Orders/OrderShippingAddressesApi.php b/src/BigCommerceLegacyApi/Api/Orders/OrderShippingAddressesApi.php new file mode 100644 index 00000000..207f7b71 --- /dev/null +++ b/src/BigCommerceLegacyApi/Api/Orders/OrderShippingAddressesApi.php @@ -0,0 +1,46 @@ +getParentResourceId()); + } + + public function singleResourceUrl(): string + { + return sprintf(self::SHIPPING_ADDRESS_ENDPOINT, $this->getParentResourceId(), $this->getResourceId()); + } + + public function get(): ShippingAddress + { + $response = $this->getResource(); + + return new ShippingAddress(json_decode($response->getBody())); + } + + /** + * @param int $page + * @param int $limit + * @return ShippingAddress[] + */ + public function getAll(int $page = 1, int $limit = 250): array + { + $response = $this->getAllResources([], $page, $limit); + + return array_map(fn($a) => new ShippingAddress($a), json_decode($response->getBody())); + } +} diff --git a/src/BigCommerceLegacyApi/Api/Orders/OrdersApi.php b/src/BigCommerceLegacyApi/Api/Orders/OrdersApi.php index 5bd5188a..bbb435a5 100644 --- a/src/BigCommerceLegacyApi/Api/Orders/OrdersApi.php +++ b/src/BigCommerceLegacyApi/Api/Orders/OrdersApi.php @@ -4,7 +4,6 @@ use BigCommerce\ApiV2\Api\Generic\V2ApiBase; use BigCommerce\ApiV2\ResourceModels\Order\Order; -use BigCommerce\ApiV2\ResourceModels\Order\OrderProduct; use BigCommerce\ApiV2\ResponseModels\Order\OrderCount; use BigCommerce\ApiV3\Api\Generic\CreateResource; use BigCommerce\ApiV3\Api\Generic\GetAllResources; @@ -17,6 +16,7 @@ * Some functionality for Orders is not available in V3, so this V2 API class has been implemented. * * @see \BigCommerce\ApiV3\Api\Orders\OrdersApi for the V3 API + * @see OrderProductsApi for listing the products in an order * * ### Example * @@ -97,4 +97,24 @@ public function count(): OrderCount return new OrderCount(json_decode($response->getBody())); } + + public function products(): OrderProductsApi + { + return new OrderProductsApi($this->getClient(), null, $this->getResourceId()); + } + + public function product(int $orderProductId): OrderProductsApi + { + return new OrderProductsApi($this->getClient(), $orderProductId, $this->getResourceId()); + } + + public function shippingAddresses(): OrderShippingAddressesApi + { + return new OrderShippingAddressesApi($this->getClient(), null, $this->getResourceId()); + } + + public function shippingAddress(int $id): OrderShippingAddressesApi + { + return new OrderShippingAddressesApi($this->getClient(), $id, $this->getResourceId()); + } } diff --git a/src/BigCommerceLegacyApi/ResponseModels/Order/OrderProduct.php b/src/BigCommerceLegacyApi/ResponseModels/Order/OrderProduct.php new file mode 100644 index 00000000..b5fd98eb --- /dev/null +++ b/src/BigCommerceLegacyApi/ResponseModels/Order/OrderProduct.php @@ -0,0 +1,64 @@ +product_options)) { + $this->product_options = array_map(fn($p) => new OrderProductOption($p), $optionObject->product_options); + unset($optionObject->product_options); + } + parent::__construct($optionObject); + } +} diff --git a/src/BigCommerceLegacyApi/ResponseModels/Order/OrderProductOption.php b/src/BigCommerceLegacyApi/ResponseModels/Order/OrderProductOption.php new file mode 100644 index 00000000..357f25fc --- /dev/null +++ b/src/BigCommerceLegacyApi/ResponseModels/Order/OrderProductOption.php @@ -0,0 +1,23 @@ +setReturnData('orders_v2__149__products__get_all.json'); + + $orderProducts = $this->getApi()->order(149)->products()->getAll(); + + $this->assertCount(2, $orderProducts); + $this->assertEquals('Fog Linen Chambray Towel - Beige Stripe', $orderProducts[0]->name); + $this->assertEquals('Size', $orderProducts[0]->product_options[0]->display_name); + } +} diff --git a/tests/BigCommerceLegacyApi/Api/Orders/OrderShippingAddressesApiTest.php b/tests/BigCommerceLegacyApi/Api/Orders/OrderShippingAddressesApiTest.php new file mode 100644 index 00000000..161e3b95 --- /dev/null +++ b/tests/BigCommerceLegacyApi/Api/Orders/OrderShippingAddressesApiTest.php @@ -0,0 +1,22 @@ +markTestIncomplete(); + } + + public function testCanGetShippingAddresses() + { + $this->setReturnData('orders_v2__229__shipping_addresses__get_all.json'); + $addresses = $this->getApi()->order(229)->shippingAddresses()->getAll(); + + $this->assertCount(2, $addresses); + $this->assertEquals('555 Main Street', $addresses[1]->street_1); + } +} diff --git a/tests/BigCommerceLegacyApi/responses/orders_v2__149__products__get_all.json b/tests/BigCommerceLegacyApi/responses/orders_v2__149__products__get_all.json new file mode 100644 index 00000000..6d4d66d7 --- /dev/null +++ b/tests/BigCommerceLegacyApi/responses/orders_v2__149__products__get_all.json @@ -0,0 +1,174 @@ +[ + { + "id": 65, + "order_id": 149, + "product_id": 77, + "order_address_id": 51, + "name": "Fog Linen Chambray Towel - Beige Stripe", + "name_customer": "Fog Linen Chambray Towel - Beige Stripe", + "name_merchant": "Fog Linen Chambray Towel - Beige Stripe", + "sku": "S-ORAN", + "upc": "1234567891112", + "type": "physical", + "base_price": "55.9900", + "price_ex_tax": "55.9900", + "price_inc_tax": "65.2300", + "price_tax": "9.2400", + "base_total": "55.9900", + "total_ex_tax": "55.9900", + "total_inc_tax": "65.2300", + "total_tax": "9.2400", + "weight": "1.0000", + "quantity": 1, + "base_cost_price": "0.0000", + "cost_price_inc_tax": "0.0000", + "cost_price_ex_tax": "0.0000", + "cost_price_tax": "0.0000", + "is_refunded": false, + "quantity_refunded": 0, + "refund_amount": "0.0000", + "return_id": 0, + "wrapping_name": "", + "base_wrapping_cost": "0.0000", + "wrapping_cost_ex_tax": "0.0000", + "wrapping_cost_inc_tax": "0.0000", + "wrapping_cost_tax": "0.0000", + "wrapping_message": "", + "quantity_shipped": 0, + "fixed_shipping_cost": "5.0000", + "ebay_item_id": "", + "ebay_transaction_id": "", + "option_set_id": 19, + "parent_order_product_id": null, + "is_bundled_product": false, + "bin_picking_number": "", + "external_id": null, + "fulfillment_source": "", + "applied_discounts": [ + { + "id": "manual-discount", + "amount": "1.5900", + "name": "Manual Discount", + "code": null, + "target": "order" + } + ], + "product_options": [ + { + "id": 45, + "option_id": 18, + "order_product_id": 65, + "product_option_id": 120, + "display_name": "Size", + "display_name_customer": "Size", + "display_name_merchant": "Size", + "display_value": "S", + "display_value_customer": "S", + "display_value_merchant": "S", + "value": "69", + "type": "Multiple choice", + "name": "Apparel sizes", + "display_style": "Rectangle" + }, + { + "id": 46, + "option_id": 3, + "order_product_id": 65, + "product_option_id": 121, + "display_name": "Color", + "display_value": "Orange", + "display_value_customer": "S", + "display_value_merchant": "S", + "value": "112", + "type": "Swatch", + "name": "Colors", + "display_style": "" + }, + { + "id": 47, + "option_id": 37, + "order_product_id": 65, + "product_option_id": 122, + "display_name": "Add Letters", + "display_value": "Text Field", + "value": "Text Field", + "type": "Text field", + "name": "Add Letters", + "display_style": "" + }, + { + "id": 48, + "option_id": 38, + "order_product_id": 65, + "product_option_id": 123, + "display_name": "Is this a gift?", + "display_value": "Yes", + "value": "104", + "type": "Checkbox", + "name": "Gift Wrapping $5", + "display_style": "" + }, + { + "id": 49, + "option_id": 39, + "order_product_id": 65, + "product_option_id": 124, + "display_name": "PickList", + "display_value": "Able Brewing System", + "value": "106", + "type": "Product Pick List", + "name": "PickList", + "display_style": "Pick list" + } + ], + "configurable_fields": [] + }, + { + "id": 66, + "order_id": 149, + "product_id": 86, + "order_address_id": 51, + "name": "Able Brewing System", + "sku": "ABS", + "type": "physical", + "base_price": "0.0000", + "price_ex_tax": "0.0000", + "price_inc_tax": "0.0000", + "price_tax": "0.0000", + "base_total": "0.0000", + "total_ex_tax": "0.0000", + "total_inc_tax": "0.0000", + "total_tax": "0.0000", + "weight": "0.0000", + "quantity": 1, + "base_cost_price": "0.0000", + "cost_price_inc_tax": "0.0000", + "cost_price_ex_tax": "0.0000", + "cost_price_tax": "0.0000", + "is_refunded": false, + "quantity_refunded": 0, + "refund_amount": "0.0000", + "return_id": 0, + "wrapping_name": "", + "base_wrapping_cost": "0.0000", + "wrapping_cost_ex_tax": "0.0000", + "wrapping_cost_inc_tax": "0.0000", + "wrapping_cost_tax": "0.0000", + "wrapping_message": "", + "quantity_shipped": 0, + "event_name": null, + "event_date": null, + "fixed_shipping_cost": "0.0000", + "ebay_item_id": "", + "ebay_transaction_id": "", + "option_set_id": null, + "parent_order_product_id": 65, + "is_bundled_product": true, + "bin_picking_number": "BIN", + "external_id": null, + "fulfillment_source": "", + "applied_discounts": [], + "product_options": [], + "configurable_fields": [] + } +] \ No newline at end of file diff --git a/tests/BigCommerceLegacyApi/responses/orders_v2__229__shipping_addresses__get_all.json b/tests/BigCommerceLegacyApi/responses/orders_v2__229__shipping_addresses__get_all.json new file mode 100644 index 00000000..d1335ffa --- /dev/null +++ b/tests/BigCommerceLegacyApi/responses/orders_v2__229__shipping_addresses__get_all.json @@ -0,0 +1,74 @@ +[ + { + "id": 132, + "order_id": 229, + "first_name": "Trishy", + "last_name": "Test", + "company": "Acme Pty Ltd", + "street_1": "666 Sussex St", + "street_2": "", + "city": "San Antonio", + "zip": "78251", + "country": "United States", + "country_iso2": "US", + "state": "Texas", + "email": "janedoe@example.com", + "phone": "", + "items_total": 2, + "items_shipped": 2, + "shipping_method": "None", + "base_cost": "12.9900", + "cost_ex_tax": "12.0000", + "cost_inc_tax": "12.9900", + "cost_tax": "0.9900", + "cost_tax_class_id": 0, + "base_handling_cost": "0.0000", + "handling_cost_ex_tax": "0.0000", + "handling_cost_inc_tax": "0.0000", + "handling_cost_tax": "0.0000", + "handling_cost_tax_class_id": 0, + "shipping_zone_id": 1, + "shipping_zone_name": "United States -1", + "shipping_quotes": { + "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/229/shippingaddresses/132/shippingquotes", + "resource": "/orders/229/shippingaddresses/132/shippingquotes" + }, + "form_fields": [] + }, + { + "id": 133, + "order_id": 229, + "first_name": "Jane", + "last_name": "Doe", + "company": "", + "street_1": "555 Main Street", + "street_2": "", + "city": "Austin", + "zip": "78751", + "country": "United States", + "country_iso2": "US", + "state": "Texas", + "email": "janedoe@example.com", + "phone": "", + "items_total": 0, + "items_shipped": 0, + "shipping_method": "None", + "base_cost": "12.9900", + "cost_ex_tax": "12.0000", + "cost_inc_tax": "12.9900", + "cost_tax": "0.9900", + "cost_tax_class_id": 0, + "base_handling_cost": "0.0000", + "handling_cost_ex_tax": "0.0000", + "handling_cost_inc_tax": "0.0000", + "handling_cost_tax": "0.0000", + "handling_cost_tax_class_id": 0, + "shipping_zone_id": 1, + "shipping_zone_name": "United States -1", + "shipping_quotes": { + "url": "https://api.bigcommerce.com/stores/{store_hash}/v2/orders/229/shippingaddresses/133/shippingquotes", + "resource": "/orders/229/shippingaddresses/133/shippingquotes" + }, + "form_fields": [] + } +] \ No newline at end of file