@cinerino/sdk 13.0.0 → 13.1.0

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.
@@ -50,6 +50,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
50
50
  exports.CloudAdmin = exports.service = void 0;
51
51
  var service;
52
52
  (function (service) {
53
+ var AcceptedPaymentMethod;
54
+ (function (AcceptedPaymentMethod) {
55
+ })(AcceptedPaymentMethod = service.AcceptedPaymentMethod || (service.AcceptedPaymentMethod = {}));
53
56
  var CreativeWork;
54
57
  (function (CreativeWork) {
55
58
  })(CreativeWork = service.CreativeWork || (service.CreativeWork = {}));
@@ -83,6 +86,9 @@ var service;
83
86
  var Order;
84
87
  (function (Order) {
85
88
  })(Order = service.Order || (service.Order = {}));
89
+ var PaymentMethod;
90
+ (function (PaymentMethod) {
91
+ })(PaymentMethod = service.PaymentMethod || (service.PaymentMethod = {}));
86
92
  var Product;
87
93
  (function (Product) {
88
94
  })(Product = service.Product || (service.Product = {}));
@@ -111,6 +117,23 @@ var CloudAdmin = /** @class */ (function () {
111
117
  }
112
118
  this.options = options;
113
119
  }
120
+ CloudAdmin.prototype.createAcceptedPaymentMethodInstance = function (params) {
121
+ return __awaiter(this, void 0, void 0, function () {
122
+ var _a;
123
+ return __generator(this, function (_b) {
124
+ switch (_b.label) {
125
+ case 0:
126
+ if (!(service.AcceptedPaymentMethod.svc === undefined)) return [3 /*break*/, 2];
127
+ _a = service.AcceptedPaymentMethod;
128
+ return [4 /*yield*/, Promise.resolve().then(function () { return require('./admin/acceptedPaymentMethod'); })];
129
+ case 1:
130
+ _a.svc = (_b.sent()).AcceptedPaymentMethodService;
131
+ _b.label = 2;
132
+ case 2: return [2 /*return*/, new service.AcceptedPaymentMethod.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: defaultRetryableStatusCodes }))];
133
+ }
134
+ });
135
+ });
136
+ };
114
137
  CloudAdmin.prototype.createCreativeWorkInstance = function (params) {
115
138
  return __awaiter(this, void 0, void 0, function () {
116
139
  var _a;
@@ -298,6 +321,23 @@ var CloudAdmin = /** @class */ (function () {
298
321
  });
299
322
  });
300
323
  };
324
+ CloudAdmin.prototype.createPaymentMethodInstance = function (params) {
325
+ return __awaiter(this, void 0, void 0, function () {
326
+ var _a;
327
+ return __generator(this, function (_b) {
328
+ switch (_b.label) {
329
+ case 0:
330
+ if (!(service.PaymentMethod.svc === undefined)) return [3 /*break*/, 2];
331
+ _a = service.PaymentMethod;
332
+ return [4 /*yield*/, Promise.resolve().then(function () { return require('./admin/paymentMethod'); })];
333
+ case 1:
334
+ _a.svc = (_b.sent()).PaymentMethodService;
335
+ _b.label = 2;
336
+ case 2: return [2 /*return*/, new service.PaymentMethod.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: defaultRetryableStatusCodes }))];
337
+ }
338
+ });
339
+ });
340
+ };
301
341
  CloudAdmin.prototype.createProductInstance = function (params) {
302
342
  return __awaiter(this, void 0, void 0, function () {
303
343
  var _a;
@@ -41,6 +41,9 @@ export declare class PaymentService extends Service {
41
41
  authorizeMovieTicketAsync(params: {
42
42
  object: IAuthorizeMovieTicketObject;
43
43
  purpose: IPurpose;
44
+ instrumentOptions?: {
45
+ acceptedPaymentMethodOfferIds?: never;
46
+ };
44
47
  }, options: {
45
48
  /**
46
49
  * レイテンシ増加時の最大待機時間(milliseconds)
@@ -178,20 +178,22 @@ var PaymentService = /** @class */ (function (_super) {
178
178
  * 決済カード決済承認
179
179
  */
180
180
  PaymentService.prototype.authorizeMovieTicketAsync = function (params, options) {
181
+ var _a;
181
182
  return __awaiter(this, void 0, void 0, function () {
182
- var object, purpose, checkedActionId, _a, auth, endpoint, project, seller, disableAutoRetry, retryableStatusCodes, chevrePay, ticketToken, paymentService;
183
- return __generator(this, function (_b) {
184
- switch (_b.label) {
183
+ var object, purpose, acceptedPaymentMethodOfferIds, checkedActionId, _b, auth, endpoint, project, seller, disableAutoRetry, retryableStatusCodes, chevrePay, ticketToken, paymentService;
184
+ return __generator(this, function (_c) {
185
+ switch (_c.label) {
185
186
  case 0:
186
187
  object = params.object, purpose = params.purpose;
188
+ acceptedPaymentMethodOfferIds = (_a = params.instrumentOptions) === null || _a === void 0 ? void 0 : _a.acceptedPaymentMethodOfferIds;
187
189
  checkedActionId = options.checkedActionId;
188
- _a = this.options, auth = _a.auth, endpoint = _a.endpoint, project = _a.project, seller = _a.seller, disableAutoRetry = _a.disableAutoRetry, retryableStatusCodes = _a.retryableStatusCodes;
190
+ _b = this.options, auth = _b.auth, endpoint = _b.endpoint, project = _b.project, seller = _b.seller, disableAutoRetry = _b.disableAutoRetry, retryableStatusCodes = _b.retryableStatusCodes;
189
191
  return [4 /*yield*/, index_1.loadChevrePay({ auth: auth, endpoint: endpoint, disableAutoRetry: disableAutoRetry })];
190
192
  case 1:
191
- chevrePay = _b.sent();
193
+ chevrePay = _c.sent();
192
194
  return [4 /*yield*/, this.issueTicketThroughMovieTicketUntilSuccess(params, options)];
193
195
  case 2:
194
- ticketToken = (_b.sent()).ticketToken;
196
+ ticketToken = (_c.sent()).ticketToken;
195
197
  return [4 /*yield*/, chevrePay.createPaymentInstance({
196
198
  project: project,
197
199
  seller: { id: (typeof (seller === null || seller === void 0 ? void 0 : seller.id) === 'string') ? seller.id : '' },
@@ -201,10 +203,13 @@ var PaymentService = /** @class */ (function (_super) {
201
203
  ])
202
204
  })];
203
205
  case 3:
204
- paymentService = _b.sent();
206
+ paymentService = _c.sent();
205
207
  return [2 /*return*/, paymentService.authorizeMovieTicket({
206
208
  object: __assign(__assign({}, object), { ticketToken: ticketToken }),
207
- purpose: purpose
209
+ purpose: purpose,
210
+ instrumentOptions: {
211
+ acceptedPaymentMethodOfferIds: (Array.isArray(acceptedPaymentMethodOfferIds)) ? acceptedPaymentMethodOfferIds : []
212
+ }
208
213
  }, { checkedActionId: checkedActionId })];
209
214
  }
210
215
  });