Pedidos
ordersnamespaceCriação, autenticação e acompanhamento de pedidos.
8métodos
ordersnamespaceEsta página é gerada automaticamente pelo
@luckymaker/sdk-generator. Não edite manualmente.
completeRegistrationPending
Seção intitulada “completeRegistrationPending”PUT
/orders/:payment/registration/pendingAssinatura:
completeRegistrationPending(payment: string, body?: CompleteRegistrationPendingBody, settings?: SdkSettings): Promise<CompleteRegistrationPendingResponse>Parâmetros de rota
Seção intitulada “Parâmetros de rota”| Nome | Tipo |
|---|---|
payment |
string |
| Nome | Tipo | Obrigatório |
|---|---|---|
cpf |
string |
sim |
formId |
string |
não |
type CompleteRegistrationPendingParams = { "payment": string; };type CompleteRegistrationPendingBody = { "cpf": string; "formId"?: string; [key: string]: unknown; };type CompleteRegistrationPendingResponse = { "token": string; };Exemplo
Seção intitulada “Exemplo”const response = await sdk.orders.completeRegistrationPending("string", { "cpf": "string" });Testar esta função no playground
createAuthentication
Seção intitulada “createAuthentication”POST
/orders/:payment/authenticationAssinatura:
createAuthentication(payment: string, body?: CreateAuthenticationBody, settings?: SdkSettings): Promise<CreateAuthenticationResponse>Parâmetros de rota
Seção intitulada “Parâmetros de rota”| Nome | Tipo |
|---|---|
payment |
string |
| Nome | Tipo | Obrigatório |
|---|---|---|
clientSecret |
string |
sim |
type CreateAuthenticationParams = { "payment": string; };type CreateAuthenticationBody = { "clientSecret": string; };type CreateAuthenticationResponse = { "status": "CREATED" | "PENDING" | "ANALYSIS" | "APPROVED" | "REFUSED" | "CANCELLED" | "REFUNDED" | "CHARGEDBACK"; "requiresAction": boolean; };Exemplo
Seção intitulada “Exemplo”const response = await sdk.orders.createAuthentication("string", { "clientSecret": "string" });Testar esta função no playground
createBond
Seção intitulada “createBond”POST
/orders/:payment/bondsAssinatura:
createBond(payment: string, body?: CreateBondBody, settings?: SdkSettings<CreateBondQuery>): Promise<CreateBondResponse>Parâmetros de rota
Seção intitulada “Parâmetros de rota”| Nome | Tipo |
|---|---|
payment |
string |
| Nome | Tipo | Obrigatório |
|---|---|---|
limit |
number |
não |
raffleUUID |
string |
não |
offset |
number |
não |
| Nome | Tipo | Obrigatório |
|---|---|---|
cpf |
string |
não |
token |
string |
não |
type CreateBondParams = { "payment": string; };type CreateBondQuery = { "limit"?: number; "raffleUUID"?: string; "offset"?: number; };type CreateBondBody = { "cpf"?: string; "token"?: string; };type CreateBondResponse = { "groups": Array<{ "raffle": { "uuid": string; }; "totalCount": number; "bonds": Array<{ "luckyNumber": string; }>; "tickets"?: Array<{ "luckyNumber": string; "chances": Array<{ "number": string; "numbers": Array<string>; }>; }>; }>; };Exemplo
Seção intitulada “Exemplo”const response = await sdk.orders.createBond("string", { "cpf": "string", "token": "string" });Testar esta função no playground
createCertificate
Seção intitulada “createCertificate”POST
/orders/:payment/certificatesAssinatura:
createCertificate(payment: string, body?: CreateCertificateBody, settings?: SdkSettings<CreateCertificateQuery>): Promise<CreateCertificateResponse>Parâmetros de rota
Seção intitulada “Parâmetros de rota”| Nome | Tipo |
|---|---|
payment |
string |
| Nome | Tipo | Obrigatório |
|---|---|---|
simplified |
boolean |
não |
includeTickets |
boolean |
não |
| Nome | Tipo | Obrigatório |
|---|---|---|
confirmationCPF |
string |
sim |
type CreateCertificateParams = { "payment": string; };type CreateCertificateQuery = { "simplified"?: boolean; "includeTickets"?: boolean; };type CreateCertificateBody = { "confirmationCPF": string; };type CreateCertificateResponse = { "user": { "name": string; "cpf": string; "city": null | string; "state": null | string; }; "bonds": Array<{ "raffle": string; "luckyNumber": string; "matrixNumbers"?: Array<number>; }>; };Exemplo
Seção intitulada “Exemplo”const response = await sdk.orders.createCertificate("string", { "confirmationCPF": "string" });Testar esta função no playground
createOrder
Seção intitulada “createOrder”POST
/orders/:paymentAssinatura:
createOrder(payment: string, body?: CreateOrderBody, settings?: SdkSettings<CreateOrderQuery>): Promise<CreateOrderResponse>Parâmetros de rota
Seção intitulada “Parâmetros de rota”| Nome | Tipo |
|---|---|
payment |
string |
| Nome | Tipo | Obrigatório |
|---|---|---|
simplified |
boolean |
não |
includeTickets |
boolean |
não |
| Nome | Tipo | Obrigatório |
|---|---|---|
cpf |
string |
não |
token |
string |
não |
type CreateOrderParams = { "payment": string; };type CreateOrderQuery = { "simplified"?: boolean; "includeTickets"?: boolean; };type CreateOrderBody = { "cpf"?: string; "token"?: string; };type CreateOrderResponse = { "id": number; "uuid": string; "method": unknown; "methods": Array<"CARD" | "PICPAY" | "PIX" | "CREDITS" | "API" | "POINTS" | "DIGITAL_WALLET">; "value": number; "originalValue"?: number; "pointsValue"?: number; "source": "APP" | "API" | "PHYSICAL" | "DESKTOP_WEB" | "MOBILE_WEB" | "TABLET_WEB" | "EMBED" | "LANDING_PAGE" | "WEBSITE" | "UNKNOWN" | "STUB" | "SUBSCRIPTION"; "status": "CREATED" | "PENDING" | "ANALYSIS" | "APPROVED" | "REFUSED" | "CANCELLED" | "REFUNDED" | "CHARGEDBACK"; "expiresAt"?: string; "canChangPaymentMethod": boolean; "authorizationOnly"?: boolean; "instantPrizesWon"?: number; "appliedOffers"?: Array<unknown>; "unlockedOffers"?: Array<unknown>; "bonds"?: { "count": number; }; "data": { "involvedRaffles"?: Record<string, unknown>; "statusMessage"?: string; "user"?: { "name": string; "cpf"?: string; "needNewPassword"?: boolean; }; "reseller"?: { "name": string; }; }; "payer"?: { "id": number; "name": string; "document": string; "email": string; "phone"?: string; "address": { "streetName": string; "number"?: string; "complement"?: string; "neighborhood": string; "city": string; "state": string; "cep": string; }; }; "blocks"?: unknown; "items": unknown; "instructions"?: { "code": string; } | { "url": string; } | { "clientSecret": string; }; "createdAt": string; "updatedAt": string; "token"?: string; "links"?: { "self": string; }; "subscriptionAuthorization"?: { "planName": string; "recurringValue": number; "billingLabel": string; "firstChargeAt"?: string; }; "externalServices"?: Array<{ "name": string; "data"?: Record<string, unknown>; }>; };Exemplo
Seção intitulada “Exemplo”const response = await sdk.orders.createOrder("string", { "cpf": "string", "token": "string" });Testar esta função no playground
createRegistrationPending
Seção intitulada “createRegistrationPending”POST
/orders/:payment/registration/pendingAssinatura:
createRegistrationPending(payment: string, body?: CreateRegistrationPendingBody, settings?: SdkSettings): Promise<CreateRegistrationPendingResponse>Parâmetros de rota
Seção intitulada “Parâmetros de rota”| Nome | Tipo |
|---|---|
payment |
string |
| Nome | Tipo | Obrigatório |
|---|---|---|
cpf |
string |
sim |
type CreateRegistrationPendingParams = { "payment": string; };type CreateRegistrationPendingBody = { "cpf": string; };type CreateRegistrationPendingResponse = { "form": { [key: string]: unknown; } | null; };Exemplo
Seção intitulada “Exemplo”const response = await sdk.orders.createRegistrationPending("string", { "cpf": "string" });Testar esta função no playground
getBonds
Seção intitulada “getBonds”GET
/orders/:payment/bondsAssinatura:
getBonds(payment: string, query?: GetBondsQuery, settings?: SdkSettings): Promise<GetBondsResponse>Parâmetros de rota
Seção intitulada “Parâmetros de rota”| Nome | Tipo |
|---|---|
payment |
string |
| Nome | Tipo | Obrigatório |
|---|---|---|
limit |
number |
não |
raffleUUID |
string |
não |
offset |
number |
não |
type GetBondsParams = { "payment": string; };type GetBondsQuery = { "limit"?: number; "raffleUUID"?: string; "offset"?: number; };type GetBondsResponse = { "groups": Array<{ "raffle": { "uuid": string; }; "totalCount": number; "bonds": Array<{ "luckyNumber": string; }>; "tickets"?: Array<{ "luckyNumber": string; "chances": Array<{ "number": string; "numbers": Array<string>; }>; }>; }>; };Exemplo
Seção intitulada “Exemplo”const response = await sdk.orders.getBonds("string");Testar esta função no playground
getOrder
Seção intitulada “getOrder”GET
/orders/:paymentAssinatura:
getOrder(payment: string, query?: GetOrderQuery, settings?: SdkSettings): Promise<GetOrderResponse>Parâmetros de rota
Seção intitulada “Parâmetros de rota”| Nome | Tipo |
|---|---|
payment |
string |
| Nome | Tipo | Obrigatório |
|---|---|---|
simplified |
boolean |
não |
includeTickets |
boolean |
não |
type GetOrderParams = { "payment": string; };type GetOrderQuery = { "simplified"?: boolean; "includeTickets"?: boolean; };type GetOrderResponse = { "id": number; "uuid": string; "method": unknown; "methods": Array<"CARD" | "PICPAY" | "PIX" | "CREDITS" | "API" | "POINTS" | "DIGITAL_WALLET">; "value": number; "originalValue"?: number; "pointsValue"?: number; "source": "APP" | "API" | "PHYSICAL" | "DESKTOP_WEB" | "MOBILE_WEB" | "TABLET_WEB" | "EMBED" | "LANDING_PAGE" | "WEBSITE" | "UNKNOWN" | "STUB" | "SUBSCRIPTION"; "status": "CREATED" | "PENDING" | "ANALYSIS" | "APPROVED" | "REFUSED" | "CANCELLED" | "REFUNDED" | "CHARGEDBACK"; "expiresAt"?: string; "canChangPaymentMethod": boolean; "authorizationOnly"?: boolean; "instantPrizesWon"?: number; "appliedOffers"?: Array<unknown>; "unlockedOffers"?: Array<unknown>; "bonds"?: { "count": number; }; "data": { "involvedRaffles"?: Record<string, unknown>; "statusMessage"?: string; "user"?: { "name": string; "cpf"?: string; "needNewPassword"?: boolean; }; "reseller"?: { "name": string; }; }; "payer"?: { "id": number; "name": string; "document": string; "email": string; "phone"?: string; "address": { "streetName": string; "number"?: string; "complement"?: string; "neighborhood": string; "city": string; "state": string; "cep": string; }; }; "blocks"?: unknown; "items": unknown; "instructions"?: { "code": string; } | { "url": string; } | { "clientSecret": string; }; "createdAt": string; "updatedAt": string; "token"?: string; "links"?: { "self": string; }; "subscriptionAuthorization"?: { "planName": string; "recurringValue": number; "billingLabel": string; "firstChargeAt"?: string; }; "externalServices"?: Array<{ "name": string; "data"?: Record<string, unknown>; }>; };Exemplo
Seção intitulada “Exemplo”const response = await sdk.orders.getOrder("string");