> For the complete documentation index, see [llms.txt](https://docs.ecommerce.seb.ee/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ecommerce.seb.ee/seb-docs-draft/seb-docs-public-et/integratsioon/mobiilne-sdk/ios-sdk/viide/konfigureerimine.md).

# Konfigureerimine

Kõik Configuration'i initsialiseerijad ja omadused koos vaikeväärtuste ja tähendustega.

`Konfiguratsioon` / `EGWConfiguration`

Sisaldab hoste, millega SDK suhtleb, ja käitumissätteid ühe `PaymentKit`. Kõik omadused on muutmatud; ühe muutmiseks loo uus eksemplar.

***

## Initsialiseerijad

```swift
init(apiBaseURL: URL?,
     checkoutAPIBaseURL: URL? = nil,
     checkoutBaseURL: URL? = nil,
     environment: Environment,
     requestTimeout: TimeInterval = 30,
     loggingEnabled: Bool = false)
```

Saadaval on ka kaks mugavusvarianti:

```swift
init(apiBaseURL: URL?, environment: Environment)

init(apiBaseURL: URL?,
     checkoutAPIBaseURL: URL?,
     checkoutBaseURL: URL?,
     environment: Environment)
```

Objective-C valijad:

```objc
- initWithApiBaseURL:checkoutAPIBaseURL:checkoutBaseURL:environment:requestTimeout:loggingEnabled:
- initWithApiBaseURL:environment:
- initWithApiBaseURL:checkoutAPIBaseURL:checkoutBaseURL:environment:
```

***

## Omadused

| Omadus               | Tüüp           | Vaikimisi | Kirjeldus                                                                                                                                                                                                                                                                                                        |
| -------------------- | -------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `apiBaseURL`         | `URL?`         | puudub    | Taustsüsteem, millelt SDK küsib makse olekut. SDK lisab `/checkout/api/egw/v1/payments/{paymentId}`. `nil` tähendab, et päringut ei tehta ning iga makse lõpeb `.unresolved`, kui pole määratud kohandatud `PaymentStatusResolving` oli ette antud.                                                              |
| `checkoutAPIBaseURL` | `URL?`         | `nil`     | Kliendipoolne kassaliidese API, mida natiivne kaardivorm kasutab kaardiseansi ja 3-D Secure'i päringuteks. SDK lisab `/checkout/api/egw/v1/payments/{paymentId}/…` ning autoriseerib iga päringu makse verifitseerimisvõtmega, mis saadetakse kujul `Authorization: Bearer`. Vajalik meetodi `startCardPayment`. |
| `checkoutBaseURL`    | `URL?`         | `nil`     | Kassalehe host. Pakub kaardi krüptimisvõtit ja lehte, kuhu 3-D Secure'i väljakutse tulemus tagasi postitatakse. Vajalik meetodi `startCardPayment`.                                                                                                                                                              |
| `environment`        | `Environment`  | puudub    | Informatiivne. Ei muuda ühtegi URL-i; lisatud selleks, et sinu enda kood ja logid suudaksid eristada testkeskkonda ja tootmiskeskkonda.                                                                                                                                                                          |
| `requestTimeout`     | `TimeInterval` | `30`      | Piirab SDK enda API-päringuid. Väärtust 0 või väiksemat käsitletakse kui 30 sekundit. Ühegi veebivaate ajalõppu ei rakendata, sest panga kinnitusekraani lugev ostja ei ole hangunud päring.                                                                                                                     |
| `loggingEnabled`     | `Bool`         | `false`   | Logib voo võtmeetapid läbi `os_log`. Ei logi kunagi sisu, kaardiandmeid, mandaate ega täielikke URL-e.                                                                                                                                                                                                           |

Ükski kolmest URL-ist ei ole teisest tuletatud. Sea igaüks eraldi.

### Milline voog loeb millist URL-i

|                      | Hostitud kassaleht          | Natiivne kaardivorm                     |
| -------------------- | --------------------------- | --------------------------------------- |
| `apiBaseURL`         | Kasutatakse oleku päringuks | Kasutatakse oleku päringuks, valikuline |
| `checkoutAPIBaseURL` | Ei kasutata                 | Nõutav                                  |
| `checkoutBaseURL`    | Ei kasutata                 | Nõutav                                  |

***

## Environment

`Environment` / `EGWEnvironment`

| Juhtum     | Objective-C             | Toorväärtus |
| ---------- | ----------------------- | ----------- |
| `.sandbox` | `EGWEnvironmentSandbox` | `0`         |
| `.live`    | `EGWEnvironmentLive`    | `1`         |

***

## Näited

Ainult hostitud kassaleht:

```swift
let configuration = Configuration(
    apiBaseURL: URL(string: "https://your-backend.example.com"),
    environment: .sandbox
)
```

Natiivse kaardivormiga:

```swift
let configuration = Configuration(
    apiBaseURL: URL(string: "https://your-backend.example.com"),
    checkoutAPIBaseURL: URL(string: "https://sandbox-api.example.com"),
    checkoutBaseURL: URL(string: "https://sandbox-checkout.example.com"),
    environment: .sandbox,
    requestTimeout: 30,
    loggingEnabled: false
)
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ecommerce.seb.ee/seb-docs-draft/seb-docs-public-et/integratsioon/mobiilne-sdk/ios-sdk/viide/konfigureerimine.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
