Skip to content

Commit d7896d0

Browse files
committed
Standard exceptions replaced non standard exceptions. [skip ci]
1 parent 144116e commit d7896d0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,9 +654,9 @@ open_pay_resource.delete_all(customer_id=nil)
654654

655655
This API generates 3 different Exception classes.
656656

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

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

662662
Examples:

lib/openpay/customers.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def update_subscription(subscription, customer, params)
154154

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

177177
def delete_all_cards(customer_id)
178178
if env == :production
179-
raise OpenPayError ('This method is not supported on PRODUCTION')
179+
raise OpenpayException.new('This method is not supported on PRODUCTION', false)
180180
end
181181
each_card(customer_id) do |card|
182182
delete_card(customer_id, card['id'])

0 commit comments

Comments
 (0)