@sylphx/sdk 0.32.3 → 0.32.5

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/money.js CHANGED
@@ -55,6 +55,12 @@ runtime.registerSchemas({
55
55
  ['entitlementGrant', 'entitlement_grant'],
56
56
  ['expireTime', 'expire_time'],
57
57
  ],
58
+ 'sylphx.money.v1.CheckMerchantAccountProcessorPermissionsRequest': [],
59
+ 'sylphx.money.v1.CheckMerchantAccountProcessorPermissionsResponse': [
60
+ ['merchantAccount', 'merchant_account'],
61
+ ['permissions', 'permissions', 'sylphx.money.v1.ProcessorReadPermission'],
62
+ ['checkTime', 'check_time'],
63
+ ],
58
64
  'sylphx.money.v1.CheckUsageStandingRequest': [
59
65
  ['subject', 'subject', 'sylphx.money.v1.Subject'],
60
66
  ['subjectProof', 'subject_proof'],
@@ -180,6 +186,7 @@ runtime.registerSchemas({
180
186
  ],
181
187
  'sylphx.money.v1.DeleteStoreConnectionRequest': [],
182
188
  'sylphx.money.v1.DisconnectMerchantAccountRequest': [],
189
+ 'sylphx.money.v1.DismissProcessorEventRequest': [],
183
190
  'sylphx.money.v1.EntitlementGrant': [
184
191
  ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
185
192
  ['subject', 'subject', 'sylphx.money.v1.Subject'],
@@ -209,6 +216,7 @@ runtime.registerSchemas({
209
216
  'sylphx.money.v1.GetLicenceKeyRequest': [],
210
217
  'sylphx.money.v1.GetMerchantAccountRequest': [],
211
218
  'sylphx.money.v1.GetPortalSessionRequest': [],
219
+ 'sylphx.money.v1.GetProcessorEventRequest': [],
212
220
  'sylphx.money.v1.GetRevenueSourceRequest': [],
213
221
  'sylphx.money.v1.GetRevenueSummaryRequest': [
214
222
  ['startDay', 'start_day'],
@@ -324,6 +332,14 @@ runtime.registerSchemas({
324
332
  ['merchantAccounts', 'merchant_accounts', 'sylphx.money.v1.MerchantAccount'],
325
333
  ['nextPageToken', 'next_page_token'],
326
334
  ],
335
+ 'sylphx.money.v1.ListProcessorEventsRequest': [
336
+ ['pageSize', 'page_size'],
337
+ ['pageToken', 'page_token'],
338
+ ],
339
+ 'sylphx.money.v1.ListProcessorEventsResponse': [
340
+ ['processorEvents', 'processor_events', 'sylphx.money.v1.ProcessorEvent'],
341
+ ['nextPageToken', 'next_page_token'],
342
+ ],
327
343
  'sylphx.money.v1.ListRevenueFactsRequest': [
328
344
  ['pageSize', 'page_size'],
329
345
  ['pageToken', 'page_token'],
@@ -414,6 +430,9 @@ runtime.registerSchemas({
414
430
  ['defaultCurrencyCode', 'default_currency_code'],
415
431
  ['refreshTime', 'refresh_time'],
416
432
  ['automaticTax', 'automatic_tax'],
433
+ ['processorReadPermissions', 'processor_read_permissions', 'sylphx.money.v1.ProcessorReadPermission'],
434
+ ['processorPermissionsCheckTime', 'processor_permissions_check_time'],
435
+ ['processorWarnings', 'processor_warnings'],
417
436
  ],
418
437
  'sylphx.money.v1.PortalSession': [
419
438
  ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
@@ -429,6 +448,20 @@ runtime.registerSchemas({
429
448
  ['defaultCurrency', 'default_currency'],
430
449
  ['introductoryUnitAmounts', 'introductory_unit_amounts', undefined, 'map'],
431
450
  ],
451
+ 'sylphx.money.v1.ProcessorEvent': [
452
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
453
+ ['accountId', 'account_id'],
454
+ ['eventType', 'event_type'],
455
+ ['objectId', 'object_id'],
456
+ ['holdReason', 'hold_reason'],
457
+ ['modeKnown', 'mode_known'],
458
+ ['lastRecovery', 'last_recovery', 'sylphx.money.v1.ProcessorEventRecovery'],
459
+ ],
460
+ 'sylphx.money.v1.ProcessorEventRecovery': [
461
+ ['receiptId', 'receipt_id'],
462
+ ['createTime', 'create_time'],
463
+ ],
464
+ 'sylphx.money.v1.ProcessorReadPermission': [],
432
465
  'sylphx.money.v1.Product': [
433
466
  ['displayName', 'display_name'],
434
467
  ['features', 'features', undefined, 'map'],
@@ -455,6 +488,7 @@ runtime.registerSchemas({
455
488
  'sylphx.money.v1.ReleaseUsageReservationRequest': [],
456
489
  'sylphx.money.v1.ResumeCustomerSubscriptionRequest': [],
457
490
  'sylphx.money.v1.RetireLicenceKeyRequest': [],
491
+ 'sylphx.money.v1.RetryProcessorEventRequest': [],
458
492
  'sylphx.money.v1.RevenueBucket': [
459
493
  ['startDay', 'start_day'],
460
494
  ['unconvertedCount', 'unconverted_count'],
@@ -731,6 +765,10 @@ runtime.registerSchemas({
731
765
  * Namespace of Sylphx Money on `Sylphx`.
732
766
  */
733
767
  export class MoneyApi {
768
+ /** The `processor_events` collection. */
769
+ processorEvents;
770
+ /** The `merchant_accounts` collection. */
771
+ merchantAccounts;
734
772
  /** The `price_catalogs` collection. */
735
773
  priceCatalogs;
736
774
  /** The `checkout_policies` collection. */
@@ -743,8 +781,6 @@ export class MoneyApi {
743
781
  customerSubscriptions;
744
782
  /** The `entitlement_grants` collection. */
745
783
  entitlementGrants;
746
- /** The `merchant_accounts` collection. */
747
- merchantAccounts;
748
784
  /** The `checkout_sessions` collection. */
749
785
  checkoutSessions;
750
786
  /** The `tax_threshold_statuses` collection. */
@@ -780,13 +816,14 @@ export class MoneyApi {
780
816
  /** The `exchange_rates` collection. */
781
817
  exchangeRates;
782
818
  constructor(client) {
819
+ this.processorEvents = new ProcessorEventsCollection(client);
820
+ this.merchantAccounts = new MerchantAccountsCollection(client);
783
821
  this.priceCatalogs = new PriceCatalogsCollection(client);
784
822
  this.checkoutPolicies = new CheckoutPoliciesCollection(client);
785
823
  this.storeConnections = new StoreConnectionsCollection(client);
786
824
  this.storePurchases = new StorePurchasesCollection(client);
787
825
  this.customerSubscriptions = new CustomerSubscriptionsCollection(client);
788
826
  this.entitlementGrants = new EntitlementGrantsCollection(client);
789
- this.merchantAccounts = new MerchantAccountsCollection(client);
790
827
  this.checkoutSessions = new CheckoutSessionsCollection(client);
791
828
  this.taxThresholdStatuses = new TaxThresholdStatusesCollection(client);
792
829
  this.portalSessions = new PortalSessionsCollection(client);
@@ -806,6 +843,225 @@ export class MoneyApi {
806
843
  this.exchangeRates = new ExchangeRatesCollection(client);
807
844
  }
808
845
  }
846
+ /** `processor_events` of Sylphx Money: Resource type `money.sylphx.com/ProcessorEvent`. */
847
+ export class ProcessorEventsCollection {
848
+ client;
849
+ constructor(client) {
850
+ this.client = client;
851
+ }
852
+ /**
853
+ * Gets one stored processor hint, with its safe hold reason.
854
+ *
855
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/processor_events/*}` · permission `billing:processor_events:read` · effect `read`
856
+ *
857
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`.
858
+ */
859
+ async get(request) {
860
+ return this.client.call({
861
+ method: 'GET',
862
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/processor_events/*', 'name')}`,
863
+ responseType: 'sylphx.money.v1.ProcessorEvent',
864
+ mutation: false,
865
+ });
866
+ }
867
+ /**
868
+ * Lists stored processor hints; defaults to held events.
869
+ *
870
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/processor_events` · permission `billing:processor_events:read` · effect `read`
871
+ *
872
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
873
+ */
874
+ async list(request) {
875
+ return this.client.call({
876
+ method: 'GET',
877
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/processor_events`,
878
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
879
+ responseType: 'sylphx.money.v1.ListProcessorEventsResponse',
880
+ mutation: false,
881
+ });
882
+ }
883
+ /** Every item of every page of `list`. */
884
+ async *listAll(request) {
885
+ let next = request;
886
+ for (;;) {
887
+ const page = await this.list(next);
888
+ yield* page.processorEvents ?? [];
889
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
890
+ return;
891
+ next = { ...request, pageToken: page.nextPageToken };
892
+ }
893
+ }
894
+ /**
895
+ * Schedules a held event through the existing idempotent application path. The decision is audited; an etag is required.
896
+ *
897
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/processor_events/*}:retry` · permission `billing:processor_events:write` · effect `write`
898
+ *
899
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`.
900
+ */
901
+ async retry(request) {
902
+ return this.client.call({
903
+ method: 'POST',
904
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/processor_events/*', 'name')}:retry`,
905
+ body: runtime.omit(request, ['name']),
906
+ bodyType: 'sylphx.money.v1.RetryProcessorEventRequest',
907
+ responseType: 'sylphx.money.v1.ProcessorEvent',
908
+ mutation: true,
909
+ });
910
+ }
911
+ /**
912
+ * Dismisses only a held test-mode payout observation, retaining the row and audit. Live, unknown-mode and payment events are refused.
913
+ *
914
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/processor_events/*}:dismiss` · permission `billing:processor_events:write` · effect `write`
915
+ *
916
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`.
917
+ */
918
+ async dismiss(request) {
919
+ return this.client.call({
920
+ method: 'POST',
921
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/processor_events/*', 'name')}:dismiss`,
922
+ body: runtime.omit(request, ['name']),
923
+ bodyType: 'sylphx.money.v1.DismissProcessorEventRequest',
924
+ responseType: 'sylphx.money.v1.ProcessorEvent',
925
+ mutation: true,
926
+ });
927
+ }
928
+ }
929
+ /** `merchant_accounts` of Sylphx Money: Resource type `money.sylphx.com/MerchantAccount`. */
930
+ export class MerchantAccountsCollection {
931
+ client;
932
+ constructor(client) {
933
+ this.client = client;
934
+ }
935
+ /**
936
+ * Checks Payouts and Balance read without modifying a merchant, its key or checkout.
937
+ *
938
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/merchant_accounts/*}:checkProcessorPermissions` · permission `billing:read` · effect `read`
939
+ *
940
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`.
941
+ */
942
+ async checkProcessorPermissions(request) {
943
+ return this.client.call({
944
+ method: 'GET',
945
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/merchant_accounts/*', 'name')}:checkProcessorPermissions`,
946
+ responseType: 'sylphx.money.v1.CheckMerchantAccountProcessorPermissionsResponse',
947
+ mutation: false,
948
+ });
949
+ }
950
+ /**
951
+ * Gets a merchant account.
952
+ *
953
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/merchant_accounts/*}` · permission `billing:read` · effect `read`
954
+ *
955
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
956
+ */
957
+ async get(request) {
958
+ return this.client.call({
959
+ method: 'GET',
960
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/merchant_accounts/*', 'name')}`,
961
+ responseType: 'sylphx.money.v1.MerchantAccount',
962
+ mutation: false,
963
+ });
964
+ }
965
+ /**
966
+ * Lists merchant accounts.
967
+ *
968
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/merchant_accounts` · permission `billing:read` · effect `read`
969
+ *
970
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
971
+ */
972
+ async list(request) {
973
+ return this.client.call({
974
+ method: 'GET',
975
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/merchant_accounts`,
976
+ query: { page_size: request.pageSize, page_token: request.pageToken },
977
+ responseType: 'sylphx.money.v1.ListMerchantAccountsResponse',
978
+ mutation: false,
979
+ });
980
+ }
981
+ /** Every item of every page of `list`. */
982
+ async *listAll(request) {
983
+ let next = request;
984
+ for (;;) {
985
+ const page = await this.list(next);
986
+ yield* page.merchantAccounts ?? [];
987
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
988
+ return;
989
+ next = { ...request, pageToken: page.nextPageToken };
990
+ }
991
+ }
992
+ /**
993
+ * Starts connecting a Stripe account: returns the processor's authorisation
994
+ * URL for an org owner to open, which the processor's redirect completes.
995
+ * With a restricted key in the request the account connects at once
996
+ * instead, and the connected merchant account comes back in the response.
997
+ *
998
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/merchant_accounts:connect` · permission `billing:write` · effect `write`
999
+ *
1000
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNAVAILABLE`.
1001
+ */
1002
+ async connect(request) {
1003
+ return this.client.call({
1004
+ method: 'POST',
1005
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/merchant_accounts:connect`,
1006
+ body: runtime.omit(request, ['parent']),
1007
+ bodyType: 'sylphx.money.v1.ConnectMerchantAccountRequest',
1008
+ responseType: 'sylphx.money.v1.ConnectMerchantAccountResponse',
1009
+ mutation: true,
1010
+ });
1011
+ }
1012
+ /**
1013
+ * Reads the connected account back from the processor.
1014
+ *
1015
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/merchant_accounts/*}:refresh` · permission `billing:write` · effect `write`
1016
+ *
1017
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNAVAILABLE`.
1018
+ */
1019
+ async refresh(request) {
1020
+ return this.client.call({
1021
+ method: 'POST',
1022
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/merchant_accounts/*', 'name')}:refresh`,
1023
+ body: runtime.omit(request, ['name']),
1024
+ bodyType: 'sylphx.money.v1.RefreshMerchantAccountRequest',
1025
+ responseType: 'sylphx.money.v1.MerchantAccount',
1026
+ mutation: true,
1027
+ });
1028
+ }
1029
+ /**
1030
+ * Disconnects the account: Sylphx loses access; checkout is refused.
1031
+ *
1032
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/merchant_accounts/*}:disconnect` · permission `billing:write` · effect `destructive`
1033
+ *
1034
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNAVAILABLE`.
1035
+ */
1036
+ async disconnect(request) {
1037
+ return this.client.call({
1038
+ method: 'POST',
1039
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/merchant_accounts/*', 'name')}:disconnect`,
1040
+ body: runtime.omit(request, ['name']),
1041
+ bodyType: 'sylphx.money.v1.DisconnectMerchantAccountRequest',
1042
+ responseType: 'sylphx.money.v1.MerchantAccount',
1043
+ mutation: true,
1044
+ });
1045
+ }
1046
+ /**
1047
+ * Updates the merchant account's own settings: the fields named in `update_mask`.
1048
+ *
1049
+ * `PATCH /v1/{merchant_account.name=orgs/*\/projects/*\/envs/*\/merchant_accounts/*}` · permission `billing:write` · effect `write`
1050
+ *
1051
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1052
+ */
1053
+ async update(request) {
1054
+ return this.client.call({
1055
+ method: 'PATCH',
1056
+ path: `/v1/${runtime.pathParam(request.merchantAccount?.name, 'orgs/*/projects/*/envs/*/merchant_accounts/*', 'merchant_account.name')}`,
1057
+ query: { update_mask: request.updateMask },
1058
+ body: request.merchantAccount ?? {},
1059
+ bodyType: 'sylphx.money.v1.MerchantAccount',
1060
+ responseType: 'sylphx.money.v1.MerchantAccount',
1061
+ mutation: true,
1062
+ });
1063
+ }
1064
+ }
809
1065
  /** `price_catalogs` of Sylphx Money: Resource type `money.sylphx.com/PriceCatalog`. */
810
1066
  export class PriceCatalogsCollection {
811
1067
  client;
@@ -1330,127 +1586,6 @@ export class EntitlementGrantsCollection {
1330
1586
  });
1331
1587
  }
1332
1588
  }
1333
- /** `merchant_accounts` of Sylphx Money: Resource type `money.sylphx.com/MerchantAccount`. */
1334
- export class MerchantAccountsCollection {
1335
- client;
1336
- constructor(client) {
1337
- this.client = client;
1338
- }
1339
- /**
1340
- * Gets a merchant account.
1341
- *
1342
- * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/merchant_accounts/*}` · permission `billing:read` · effect `read`
1343
- *
1344
- * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1345
- */
1346
- async get(request) {
1347
- return this.client.call({
1348
- method: 'GET',
1349
- path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/merchant_accounts/*', 'name')}`,
1350
- responseType: 'sylphx.money.v1.MerchantAccount',
1351
- mutation: false,
1352
- });
1353
- }
1354
- /**
1355
- * Lists merchant accounts.
1356
- *
1357
- * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/merchant_accounts` · permission `billing:read` · effect `read`
1358
- *
1359
- * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1360
- */
1361
- async list(request) {
1362
- return this.client.call({
1363
- method: 'GET',
1364
- path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/merchant_accounts`,
1365
- query: { page_size: request.pageSize, page_token: request.pageToken },
1366
- responseType: 'sylphx.money.v1.ListMerchantAccountsResponse',
1367
- mutation: false,
1368
- });
1369
- }
1370
- /** Every item of every page of `list`. */
1371
- async *listAll(request) {
1372
- let next = request;
1373
- for (;;) {
1374
- const page = await this.list(next);
1375
- yield* page.merchantAccounts ?? [];
1376
- if (page.nextPageToken === undefined || page.nextPageToken === '')
1377
- return;
1378
- next = { ...request, pageToken: page.nextPageToken };
1379
- }
1380
- }
1381
- /**
1382
- * Starts connecting a Stripe account: returns the processor's authorisation
1383
- * URL for an org owner to open, which the processor's redirect completes.
1384
- * With a restricted key in the request the account connects at once
1385
- * instead, and the connected merchant account comes back in the response.
1386
- *
1387
- * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/merchant_accounts:connect` · permission `billing:write` · effect `write`
1388
- *
1389
- * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `UNAVAILABLE`.
1390
- */
1391
- async connect(request) {
1392
- return this.client.call({
1393
- method: 'POST',
1394
- path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/merchant_accounts:connect`,
1395
- body: runtime.omit(request, ['parent']),
1396
- bodyType: 'sylphx.money.v1.ConnectMerchantAccountRequest',
1397
- responseType: 'sylphx.money.v1.ConnectMerchantAccountResponse',
1398
- mutation: true,
1399
- });
1400
- }
1401
- /**
1402
- * Reads the connected account back from the processor.
1403
- *
1404
- * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/merchant_accounts/*}:refresh` · permission `billing:write` · effect `write`
1405
- *
1406
- * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNAVAILABLE`.
1407
- */
1408
- async refresh(request) {
1409
- return this.client.call({
1410
- method: 'POST',
1411
- path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/merchant_accounts/*', 'name')}:refresh`,
1412
- body: runtime.omit(request, ['name']),
1413
- bodyType: 'sylphx.money.v1.RefreshMerchantAccountRequest',
1414
- responseType: 'sylphx.money.v1.MerchantAccount',
1415
- mutation: true,
1416
- });
1417
- }
1418
- /**
1419
- * Disconnects the account: Sylphx loses access; checkout is refused.
1420
- *
1421
- * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/merchant_accounts/*}:disconnect` · permission `billing:write` · effect `destructive`
1422
- *
1423
- * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNAVAILABLE`.
1424
- */
1425
- async disconnect(request) {
1426
- return this.client.call({
1427
- method: 'POST',
1428
- path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/merchant_accounts/*', 'name')}:disconnect`,
1429
- body: runtime.omit(request, ['name']),
1430
- bodyType: 'sylphx.money.v1.DisconnectMerchantAccountRequest',
1431
- responseType: 'sylphx.money.v1.MerchantAccount',
1432
- mutation: true,
1433
- });
1434
- }
1435
- /**
1436
- * Updates the merchant account's own settings: the fields named in `update_mask`.
1437
- *
1438
- * `PATCH /v1/{merchant_account.name=orgs/*\/projects/*\/envs/*\/merchant_accounts/*}` · permission `billing:write` · effect `write`
1439
- *
1440
- * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1441
- */
1442
- async update(request) {
1443
- return this.client.call({
1444
- method: 'PATCH',
1445
- path: `/v1/${runtime.pathParam(request.merchantAccount?.name, 'orgs/*/projects/*/envs/*/merchant_accounts/*', 'merchant_account.name')}`,
1446
- query: { update_mask: request.updateMask },
1447
- body: request.merchantAccount ?? {},
1448
- bodyType: 'sylphx.money.v1.MerchantAccount',
1449
- responseType: 'sylphx.money.v1.MerchantAccount',
1450
- mutation: true,
1451
- });
1452
- }
1453
- }
1454
1589
  /** `checkout_sessions` of Sylphx Money: Resource type `money.sylphx.com/CheckoutSession`. */
1455
1590
  export class CheckoutSessionsCollection {
1456
1591
  client;