From 93cae75aa760cb95a3078c7dfa5c57b832a6512c Mon Sep 17 00:00:00 2001 From: Santiago Date: Wed, 22 Feb 2017 12:29:47 -0300 Subject: [PATCH] Reverted change on Mandrill. --- lib/Mandrill/Mandrill.php | 60 --- lib/Mandrill/Mandrill/Exceptions.php | 412 +++++++++--------- lib/Mandrill/Mandrill/HttpError.php | 5 - lib/Mandrill/Mandrill/IPProvisionLimit.php | 8 - lib/Mandrill/Mandrill/InvalidCustomDNS.php | 8 - .../Mandrill/InvalidCustomDNSPending.php | 8 - .../Mandrill/InvalidDeleteDefaultPool.php | 8 - .../Mandrill/InvalidDeleteNonEmptyPool.php | 8 - .../Mandrill/InvalidEmptyDefaultPool.php | 8 - lib/Mandrill/Mandrill/InvalidKey.php | 8 - lib/Mandrill/Mandrill/InvalidReject.php | 8 - lib/Mandrill/Mandrill/InvalidTagName.php | 8 - lib/Mandrill/Mandrill/InvalidTemplate.php | 8 - lib/Mandrill/Mandrill/MetadataFieldLimit.php | 8 - lib/Mandrill/Mandrill/NoSendingHistory.php | 8 - lib/Mandrill/Mandrill/PaymentRequired.php | 8 - lib/Mandrill/Mandrill/PoorReputation.php | 8 - lib/Mandrill/Mandrill/ServiceUnavailable.php | 8 - lib/Mandrill/Mandrill/UnknownExport.php | 8 - lib/Mandrill/Mandrill/UnknownIP.php | 8 - .../Mandrill/UnknownInboundDomain.php | 8 - lib/Mandrill/Mandrill/UnknownInboundRoute.php | 8 - lib/Mandrill/Mandrill/UnknownMessage.php | 8 - .../Mandrill/UnknownMetadataField.php | 8 - lib/Mandrill/Mandrill/UnknownPool.php | 8 - lib/Mandrill/Mandrill/UnknownSender.php | 8 - lib/Mandrill/Mandrill/UnknownSubaccount.php | 8 - lib/Mandrill/Mandrill/UnknownTemplate.php | 8 - .../Mandrill/UnknownTrackingDomain.php | 8 - lib/Mandrill/Mandrill/UnknownUrl.php | 8 - lib/Mandrill/Mandrill/UnknownWebhook.php | 8 - lib/Mandrill/Mandrill/ValidationError.php | 8 - 32 files changed, 206 insertions(+), 503 deletions(-) delete mode 100644 lib/Mandrill/Mandrill/HttpError.php delete mode 100644 lib/Mandrill/Mandrill/IPProvisionLimit.php delete mode 100644 lib/Mandrill/Mandrill/InvalidCustomDNS.php delete mode 100644 lib/Mandrill/Mandrill/InvalidCustomDNSPending.php delete mode 100644 lib/Mandrill/Mandrill/InvalidDeleteDefaultPool.php delete mode 100644 lib/Mandrill/Mandrill/InvalidDeleteNonEmptyPool.php delete mode 100644 lib/Mandrill/Mandrill/InvalidEmptyDefaultPool.php delete mode 100644 lib/Mandrill/Mandrill/InvalidKey.php delete mode 100644 lib/Mandrill/Mandrill/InvalidReject.php delete mode 100644 lib/Mandrill/Mandrill/InvalidTagName.php delete mode 100644 lib/Mandrill/Mandrill/InvalidTemplate.php delete mode 100644 lib/Mandrill/Mandrill/MetadataFieldLimit.php delete mode 100644 lib/Mandrill/Mandrill/NoSendingHistory.php delete mode 100644 lib/Mandrill/Mandrill/PaymentRequired.php delete mode 100644 lib/Mandrill/Mandrill/PoorReputation.php delete mode 100644 lib/Mandrill/Mandrill/ServiceUnavailable.php delete mode 100644 lib/Mandrill/Mandrill/UnknownExport.php delete mode 100644 lib/Mandrill/Mandrill/UnknownIP.php delete mode 100644 lib/Mandrill/Mandrill/UnknownInboundDomain.php delete mode 100644 lib/Mandrill/Mandrill/UnknownInboundRoute.php delete mode 100644 lib/Mandrill/Mandrill/UnknownMessage.php delete mode 100644 lib/Mandrill/Mandrill/UnknownMetadataField.php delete mode 100644 lib/Mandrill/Mandrill/UnknownPool.php delete mode 100644 lib/Mandrill/Mandrill/UnknownSender.php delete mode 100644 lib/Mandrill/Mandrill/UnknownSubaccount.php delete mode 100644 lib/Mandrill/Mandrill/UnknownTemplate.php delete mode 100644 lib/Mandrill/Mandrill/UnknownTrackingDomain.php delete mode 100644 lib/Mandrill/Mandrill/UnknownUrl.php delete mode 100644 lib/Mandrill/Mandrill/UnknownWebhook.php delete mode 100644 lib/Mandrill/Mandrill/ValidationError.php diff --git a/lib/Mandrill/Mandrill.php b/lib/Mandrill/Mandrill.php index 84fe85b81..192cae01e 100755 --- a/lib/Mandrill/Mandrill.php +++ b/lib/Mandrill/Mandrill.php @@ -16,36 +16,6 @@ require_once(dirname(__FILE__) . '/Mandrill/Mandrill/Senders.php'); require_once(dirname(__FILE__) . '/Mandrill/Mandrill/Metadata.php'); require_once(dirname(__FILE__) . '/Mandrill/Mandrill/Exceptions.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/HttpError.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/ValidationError.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/InvalidKey.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/PaymentRequired.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/UnknownSubaccount.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/UnknownTemplate.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/ServiceUnavailable.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/UnknownMessage.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/InvalidTagName.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/InvalidReject.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/UnknownSender.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/UnknownUrl.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/UnknownTrackingDomain.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/InvalidTemplate.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/UnknownWebhook.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/UnknownInboundDomain.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/UnknownInboundRoute.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/UnknownExport.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/IPProvisionLimit.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/UnknownPool.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/NoSendingHistory.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/PoorReputation.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/UnknownIP.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/InvalidEmptyDefaultPool.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/InvalidDeleteDefaultPool.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/InvalidDeleteNonEmptyPool.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/InvalidCustomDNS.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/InvalidCustomDNSPending.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/MetadataFieldLimit.php'); - require_once(dirname(__FILE__) . '/Mandrill/Mandrill/UnknownMetadataField.php'); } else { require_once(dirname(__FILE__) . '/Mandrill/Templates.php'); require_once(dirname(__FILE__) . '/Mandrill/Exports.php'); @@ -63,36 +33,6 @@ require_once(dirname(__FILE__) . '/Mandrill/Senders.php'); require_once(dirname(__FILE__) . '/Mandrill/Metadata.php'); require_once(dirname(__FILE__) . '/Mandrill/Exceptions.php'); - require_once(dirname(__FILE__) . '/Mandrill/HttpError.php'); - require_once(dirname(__FILE__) . '/Mandrill/ValidationError.php'); - require_once(dirname(__FILE__) . '/Mandrill/InvalidKey.php'); - require_once(dirname(__FILE__) . '/Mandrill/PaymentRequired.php'); - require_once(dirname(__FILE__) . '/Mandrill/UnknownSubaccount.php'); - require_once(dirname(__FILE__) . '/Mandrill/UnknownTemplate.php'); - require_once(dirname(__FILE__) . '/Mandrill/ServiceUnavailable.php'); - require_once(dirname(__FILE__) . '/Mandrill/UnknownMessage.php'); - require_once(dirname(__FILE__) . '/Mandrill/InvalidTagName.php'); - require_once(dirname(__FILE__) . '/Mandrill/InvalidReject.php'); - require_once(dirname(__FILE__) . '/Mandrill/UnknownSender.php'); - require_once(dirname(__FILE__) . '/Mandrill/UnknownUrl.php'); - require_once(dirname(__FILE__) . '/Mandrill/UnknownTrackingDomain.php'); - require_once(dirname(__FILE__) . '/Mandrill/InvalidTemplate.php'); - require_once(dirname(__FILE__) . '/Mandrill/UnknownWebhook.php'); - require_once(dirname(__FILE__) . '/Mandrill/UnknownInboundDomain.php'); - require_once(dirname(__FILE__) . '/Mandrill/UnknownInboundRoute.php'); - require_once(dirname(__FILE__) . '/Mandrill/UnknownExport.php'); - require_once(dirname(__FILE__) . '/Mandrill/IPProvisionLimit.php'); - require_once(dirname(__FILE__) . '/Mandrill/UnknownPool.php'); - require_once(dirname(__FILE__) . '/Mandrill/NoSendingHistory.php'); - require_once(dirname(__FILE__) . '/Mandrill/PoorReputation.php'); - require_once(dirname(__FILE__) . '/Mandrill/UnknownIP.php'); - require_once(dirname(__FILE__) . '/Mandrill/InvalidEmptyDefaultPool.php'); - require_once(dirname(__FILE__) . '/Mandrill/InvalidDeleteDefaultPool.php'); - require_once(dirname(__FILE__) . '/Mandrill/InvalidDeleteNonEmptyPool.php'); - require_once(dirname(__FILE__) . '/Mandrill/InvalidCustomDNS.php'); - require_once(dirname(__FILE__) . '/Mandrill/InvalidCustomDNSPending.php'); - require_once(dirname(__FILE__) . '/Mandrill/MetadataFieldLimit.php'); - require_once(dirname(__FILE__) . '/Mandrill/UnknownMetadataField.php'); } class Mandrill_Mandrill diff --git a/lib/Mandrill/Mandrill/Exceptions.php b/lib/Mandrill/Mandrill/Exceptions.php index 20f51dff3..b84fe707e 100755 --- a/lib/Mandrill/Mandrill/Exceptions.php +++ b/lib/Mandrill/Mandrill/Exceptions.php @@ -4,210 +4,210 @@ class Mandrill_Error extends Exception { } -//class Mandrill_HttpError extends Mandrill_Error -//{ -//} - -///** -// * The parameters passed to the API call are invalid or not provided when required -// */ -//class Mandrill_ValidationError extends Mandrill_Error -//{ -//} - -///** -// * The provided API key is not a valid Mandrill API key -// */ -//class Mandrill_Invalid_Key extends Mandrill_Error -//{ -//} - -///** -// * The requested feature requires payment. -// */ -//class Mandrill_PaymentRequired extends Mandrill_Error -//{ -//} - -///** -// * The provided subaccount id does not exist. -// */ -//class Mandrill_Unknown_Subaccount extends Mandrill_Error -//{ -//} - -///** -// * The requested template does not exist -// */ -//class Mandrill_Unknown_Template extends Mandrill_Error -//{ -//} - -///** -// * The subsystem providing this API call is down for maintenance -// */ -//class Mandrill_ServiceUnavailable extends Mandrill_Error -//{ -//} - -///** -// * The provided message id does not exist. -// */ -//class Mandrill_Unknown_Message extends Mandrill_Error -//{ -//} - -///** -// * The requested tag does not exist or contains invalid characters -// */ -//class Mandrill_Invalid_Tag_Name extends Mandrill_Error -//{ -//} - -///** -// * The requested email is not in the rejection list -// */ -//class Mandrill_Invalid_Reject extends Mandrill_Error -//{ -//} - -///** -// * The requested sender does not exist -// */ -//class Mandrill_Unknown_Sender extends Mandrill_Error -//{ -//} - -///** -// * The requested URL has not been seen in a tracked link -// */ -//class Mandrill_Unknown_Url extends Mandrill_Error -//{ -//} - -///** -// * The provided tracking domain does not exist. -// */ -//class Mandrill_Unknown_TrackingDomain extends Mandrill_Error -//{ -//} - -///** -// * The given template name already exists or contains invalid characters -// */ -//class Mandrill_Invalid_Template extends Mandrill_Error -//{ -//} - -///** -// * The requested webhook does not exist -// */ -//class Mandrill_Unknown_Webhook extends Mandrill_Error -//{ -//} - -///** -// * The requested inbound domain does not exist -// */ -//class Mandrill_Unknown_InboundDomain extends Mandrill_Error -//{ -//} - -///** -// * The provided inbound route does not exist. -// */ -//class Mandrill_Unknown_InboundRoute extends Mandrill_Error -//{ -//} - -///** -// * The requested export job does not exist -// */ -//class Mandrill_Unknown_Export extends Mandrill_Error -//{ -//} - -///** -// * A dedicated IP cannot be provisioned while another request is pending. -// */ -//class Mandrill_IP_ProvisionLimit extends Mandrill_Error -//{ -//} - -///** -// * The provided dedicated IP pool does not exist. -// */ -//class Mandrill_Unknown_Pool extends Mandrill_Error -//{ -//} - -///** -// * The user hasn't started sending yet. -// */ -//class Mandrill_NoSendingHistory extends Mandrill_Error -//{ -//} - -///** -// * The user's reputation is too low to continue. -// */ -//class Mandrill_PoorReputation extends Mandrill_Error -//{ -//} - -///** -// * The provided dedicated IP does not exist. -// */ -//class Mandrill_Unknown_IP extends Mandrill_Error -//{ -//} - -///** -// * You cannot remove the last IP from your default IP pool. -// */ -//class Mandrill_Invalid_EmptyDefaultPool extends Mandrill_Error -//{ -//} - -///** -// * The default pool cannot be deleted. -// */ -//class Mandrill_Invalid_DeleteDefaultPool extends Mandrill_Error -//{ -//} - -///** -// * Non-empty pools cannot be deleted. -// */ -//class Mandrill_Invalid_DeleteNonEmptyPool extends Mandrill_Error -//{ -//} - -///** -// * The domain name is not configured for use as the dedicated IP's custom reverse DNS. -// */ -//class Mandrill_Invalid_CustomDNS extends Mandrill_Error -//{ -//} - -///** -// * A custom DNS change for this dedicated IP is currently pending. -// */ -//class Mandrill_Invalid_CustomDNSPending extends Mandrill_Error -//{ -//} - -///** -// * Custom metadata field limit reached. -// */ -//class Mandrill_Metadata_FieldLimit extends Mandrill_Error -//{ -//} - -///** -// * The provided metadata field name does not exist. -// */ -//class Mandrill_Unknown_MetadataField extends Mandrill_Error -//{ -//} +class Mandrill_HttpError extends Mandrill_Error +{ +} + +/** + * The parameters passed to the API call are invalid or not provided when required + */ +class Mandrill_ValidationError extends Mandrill_Error +{ +} + +/** + * The provided API key is not a valid Mandrill API key + */ +class Mandrill_Invalid_Key extends Mandrill_Error +{ +} + +/** + * The requested feature requires payment. + */ +class Mandrill_PaymentRequired extends Mandrill_Error +{ +} + +/** + * The provided subaccount id does not exist. + */ +class Mandrill_Unknown_Subaccount extends Mandrill_Error +{ +} + +/** + * The requested template does not exist + */ +class Mandrill_Unknown_Template extends Mandrill_Error +{ +} + +/** + * The subsystem providing this API call is down for maintenance + */ +class Mandrill_ServiceUnavailable extends Mandrill_Error +{ +} + +/** + * The provided message id does not exist. + */ +class Mandrill_Unknown_Message extends Mandrill_Error +{ +} + +/** + * The requested tag does not exist or contains invalid characters + */ +class Mandrill_Invalid_Tag_Name extends Mandrill_Error +{ +} + +/** + * The requested email is not in the rejection list + */ +class Mandrill_Invalid_Reject extends Mandrill_Error +{ +} + +/** + * The requested sender does not exist + */ +class Mandrill_Unknown_Sender extends Mandrill_Error +{ +} + +/** + * The requested URL has not been seen in a tracked link + */ +class Mandrill_Unknown_Url extends Mandrill_Error +{ +} + +/** + * The provided tracking domain does not exist. + */ +class Mandrill_Unknown_TrackingDomain extends Mandrill_Error +{ +} + +/** + * The given template name already exists or contains invalid characters + */ +class Mandrill_Invalid_Template extends Mandrill_Error +{ +} + +/** + * The requested webhook does not exist + */ +class Mandrill_Unknown_Webhook extends Mandrill_Error +{ +} + +/** + * The requested inbound domain does not exist + */ +class Mandrill_Unknown_InboundDomain extends Mandrill_Error +{ +} + +/** + * The provided inbound route does not exist. + */ +class Mandrill_Unknown_InboundRoute extends Mandrill_Error +{ +} + +/** + * The requested export job does not exist + */ +class Mandrill_Unknown_Export extends Mandrill_Error +{ +} + +/** + * A dedicated IP cannot be provisioned while another request is pending. + */ +class Mandrill_IP_ProvisionLimit extends Mandrill_Error +{ +} + +/** + * The provided dedicated IP pool does not exist. + */ +class Mandrill_Unknown_Pool extends Mandrill_Error +{ +} + +/** + * The user hasn't started sending yet. + */ +class Mandrill_NoSendingHistory extends Mandrill_Error +{ +} + +/** + * The user's reputation is too low to continue. + */ +class Mandrill_PoorReputation extends Mandrill_Error +{ +} + +/** + * The provided dedicated IP does not exist. + */ +class Mandrill_Unknown_IP extends Mandrill_Error +{ +} + +/** + * You cannot remove the last IP from your default IP pool. + */ +class Mandrill_Invalid_EmptyDefaultPool extends Mandrill_Error +{ +} + +/** + * The default pool cannot be deleted. + */ +class Mandrill_Invalid_DeleteDefaultPool extends Mandrill_Error +{ +} + +/** + * Non-empty pools cannot be deleted. + */ +class Mandrill_Invalid_DeleteNonEmptyPool extends Mandrill_Error +{ +} + +/** + * The domain name is not configured for use as the dedicated IP's custom reverse DNS. + */ +class Mandrill_Invalid_CustomDNS extends Mandrill_Error +{ +} + +/** + * A custom DNS change for this dedicated IP is currently pending. + */ +class Mandrill_Invalid_CustomDNSPending extends Mandrill_Error +{ +} + +/** + * Custom metadata field limit reached. + */ +class Mandrill_Metadata_FieldLimit extends Mandrill_Error +{ +} + +/** + * The provided metadata field name does not exist. + */ +class Mandrill_Unknown_MetadataField extends Mandrill_Error +{ +} diff --git a/lib/Mandrill/Mandrill/HttpError.php b/lib/Mandrill/Mandrill/HttpError.php deleted file mode 100644 index 0fea640e7..000000000 --- a/lib/Mandrill/Mandrill/HttpError.php +++ /dev/null @@ -1,5 +0,0 @@ -