Skip to content

Commit

Permalink
v2.0.1 add coupon reservations enpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
altJake committed Aug 20, 2019
1 parent 6e9705e commit d184ba6
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 41 deletions.
5 changes: 1 addition & 4 deletions example.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Generated at Tue Jun 25 2019 15:10:26 GMT+0200 (CEST)
* Generated at Tue Aug 20 2019 15:48:11 GMT+0200 (CEST)
* Author: Talon.One
* The contents of this file are auto generated
*/
Expand All @@ -12,9 +12,6 @@
$t = new TalonOne();
$tm = new TalonOneManagement();

$t->applicationId = 1;
$t->applicationKey = "2f276f93baf3d415";

// set apikey for the integration api
$t->apikey = "dbc644d33aa74d582bd9479c59e16f970fe13bf34a208c39d6c7fa7586968468";

Expand Down
54 changes: 53 additions & 1 deletion integration_api.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Generated at Tue Jun 25 2019 15:10:26 GMT+0200 (CEST)
* Generated at Tue Aug 20 2019 15:48:11 GMT+0200 (CEST)
* Author: Talon.One
* The contents of this file are auto generated
*/
Expand Down Expand Up @@ -118,6 +118,58 @@ public function delete_customer_data($integrationId, $body) {
return $this->apiRequest("DELETE", "customer_data/$integrationId", $body);
}

/**
* Creates a coupon reservation for all passed customer profiles on this couponID
* Arguments
*
* @param string $couponValue The value of a coupon
*
*/

public function create_coupon_reservation($couponValue, $body) {
return $this->apiRequest("POST", "coupon_reservations/$couponValue", $body);
}

/**
* Removes all passed customer profiles reservation from this coupon
* Arguments
*
* @param string $couponValue The value of a coupon
*
*/

public function delete_coupon_reservation($couponValue, $body) {
return $this->apiRequest("DELETE", "coupon_reservations/$couponValue", $body);
}

/**
* Returns all users that have this coupon marked as reserved
* Arguments
*
* @param string $couponValue The value of a coupon
*
*/

public function get_reserved_customers($couponValue, $body) {
return $this->apiRequest("GET", "coupon_reservations/customerprofiles/$couponValue", $body);
}

/**
* Returns all coupons this user is subscribed to that are valid and usable
* Arguments
*
* @param string $integrationId The custom identifier for this profile, must be unique within the account.
*
*/

public function get_reserved_coupons($integrationID, $body) {
return $this->apiRequest("GET", "coupon_reservations/coupons/$integrationID", $body);
}

}

?>
Loading

0 comments on commit d184ba6

Please sign in to comment.