Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 50 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,71 @@
name: CI
on:
push:
branches: [main]
branches:
- '**'
- '!integrated/**'
- '!stl-preview-head/**'
- '!stl-preview-base/**'
- '!generated'
- '!codegen/**'
- 'codegen/stl/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
- 'stl-preview-base/**'

jobs:
ci:
lint:
timeout-minutes: 15
name: lint
runs-on: ubuntu-latest
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- uses: actions/setup-java@v5
- name: Set up Java
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: temurin
java-version: |
8
21
cache: gradle

- uses: gradle/actions/setup-gradle@v4
- name: Set up Gradle
uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3

- name: Lint
- name: Run lints
run: ./scripts/lint

- name: Build
build:
timeout-minutes: 15
name: build
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Java
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: temurin
java-version: |
8
21
cache: gradle

- name: Set up Gradle
uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3

- name: Build SDK
run: ./scripts/build

- name: Test
run: ./scripts/test



5 changes: 2 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
configured_endpoints: 238
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase/increase-beca94b958f84df1e88f5e26405a66965fbf81a0c0c33b5201f0ec8d06e13ff0.yml
openapi_spec_hash: e201015ba263f8cf966969629dd16dfa
config_hash: ac050010e5453883d5e5fa603554a2e0
openapi_spec_hash: 26d57c325f47d508b35237996f9b1074
config_hash: 2ae0d8aaecf01b38cbf9f9e112822c23
1 change: 0 additions & 1 deletion increase-java-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ dependencies {
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.2")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.18.2")
implementation("com.google.guava:guava:33.0.0-jre")

