lib/mp_api/payment.rb in mp_api-0.1.5 vs lib/mp_api/payment.rb in mp_api-0.1.6

- old
+ new

@@ -3,11 +3,11 @@ def self.find_by_id(payment_id) begin response = Client.new.get_payment(payment_id) rescue RuntimeError => e - e.message == 'Too many retries' ? raise(TooManyRequests) : raise(e) + e.message == 'Too many retries' ? raise(TooManyRequestsError) : raise(e) end new(**build_hash(response)) end attr_reader :status_detail, :three_ds_info_creq, :three_ds_info_external_resource_url, :three_d_secure_mode, :id, :description, :date_approved, :date_created, :money_release_date, :payer_email, :payer_identification_type, :payer_identification_number, :payment_method, :payment_type, :qr_code, :qr_code_base_64, :transaction_id, :ticket_url, :status, :amount, :token, :issuer_id, :installments @@ -67,10 +67,10 @@ def create begin response = Client.new.create_payment(JSON.dump(build_json)) rescue RuntimeError => e - e.message == 'Too many retries' ? raise(TooManyRequests) : raise(e) + e.message == 'Too many retries' ? raise(TooManyRequestsError) : raise(e) end self.class.new(**self.class.build_hash(response)) end def self.build_hash json_response