from django.db import transaction
from django.http import JsonResponse
@transaction.atomic
def transfer_funds(request):
from sqlalchemy import Column, Integer, BigInteger, String
from sqlalchemy.orm import declarative_base
Base = declarative_base()
@MappedSuperclass
@FilterDef(
name = "tenantFilter",
parameters = @ParamDef(name = "tenantId", type = String.class)
)
@Filter(name = "tenantFilter", condition = "tenant_id = :tenantId")
@Component
public class SalesRollupScheduler {
private static final Logger log = LoggerFactory.getLogger(SalesRollupScheduler.class);
private static final int ROLLUP_WINDOW_DAYS = 3;
package com.example.demo.service;
import com.example.demo.model.Order;
import com.example.demo.model.OrderItem;
import com.example.demo.model.User;
import com.example.demo.repository.OrderRepository;
import uuid
from django.db import models
class Cart(models.Model):
OPEN = "open"
class ApplicationCommand
Result = Struct.new(:value, :errors) do
def success?
errors.nil? || errors.empty?
end
class RegistrationsController < ApplicationController
def new
@user = User.new
end
def create
<?php
namespace App\Http\Controllers;
use App\Models\Wallet;
use App\Services\WalletService;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import java.time.Instant;
class OrderCreationService
Result = Struct.new(:success?, :order, :error, keyword_init: true)
def initialize(customer:, line_params:)
@customer = customer
@line_params = line_params
CREATE TABLE idempotency_keys (
request_key text NOT NULL,
endpoint text NOT NULL,
request_fingerprint text NOT NULL,
status text NOT NULL DEFAULT 'in_progress'
CHECK (status IN ('in_progress', 'completed')),