承接 fmasites/omeda 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fmasites/omeda

最新稳定版本:v0.2.1

Composer 安装命令:

composer require fmasites/omeda

包简介

Omeda API client and utilities for Laravel

README 文档

README

A Laravel package for interacting with the Omeda API.

Requirements

  • PHP 8.3+
  • Laravel 11 or 12

Installation

composer require fmasites/omeda

Configuration

Add the following to your .env file:

OMEDA_APP_ID=
OMEDA_BASE_API_URL=
OMEDA_BRAND=
OMEDA_CLIENT=
OMEDA_CLIENT_BASE_API_URL=
OMEDA_INPUT_ID=
Variable Description
OMEDA_APP_ID Your Omeda application ID
OMEDA_BASE_API_URL Base URL for the Omeda brand API
OMEDA_BRAND Your Omeda brand abbreviation
OMEDA_CLIENT Your Omeda client abbreviation
OMEDA_CLIENT_BASE_API_URL Base URL for client-level API endpoints
OMEDA_INPUT_ID Input ID used for POST requests

Usage

OmedaApi

use FMASites\Omeda\OmedaApi;

$api = new OmedaApi();

You can also inject custom base URLs directly, which is useful in tests:

$api = new OmedaApi(baseApiUrl: 'https://...', clientBaseApiUrl: 'https://...');

Available methods

// Brand
$api->brandComprehensiveLookup();             // Cached for 8 hours

// Customer
$api->customerComprehensiveLookup($id);
$api->customerLookupByEmail($email);

// Orders & Transactions
$api->storeCustomerAndOrder($data);
$api->transactionLookup($transactionId);
$api->runProcessor($transactionIds);          // Utility API

// Postal
$api->postalInfoLookup($zipCode);             // Utility API

// Email
$api->emailOptinQueue($email, $deploymentTypeId, $options);

GET methods return array|falsefalse indicates a non-successful response (404, 300, etc.). POST methods return an Illuminate\Http\Client\Response instance.

DataAdapter

Utilities for transforming brand comprehensive lookup data:

use FMASites\Omeda\DataAdapter;

// Filter demographics down to specific type IDs
DataAdapter::filterByDemographicTypes($brandData, [1, 2, 3]);

// Simplify the full brand lookup response to a smaller structure
DataAdapter::simplifyBrandComprehensiveLookupData($brandData);

// Remove specific demographic value options by ID
DataAdapter::removeDemographicValueOptionsById($brandData, [10, 11]);

// Simplify a products array
DataAdapter::simplifyProductData($products);

Enums

The package includes enums for common Omeda constants:

Enum Description
AddressContactType Address contact type codes
EmailContactType Email contact type codes
PhoneContactType Phone contact type codes
MarketingClassCode Marketing classification codes
ProductType Product type codes
SubscriptionClassCode Subscription classification codes
LocationCodes Country, US state, Canadian province, and Mexican state codes

Testing

composer install
./vendor/bin/phpunit

统计信息

  • 总下载量: 42
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固