All Verbs | /account/settings | ||
---|---|---|---|
GET POST | /AccountSettings |
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AccountSettings(IPost):
display_name: Optional[str] = None
first_name: Optional[str] = None
last_name: Optional[str] = None
company: Optional[str] = None
phone_number: Optional[str] = None
show_card: bool = False
brand: Optional[str] = None
last4: Optional[str] = None
card_number: Optional[str] = None
cvc: Optional[str] = None
exp_month: int = 0
exp_year: int = 0
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /account/settings HTTP/1.1
Host: account.servicestack.net
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"displayName":"String","firstName":"String","lastName":"String","company":"String","phoneNumber":"String","showCard":false,"brand":"String","last4":"String","cardNumber":"String","cvc":"String","expMonth":0,"expYear":0}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"displayName":"String","firstName":"String","lastName":"String","company":"String","phoneNumber":"String","showCard":false,"brand":"String","last4":"String","cardNumber":"String","cvc":"String","expMonth":0,"expYear":0}