Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest Changes for 2019-10-10 (Automated Exports, additional resource data methods) #537

Merged
merged 2 commits into from
Sep 11, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
30 changes: 30 additions & 0 deletions lib/recurly/client.php
Original file line number Diff line number Diff line change
Expand Up @@ -2518,4 +2518,34 @@ public function previewPurchase(array $body): \Recurly\Resources\InvoiceCollecti
return $this->makeRequest('POST', $path, $body, null);
}

/**
* List the dates that have an available export to download.
*
* @return \Recurly\Resources\ExportDates Returns a list of dates.
* @link https://developers.recurly.com/api/v2019-10-10#operation/get_export_dates
*/
public function getExportDates(): \Recurly\Resources\ExportDates
{
$path = $this->interpolatePath("/export_dates", []);
return $this->makeRequest('GET', $path, null, null);
}

/**
* List of the export files that are available to download.
*
* @param array $options Associative array of optional parameters
*
* Supported optional query string parameters:
*
* - $options['date'] (string): Date for which to get a list of available automated export files. Date must be in YYYY-MM-DD format.
*
* @return \Recurly\Resources\ExportFiles Returns a list of export files to download.
* @link https://developers.recurly.com/api/v2019-10-10#operation/get_export_files
*/
public function getExportFiles(array $options = []): \Recurly\Resources\ExportFiles
{
$path = $this->interpolatePath("/export_dates/{export_date}/export_files", []);
return $this->makeRequest('GET', $path, null, $options);
}

}
48 changes: 48 additions & 0 deletions lib/recurly/resources/coupon.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class Coupon extends RecurlyResource
{
private $_applies_to_all_plans;
private $_applies_to_non_plan_charges;
private $_bulk_coupon_code;
private $_bulk_coupon_id;
private $_code;
private $_coupon_type;
private $_created_at;
Expand Down Expand Up @@ -93,6 +95,52 @@ public function setAppliesToNonPlanCharges(bool $applies_to_non_plan_charges): v
$this->_applies_to_non_plan_charges = $applies_to_non_plan_charges;
}

/**
* Getter method for the bulk_coupon_code attribute.
* The Coupon code of the parent Bulk Coupon
*
* @return ?string
*/
public function getBulkCouponCode(): ?string
{
return $this->_bulk_coupon_code;
}

/**
* Setter method for the bulk_coupon_code attribute.
*
* @param string $bulk_coupon_code
*
* @return void
*/
public function setBulkCouponCode(string $bulk_coupon_code): void
{
$this->_bulk_coupon_code = $bulk_coupon_code;
}

/**
* Getter method for the bulk_coupon_id attribute.
* The Coupon ID of the parent Bulk Coupon
*
* @return ?string
*/
public function getBulkCouponId(): ?string
{
return $this->_bulk_coupon_id;
}

/**
* Setter method for the bulk_coupon_id attribute.
*
* @param string $bulk_coupon_id
*
* @return void
*/
public function setBulkCouponId(string $bulk_coupon_id): void
{
$this->_bulk_coupon_id = $bulk_coupon_id;
}

/**
* Getter method for the code attribute.
* The code the customer enters to redeem the coupon.
Expand Down
44 changes: 44 additions & 0 deletions lib/recurly/resources/export_dates.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php
/**
* This file is automatically created by Recurly's OpenAPI generation process
* and thus any edits you make by hand will be lost. If you wish to make a
* change to this file, please create a Github issue explaining the changes you
* need and we will usher them to the appropriate places.
*/
namespace Recurly\Resources;

use Recurly\RecurlyResource;

// phpcs:disable
class ExportDates extends RecurlyResource
{
private $_dates;

protected static $array_hints = [
'setDates' => 'string',
];


/**
* Getter method for the dates attribute.
* An array of dates that have available exports.
*
* @return array
*/
public function getDates(): array
{
return $this->_dates ?? [] ;
}

/**
* Setter method for the dates attribute.
*
* @param array $dates
*
* @return void
*/
public function setDates(array $dates): void
{
$this->_dates = $dates;
}
}
91 changes: 91 additions & 0 deletions lib/recurly/resources/export_file.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?php
/**
* This file is automatically created by Recurly's OpenAPI generation process
* and thus any edits you make by hand will be lost. If you wish to make a
* change to this file, please create a Github issue explaining the changes you
* need and we will usher them to the appropriate places.
*/
namespace Recurly\Resources;

