Skip to content
Open
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
31 changes: 31 additions & 0 deletions src/Enum/Fields/DiscountApplicationFields.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

namespace Shopify\Enum\Fields;

class DiscountApplicationFields extends AbstractObjectEnum
{
const TYPE = 'type';
const CODE = 'code';
const TITLE = 'title';
const DESCRIPTION = 'description';
const VALUE = 'value';
const VALUE_TYPE = 'value_type';
const ALLOCATION_METHOD = 'allocation_method';
const TARGET_SELECTION = 'target_selection';
const TARGET_TYPE = 'target_type';

public function getFieldTypes()
{
return array(
'type' => 'string',
'code' => 'string',
'title' => 'string',
'description' => 'string',
'value' => 'string',
'value_type' => 'string',
'allocation_method' => 'string',
'target_selection' => 'string',
'target_type' => 'string',
);
}
}
2 changes: 2 additions & 0 deletions src/Enum/Fields/OrderFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class OrderFields extends AbstractObjectEnum
const TAXES_INCLUDED = 'taxes_included';
const TOKEN = 'token';
const TOTAL_DISCOUNTS = 'total_discounts';
const DISCOUNT_APPLICATION = 'discount_applications';
const TOTAL_LINE_ITEMS_PRICE = 'total_line_items_price';
const TOTAL_PRICE = 'total_price';
const TOTAL_PRICE_USD = 'total_price_usd';
Expand Down Expand Up @@ -112,6 +113,7 @@ public function getFieldTypes()
'taxes_included' => 'boolean',
'token' => 'string',
'total_discounts' => 'string',
'discount_applications' => 'DiscountApplication[]',
'total_line_items_price' => 'string',
'total_price' => 'string',
'total_price_usd' => 'string',
Expand Down
13 changes: 13 additions & 0 deletions src/Object/DiscountApplication.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Shopify\Object;

use Shopify\Enum\Fields\DiscountApplicationFields;

class DiscountApplication extends AbstractObject
{
public static function getFieldsEnum()
{
return DiscountApplicationFields::getInstance();
}
}