class Money
include Comparable
attr_reader :amount, :currency
def initialize(amount, currency = 'USD')
export interface Post {
id: string;
title: string;
updatedAt: string;
}
<?php
namespace App\ValueObjects;
final readonly class NotificationSettings
{
<?php
namespace App\Domain;
use InvalidArgumentException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Currency;
import java.util.Objects;
public final class Money {
export interface CartItem {
sku: string;
name: string;
unitPrice: number; // cents
qty: number;
}
import { useReducer, useCallback } from 'react';
const initialState = (present) => ({ past: [], present, future: [] });
function historyReducer(state, action) {
const { past, present, future } = state;
class PriceBreakdown < Struct.new(:subtotal_cents, :discount_cents, :tax_cents, keyword_init: true)
def initialize(*)
super
freeze
end
package com.example.billing.config;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
@Configuration
use std::time::Duration;
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Config {
pub endpoint: String,
pub timeout: Duration,
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;
import Transaction.Category;
export interface DocState {
text: string;
selection: number;
}
export interface Command<S> {