lasselehtinen/groschen

Mockingbird 的包装器

v6.7.6 2024-09-18 08:56 UTC

This package is auto-updated.

Last update: 2024-09-18 09:05:45 UTC


README

基础知识

目的

Groschen 是 Mockingbird 的 API 包装器。目的是提供一个通用库,返回产品的基本信息,如标题、利益相关者、媒体类型等。通常返回多个值的元素会返回 Laravel Collection,结构通常从 Onix 标准复制。例如,getProductIdentifiers 方法返回以下 Collection

Illuminate\Support\Collection {#224
  #items: array:3 [
    0 => array:5 [
      "PriceType" => "05"
      "PriceAmount" => 16.25
      "Tax" => array:5 [
        "TaxType" => "01"
        "TaxRateCode" => "Z"
        "TaxRatePercent" => 10.0
        "TaxableAmount" => 16.25
        "TaxAmount" => 0.0
      ]
      "CurrencyCode" => "EUR"
      "Territory" => array:1 [
        "RegionsIncluded" => "WORLD"
      ]
    ]
    1 => array:5 [
      "PriceType" => "07"
      "PriceAmount" => 17.87
      "Tax" => array:5 [
        "TaxType" => "01"
        "TaxRateCode" => "S"
        "TaxRatePercent" => 10.0
        "TaxableAmount" => 16.25
        "TaxAmount" => 1.62
      ]
      "CurrencyCode" => "EUR"
      "Territory" => array:1 [
        "RegionsIncluded" => "WORLD"
      ]
    ]
    2 => array:5 [
      "PriceType" => "42"
      "PriceAmount" => 26.0
      "Tax" => array:5 [
        "TaxType" => "01"
        "TaxRateCode" => "S"
        "TaxRatePercent" => 10.0
        "TaxableAmount" => 23.64
        "TaxAmount" => 2.36
      ]
      "CurrencyCode" => "EUR"
      "Territory" => array:1 [
        "RegionsIncluded" => "WORLD"
      ]
    ]
  ]
}

方法