@flowio/api-factories 0.0.68 → 0.0.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api.js +92 -29
- package/dist/esm/api.js +92 -29
- package/package.json +2 -2
- package/src/api.ts +94 -31
package/dist/cjs/api.js
CHANGED
|
@@ -1197,20 +1197,6 @@ var factories = {
|
|
|
1197
1197
|
'Diners Club',
|
|
1198
1198
|
'Unknown',
|
|
1199
1199
|
]); },
|
|
1200
|
-
'io.flow.stripe.v0.enums.card_error_code': function () { return faker_1.default.helpers.arrayElement([
|
|
1201
|
-
'invalid_number',
|
|
1202
|
-
'invalid_expiry_month',
|
|
1203
|
-
'invalid_expiry_year',
|
|
1204
|
-
'invalid_cvc',
|
|
1205
|
-
'invalid_swipe_data',
|
|
1206
|
-
'incorrect_number',
|
|
1207
|
-
'expired_card',
|
|
1208
|
-
'incorrect_cvc',
|
|
1209
|
-
'incorrect_zip',
|
|
1210
|
-
'card_declined',
|
|
1211
|
-
'missing',
|
|
1212
|
-
'processing_error',
|
|
1213
|
-
]); },
|
|
1214
1200
|
'io.flow.stripe.v0.enums.card_funding_type': function () { return faker_1.default.helpers.arrayElement(['credit', 'debit', 'prepaid', 'unknown']); },
|
|
1215
1201
|
'io.flow.stripe.v0.enums.card_network': function () { return faker_1.default.helpers.arrayElement([
|
|
1216
1202
|
'amex',
|
|
@@ -1248,6 +1234,7 @@ var factories = {
|
|
|
1248
1234
|
'invalid_account',
|
|
1249
1235
|
'invalid_amount',
|
|
1250
1236
|
'invalid_cvc',
|
|
1237
|
+
'invalid_expiry_month',
|
|
1251
1238
|
'invalid_expiry_year',
|
|
1252
1239
|
'invalid_number',
|
|
1253
1240
|
'invalid_pin',
|
|
@@ -1272,6 +1259,79 @@ var factories = {
|
|
|
1272
1259
|
'try_again_later',
|
|
1273
1260
|
'withdrawal_count_limit_exceeded',
|
|
1274
1261
|
]); },
|
|
1262
|
+
'io.flow.stripe.v0.enums.error_code': function () { return faker_1.default.helpers.arrayElement([
|
|
1263
|
+
'invalid_number',
|
|
1264
|
+
'invalid_expiry_month',
|
|
1265
|
+
'invalid_expiry_year',
|
|
1266
|
+
'invalid_cvc',
|
|
1267
|
+
'invalid_swipe_data',
|
|
1268
|
+
'country_code_invalid',
|
|
1269
|
+
'email_invalid',
|
|
1270
|
+
'postal_code_invalid',
|
|
1271
|
+
'invalid_characters',
|
|
1272
|
+
'url_invalid',
|
|
1273
|
+
'invalid_charge_amount',
|
|
1274
|
+
'incorrect_number',
|
|
1275
|
+
'incorrect_address',
|
|
1276
|
+
'incorrect_cvc',
|
|
1277
|
+
'incorrect_zip',
|
|
1278
|
+
'card_declined',
|
|
1279
|
+
'expired_card',
|
|
1280
|
+
'missing',
|
|
1281
|
+
'processing_error',
|
|
1282
|
+
'account_closed',
|
|
1283
|
+
'amount_too_small',
|
|
1284
|
+
'amount_too_large',
|
|
1285
|
+
'api_key_expired',
|
|
1286
|
+
'authentication_required',
|
|
1287
|
+
'capture_charge_authorization_expired',
|
|
1288
|
+
'capture_unauthorized_payment',
|
|
1289
|
+
'card_decline_rate_limit_exceeded',
|
|
1290
|
+
'charge_already_captured',
|
|
1291
|
+
'charge_already_refunded',
|
|
1292
|
+
'charge_disputed',
|
|
1293
|
+
'charge_exceeds_source_limit',
|
|
1294
|
+
'charge_expired_for_capture',
|
|
1295
|
+
'charge_invalid_parameter',
|
|
1296
|
+
'charge_not_refundable',
|
|
1297
|
+
'insufficient_funds',
|
|
1298
|
+
'intent_invalid_state',
|
|
1299
|
+
'livemode_mismatch',
|
|
1300
|
+
'parameter_invalid_empty',
|
|
1301
|
+
'parameter_invalid_integer',
|
|
1302
|
+
'parameter_invalid_string_blank',
|
|
1303
|
+
'parameter_invalid_string_empty',
|
|
1304
|
+
'parameter_missing',
|
|
1305
|
+
'parameter_unknown',
|
|
1306
|
+
'parameters_exclusive',
|
|
1307
|
+
'payment_intent_action_required',
|
|
1308
|
+
'payment_intent_authentication_failure',
|
|
1309
|
+
'payment_intent_incompatible_payment_method',
|
|
1310
|
+
'payment_intent_payment_attempt_expired',
|
|
1311
|
+
'payment_intent_payment_attempt_failed',
|
|
1312
|
+
'payment_intent_unexpected_state',
|
|
1313
|
+
'payment_intent_invalid_parameter',
|
|
1314
|
+
'payment_method_billing_details_address_missing',
|
|
1315
|
+
'payment_method_customer_decline',
|
|
1316
|
+
'payment_method_currency_mismatch',
|
|
1317
|
+
'payment_method_invalid_parameter',
|
|
1318
|
+
'payment_method_invalid_parameter_testmode',
|
|
1319
|
+
'payment_method_not_available',
|
|
1320
|
+
'payment_method_provider_decline',
|
|
1321
|
+
'payment_method_provider_timeout',
|
|
1322
|
+
'payment_method_unactivated',
|
|
1323
|
+
'payment_method_unexpected_state',
|
|
1324
|
+
'payment_method_unsupported_type',
|
|
1325
|
+
'platform_api_key_expired',
|
|
1326
|
+
'refund_disputed_payment',
|
|
1327
|
+
'testmode_charges_only',
|
|
1328
|
+
'tls_version_unsupported',
|
|
1329
|
+
'setup_attempt_failed',
|
|
1330
|
+
'setup_intent_authentication_failure',
|
|
1331
|
+
'setup_intent_invalid_parameter',
|
|
1332
|
+
'setup_intent_setup_attempt_expired',
|
|
1333
|
+
'setup_intent_unexpected_state',
|
|
1334
|
+
]); },
|
|
1275
1335
|
'io.flow.stripe.v0.enums.error_type': function () { return faker_1.default.helpers.arrayElement([
|
|
1276
1336
|
'api_connection_error',
|
|
1277
1337
|
'api_error',
|
|
@@ -1547,7 +1607,7 @@ var factories = {
|
|
|
1547
1607
|
balance_transaction: factories.string(),
|
|
1548
1608
|
destination: factories.string(),
|
|
1549
1609
|
dispute: factories.string(),
|
|
1550
|
-
failure_code: factories.
|
|
1610
|
+
failure_code: factories['io.flow.stripe.v0.enums.error_code'](),
|
|
1551
1611
|
failure_message: factories.string(),
|
|
1552
1612
|
on_behalf_of: factories.string(),
|
|
1553
1613
|
review: factories.string(),
|
|
@@ -1595,7 +1655,7 @@ var factories = {
|
|
|
1595
1655
|
balance_transaction: factories.string(),
|
|
1596
1656
|
destination: factories.string(),
|
|
1597
1657
|
dispute: factories.string(),
|
|
1598
|
-
failure_code: factories.
|
|
1658
|
+
failure_code: factories['io.flow.stripe.v0.enums.error_code'](),
|
|
1599
1659
|
failure_message: factories.string(),
|
|
1600
1660
|
on_behalf_of: factories.string(),
|
|
1601
1661
|
review: factories.string(),
|
|
@@ -1639,16 +1699,6 @@ var factories = {
|
|
|
1639
1699
|
sub_merchant_id: factories.string(),
|
|
1640
1700
|
product_category: factories.string(),
|
|
1641
1701
|
}); },
|
|
1642
|
-
'io.flow.stripe.v0.models.last_payment_error': function () { return ({
|
|
1643
|
-
charge: factories.string(),
|
|
1644
|
-
code: factories.string(),
|
|
1645
|
-
decline_code: factories['io.flow.stripe.v0.enums.decline_code'](),
|
|
1646
|
-
doc_url: factories.string(),
|
|
1647
|
-
message: factories.string(),
|
|
1648
|
-
param: factories.string(),
|
|
1649
|
-
payment_method: factories['io.flow.stripe.v0.models.payment_method'](),
|
|
1650
|
-
type: factories['io.flow.stripe.v0.enums.error_type'](),
|
|
1651
|
-
}); },
|
|
1652
1702
|
'io.flow.stripe.v0.models.legal_entity': function () { return ({
|
|
1653
1703
|
additional_owners: arrayOf(function () { return factories['io.flow.stripe.v0.models.owner'](); }),
|
|
1654
1704
|
}); },
|
|
@@ -1740,7 +1790,7 @@ var factories = {
|
|
|
1740
1790
|
customer: factories.string(),
|
|
1741
1791
|
description: factories.string(),
|
|
1742
1792
|
invoice: factories.string(),
|
|
1743
|
-
last_payment_error: factories['io.flow.stripe.v0.models.
|
|
1793
|
+
last_payment_error: factories['io.flow.stripe.v0.models.stripe_error'](),
|
|
1744
1794
|
livemode: factories.boolean(),
|
|
1745
1795
|
metadata: factories['io.flow.stripe.v0.models.metadata'](),
|
|
1746
1796
|
next_action: factories['io.flow.stripe.v0.models.next_action'](),
|
|
@@ -1757,6 +1807,7 @@ var factories = {
|
|
|
1757
1807
|
status: factories['io.flow.stripe.v0.enums.payment_intent_status'](),
|
|
1758
1808
|
transfer_data: factories['io.flow.stripe.v0.models.transfer_data'](),
|
|
1759
1809
|
transfer_group: factories.string(),
|
|
1810
|
+
shipping: factories['io.flow.stripe.v0.models.payment_intent_shipping'](),
|
|
1760
1811
|
}); },
|
|
1761
1812
|
'io.flow.stripe.v0.models.payment_intent_cancellation_form': function () { return ({
|
|
1762
1813
|
cancellation_reason: factories['io.flow.stripe.v0.enums.cancellation_reason'](),
|
|
@@ -1808,6 +1859,12 @@ var factories = {
|
|
|
1808
1859
|
statement_descriptor_suffix: factories.string(),
|
|
1809
1860
|
transfer_data: factories['io.flow.stripe.v0.models.transfer_data'](),
|
|
1810
1861
|
transfer_group: factories.string(),
|
|
1862
|
+
shipping: factories['io.flow.stripe.v0.models.payment_intent_shipping'](),
|
|
1863
|
+
}); },
|
|
1864
|
+
'io.flow.stripe.v0.models.payment_intent_shipping': function () { return ({
|
|
1865
|
+
address: factories['io.flow.stripe.v0.models.address'](),
|
|
1866
|
+
name: factories.string(),
|
|
1867
|
+
phone: factories.string(),
|
|
1811
1868
|
}); },
|
|
1812
1869
|
'io.flow.stripe.v0.models.payment_intent_update_form': function () { return ({
|
|
1813
1870
|
amount: factories.integer(),
|
|
@@ -2097,10 +2154,11 @@ var factories = {
|
|
|
2097
2154
|
type: factories['io.flow.stripe.v0.enums.error_type'](),
|
|
2098
2155
|
charge: factories.string(),
|
|
2099
2156
|
message: factories.string(),
|
|
2100
|
-
code: factories['io.flow.stripe.v0.enums.
|
|
2101
|
-
decline_code: factories.
|
|
2157
|
+
code: factories['io.flow.stripe.v0.enums.error_code'](),
|
|
2158
|
+
decline_code: factories['io.flow.stripe.v0.enums.decline_code'](),
|
|
2102
2159
|
param: factories.string(),
|
|
2103
2160
|
payment_intent: factories['io.flow.stripe.v0.models.payment_intent'](),
|
|
2161
|
+
payment_method: factories['io.flow.stripe.v0.models.payment_method'](),
|
|
2104
2162
|
}); },
|
|
2105
2163
|
'io.flow.stripe.v0.models.stripe_event': function () { return ({
|
|
2106
2164
|
id: factories.string(),
|
|
@@ -2128,9 +2186,12 @@ var factories = {
|
|
|
2128
2186
|
'io.flow.stripe.v0.models.three_d_secure_charge': function () { return ({
|
|
2129
2187
|
authenticated: factories.boolean(),
|
|
2130
2188
|
authentication_flow: factories['io.flow.stripe.v0.enums.three_ds_authentication_flow'](),
|
|
2189
|
+
electronic_commerce_indicator: factories.string(),
|
|
2190
|
+
exemption_indicator: factories.string(),
|
|
2131
2191
|
result: factories['io.flow.stripe.v0.enums.three_ds_result'](),
|
|
2132
2192
|
result_reason: factories['io.flow.stripe.v0.enums.three_ds_result_reason'](),
|
|
2133
2193
|
succeeded: factories.boolean(),
|
|
2194
|
+
transaction_id: factories.string(),
|
|
2134
2195
|
version: factories.string(),
|
|
2135
2196
|
}); },
|
|
2136
2197
|
'io.flow.stripe.v0.models.three_d_secure_redirect': function () { return ({
|
|
@@ -11658,7 +11719,9 @@ var factories = {
|
|
|
11658
11719
|
}); },
|
|
11659
11720
|
'io.flow.v0.models.transaction_metadata_manual': function () { return ({
|
|
11660
11721
|
discriminator: 'manual',
|
|
11722
|
+
description: factories.string(),
|
|
11661
11723
|
original: factories['io.flow.v0.models.transaction_metadata_original_transaction'](),
|
|
11724
|
+
url: factories.string(),
|
|
11662
11725
|
}); },
|
|
11663
11726
|
'io.flow.v0.models.transaction_metadata_original_transaction': function () { return ({
|
|
11664
11727
|
id: factories.string(),
|
package/dist/esm/api.js
CHANGED
|
@@ -1157,20 +1157,6 @@ var factories = {
|
|
|
1157
1157
|
'Diners Club',
|
|
1158
1158
|
'Unknown',
|
|
1159
1159
|
]); },
|
|
1160
|
-
'io.flow.stripe.v0.enums.card_error_code': function () { return faker.helpers.arrayElement([
|
|
1161
|
-
'invalid_number',
|
|
1162
|
-
'invalid_expiry_month',
|
|
1163
|
-
'invalid_expiry_year',
|
|
1164
|
-
'invalid_cvc',
|
|
1165
|
-
'invalid_swipe_data',
|
|
1166
|
-
'incorrect_number',
|
|
1167
|
-
'expired_card',
|
|
1168
|
-
'incorrect_cvc',
|
|
1169
|
-
'incorrect_zip',
|
|
1170
|
-
'card_declined',
|
|
1171
|
-
'missing',
|
|
1172
|
-
'processing_error',
|
|
1173
|
-
]); },
|
|
1174
1160
|
'io.flow.stripe.v0.enums.card_funding_type': function () { return faker.helpers.arrayElement(['credit', 'debit', 'prepaid', 'unknown']); },
|
|
1175
1161
|
'io.flow.stripe.v0.enums.card_network': function () { return faker.helpers.arrayElement([
|
|
1176
1162
|
'amex',
|
|
@@ -1208,6 +1194,7 @@ var factories = {
|
|
|
1208
1194
|
'invalid_account',
|
|
1209
1195
|
'invalid_amount',
|
|
1210
1196
|
'invalid_cvc',
|
|
1197
|
+
'invalid_expiry_month',
|
|
1211
1198
|
'invalid_expiry_year',
|
|
1212
1199
|
'invalid_number',
|
|
1213
1200
|
'invalid_pin',
|
|
@@ -1232,6 +1219,79 @@ var factories = {
|
|
|
1232
1219
|
'try_again_later',
|
|
1233
1220
|
'withdrawal_count_limit_exceeded',
|
|
1234
1221
|
]); },
|
|
1222
|
+
'io.flow.stripe.v0.enums.error_code': function () { return faker.helpers.arrayElement([
|
|
1223
|
+
'invalid_number',
|
|
1224
|
+
'invalid_expiry_month',
|
|
1225
|
+
'invalid_expiry_year',
|
|
1226
|
+
'invalid_cvc',
|
|
1227
|
+
'invalid_swipe_data',
|
|
1228
|
+
'country_code_invalid',
|
|
1229
|
+
'email_invalid',
|
|
1230
|
+
'postal_code_invalid',
|
|
1231
|
+
'invalid_characters',
|
|
1232
|
+
'url_invalid',
|
|
1233
|
+
'invalid_charge_amount',
|
|
1234
|
+
'incorrect_number',
|
|
1235
|
+
'incorrect_address',
|
|
1236
|
+
'incorrect_cvc',
|
|
1237
|
+
'incorrect_zip',
|
|
1238
|
+
'card_declined',
|
|
1239
|
+
'expired_card',
|
|
1240
|
+
'missing',
|
|
1241
|
+
'processing_error',
|
|
1242
|
+
'account_closed',
|
|
1243
|
+
'amount_too_small',
|
|
1244
|
+
'amount_too_large',
|
|
1245
|
+
'api_key_expired',
|
|
1246
|
+
'authentication_required',
|
|
1247
|
+
'capture_charge_authorization_expired',
|
|
1248
|
+
'capture_unauthorized_payment',
|
|
1249
|
+
'card_decline_rate_limit_exceeded',
|
|
1250
|
+
'charge_already_captured',
|
|
1251
|
+
'charge_already_refunded',
|
|
1252
|
+
'charge_disputed',
|
|
1253
|
+
'charge_exceeds_source_limit',
|
|
1254
|
+
'charge_expired_for_capture',
|
|
1255
|
+
'charge_invalid_parameter',
|
|
1256
|
+
'charge_not_refundable',
|
|
1257
|
+
'insufficient_funds',
|
|
1258
|
+
'intent_invalid_state',
|
|
1259
|
+
'livemode_mismatch',
|
|
1260
|
+
'parameter_invalid_empty',
|
|
1261
|
+
'parameter_invalid_integer',
|
|
1262
|
+
'parameter_invalid_string_blank',
|
|
1263
|
+
'parameter_invalid_string_empty',
|
|
1264
|
+
'parameter_missing',
|
|
1265
|
+
'parameter_unknown',
|
|
1266
|
+
'parameters_exclusive',
|
|
1267
|
+
'payment_intent_action_required',
|
|
1268
|
+
'payment_intent_authentication_failure',
|
|
1269
|
+
'payment_intent_incompatible_payment_method',
|
|
1270
|
+
'payment_intent_payment_attempt_expired',
|
|
1271
|
+
'payment_intent_payment_attempt_failed',
|
|
1272
|
+
'payment_intent_unexpected_state',
|
|
1273
|
+
'payment_intent_invalid_parameter',
|
|
1274
|
+
'payment_method_billing_details_address_missing',
|
|
1275
|
+
'payment_method_customer_decline',
|
|
1276
|
+
'payment_method_currency_mismatch',
|
|
1277
|
+
'payment_method_invalid_parameter',
|
|
1278
|
+
'payment_method_invalid_parameter_testmode',
|
|
1279
|
+
'payment_method_not_available',
|
|
1280
|
+
'payment_method_provider_decline',
|
|
1281
|
+
'payment_method_provider_timeout',
|
|
1282
|
+
'payment_method_unactivated',
|
|
1283
|
+
'payment_method_unexpected_state',
|
|
1284
|
+
'payment_method_unsupported_type',
|
|
1285
|
+
'platform_api_key_expired',
|
|
1286
|
+
'refund_disputed_payment',
|
|
1287
|
+
'testmode_charges_only',
|
|
1288
|
+
'tls_version_unsupported',
|
|
1289
|
+
'setup_attempt_failed',
|
|
1290
|
+
'setup_intent_authentication_failure',
|
|
1291
|
+
'setup_intent_invalid_parameter',
|
|
1292
|
+
'setup_intent_setup_attempt_expired',
|
|
1293
|
+
'setup_intent_unexpected_state',
|
|
1294
|
+
]); },
|
|
1235
1295
|
'io.flow.stripe.v0.enums.error_type': function () { return faker.helpers.arrayElement([
|
|
1236
1296
|
'api_connection_error',
|
|
1237
1297
|
'api_error',
|
|
@@ -1507,7 +1567,7 @@ var factories = {
|
|
|
1507
1567
|
balance_transaction: factories.string(),
|
|
1508
1568
|
destination: factories.string(),
|
|
1509
1569
|
dispute: factories.string(),
|
|
1510
|
-
failure_code: factories.
|
|
1570
|
+
failure_code: factories['io.flow.stripe.v0.enums.error_code'](),
|
|
1511
1571
|
failure_message: factories.string(),
|
|
1512
1572
|
on_behalf_of: factories.string(),
|
|
1513
1573
|
review: factories.string(),
|
|
@@ -1555,7 +1615,7 @@ var factories = {
|
|
|
1555
1615
|
balance_transaction: factories.string(),
|
|
1556
1616
|
destination: factories.string(),
|
|
1557
1617
|
dispute: factories.string(),
|
|
1558
|
-
failure_code: factories.
|
|
1618
|
+
failure_code: factories['io.flow.stripe.v0.enums.error_code'](),
|
|
1559
1619
|
failure_message: factories.string(),
|
|
1560
1620
|
on_behalf_of: factories.string(),
|
|
1561
1621
|
review: factories.string(),
|
|
@@ -1599,16 +1659,6 @@ var factories = {
|
|
|
1599
1659
|
sub_merchant_id: factories.string(),
|
|
1600
1660
|
product_category: factories.string(),
|
|
1601
1661
|
}); },
|
|
1602
|
-
'io.flow.stripe.v0.models.last_payment_error': function () { return ({
|
|
1603
|
-
charge: factories.string(),
|
|
1604
|
-
code: factories.string(),
|
|
1605
|
-
decline_code: factories['io.flow.stripe.v0.enums.decline_code'](),
|
|
1606
|
-
doc_url: factories.string(),
|
|
1607
|
-
message: factories.string(),
|
|
1608
|
-
param: factories.string(),
|
|
1609
|
-
payment_method: factories['io.flow.stripe.v0.models.payment_method'](),
|
|
1610
|
-
type: factories['io.flow.stripe.v0.enums.error_type'](),
|
|
1611
|
-
}); },
|
|
1612
1662
|
'io.flow.stripe.v0.models.legal_entity': function () { return ({
|
|
1613
1663
|
additional_owners: arrayOf(function () { return factories['io.flow.stripe.v0.models.owner'](); }),
|
|
1614
1664
|
}); },
|
|
@@ -1700,7 +1750,7 @@ var factories = {
|
|
|
1700
1750
|
customer: factories.string(),
|
|
1701
1751
|
description: factories.string(),
|
|
1702
1752
|
invoice: factories.string(),
|
|
1703
|
-
last_payment_error: factories['io.flow.stripe.v0.models.
|
|
1753
|
+
last_payment_error: factories['io.flow.stripe.v0.models.stripe_error'](),
|
|
1704
1754
|
livemode: factories.boolean(),
|
|
1705
1755
|
metadata: factories['io.flow.stripe.v0.models.metadata'](),
|
|
1706
1756
|
next_action: factories['io.flow.stripe.v0.models.next_action'](),
|
|
@@ -1717,6 +1767,7 @@ var factories = {
|
|
|
1717
1767
|
status: factories['io.flow.stripe.v0.enums.payment_intent_status'](),
|
|
1718
1768
|
transfer_data: factories['io.flow.stripe.v0.models.transfer_data'](),
|
|
1719
1769
|
transfer_group: factories.string(),
|
|
1770
|
+
shipping: factories['io.flow.stripe.v0.models.payment_intent_shipping'](),
|
|
1720
1771
|
}); },
|
|
1721
1772
|
'io.flow.stripe.v0.models.payment_intent_cancellation_form': function () { return ({
|
|
1722
1773
|
cancellation_reason: factories['io.flow.stripe.v0.enums.cancellation_reason'](),
|
|
@@ -1768,6 +1819,12 @@ var factories = {
|
|
|
1768
1819
|
statement_descriptor_suffix: factories.string(),
|
|
1769
1820
|
transfer_data: factories['io.flow.stripe.v0.models.transfer_data'](),
|
|
1770
1821
|
transfer_group: factories.string(),
|
|
1822
|
+
shipping: factories['io.flow.stripe.v0.models.payment_intent_shipping'](),
|
|
1823
|
+
}); },
|
|
1824
|
+
'io.flow.stripe.v0.models.payment_intent_shipping': function () { return ({
|
|
1825
|
+
address: factories['io.flow.stripe.v0.models.address'](),
|
|
1826
|
+
name: factories.string(),
|
|
1827
|
+
phone: factories.string(),
|
|
1771
1828
|
}); },
|
|
1772
1829
|
'io.flow.stripe.v0.models.payment_intent_update_form': function () { return ({
|
|
1773
1830
|
amount: factories.integer(),
|
|
@@ -2057,10 +2114,11 @@ var factories = {
|
|
|
2057
2114
|
type: factories['io.flow.stripe.v0.enums.error_type'](),
|
|
2058
2115
|
charge: factories.string(),
|
|
2059
2116
|
message: factories.string(),
|
|
2060
|
-
code: factories['io.flow.stripe.v0.enums.
|
|
2061
|
-
decline_code: factories.
|
|
2117
|
+
code: factories['io.flow.stripe.v0.enums.error_code'](),
|
|
2118
|
+
decline_code: factories['io.flow.stripe.v0.enums.decline_code'](),
|
|
2062
2119
|
param: factories.string(),
|
|
2063
2120
|
payment_intent: factories['io.flow.stripe.v0.models.payment_intent'](),
|
|
2121
|
+
payment_method: factories['io.flow.stripe.v0.models.payment_method'](),
|
|
2064
2122
|
}); },
|
|
2065
2123
|
'io.flow.stripe.v0.models.stripe_event': function () { return ({
|
|
2066
2124
|
id: factories.string(),
|
|
@@ -2088,9 +2146,12 @@ var factories = {
|
|
|
2088
2146
|
'io.flow.stripe.v0.models.three_d_secure_charge': function () { return ({
|
|
2089
2147
|
authenticated: factories.boolean(),
|
|
2090
2148
|
authentication_flow: factories['io.flow.stripe.v0.enums.three_ds_authentication_flow'](),
|
|
2149
|
+
electronic_commerce_indicator: factories.string(),
|
|
2150
|
+
exemption_indicator: factories.string(),
|
|
2091
2151
|
result: factories['io.flow.stripe.v0.enums.three_ds_result'](),
|
|
2092
2152
|
result_reason: factories['io.flow.stripe.v0.enums.three_ds_result_reason'](),
|
|
2093
2153
|
succeeded: factories.boolean(),
|
|
2154
|
+
transaction_id: factories.string(),
|
|
2094
2155
|
version: factories.string(),
|
|
2095
2156
|
}); },
|
|
2096
2157
|
'io.flow.stripe.v0.models.three_d_secure_redirect': function () { return ({
|
|
@@ -11618,7 +11679,9 @@ var factories = {
|
|
|
11618
11679
|
}); },
|
|
11619
11680
|
'io.flow.v0.models.transaction_metadata_manual': function () { return ({
|
|
11620
11681
|
discriminator: 'manual',
|
|
11682
|
+
description: factories.string(),
|
|
11621
11683
|
original: factories['io.flow.v0.models.transaction_metadata_original_transaction'](),
|
|
11684
|
+
url: factories.string(),
|
|
11622
11685
|
}); },
|
|
11623
11686
|
'io.flow.v0.models.transaction_metadata_original_transaction': function () { return ({
|
|
11624
11687
|
id: factories.string(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowio/api-factories",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.70",
|
|
4
4
|
"description": "Flow API mock data factories",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"flow",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"@faker-js/faker": "^6.2.0",
|
|
37
37
|
"@flowio/api-types": "*"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "4b5d69bf9ba5f404b7b1c8f07d256db3c25210d9"
|
|
40
40
|
}
|
package/src/api.ts
CHANGED
|
@@ -1385,21 +1385,6 @@ const factories = {
|
|
|
1385
1385
|
'Unknown',
|
|
1386
1386
|
]),
|
|
1387
1387
|
|
|
1388
|
-
'io.flow.stripe.v0.enums.card_error_code': (): io.flow.stripe.v0.enums.CardErrorCode => faker.helpers.arrayElement([
|
|
1389
|
-
'invalid_number',
|
|
1390
|
-
'invalid_expiry_month',
|
|
1391
|
-
'invalid_expiry_year',
|
|
1392
|
-
'invalid_cvc',
|
|
1393
|
-
'invalid_swipe_data',
|
|
1394
|
-
'incorrect_number',
|
|
1395
|
-
'expired_card',
|
|
1396
|
-
'incorrect_cvc',
|
|
1397
|
-
'incorrect_zip',
|
|
1398
|
-
'card_declined',
|
|
1399
|
-
'missing',
|
|
1400
|
-
'processing_error',
|
|
1401
|
-
]),
|
|
1402
|
-
|
|
1403
1388
|
'io.flow.stripe.v0.enums.card_funding_type': (): io.flow.stripe.v0.enums.CardFundingType => faker.helpers.arrayElement(['credit', 'debit', 'prepaid', 'unknown']),
|
|
1404
1389
|
|
|
1405
1390
|
'io.flow.stripe.v0.enums.card_network': (): io.flow.stripe.v0.enums.CardNetwork => faker.helpers.arrayElement([
|
|
@@ -1440,6 +1425,7 @@ const factories = {
|
|
|
1440
1425
|
'invalid_account',
|
|
1441
1426
|
'invalid_amount',
|
|
1442
1427
|
'invalid_cvc',
|
|
1428
|
+
'invalid_expiry_month',
|
|
1443
1429
|
'invalid_expiry_year',
|
|
1444
1430
|
'invalid_number',
|
|
1445
1431
|
'invalid_pin',
|
|
@@ -1465,6 +1451,80 @@ const factories = {
|
|
|
1465
1451
|
'withdrawal_count_limit_exceeded',
|
|
1466
1452
|
]),
|
|
1467
1453
|
|
|
1454
|
+
'io.flow.stripe.v0.enums.error_code': (): io.flow.stripe.v0.enums.ErrorCode => faker.helpers.arrayElement([
|
|
1455
|
+
'invalid_number',
|
|
1456
|
+
'invalid_expiry_month',
|
|
1457
|
+
'invalid_expiry_year',
|
|
1458
|
+
'invalid_cvc',
|
|
1459
|
+
'invalid_swipe_data',
|
|
1460
|
+
'country_code_invalid',
|
|
1461
|
+
'email_invalid',
|
|
1462
|
+
'postal_code_invalid',
|
|
1463
|
+
'invalid_characters',
|
|
1464
|
+
'url_invalid',
|
|
1465
|
+
'invalid_charge_amount',
|
|
1466
|
+
'incorrect_number',
|
|
1467
|
+
'incorrect_address',
|
|
1468
|
+
'incorrect_cvc',
|
|
1469
|
+
'incorrect_zip',
|
|
1470
|
+
'card_declined',
|
|
1471
|
+
'expired_card',
|
|
1472
|
+
'missing',
|
|
1473
|
+
'processing_error',
|
|
1474
|
+
'account_closed',
|
|
1475
|
+
'amount_too_small',
|
|
1476
|
+
'amount_too_large',
|
|
1477
|
+
'api_key_expired',
|
|
1478
|
+
'authentication_required',
|
|
1479
|
+
'capture_charge_authorization_expired',
|
|
1480
|
+
'capture_unauthorized_payment',
|
|
1481
|
+
'card_decline_rate_limit_exceeded',
|
|
1482
|
+
'charge_already_captured',
|
|
1483
|
+
'charge_already_refunded',
|
|
1484
|
+
'charge_disputed',
|
|
1485
|
+
'charge_exceeds_source_limit',
|
|
1486
|
+
'charge_expired_for_capture',
|
|
1487
|
+
'charge_invalid_parameter',
|
|
1488
|
+
'charge_not_refundable',
|
|
1489
|
+
'insufficient_funds',
|
|
1490
|
+
'intent_invalid_state',
|
|
1491
|
+
'livemode_mismatch',
|
|
1492
|
+
'parameter_invalid_empty',
|
|
1493
|
+
'parameter_invalid_integer',
|
|
1494
|
+
'parameter_invalid_string_blank',
|
|
1495
|
+
'parameter_invalid_string_empty',
|
|
1496
|
+
'parameter_missing',
|
|
1497
|
+
'parameter_unknown',
|
|
1498
|
+
'parameters_exclusive',
|
|
1499
|
+
'payment_intent_action_required',
|
|
1500
|
+
'payment_intent_authentication_failure',
|
|
1501
|
+
'payment_intent_incompatible_payment_method',
|
|
1502
|
+
'payment_intent_payment_attempt_expired',
|
|
1503
|
+
'payment_intent_payment_attempt_failed',
|
|
1504
|
+
'payment_intent_unexpected_state',
|
|
1505
|
+
'payment_intent_invalid_parameter',
|
|
1506
|
+
'payment_method_billing_details_address_missing',
|
|
1507
|
+
'payment_method_customer_decline',
|
|
1508
|
+
'payment_method_currency_mismatch',
|
|
1509
|
+
'payment_method_invalid_parameter',
|
|
1510
|
+
'payment_method_invalid_parameter_testmode',
|
|
1511
|
+
'payment_method_not_available',
|
|
1512
|
+
'payment_method_provider_decline',
|
|
1513
|
+
'payment_method_provider_timeout',
|
|
1514
|
+
'payment_method_unactivated',
|
|
1515
|
+
'payment_method_unexpected_state',
|
|
1516
|
+
'payment_method_unsupported_type',
|
|
1517
|
+
'platform_api_key_expired',
|
|
1518
|
+
'refund_disputed_payment',
|
|
1519
|
+
'testmode_charges_only',
|
|
1520
|
+
'tls_version_unsupported',
|
|
1521
|
+
'setup_attempt_failed',
|
|
1522
|
+
'setup_intent_authentication_failure',
|
|
1523
|
+
'setup_intent_invalid_parameter',
|
|
1524
|
+
'setup_intent_setup_attempt_expired',
|
|
1525
|
+
'setup_intent_unexpected_state',
|
|
1526
|
+
]),
|
|
1527
|
+
|
|
1468
1528
|
'io.flow.stripe.v0.enums.error_type': (): io.flow.stripe.v0.enums.ErrorType => faker.helpers.arrayElement([
|
|
1469
1529
|
'api_connection_error',
|
|
1470
1530
|
'api_error',
|
|
@@ -1766,7 +1826,7 @@ const factories = {
|
|
|
1766
1826
|
balance_transaction: factories.string(),
|
|
1767
1827
|
destination: factories.string(),
|
|
1768
1828
|
dispute: factories.string(),
|
|
1769
|
-
failure_code: factories.
|
|
1829
|
+
failure_code: factories['io.flow.stripe.v0.enums.error_code'](),
|
|
1770
1830
|
failure_message: factories.string(),
|
|
1771
1831
|
on_behalf_of: factories.string(),
|
|
1772
1832
|
review: factories.string(),
|
|
@@ -1817,7 +1877,7 @@ const factories = {
|
|
|
1817
1877
|
balance_transaction: factories.string(),
|
|
1818
1878
|
destination: factories.string(),
|
|
1819
1879
|
dispute: factories.string(),
|
|
1820
|
-
failure_code: factories.
|
|
1880
|
+
failure_code: factories['io.flow.stripe.v0.enums.error_code'](),
|
|
1821
1881
|
failure_message: factories.string(),
|
|
1822
1882
|
on_behalf_of: factories.string(),
|
|
1823
1883
|
review: factories.string(),
|
|
@@ -1871,17 +1931,6 @@ const factories = {
|
|
|
1871
1931
|
product_category: factories.string(),
|
|
1872
1932
|
}),
|
|
1873
1933
|
|
|
1874
|
-
'io.flow.stripe.v0.models.last_payment_error': (): io.flow.stripe.v0.models.LastPaymentError => ({
|
|
1875
|
-
charge: factories.string(),
|
|
1876
|
-
code: factories.string(),
|
|
1877
|
-
decline_code: factories['io.flow.stripe.v0.enums.decline_code'](),
|
|
1878
|
-
doc_url: factories.string(),
|
|
1879
|
-
message: factories.string(),
|
|
1880
|
-
param: factories.string(),
|
|
1881
|
-
payment_method: factories['io.flow.stripe.v0.models.payment_method'](),
|
|
1882
|
-
type: factories['io.flow.stripe.v0.enums.error_type'](),
|
|
1883
|
-
}),
|
|
1884
|
-
|
|
1885
1934
|
'io.flow.stripe.v0.models.legal_entity': (): io.flow.stripe.v0.models.LegalEntity => ({
|
|
1886
1935
|
additional_owners: arrayOf(() => factories['io.flow.stripe.v0.models.owner']()),
|
|
1887
1936
|
}),
|
|
@@ -1984,7 +2033,7 @@ const factories = {
|
|
|
1984
2033
|
customer: factories.string(),
|
|
1985
2034
|
description: factories.string(),
|
|
1986
2035
|
invoice: factories.string(),
|
|
1987
|
-
last_payment_error: factories['io.flow.stripe.v0.models.
|
|
2036
|
+
last_payment_error: factories['io.flow.stripe.v0.models.stripe_error'](),
|
|
1988
2037
|
livemode: factories.boolean(),
|
|
1989
2038
|
metadata: factories['io.flow.stripe.v0.models.metadata'](),
|
|
1990
2039
|
next_action: factories['io.flow.stripe.v0.models.next_action'](),
|
|
@@ -2001,6 +2050,7 @@ const factories = {
|
|
|
2001
2050
|
status: factories['io.flow.stripe.v0.enums.payment_intent_status'](),
|
|
2002
2051
|
transfer_data: factories['io.flow.stripe.v0.models.transfer_data'](),
|
|
2003
2052
|
transfer_group: factories.string(),
|
|
2053
|
+
shipping: factories['io.flow.stripe.v0.models.payment_intent_shipping'](),
|
|
2004
2054
|
}),
|
|
2005
2055
|
|
|
2006
2056
|
'io.flow.stripe.v0.models.payment_intent_cancellation_form': (): io.flow.stripe.v0.models.PaymentIntentCancellationForm => ({
|
|
@@ -2057,6 +2107,13 @@ const factories = {
|
|
|
2057
2107
|
statement_descriptor_suffix: factories.string(),
|
|
2058
2108
|
transfer_data: factories['io.flow.stripe.v0.models.transfer_data'](),
|
|
2059
2109
|
transfer_group: factories.string(),
|
|
2110
|
+
shipping: factories['io.flow.stripe.v0.models.payment_intent_shipping'](),
|
|
2111
|
+
}),
|
|
2112
|
+
|
|
2113
|
+
'io.flow.stripe.v0.models.payment_intent_shipping': (): io.flow.stripe.v0.models.PaymentIntentShipping => ({
|
|
2114
|
+
address: factories['io.flow.stripe.v0.models.address'](),
|
|
2115
|
+
name: factories.string(),
|
|
2116
|
+
phone: factories.string(),
|
|
2060
2117
|
}),
|
|
2061
2118
|
|
|
2062
2119
|
'io.flow.stripe.v0.models.payment_intent_update_form': (): io.flow.stripe.v0.models.PaymentIntentUpdateForm => ({
|
|
@@ -2378,10 +2435,11 @@ const factories = {
|
|
|
2378
2435
|
type: factories['io.flow.stripe.v0.enums.error_type'](),
|
|
2379
2436
|
charge: factories.string(),
|
|
2380
2437
|
message: factories.string(),
|
|
2381
|
-
code: factories['io.flow.stripe.v0.enums.
|
|
2382
|
-
decline_code: factories.
|
|
2438
|
+
code: factories['io.flow.stripe.v0.enums.error_code'](),
|
|
2439
|
+
decline_code: factories['io.flow.stripe.v0.enums.decline_code'](),
|
|
2383
2440
|
param: factories.string(),
|
|
2384
2441
|
payment_intent: factories['io.flow.stripe.v0.models.payment_intent'](),
|
|
2442
|
+
payment_method: factories['io.flow.stripe.v0.models.payment_method'](),
|
|
2385
2443
|
}),
|
|
2386
2444
|
|
|
2387
2445
|
'io.flow.stripe.v0.models.stripe_event': (): io.flow.stripe.v0.models.StripeEvent => ({
|
|
@@ -2414,9 +2472,12 @@ const factories = {
|
|
|
2414
2472
|
'io.flow.stripe.v0.models.three_d_secure_charge': (): io.flow.stripe.v0.models.ThreeDSecureCharge => ({
|
|
2415
2473
|
authenticated: factories.boolean(),
|
|
2416
2474
|
authentication_flow: factories['io.flow.stripe.v0.enums.three_ds_authentication_flow'](),
|
|
2475
|
+
electronic_commerce_indicator: factories.string(),
|
|
2476
|
+
exemption_indicator: factories.string(),
|
|
2417
2477
|
result: factories['io.flow.stripe.v0.enums.three_ds_result'](),
|
|
2418
2478
|
result_reason: factories['io.flow.stripe.v0.enums.three_ds_result_reason'](),
|
|
2419
2479
|
succeeded: factories.boolean(),
|
|
2480
|
+
transaction_id: factories.string(),
|
|
2420
2481
|
version: factories.string(),
|
|
2421
2482
|
}),
|
|
2422
2483
|
|
|
@@ -13425,7 +13486,9 @@ const factories = {
|
|
|
13425
13486
|
|
|
13426
13487
|
'io.flow.v0.models.transaction_metadata_manual': (): io.flow.v0.models.TransactionMetadataManual => ({
|
|
13427
13488
|
discriminator: 'manual',
|
|
13489
|
+
description: factories.string(),
|
|
13428
13490
|
original: factories['io.flow.v0.models.transaction_metadata_original_transaction'](),
|
|
13491
|
+
url: factories.string(),
|
|
13429
13492
|
}),
|
|
13430
13493
|
|
|
13431
13494
|
'io.flow.v0.models.transaction_metadata_original_transaction': (): io.flow.v0.models.TransactionMetadataOriginalTransaction => ({
|