@randock/nameshift-api-client 0.0.129 → 0.0.130

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.129
1
+ ## @randock/nameshift-api-client@0.0.130
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @randock/nameshift-api-client@0.0.129 --save
39
+ npm install @randock/nameshift-api-client@0.0.130 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -44,4 +44,4 @@ _unPublished (not recommended):_
44
44
  ```
45
45
  npm install PATH_TO_GENERATED_PACKAGE --save
46
46
  ```
47
- 51f1c00f68ab0a12c3de1c422a3dea7aba699e87ab8e95404776584beb474d8affb2b0c05ac9408ff6e7fcefc0c97eb5
47
+ 611fff74ff5401b9359b756acc8491bed0e00797c65ac604edaec127c3a1d211f197640623bb1463c3a333bf89977dd2
@@ -63,6 +63,9 @@ export interface AdminApiPayDomainTransferSellerInvoiceRequest {
63
63
  transferId: string;
64
64
  invoiceId: string;
65
65
  }
66
+ export interface AdminApiPaySellerInvoiceRequest {
67
+ invoiceId: string;
68
+ }
66
69
  export interface AdminApiUpdateAccountSettingsRequest {
67
70
  accountId: string;
68
71
  adminAccountSettingsInput: AdminAccountSettingsInput;
@@ -159,6 +162,14 @@ export declare class AdminApi extends runtime.BaseAPI {
159
162
  *
160
163
  */
161
164
  payDomainTransferSellerInvoice(requestParameters: AdminApiPayDomainTransferSellerInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
165
+ /**
166
+ *
167
+ */
168
+ paySellerInvoiceRaw(requestParameters: AdminApiPaySellerInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
169
+ /**
170
+ *
171
+ */
172
+ paySellerInvoice(requestParameters: AdminApiPaySellerInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
162
173
  /**
163
174
  *
164
175
  */
@@ -716,6 +716,57 @@ var AdminApi = /** @class */ (function (_super) {
716
716
  });
717
717
  });
718
718
  };
719
+ /**
720
+ *
721
+ */
722
+ AdminApi.prototype.paySellerInvoiceRaw = function (requestParameters, initOverrides) {
723
+ return __awaiter(this, void 0, void 0, function () {
724
+ var queryParameters, headerParameters, token, tokenString, response;
725
+ return __generator(this, function (_a) {
726
+ switch (_a.label) {
727
+ case 0:
728
+ if (requestParameters['invoiceId'] == null) {
729
+ throw new runtime.RequiredError('invoiceId', 'Required parameter "invoiceId" was null or undefined when calling paySellerInvoice().');
730
+ }
731
+ queryParameters = {};
732
+ headerParameters = {};
733
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
734
+ token = this.configuration.accessToken;
735
+ return [4 /*yield*/, token("bearer", [])];
736
+ case 1:
737
+ tokenString = _a.sent();
738
+ if (tokenString) {
739
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
740
+ }
741
+ _a.label = 2;
742
+ case 2: return [4 /*yield*/, this.request({
743
+ path: "/admin/invoices/{invoiceId}/pay".replace("{".concat("invoiceId", "}"), encodeURIComponent(String(requestParameters['invoiceId']))),
744
+ method: 'POST',
745
+ headers: headerParameters,
746
+ query: queryParameters,
747
+ }, initOverrides)];
748
+ case 3:
749
+ response = _a.sent();
750
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
751
+ }
752
+ });
753
+ });
754
+ };
755
+ /**
756
+ *
757
+ */
758
+ AdminApi.prototype.paySellerInvoice = function (requestParameters, initOverrides) {
759
+ return __awaiter(this, void 0, void 0, function () {
760
+ return __generator(this, function (_a) {
761
+ switch (_a.label) {
762
+ case 0: return [4 /*yield*/, this.paySellerInvoiceRaw(requestParameters, initOverrides)];
763
+ case 1:
764
+ _a.sent();
765
+ return [2 /*return*/];
766
+ }
767
+ });
768
+ });
769
+ };
719
770
  /**
720
771
  *
721
772
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.129",
3
+ "version": "0.0.130",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -121,6 +121,10 @@ export interface AdminApiPayDomainTransferSellerInvoiceRequest {
121
121
  invoiceId: string;
122
122
  }
123
123
 
124
+ export interface AdminApiPaySellerInvoiceRequest {
125
+ invoiceId: string;
126
+ }
127
+
124
128
  export interface AdminApiUpdateAccountSettingsRequest {
125
129
  accountId: string;
126
130
  adminAccountSettingsInput: AdminAccountSettingsInput;
@@ -655,6 +659,46 @@ export class AdminApi extends runtime.BaseAPI {
655
659
  await this.payDomainTransferSellerInvoiceRaw(requestParameters, initOverrides);
656
660
  }
657
661
 
662
+ /**
663
+ *
664
+ */
665
+ async paySellerInvoiceRaw(requestParameters: AdminApiPaySellerInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
666
+ if (requestParameters['invoiceId'] == null) {
667
+ throw new runtime.RequiredError(
668
+ 'invoiceId',
669
+ 'Required parameter "invoiceId" was null or undefined when calling paySellerInvoice().'
670
+ );
671
+ }
672
+
673
+ const queryParameters: any = {};
674
+
675
+ const headerParameters: runtime.HTTPHeaders = {};
676
+
677
+ if (this.configuration && this.configuration.accessToken) {
678
+ const token = this.configuration.accessToken;
679
+ const tokenString = await token("bearer", []);
680
+
681
+ if (tokenString) {
682
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
683
+ }
684
+ }
685
+ const response = await this.request({
686
+ path: `/admin/invoices/{invoiceId}/pay`.replace(`{${"invoiceId"}}`, encodeURIComponent(String(requestParameters['invoiceId']))),
687
+ method: 'POST',
688
+ headers: headerParameters,
689
+ query: queryParameters,
690
+ }, initOverrides);
691
+
692
+ return new runtime.VoidApiResponse(response);
693
+ }
694
+
695
+ /**
696
+ *
697
+ */
698
+ async paySellerInvoice(requestParameters: AdminApiPaySellerInvoiceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
699
+ await this.paySellerInvoiceRaw(requestParameters, initOverrides);
700
+ }
701
+
658
702
  /**
659
703
  *
660
704
  */