use Recurly\RecurlyResource;

// phpcs:disable
class ExportFile extends RecurlyResource
{
private $_href;
private $_md5sum;
private $_name;

protected static $array_hints = [
];


/**
* Getter method for the href attribute.
* A presigned link to download the export file.
*
* @return ?string
*/
public function getHref(): ?string
{
return $this->_href;
}

/**
* Setter method for the href attribute.
*
* @param string $href
*
* @return void
*/
public function setHref(string $href): void
{
$this->_href = $href;
}

/**
* Getter method for the md5sum attribute.
* MD5 hash of the export file.
*
* @return ?string
*/
public function getMd5sum(): ?string
{
return $this->_md5sum;
}

/**
* Setter method for the md5sum attribute.
*
* @param string $md5sum
*
* @return void
*/
public function setMd5sum(string $md5sum): void
{
$this->_md5sum = $md5sum;
}

/**
* Getter method for the name attribute.
* Name of the export file.
*
* @return ?string
*/
public function getName(): ?string
{
return $this->_name;
}

/**
* Setter method for the name attribute.
*
* @param string $name
*
* @return void
*/
public function setName(string $name): void
{
$this->_name = $name;
}
}
44 changes: 44 additions & 0 deletions lib/recurly/resources/export_files.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php
/**
* This file is automatically created by Recurly's OpenAPI generation process
* and thus any edits you make by hand will be lost. If you wish to make a
* change to this file, please create a Github issue explaining the changes you
* need and we will usher them to the appropriate places.
*/
namespace Recurly\Resources;

use Recurly\RecurlyResource;

// phpcs:disable
class ExportFiles extends RecurlyResource
{
private $_files;

protected static $array_hints = [
'setFiles' => '\Recurly\Resources\ExportFile',
];


/**
* Getter method for the files attribute.
*
*
* @return array
*/
public function getFiles(): array
{
return $this->_files ?? [] ;
}

/**
* Setter method for the files attribute.
*
* @param array $files
*
* @return void
*/
public function setFiles(array $files): void
{
$this->_files = $files;
}
}
48 changes: 48 additions & 0 deletions lib/recurly/resources/unique_coupon_code.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// phpcs:disable
class UniqueCouponCode extends RecurlyResource
{
private $_bulk_coupon_code;
private $_bulk_coupon_id;
private $_code;
private $_created_at;
private $_expired_at;
Expand All @@ -25,6 +27,52 @@ class UniqueCouponCode extends RecurlyResource
];


/**
* Getter method for the bulk_coupon_code attribute.
* The Coupon code of the parent Bulk Coupon
*
* @return ?string
*/
public function getBulkCouponCode(): ?string
{
return $this->_bulk_coupon_code;
}

/**
* Setter method for the bulk_coupon_code attribute.
*
* @param string $bulk_coupon_code
*
* @return void
*/
public function setBulkCouponCode(string $bulk_coupon_code): void
{
$this->_bulk_coupon_code = $bulk_coupon_code;
}

/**
* Getter method for the bulk_coupon_id attribute.
* The Coupon ID of the parent Bulk Coupon
*
* @return ?string
*/
public function getBulkCouponId(): ?string
{
return $this->_bulk_coupon_id;
}

/**
* Setter method for the bulk_coupon_id attribute.
*
* @param string $bulk_coupon_id
*
* @return void
*/
public function setBulkCouponId(string $bulk_coupon_id): void
{
$this->_bulk_coupon_id = $bulk_coupon_id;
}

/**
* Getter method for the code attribute.
* The code the customer enters to redeem the coupon.
Expand Down
Loading