Module: PagarMe

Defined in:
lib/pagarme.rb,
lib/pagarme/model.rb,
lib/pagarme/errors.rb,
lib/pagarme/object.rb,
lib/pagarme/request.rb,
lib/pagarme/version.rb,
lib/pagarme/nested_model.rb,
lib/pagarme/resources/card.rb,
lib/pagarme/resources/item.rb,
lib/pagarme/resources/plan.rb,
lib/pagarme/resources/user.rb,
lib/pagarme/resources/phone.rb,
lib/pagarme/resources/address.rb,
lib/pagarme/resources/balance.rb,
lib/pagarme/resources/billing.rb,
lib/pagarme/resources/company.rb,
lib/pagarme/resources/payable.rb,
lib/pagarme/resources/customer.rb,
lib/pagarme/resources/postback.rb,
lib/pagarme/resources/shipping.rb,
lib/pagarme/resources/transfer.rb,
lib/pagarme/transaction_common.rb,
lib/pagarme/resources/recipient.rb,
lib/pagarme/resources/split_rule.rb,
lib/pagarme/resources/postal_code.rb,
lib/pagarme/resources/transaction.rb,
lib/pagarme/resources/bank_account.rb,
lib/pagarme/resources/subscription.rb,
lib/pagarme/resources/fee_collection.rb,
lib/pagarme/resources/balance_operation.rb,
lib/pagarme/resources/bulk_anticipation.rb,
lib/pagarme/resources/antifraud_analysis.rb

Defined Under Namespace

Classes: Address, AntifraudAnalysis, Balance, BalanceOperation, BankAccount, Billing, BulkAnticipation, Card, Company, ConnectionError, Customer, FeeCollection, Item, Model, NestedModel, NotFound, PagarMeError, PagarMeObject, ParamError, Payable, Phone, Plan, Postback, Recipient, Request, RequestError, ResponseError, Shipping, SplitRule, Subscription, Transaction, TransactionCommon, Transfer, User, ValidationError, Zipcode

Constant Summary collapse

VERSION =
'2.2.2'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_endpointObject

Returns the value of attribute api_endpoint.



21
22
23
# File 'lib/pagarme.rb', line 21

def api_endpoint
  @api_endpoint
end

.api_keyObject

Returns the value of attribute api_key.



21
22
23
# File 'lib/pagarme.rb', line 21

def api_key
  @api_key
end

.encryption_keyObject

Returns the value of attribute encryption_key.



21
22
23
# File 'lib/pagarme.rb', line 21

def encryption_key
  @encryption_key
end

.open_timeoutObject

Returns the value of attribute open_timeout.



21
22
23
# File 'lib/pagarme.rb', line 21

def open_timeout
  @open_timeout
end

.timeoutObject

Returns the value of attribute timeout.



21
22
23
# File 'lib/pagarme.rb', line 21

def timeout
  @timeout
end

Class Method Details

.production?Boolean

Returns:

  • (Boolean)


35
36
37
38
39
40
# File 'lib/pagarme.rb', line 35

def self.production?
  ENV['RACK_ENV']  == 'production' ||
  ENV['RAILS_ENV'] == 'production' ||
  ENV['PRODUCTION'] ||
  ENV['production']
end

.validate_fingerprint(*args) ⇒ Object

TODO: Remove deprecated PagarMe.validate_fingerprint



31
32
33
# File 'lib/pagarme.rb', line 31

def self.validate_fingerprint(*args)
  raise '[Deprecation Error] PagarMe.validate_fingerprint is deprecated, use PagarMe::Postback.valid_request_signature? instead'
end