Skip to content

Commit 26f9dc7

Browse files
DEVDOCS-6313: [update] currencies endpoints (#858)
<!-- Ticket number or summary of work --> # [DEVDOCS-6313] ## What changed? Updated the currencies endpoints - removed `date_created` and `date_modified`, replaced with `last_updated`. - created new schemas for PUT and POST endpoints. - added `default_for_country_codes` and `use_default_name` - removed required for the currency_code field for the PUT request body - updated the PUT request body - updated the POST request body - added readonly for the last_updated field ## Release notes draft <!-- Provide an entry for the release notes using simple, conversational language. Don't be too technical. Explain how the change will benefit the merchant and link to the feature. Examples: * The newly-released [X feature] is now available to use. Now, you’ll be able to [perform Y action]. * We're happy to announce [X feature], which can help you [perform Y action]. * [X feature] helps you to create [Y response] using the [Z query parameter]. Now, you can deliver [ex, localized shopping experiences for your customers]. * Fixed a bug in the [X endpoint]. Now the [Y field] will appear when you click [Z option]. --> * ## Anything else? <!-- Add related PRs, salient notes, additional ticket numbers, etc. --> ping {names} [DEVDOCS-6313]: https://bigcommercecloud.atlassian.net/browse/DEVDOCS-6313?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent d3081bf commit 26f9dc7

File tree

1 file changed

+168
-11
lines changed

1 file changed

+168
-11
lines changed

reference/currencies.v2.yml

+168-11
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ paths:
8080
Creates *Currency*.
8181
8282
**Required Fields**
83-
8483
* name
8584
* currency_code
8685
* currency_exchange_rate
@@ -92,8 +91,7 @@ paths:
9291
9392
**Read-Only Fields**
9493
* id
95-
* date_created
96-
* date_modified
94+
* last_updated
9795
9896
9997
The `is_default` property can only be set to true. The value of `is_default` cannot be unset, only overridden. To change the storeʼs default currency in the BigCommerce control panel, please see [Managing Currencies (Help Center)](https://support.bigcommerce.com/s/article/Managing-Currencies-Beta).
@@ -154,8 +152,7 @@ paths:
154152
**Read-Only Fields**
155153
156154
* id
157-
* date_created
158-
* date_modified
155+
* last_updated
159156
* currency_code
160157
161158
@@ -198,10 +195,8 @@ paths:
198195
components:
199196
schemas:
200197
currency_Post:
201-
$ref: '#/components/schemas/currency_Base'
202-
currency_Base:
203-
title: currency_Base
204-
required:
198+
title: currency_Post
199+
required:
205200
- currency_code
206201
- currency_exchange_rate
207202
- decimal_places
@@ -210,6 +205,159 @@ components:
210205
- thousands_token
211206
- token
212207
- token_location
208+
type: object
209+
properties:
210+
is_default:
211+
type: boolean
212+
description: Specifies the store’s default currency display format. For
213+
write operations, only true value is accepted. When set to true, it cannot
214+
be unset, only overridden.
215+
example: false
216+
country_iso2:
217+
type: string
218+
description: 2-letter ISO Alpha-2 code for this currency’s country.
219+
example: EU
220+
currency_code:
221+
type: string
222+
description: 3-letter ISO 4217 code for this currency.
223+
example: EUR
224+
currency_exchange_rate:
225+
type: string
226+
description: Amount of this currency that is equivalent to one U.S. dollar.(Float,
227+
Float as String, Integer)
228+
example: "0.849"
229+
auto_update:
230+
type: boolean
231+
description: Specifies whether to use the Open Exchange Rates service to
232+
update the currency conversion. A value of false specifies a static conversion
233+
value. auto_update only applies to non-transactional currencies.
234+
example: true
235+
token_location:
236+
type: string
237+
description: Specifies whether this currency’s symbol appears to the “left”
238+
or “right” of the numeric amount.
239+
example: left
240+
token:
241+
type: string
242+
description: Symbol for this currency.
243+
example:
244+
decimal_token:
245+
type: string
246+
description: Symbol used as the decimal separator in this currency.
247+
example: "."
248+
thousands_token:
249+
type: string
250+
description: Symbol used as the thousands separator in this currency.
251+
example: ','
252+
decimal_places:
253+
type: integer
254+
description: Number of decimal places to show for this currency.
255+
example: 2
256+
name:
257+
type: string
258+
description: Name of the currency.
259+
example: Euro
260+
enabled:
261+
type: boolean
262+
description: If the currency is active on the store.
263+
example: false
264+
is_transactional:
265+
type: boolean
266+
description: Indicates if the currency is set as transactional or not. False
267+
means display only currency
268+
example: false
269+
description: Currency Object
270+
example:
271+
is_default: false
272+
country_iso2: EU
273+
currency_code: EUR
274+
currency_exchange_rate: '0.849'
275+
auto_update: true
276+
token_location: left
277+
token:
278+
decimal_token: "."
279+
thousands_token: ','
280+
decimal_places: 2
281+
name: Euro
282+
enabled: false
283+
currency_Put:
284+
title: currency_Put
285+
required:
286+
- currency_exchange_rate
287+
- decimal_places
288+
- decimal_token
289+
- name
290+
- thousands_token
291+
- token
292+
- token_location
293+
type: object
294+
properties:
295+
is_default:
296+
type: boolean
297+
description: Specifies the store’s default currency display format. For
298+
write operations, only true value is accepted. When set to true, it cannot
299+
be unset, only overridden.
300+
example: false
301+
country_iso2:
302+
type: string
303+
description: 2-letter ISO Alpha-2 code for this currency’s country.
304+
example: EU
305+
currency_exchange_rate:
306+
type: string
307+
description: Amount of this currency that is equivalent to one U.S. dollar.(Float,
308+
Float as String, Integer)
309+
example: "0.849"
310+
auto_update:
311+
type: boolean
312+
description: Specifies whether to use the Open Exchange Rates service to
313+
update the currency conversion. A value of false specifies a static conversion
314+
value. auto_update only applies to non-transactional currencies.
315+
example: true
316+
token_location:
317+
type: string
318+
description: Specifies whether this currency’s symbol appears to the “left”
319+
or “right” of the numeric amount.
320+
example: left
321+
token:
322+
type: string
323+
description: Symbol for this currency.
324+
example:
325+
decimal_token:
326+
type: string
327+
description: Symbol used as the decimal separator in this currency.
328+
example: "."
329+
thousands_token:
330+
type: string
331+
description: Symbol used as the thousands separator in this currency.
332+
example: ','
333+
decimal_places:
334+
type: integer
335+
description: Number of decimal places to show for this currency.
336+
example: 2
337+
name:
338+
type: string
339+
description: Name of the currency.
340+
example: Euro
341+
enabled:
342+
type: boolean
343+
description: If the currency is active on the store.
344+
example: false
345+
is_transactional:
346+
type: boolean
347+
description: Indicates if the currency is set as transactional or not. False
348+
means display only currency
349+
example: false
350+
description: Currency Object
351+
example:
352+
currency_exchange_rate: "0.849"
353+
token_location: left
354+
token:
355+
decimal_token: "."
356+
thousands_token: ','
357+
decimal_places: 2
358+
name: Euro
359+
currency_Base:
360+
title: currency_Base
213361
type: object
214362
properties:
215363
is_default:
@@ -222,6 +370,12 @@ components:
222370
type: string
223371
description: 2-letter ISO Alpha-2 code for this currency’s country.
224372
example: EU
373+
default_for_country_codes:
374+
type: array
375+
items:
376+
type: string
377+
description: Default 3-letter ISO 4217 code for this currency.
378+
example: [EU]
225379
currency_code:
226380
type: string
227381
description: 3-letter ISO 4217 code for this currency.
@@ -270,6 +424,10 @@ components:
270424
type: boolean
271425
description: Indicates if the currency is set as transactional or not. False
272426
means display only currency
427+
example: true
428+
use_default_name:
429+
type: boolean
430+
description: Default currency name
273431
example: false
274432
description: Currency Object
275433
example:
@@ -306,8 +464,6 @@ components:
306464
last_updated: 2018-06-12T14:41:56.000Z
307465
enabled: false
308466
x-internal: false
309-
currency_Put:
310-
$ref: '#/components/schemas/currency_Post'
311467
currency_Full:
312468
title: currency_Full
313469
allOf:
@@ -323,6 +479,7 @@ components:
323479
type: string
324480
description: Date the currency was last updated, created or modified.
325481
format: date-time
482+
readOnly: true
326483
x-internal: false
327484
responses:
328485
currencyCollection_Resp:

0 commit comments

Comments
 (0)