Skip to content

Commit

Permalink
Standard exceptions replaced non standard exceptions. [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ronniebermejo committed Jun 18, 2014
1 parent 144116e commit d7896d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -654,9 +654,9 @@ open_pay_resource.delete_all(customer_id=nil)

This API generates 3 different Exception classes.

- **OpenpayException**: Generic base api exception class, for generic api exceptions.
- **OpenpayException**: Generic base API exception class, Generic API exceptions.

- Internal server error (500 Internal Server Error)
- Internal server error (500 Internal Server Error).
- OpenpayApi factory method, invalid resource name.

Examples:
Expand Down
4 changes: 2 additions & 2 deletions lib/openpay/customers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def update_subscription(subscription, customer, params)

def delete_all_subscriptions(customer_id)
if env == :production
raise OpenPayError ('This method is not supported on PRODUCTION')
raise OpenpayException.new('This method is not supported on PRODUCTION', false)
end
all_subscriptions(customer_id).each do |sub|
delete_subscription(customer_id, sub['id'])
Expand All @@ -176,7 +176,7 @@ def delete_card(customer, card_id)

def delete_all_cards(customer_id)
if env == :production
raise OpenPayError ('This method is not supported on PRODUCTION')
raise OpenpayException.new('This method is not supported on PRODUCTION', false)
end
each_card(customer_id) do |card|
delete_card(customer_id, card['id'])
Expand Down

0 comments on commit d7896d0

Please sign in to comment.