KOUserShippingAddress Class Reference

Inherits from NSObject
Declared in KOUserShippingAddress.h
KOUserShippingAddress.m

Overview

@class KOUserShippingAddress

배송지의 정렬 순서는 기본배송지가 무조건 젤 먼저, 그후에는 배송지 수정된 시각을 기준으로 최신순으로 정렬되어 나가고, 페이지 사이즈를 주어서 여러 페이지를 나누어 조회하거나, 특정 배송지 id만을 지정하여 해당 배송지 정보만을 조회할 수 있다.
(배송지 요약 목록과 배송지 단일 상세 정보 API를 분리할까도 생각했으나, 현재 요약정보와 상세정보가 동일하여 일단은 하나로.)

Copyright 2018 Kakao Corp.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

  userId

배송지 정보를 요청한 사용자 아이디(ID)

@property (nonatomic, readonly, nullable) NSString *userId

Discussion

@property userId

Declared In

KOUserShippingAddress.h

  shippingAddresses

사용자의 배송지 정보 리스트.

@property (nonatomic, readonly, nullable) NSArray<KOShippingAddress*> *shippingAddresses

Discussion

@property shippingAddresses

최신 수정순 (단, 기본 배송지는 수정시각과 상관없이 첫번째에 위치)
shippingAddresses는 사용자의 동의를 받지 않은 경우 nil이 반환됩니다.
shippingAddresses가 nil이면 shippingAddressNeedsAgreement 속성 값을 확인하여 사용자에게 정보 제공에 대한 동의를 요청하고 정보 획득을 시도해 볼 수 있습니다.
동의를 받은 후 user/me를 다시 호출하면 shippingAddresses 값이 반환됩니다.
@seealso shippingAddressNeedsAgreement

Declared In

KOUserShippingAddress.h

  shippingAddressNeedsAgreement

shippingAddresses 제공에 대한 사용자 동의 필요 여부

@property (nonatomic, readonly) BOOL shippingAddressNeedsAgreement

Discussion

@property shippingAddressNeedsAgreement

shippingAddressNeedsAgreement 값이 true인 경우 새로운 동의 요청이 가능한 상태이며 KOSession의 updateScopes 메소드를 이용하여 동의를 받을 수 있습니다.
updateScopes의 파라미터로 전달할 shippingAddresses 동의항목에 대한 scope ID는 “shipping_addresses"입니다.
shippingAddressNeedsAgreement 값이 false인 경우 사용자의 계정에 shippingAddresses 정보가 없어서 값을 얻을 수 없음을 의미합니다.
@seealso shippingAddresses

Declared In

KOUserShippingAddress.h