Skip to content

Commit

Permalink
seller.makesOfferに適用カスタマータイプを追加
Browse files Browse the repository at this point in the history
discontinue placeOrder.startParams.expiresInSeconds
  • Loading branch information
ilovegadd committed Nov 17, 2023
1 parent 9d2c107 commit f5565c3
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 11 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
### Added

- add unitPriceOffer.acceptedPaymentMethod
- seller.makesOfferに適用カスタマータイプを追加

### Changed

### Deprecated

### Removed

- discontinue placeOrder.startParams.expiresInSeconds

### Fixed

### Security
Expand Down
3 changes: 3 additions & 0 deletions src/businessEntityType.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { ICategoryCode } from './categoryCode';

export type IBusinessEntityType = Pick<ICategoryCode, 'codeValue' | 'typeOf'>;
4 changes: 4 additions & 0 deletions src/categoryCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export enum CategorySetIdentifier {
* 通貨区分
*/
CurrencyType = 'CurrencyType',
/**
* カスタマータイプ
*/
CustomerType = 'CustomerType',
/**
* 配給区分
*/
Expand Down
20 changes: 12 additions & 8 deletions src/seller.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { IBusinessEntityType } from './businessEntityType';
import { IMerchantReturnPolicy, IRestockingFee } from './merchantReturnPolicy';
import { IMultilingualString } from './multilingualString';
import { IOffer } from './offer';
import { IAvailableAtOrFrom, IOffer } from './offer';
import { IOrganization } from './organization';
import { OrganizationType } from './organizationType';
import { IProject } from './project';
Expand All @@ -9,7 +10,6 @@ import { IQuantitativeValue } from './quantitativeValue';
import { SortType } from './sortType';
import { UnitCode } from './unitCode';

// strict definition(2022-08-04~)
export type ISellerMerchantReturnPolicy = Pick<
IMerchantReturnPolicy,
'itemCondition' | 'typeOf' | 'merchantReturnDays' | 'restockingFee' | 'url' | 'applicablePaymentMethod'
Expand All @@ -27,16 +27,20 @@ export interface IPaymentAccepted {
paymentMethodType: string;
}
export type IEligibleTransactionDuration = Pick<IQuantitativeValue<UnitCode.Sec>, 'maxValue' | 'typeOf' | 'unitCode'>;
export type IMakesOffer = Pick<
export interface IMakesOffer extends Pick<
IOffer,
'typeOf' | 'availableAtOrFrom'
> & {
> {
availableAtOrFrom: IAvailableAtOrFrom[]; // required
/**
* 適用カスタマータイプ
*/
eligibleCustomerType?: IBusinessEntityType[]; // add eligibleCustomerType(2023-11-18~)
/**
* 適用取引期間
*/
eligibleTransactionDuration?: IEligibleTransactionDuration;

};
eligibleTransactionDuration: IEligibleTransactionDuration; // required
}
export interface ISeller extends Pick<
IOrganization,
'typeOf' | 'id' | 'location' | 'telephone' | 'additionalProperty' | 'name' | 'url'
Expand All @@ -53,7 +57,7 @@ export interface ISeller extends Pick<
hasMerchantReturnPolicy?: IHasMerchantReturnPolicy;
name: IMultilingualString;
/**
* A pointer to products or services offered by the organization or person.
* 各アプリケーションに対するオファー
*/
makesOffer?: IMakesOffer[];
paymentAccepted?: IPaymentAccepted[];
Expand Down
4 changes: 1 addition & 3 deletions src/transaction/placeOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ export interface IObject {
}
export interface IStartParamsWithoutDetail {
project: Pick<IProject, 'id' | 'typeOf'>;
// expiresInSeconds指定に変更(2022-11-29~)
// expires: Date;
expiresInSeconds?: number;
// expiresInSeconds?: number; // discontinue(2023-11-18~)
agent: IAgent;
seller: {
id: string;
Expand Down

0 comments on commit f5565c3

Please sign in to comment.