Module: Akatus
- Extended by:
- Akatus
- Included in:
- Akatus
- Defined in:
- lib/akatus.rb,
lib/akatus/base.rb,
lib/akatus/order.rb,
lib/akatus/phone.rb,
lib/akatus/address.rb,
lib/akatus/product.rb,
lib/akatus/version.rb,
lib/akatus/credit_card.rb,
lib/akatus/installments.rb,
lib/akatus/transactions.rb,
lib/akatus/payment_methods.rb
Defined Under Namespace
Classes: Address, CreditCard, Installments, InvalidEnvironment, MissingConfiguration, Order, PaymentMethods, Phone, Product, Transactions
Constant Summary
collapse
- VERSION =
"0.0.1"
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#config_file ⇒ Object
Returns the value of attribute config_file.
8
9
10
|
# File 'lib/akatus/base.rb', line 8
def config_file
@config_file
end
|
#env ⇒ Object
Returns the value of attribute env.
8
9
10
|
# File 'lib/akatus/base.rb', line 8
def env
@env
end
|
Instance Method Details
#akatus_api_uri ⇒ Object
29
30
31
|
# File 'lib/akatus/base.rb', line 29
def akatus_api_uri
akatus_uri + "/api/v1"
end
|
#akatus_uri ⇒ Object
26
27
28
|
# File 'lib/akatus/base.rb', line 26
def akatus_uri
config["uri"]
end
|
#config ⇒ Object
10
11
12
13
|
# File 'lib/akatus/base.rb', line 10
def config
validate!
@config ||= YAML.load_file(config_file)[env]
end
|
#config! ⇒ Object
15
16
17
18
|
# File 'lib/akatus/base.rb', line 15
def config!
@config = nil
config
end
|
#seller_api_key ⇒ Object
23
24
25
|
# File 'lib/akatus/base.rb', line 23
def seller_api_key
config["api_key"]
end
|
#seller_email ⇒ Object
20
21
22
|
# File 'lib/akatus/base.rb', line 20
def seller_email
config["email"]
end
|