Back to list
violetio

rithum

by violetio

AI-powered knowledge and agent plugins for Violet, compatible with Claude Code and other AI systems

1🍴 0📅 Jan 8, 2026

SKILL.md


name: rithum description: Rithum B2B patterns and distribution API

Rithum Best Practices

Leverage Data Model Guarantees

Trust guaranteed non-null fields:

// DO: Trust the data model guarantees
order.setTotalPrice(PriceUtils.centsToDollars(transactableBag.getTotal()));

// DON'T: Add unnecessary null checks
if (Objects.nonNull(transactableBag.getTotal())) {
  order.setTotalPrice(PriceUtils.centsToDollars(transactableBag.getTotal()));
}

Clean Separation of Concerns

  • Keep main composer methods focused on orchestration
  • Extract complex logic into focused helper methods
  • Use static utility classes for reusable functionality

Common Compilation Issues

OfferData.Shipping.Price Structure

// CORRECT
OfferData.Shipping.Price price = new OfferData.Shipping.Price();

// WRONG
OfferData.Shipping.Method.Price price = new OfferData.Shipping.Method.Price();

MerchantConfiguration Method Names

// CORRECT
config.setRithumConfig(rithumConfig);

// WRONG
config.setRithum(rithumConfig);

Type Consistency

// CORRECT - merchantId is Integer
assertEquals(Integer.valueOf(12345), result.getMerchantId());

// WRONG
assertEquals(Long.valueOf(12345L), result.getMerchantId());

Testing Patterns

Static Method Mocking

@Test
public void testOrderSyncWithFallbackShipping() {
  try (MockedStatic<RithumMerchantConfig> mockedRithumConfig = Mockito.mockStatic(RithumMerchantConfig.class)) {
    mockedRithumConfig.when(() -> RithumMerchantConfig.shouldUseFallbackShippingMethods(config)).thenReturn(true);

    List<OfferData.Shipping> result = rithumOrderSyncService.getShippingEstimates(request);

    assertNotNull(result);
    assertTrue(CollectionUtils.isNotEmpty(result));
  }
}

Test Data Creation

private DecryptedMerchantCredentials createDecryptedMerchantCredentials() {
  DecryptedMerchantCredentials dmc = new DecryptedMerchantCredentials();
  dmc.setMerchantId(12345);  // Use Integer, not Long
  dmc.setPlatform(Merchant.Platform.RITHUM);
  return dmc;
}

Comprehensive Testing Strategy

  • Test successful composition with complete data
  • Test edge cases: null addresses, empty collections
  • Test status mapping for all enum values
  • Test fallback shipping configuration
  • Verify property mapping accuracy
  • Use realistic test data

Score

Total Score

45/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

0/5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon