Class: KiriminAja::Client
- Inherits:
-
Object
- Object
- KiriminAja::Client
- Defined in:
- lib/kiriminaja/client.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#courier ⇒ Object
readonly
Returns the value of attribute courier.
-
#coverage_area ⇒ Object
readonly
Returns the value of attribute coverage_area.
-
#order ⇒ Object
readonly
Returns the value of attribute order.
-
#payment ⇒ Object
readonly
Returns the value of attribute payment.
-
#pickup ⇒ Object
readonly
Returns the value of attribute pickup.
Instance Method Summary collapse
-
#initialize(env: Config::ENV_SANDBOX, api_key: nil, base_url: nil, http_client: nil) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(env: Config::ENV_SANDBOX, api_key: nil, base_url: nil, http_client: nil) ⇒ Client
Returns a new instance of Client.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/kiriminaja/client.rb', line 20 def initialize(env: Config::ENV_SANDBOX, api_key: nil, base_url: nil, http_client: nil) config = Config::ClientConfig.new( env: env, api_key: api_key, base_url: base_url, http_client: http_client, ) http = Http::Request.new(config) @address = Services::AddressService.new(http) @coverage_area = Services::CoverageAreaService.new(http) @courier = Services::CourierService.new(http) @order = Services::OrderService.new(http) @payment = Services::PaymentService.new(http) @pickup = Services::PickupService.new(http) end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
18 19 20 |
# File 'lib/kiriminaja/client.rb', line 18 def address @address end |
#courier ⇒ Object (readonly)
Returns the value of attribute courier.
18 19 20 |
# File 'lib/kiriminaja/client.rb', line 18 def courier @courier end |
#coverage_area ⇒ Object (readonly)
Returns the value of attribute coverage_area.
18 19 20 |
# File 'lib/kiriminaja/client.rb', line 18 def coverage_area @coverage_area end |
#order ⇒ Object (readonly)
Returns the value of attribute order.
18 19 20 |
# File 'lib/kiriminaja/client.rb', line 18 def order @order end |
#payment ⇒ Object (readonly)
Returns the value of attribute payment.
18 19 20 |
# File 'lib/kiriminaja/client.rb', line 18 def payment @payment end |
#pickup ⇒ Object (readonly)
Returns the value of attribute pickup.
18 19 20 |
# File 'lib/kiriminaja/client.rb', line 18 def pickup @pickup end |