testImplementation(kotlin("test"))
testImplementation(project(":increase-java-client-okhttp"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

package com.increase.api.core

import com.increase.api.core.http.Headers
import com.increase.api.errors.IncreaseInvalidDataException
import java.util.Collections
import java.util.SortedMap
Expand Down Expand Up @@ -98,10 +97,6 @@ internal fun Any?.contentToString(): String {
return string
}

@JvmSynthetic
internal fun Headers.getRequiredHeader(name: String): String =
values(name).firstOrNull() ?: throw IncreaseInvalidDataException("Could not find $name header")

internal interface Enum

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1113,20 +1113,20 @@ private constructor(

companion object {

/** The Prenotification is for an anticipated credit. */
/** Credit */
@JvmField val CREDIT = of("credit")

/** The Prenotification is for an anticipated debit. */
/** Debit */
@JvmField val DEBIT = of("debit")

@JvmStatic fun of(value: String) = CreditDebitIndicator(JsonField.of(value))
}

/** An enum containing [CreditDebitIndicator]'s known values. */
enum class Known {
/** The Prenotification is for an anticipated credit. */
/** Credit */
CREDIT,
/** The Prenotification is for an anticipated debit. */
/** Debit */
DEBIT,
}

Expand All @@ -1141,9 +1141,9 @@ private constructor(
* - It was constructed with an arbitrary value using the [of] method.
*/
enum class Value {
/** The Prenotification is for an anticipated credit. */
/** Credit */
CREDIT,
/** The Prenotification is for an anticipated debit. */
/** Debit */
DEBIT,
/**
* An enum member indicating that [CreditDebitIndicator] was instantiated with an
Expand Down Expand Up @@ -2092,6 +2092,9 @@ private constructor(
/** A savings account. */
@JvmField val SAVINGS = of("savings")

/** A loan account used in a lender-borrower relationship. Uncommon. */
@JvmField val LOAN = of("loan")

/** A bank's general ledger. Uncommon. */
@JvmField val GENERAL_LEDGER = of("general_ledger")

Expand All @@ -2104,6 +2107,8 @@ private constructor(
CHECKING,
/** A savings account. */
SAVINGS,
/** A loan account used in a lender-borrower relationship. Uncommon. */
LOAN,
/** A bank's general ledger. Uncommon. */
GENERAL_LEDGER,
}
Expand All @@ -2124,6 +2129,8 @@ private constructor(
CHECKING,
/** A savings account. */
SAVINGS,
/** A loan account used in a lender-borrower relationship. Uncommon. */
LOAN,
/** A bank's general ledger. Uncommon. */
GENERAL_LEDGER,
/**
Expand All @@ -2144,6 +2151,7 @@ private constructor(
when (this) {
CHECKING -> Value.CHECKING
SAVINGS -> Value.SAVINGS
LOAN -> Value.LOAN
GENERAL_LEDGER -> Value.GENERAL_LEDGER
else -> Value._UNKNOWN
}
Expand All @@ -2161,6 +2169,7 @@ private constructor(
when (this) {
CHECKING -> Known.CHECKING
SAVINGS -> Known.SAVINGS
LOAN -> Known.LOAN
GENERAL_LEDGER -> Known.GENERAL_LEDGER
else ->
throw IncreaseInvalidDataException(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1384,20 +1384,20 @@ private constructor(

companion object {

/** The Prenotification is for an anticipated credit. */
/** Credit */
@JvmField val CREDIT = of("credit")

/** The Prenotification is for an anticipated debit. */
/** Debit */
@JvmField val DEBIT = of("debit")

@JvmStatic fun of(value: String) = CreditDebitIndicator(JsonField.of(value))
}

/** An enum containing [CreditDebitIndicator]'s known values. */
enum class Known {
/** The Prenotification is for an anticipated credit. */
/** Credit */
CREDIT,
/** The Prenotification is for an anticipated debit. */
/** Debit */
DEBIT,
}

Expand All @@ -1412,9 +1412,9 @@ private constructor(
* - It was constructed with an arbitrary value using the [of] method.
*/
enum class Value {
/** The Prenotification is for an anticipated credit. */
/** Credit */
CREDIT,
/** The Prenotification is for an anticipated debit. */
/** Debit */
DEBIT,
/**
* An enum member indicating that [CreditDebitIndicator] was instantiated with an
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,8 @@ private constructor(
fun network(): Network = network.getRequired("network")

/**
* If the receiving bank accepts the transfer but notifies that future transfers should use
* different details, this will contain those details.
* If the receiving bank notifies that future transfers should use different details, this will
* contain those details.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
Expand Down Expand Up @@ -1373,8 +1373,8 @@ private constructor(
fun network(network: JsonField<Network>) = apply { this.network = network }

/**
* If the receiving bank accepts the transfer but notifies that future transfers should use
* different details, this will contain those details.
* If the receiving bank notifies that future transfers should use different details, this
* will contain those details.
*/
fun notificationsOfChange(notificationsOfChange: List<NotificationsOfChange>) =
notificationsOfChange(JsonField.of(notificationsOfChange))
Expand Down Expand Up @@ -7141,6 +7141,9 @@ private constructor(
/** A savings account. */
@JvmField val SAVINGS = of("savings")

/** A loan account used in a lender-borrower relationship. Uncommon. */
@JvmField val LOAN = of("loan")

/** A bank's general ledger. Uncommon. */
@JvmField val GENERAL_LEDGER = of("general_ledger")

Expand All @@ -7153,6 +7156,8 @@ private constructor(
CHECKING,
/** A savings account. */
SAVINGS,
/** A loan account used in a lender-borrower relationship. Uncommon. */
LOAN,
/** A bank's general ledger. Uncommon. */
GENERAL_LEDGER,
}
Expand All @@ -7173,6 +7178,8 @@ private constructor(
CHECKING,
/** A savings account. */
SAVINGS,
/** A loan account used in a lender-borrower relationship. Uncommon. */
LOAN,
/** A bank's general ledger. Uncommon. */
GENERAL_LEDGER,
/**
Expand All @@ -7193,6 +7200,7 @@ private constructor(
when (this) {
CHECKING -> Value.CHECKING
SAVINGS -> Value.SAVINGS
LOAN -> Value.LOAN
GENERAL_LEDGER -> Value.GENERAL_LEDGER
else -> Value._UNKNOWN
}
Expand All @@ -7210,6 +7218,7 @@ private constructor(
when (this) {
CHECKING -> Known.CHECKING
SAVINGS -> Known.SAVINGS
LOAN -> Known.LOAN
GENERAL_LEDGER -> Known.GENERAL_LEDGER
else ->
throw IncreaseInvalidDataException(
Expand Down
Loading
Loading