Module: Nihaopay

Defined in:
lib/nihaopay/util/hash_util.rb,
lib/nihaopay-ruby.rb,
lib/nihaopay/query.rb,
lib/nihaopay/errors.rb,
lib/nihaopay/version.rb,
lib/nihaopay/merchant.rb,
lib/nihaopay/configure.rb,
lib/nihaopay/mixins/api.rb,
lib/nihaopay/credit_card.rb,
lib/nihaopay/secure_pay/base.rb,
lib/nihaopay/mixins/queryable.rb,
lib/nihaopay/transactions/base.rb,
lib/nihaopay/secure_pay/ali_pay.rb,
lib/nihaopay/transactions/cancel.rb,
lib/nihaopay/transactions/refund.rb,
lib/nihaopay/secure_pay/union_pay.rb,
lib/nihaopay/transactions/capture.rb,
lib/nihaopay/transactions/release.rb,
lib/nihaopay/transactions/purchase.rb,
lib/nihaopay/secure_pay/we_chat_pay.rb,
lib/nihaopay/transactions/authorize.rb

Overview

Emulates Hash methods from ActiveSupport without monkey-patching the Hash class directly.

Defined Under Namespace

Modules: Api, HashUtil, Queryable, SecurePay, Transactions Classes: CreditCard, Merchant, Query

Constant Summary collapse

TransactionError =
Class.new(StandardError)
SecurePayTransactionError =
Class.new(TransactionError)
ExpressPayTransactionError =
Class.new(TransactionError)
TransactionLookUpError =
Class.new(TransactionError)
VERSION =
'0.1.0'.freeze
DEFAULT_CURRENCY =
'USD'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.currencyObject

Returns the value of attribute currency.



5
6
7
# File 'lib/nihaopay/configure.rb', line 5

def currency
  @currency
end

.test_modeObject

Returns the value of attribute test_mode.



5
6
7
# File 'lib/nihaopay/configure.rb', line 5

def test_mode
  @test_mode
end

.tokenObject

Returns the value of attribute token.



5
6
7
# File 'lib/nihaopay/configure.rb', line 5

def token
  @token
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Nihaopay)

    the object that the method was called on



7
8
9
# File 'lib/nihaopay/configure.rb', line 7

def configure
  yield self
end