1
0
зеркало из https://github.com/glebtv/yookassa.git synced 2026-08-28 15:16:18 +03:00
Этот коммит содержится в:
Gleb Tv
2026-07-18 14:31:53 +03:00
родитель 7339e4a53d
Коммит 04f37a9e6a
4 изменённых файлов: 21 добавлений и 3 удалений

4
.github/workflows/main.yml поставляемый
Просмотреть файл

@@ -13,7 +13,7 @@ jobs:
matrix: matrix:
ruby: ruby:
- "3.4" - "3.4"
- "4.0" - "4.0.6"
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -35,7 +35,7 @@ jobs:
- name: Set up Ruby - name: Set up Ruby
uses: ruby/setup-ruby@v1 uses: ruby/setup-ruby@v1
with: with:
ruby-version: 4.0 ruby-version: 4.0.6
bundler-cache: true bundler-cache: true
- name: Set up Chrome - name: Set up Chrome
uses: browser-actions/setup-chrome@v1 uses: browser-actions/setup-chrome@v1

1
.ruby-version Обычный файл
Просмотреть файл

@@ -0,0 +1 @@
4.0.6

Просмотреть файл

@@ -62,7 +62,7 @@ module Yookassa
# Amount of excise tax on products including kopeks. Decimal number with 2 digits after the period. # Amount of excise tax on products including kopeks. Decimal number with 2 digits after the period.
# Online sales register that support this parameter: Orange Data, Kit Invest. # Online sales register that support this parameter: Orange Data, Kit Invest.
attribute? :excise attribute? :excise, Types::Coercible::Float
# Information about the supplier of product or service. You can specify this parameter if you send the data # Information about the supplier of product or service. You can specify this parameter if you send the data
# for creating the receipt using the Receipt after payment scenario. # for creating the receipt using the Receipt after payment scenario.

17
spec/yookassa/entity/product_spec.rb Обычный файл
Просмотреть файл

@@ -0,0 +1,17 @@
# frozen_string_literal: true
RSpec.describe Yookassa::Entity::Product do
let(:attributes) do
{
description: "Fuel",
quantity: 1,
amount: { value: 100, currency: "RUB" },
vat_code: 1
}
end
it "defines excise as an optional numeric attribute" do
expect(described_class.new(**attributes, excise: "12.34").excise).to eq(12.34)
expect(described_class.new(**attributes).excise).to be_nil
end
end