Source code for bungieapi.generated.components.schemas.tokens
# generated by update to not change manually
import dataclasses as dt
import typing as t
from bungieapi.json import to_json
[docs]@dt.dataclass(frozen=True)
class PartnerOfferClaimRequest:
bungie_net_membership_id: t.Optional[int] = None
partner_offer_id: t.Optional[str] = None
transaction_id: t.Optional[str] = None
[docs] def to_json(self) -> t.Mapping[str, t.Any]:
return {
"PartnerOfferId": to_json(self.partner_offer_id),
"BungieNetMembershipId": to_json(self.bungie_net_membership_id),
"TransactionId": to_json(self.transaction_id),
}
[docs]@dt.dataclass(frozen=True)
class PartnerOfferSkuHistoryResponse:
all_offers_applied: t.Optional[bool] = None
claim_date: t.Optional[str] = None
localized_description: t.Optional[str] = None
localized_name: t.Optional[str] = None
sku_identifier: t.Optional[str] = None
sku_offers: t.Optional[t.Sequence["PartnerOfferHistoryResponse"]] = None
transaction_id: t.Optional[str] = None
[docs] def to_json(self) -> t.Mapping[str, t.Any]:
return {
"SkuIdentifier": to_json(self.sku_identifier),
"LocalizedName": to_json(self.localized_name),
"LocalizedDescription": to_json(self.localized_description),
"ClaimDate": to_json(self.claim_date),
"AllOffersApplied": to_json(self.all_offers_applied),
"TransactionId": to_json(self.transaction_id),
"SkuOffers": to_json(self.sku_offers),
}
[docs]@dt.dataclass(frozen=True)
class PartnerOfferHistoryResponse:
apply_date: t.Optional[str] = None
is_consumable: t.Optional[bool] = None
localized_description: t.Optional[str] = None
localized_name: t.Optional[str] = None
membership_id: t.Optional[int] = None
membership_type: t.Optional[int] = None
partner_offer_key: t.Optional[str] = None
quantity_applied: t.Optional[int] = None
[docs] def to_json(self) -> t.Mapping[str, t.Any]:
return {
"PartnerOfferKey": to_json(self.partner_offer_key),
"MembershipId": to_json(self.membership_id),
"MembershipType": to_json(self.membership_type),
"LocalizedName": to_json(self.localized_name),
"LocalizedDescription": to_json(self.localized_description),
"IsConsumable": to_json(self.is_consumable),
"QuantityApplied": to_json(self.quantity_applied),
"ApplyDate": to_json(self.apply_date),
}