Skip to content

Commit

Permalink
Merge pull request #74 from rich-spitkovsky-riskified/policy-abuse
Browse files Browse the repository at this point in the history
TIS-252 add support for policy object
  • Loading branch information
arungopalRF authored Mar 5, 2021
2 parents 326c2d9 + 726ed1b commit 5f5529d
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Riskified PHP SDK
=================

version: 1.9.2
-------------------

See *samples/* for examples on how to use this SDK.

Migrating to API Version 2
Expand Down
2 changes: 1 addition & 1 deletion src/Riskified/Common/Riskified.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @package Riskified\Common
*/
class Riskified {
const VERSION = '1.9.1';
const VERSION = '1.9.2';
const API_VERSION = '2';

/**
Expand Down
3 changes: 2 additions & 1 deletion src/Riskified/OrderWebhook/Model/DiscountCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class DiscountCode extends AbstractModel {

protected $_fields = array(
'code' => 'string',
'amount' => 'float'
'amount' => 'float',
'policy' => 'object \Policy optional',
);
}
1 change: 1 addition & 0 deletions src/Riskified/OrderWebhook/Model/LineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class LineItem extends AbstractModel {
'condition' => 'string optional',
'product_type' => 'string optional',
'brand' => 'string optional',
'policy' => 'object \Policy optional',

/* add this field when the (digital) goods are to be delivered in future date */
'delivered_at' => 'date optional',
Expand Down
27 changes: 27 additions & 0 deletions src/Riskified/OrderWebhook/Model/Policy.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php namespace Riskified\OrderWebhook\Model;
/**
* Copyright 2013-2021 Riskified.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0.html
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

/**
* Class Policy
* data model of policy information
* @package Riskified\OrderWebhook\Model
*/
class Policy extends AbstractModel {

protected $_fields = array(
'evaluate' => 'boolean'
);
}

0 comments on commit 5f5529d

Please sign in to comment.