Skip to content

Commit 014ce03

Browse files
feat(api): api update
1 parent efdd6eb commit 014ce03

File tree

5 files changed

+35
-24
lines changed

5 files changed

+35
-24
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 139
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-dafe9f726a47bdf7e506af8f10c6abcf4321dcc58106ce2b806a918778dfe2be.yml
3-
openapi_spec_hash: 8e9827f2e8818d011e6afb203adb825f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-87e16688d40cde735bc36efd40d8c12a7918919b18268d9c40b46d0cdf2f6251.yml
3+
openapi_spec_hash: 83f1f5a6fa7a07db4af09426232d0786
44
config_hash: 3279841440b02d4e8303c961d6983492

orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerUpdateByExternalIdParams.kt

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ private constructor(
9393
fun billingAddress(): Optional<AddressInput> = body.billingAddress()
9494

9595
/**
96-
* An ISO 4217 currency string used for the customer's invoices and balance. If not set at
97-
* creation time, will be set at subscription creation time.
96+
* An ISO 4217 currency string used for the customer's invoices and balance. This can only be
97+
* set if the customer does not already have a currency configured. If not set at creation or
98+
* update time, it will be set at subscription creation time.
9899
*
99100
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the server
100101
* responded with an unexpected value).
@@ -686,8 +687,9 @@ private constructor(
686687
}
687688

688689
/**
689-
* An ISO 4217 currency string used for the customer's invoices and balance. If not set at
690-
* creation time, will be set at subscription creation time.
690+
* An ISO 4217 currency string used for the customer's invoices and balance. This can only
691+
* be set if the customer does not already have a currency configured. If not set at
692+
* creation or update time, it will be set at subscription creation time.
691693
*/
692694
fun currency(currency: String?) = apply { body.currency(currency) }
693695

@@ -1510,8 +1512,9 @@ private constructor(
15101512
fun billingAddress(): Optional<AddressInput> = billingAddress.getOptional("billing_address")
15111513

15121514
/**
1513-
* An ISO 4217 currency string used for the customer's invoices and balance. If not set at
1514-
* creation time, will be set at subscription creation time.
1515+
* An ISO 4217 currency string used for the customer's invoices and balance. This can only
1516+
* be set if the customer does not already have a currency configured. If not set at
1517+
* creation or update time, it will be set at subscription creation time.
15151518
*
15161519
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the
15171520
* server responded with an unexpected value).
@@ -2158,8 +2161,9 @@ private constructor(
21582161
}
21592162

21602163
/**
2161-
* An ISO 4217 currency string used for the customer's invoices and balance. If not set
2162-
* at creation time, will be set at subscription creation time.
2164+
* An ISO 4217 currency string used for the customer's invoices and balance. This can
2165+
* only be set if the customer does not already have a currency configured. If not set
2166+
* at creation or update time, it will be set at subscription creation time.
21632167
*/
21642168
fun currency(currency: String?) = currency(JsonField.ofNullable(currency))
21652169

orb-java-core/src/main/kotlin/com/withorb/api/models/CustomerUpdateParams.kt

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ import kotlin.jvm.optionals.getOrNull
3636
/**
3737
* This endpoint can be used to update the `payment_provider`, `payment_provider_id`, `name`,
3838
* `email`, `email_delivery`, `tax_id`, `auto_collection`, `metadata`, `shipping_address`,
39-
* `billing_address`, and `additional_emails` of an existing customer. Other fields on a customer
40-
* are currently immutable.
39+
* `billing_address`, `additional_emails`, and `currency` of an existing customer. `currency` can
40+
* only be set if it has not already been set on the customer. Other fields on a customer are
41+
* currently immutable.
4142
*/
4243
class CustomerUpdateParams
4344
private constructor(
@@ -94,8 +95,9 @@ private constructor(
9495
fun billingAddress(): Optional<AddressInput> = body.billingAddress()
9596

9697
/**
97-
* An ISO 4217 currency string used for the customer's invoices and balance. If not set at
98-
* creation time, will be set at subscription creation time.
98+
* An ISO 4217 currency string used for the customer's invoices and balance. This can only be
99+
* set if the customer does not already have a currency configured. If not set at creation or
100+
* update time, it will be set at subscription creation time.
99101
*
100102
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the server
101103
* responded with an unexpected value).
@@ -682,8 +684,9 @@ private constructor(
682684
}
683685

684686
/**
685-
* An ISO 4217 currency string used for the customer's invoices and balance. If not set at
686-
* creation time, will be set at subscription creation time.
687+
* An ISO 4217 currency string used for the customer's invoices and balance. This can only
688+
* be set if the customer does not already have a currency configured. If not set at
689+
* creation or update time, it will be set at subscription creation time.
687690
*/
688691
fun currency(currency: String?) = apply { body.currency(currency) }
689692

@@ -1506,8 +1509,9 @@ private constructor(
15061509
fun billingAddress(): Optional<AddressInput> = billingAddress.getOptional("billing_address")
15071510

15081511
/**
1509-
* An ISO 4217 currency string used for the customer's invoices and balance. If not set at
1510-
* creation time, will be set at subscription creation time.
1512+
* An ISO 4217 currency string used for the customer's invoices and balance. This can only
1513+
* be set if the customer does not already have a currency configured. If not set at
1514+
* creation or update time, it will be set at subscription creation time.
15111515
*
15121516
* @throws OrbInvalidDataException if the JSON field has an unexpected type (e.g. if the
15131517
* server responded with an unexpected value).
@@ -2154,8 +2158,9 @@ private constructor(
21542158
}
21552159

21562160
/**
2157-
* An ISO 4217 currency string used for the customer's invoices and balance. If not set
2158-
* at creation time, will be set at subscription creation time.
2161+
* An ISO 4217 currency string used for the customer's invoices and balance. This can
2162+
* only be set if the customer does not already have a currency configured. If not set
2163+
* at creation or update time, it will be set at subscription creation time.
21592164
*/
21602165
fun currency(currency: String?) = currency(JsonField.ofNullable(currency))
21612166

orb-java-core/src/main/kotlin/com/withorb/api/services/async/CustomerServiceAsync.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,9 @@ interface CustomerServiceAsync {
126126
/**
127127
* This endpoint can be used to update the `payment_provider`, `payment_provider_id`, `name`,
128128
* `email`, `email_delivery`, `tax_id`, `auto_collection`, `metadata`, `shipping_address`,
129-
* `billing_address`, and `additional_emails` of an existing customer. Other fields on a
130-
* customer are currently immutable.
129+
* `billing_address`, `additional_emails`, and `currency` of an existing customer. `currency`
130+
* can only be set if it has not already been set on the customer. Other fields on a customer
131+
* are currently immutable.
131132
*/
132133
fun update(customerId: String): CompletableFuture<Customer> =
133134
update(customerId, CustomerUpdateParams.none())

orb-java-core/src/main/kotlin/com/withorb/api/services/blocking/CustomerService.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@ interface CustomerService {
125125
/**
126126
* This endpoint can be used to update the `payment_provider`, `payment_provider_id`, `name`,
127127
* `email`, `email_delivery`, `tax_id`, `auto_collection`, `metadata`, `shipping_address`,
128-
* `billing_address`, and `additional_emails` of an existing customer. Other fields on a
129-
* customer are currently immutable.
128+
* `billing_address`, `additional_emails`, and `currency` of an existing customer. `currency`
129+
* can only be set if it has not already been set on the customer. Other fields on a customer
130+
* are currently immutable.
130131
*/
131132
fun update(customerId: String): Customer = update(customerId, CustomerUpdateParams.none())
132133

0 commit comments

Comments
 (0)