Module: Shipay
- Defined in:
- lib/shipay/resources/wallet.rb,
lib/shipay.rb,
lib/shipay/util.rb,
lib/shipay/model.rb,
lib/shipay/errors.rb,
lib/shipay/object.rb,
lib/shipay/request.rb,
lib/shipay/version.rb,
lib/shipay/order_commom.rb,
lib/shipay/authenticator.rb,
lib/shipay/token_manager.rb,
lib/shipay/resources/item.rb,
lib/shipay/resources/order.rb,
lib/shipay/resources/order_v.rb,
lib/shipay/resources/buyer_info.rb,
lib/shipay/resources/order_bacen.rb,
lib/shipay/resources/wallet_list.rb
Overview
{ “order_ref”: “shipaypag-001”, “wallet”: “shipay-pagador”, “total”: 0.51, “items”: [ { “item_title”: “Item 1”, “unit_price”: 0.30, “quantity”: 1 }, { “item_title”: “Item 2”, “unit_price”: 0.20, “quantity”: 1 }, { “item_title”: “Item 3”, “unit_price”: 0.01, “quantity”: 1 } ], “buyer”: { “name”: “Shipay PDV”, “cpf_cnpj”: “121.191.870-02”, “email”: “[email protected]”, “phone”: “+55 11 99999-9999” } } path = ‘/order’
Defined Under Namespace
Classes: Authenticator, BuyerInfo, Client, ConnectionError, Error, Item, MissingCredentialsError, Model, NotFound, Order, OrderBacen, OrderCommom, OrderV, ParamError, Request, RequestError, ResponseError, ShipayError, ShipayObject, TokenManager, Util, ValidationError, Wallet, WalletList
Constant Summary collapse
- VERSION =
"0.1.5"
- CLIENT_TYPES =
i(pdv e_comerce)
Class Attribute Summary collapse
-
.access_key ⇒ Object
Returns the value of attribute access_key.
-
.api_endpoint ⇒ Object
readonly
Returns the value of attribute api_endpoint.
-
.callback_url ⇒ Object
Returns the value of attribute callback_url.
-
.client_id ⇒ Object
Returns the value of attribute client_id.
-
.credentials ⇒ Object
Returns the value of attribute credentials.
-
.default_client_key ⇒ Object
Returns the value of attribute default_client_key.
-
.secret_key ⇒ Object
Returns the value of attribute secret_key.
Class Method Summary collapse
Class Attribute Details
.access_key ⇒ Object
Returns the value of attribute access_key.
23 24 25 |
# File 'lib/shipay.rb', line 23 def access_key @access_key end |
.api_endpoint ⇒ Object (readonly)
Returns the value of attribute api_endpoint.
24 25 26 |
# File 'lib/shipay.rb', line 24 def api_endpoint @api_endpoint end |
.callback_url ⇒ Object
Returns the value of attribute callback_url.
23 24 25 |
# File 'lib/shipay.rb', line 23 def callback_url @callback_url end |
.client_id ⇒ Object
Returns the value of attribute client_id.
23 24 25 |
# File 'lib/shipay.rb', line 23 def client_id @client_id end |
.credentials ⇒ Object
Returns the value of attribute credentials.
23 24 25 |
# File 'lib/shipay.rb', line 23 def credentials @credentials end |
.default_client_key ⇒ Object
Returns the value of attribute default_client_key.
23 24 25 |
# File 'lib/shipay.rb', line 23 def default_client_key @default_client_key end |
.secret_key ⇒ Object
Returns the value of attribute secret_key.
23 24 25 |
# File 'lib/shipay.rb', line 23 def secret_key @secret_key end |
Class Method Details
.production? ⇒ Boolean
26 27 28 29 30 31 32 33 34 |
# File 'lib/shipay.rb', line 26 def production? ENV["RACK_ENV"] == "production" || ENV["RAILS_ENV"] == "production" || ENV["PRODUCTION"] || ENV["production"] || (Rails.env.production? if Object.const_defined?('::Rails')) rescue NameError => e return false end |