Class: Yoomoney::Models::ReceiptData::Item

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/yoomoney/models/receipt_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(amount:, description:, quantity:, vat_code:, country_of_origin_code: nil, customs_declaration_number: nil, excise: nil, mark_code_info: nil, mark_mode: nil, mark_quantity: nil, measure: nil, payment_mode: nil, payment_subject: nil, payment_subject_industry_details: nil, planned_status: nil, product_code: nil) ⇒ Object

Parameters:



50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'lib/yoomoney/models/receipt_data.rb', line 50

class Item < Yoomoney::Internal::Type::BaseModel
  # @!attribute amount
  #   Сумма.
  #
  #   @return [Yoomoney::Models::MonetaryAmount]
  required :amount, -> { Yoomoney::MonetaryAmount }

  # @!attribute description
  #   Название товара.
  #
  #   @return [String]
  required :description, String

  # @!attribute quantity
  #   Количество.
  #
  #   @return [Float]
  required :quantity, Float

  # @!attribute vat_code
  #   Ставка НДС.
  #
  #   @return [Integer]
  required :vat_code, Integer

  # @!attribute country_of_origin_code
  #
  #   @return [String, nil]
  optional :country_of_origin_code, String

  # @!attribute customs_declaration_number
  #
  #   @return [String, nil]
  optional :customs_declaration_number, String

  # @!attribute excise
  #
  #   @return [String, nil]
  optional :excise, String

  # @!attribute mark_code_info
  #
  #   @return [Yoomoney::Models::MarkCodeInfo, nil]
  optional :mark_code_info, -> { Yoomoney::MarkCodeInfo }

  # @!attribute mark_mode
  #
  #   @return [String, nil]
  optional :mark_mode, String

  # @!attribute mark_quantity
  #
  #   @return [Yoomoney::Models::MarkQuantity, nil]
  optional :mark_quantity, -> { Yoomoney::MarkQuantity }

  # @!attribute measure
  #
  #   @return [Symbol, Yoomoney::Models::ReceiptItemMeasure, nil]
  optional :measure, enum: -> { Yoomoney::ReceiptItemMeasure }

  # @!attribute payment_mode
  #
  #   @return [Symbol, Yoomoney::Models::ReceiptItemPaymentMode, nil]
  optional :payment_mode, enum: -> { Yoomoney::ReceiptItemPaymentMode }

  # @!attribute payment_subject
  #
  #   @return [Symbol, Yoomoney::Models::ReceiptItemPaymentSubject, nil]
  optional :payment_subject, enum: -> { Yoomoney::ReceiptItemPaymentSubject }

  # @!attribute payment_subject_industry_details
  #
  #   @return [Array<Yoomoney::Models::IndustryDetails>, nil]
  optional :payment_subject_industry_details,
           -> { Yoomoney::Internal::Type::ArrayOf[Yoomoney::IndustryDetails] }

  # @!attribute planned_status
  #
  #   @return [Integer, nil]
  optional :planned_status, Integer

  # @!attribute product_code
  #
  #   @return [String, nil]
  optional :product_code, String

  # @!method initialize(amount:, description:, quantity:, vat_code:, country_of_origin_code: nil, customs_declaration_number: nil, excise: nil, mark_code_info: nil, mark_mode: nil, mark_quantity: nil, measure: nil, payment_mode: nil, payment_subject: nil, payment_subject_industry_details: nil, planned_status: nil, product_code: nil)
  #   @param amount [Yoomoney::Models::MonetaryAmount] Сумма.
  #
  #   @param description [String] Название товара.
  #
  #   @param quantity [Float] Количество.
  #
  #   @param vat_code [Integer] Ставка НДС.
  #
  #   @param country_of_origin_code [String]
  #
  #   @param customs_declaration_number [String]
  #
  #   @param excise [String]
  #
  #   @param mark_code_info [Yoomoney::Models::MarkCodeInfo]
  #
  #   @param mark_mode [String]
  #
  #   @param mark_quantity [Yoomoney::Models::MarkQuantity]
  #
  #   @param measure [Symbol, Yoomoney::Models::ReceiptItemMeasure]
  #
  #   @param payment_mode [Symbol, Yoomoney::Models::ReceiptItemPaymentMode]
  #
  #   @param payment_subject [Symbol, Yoomoney::Models::ReceiptItemPaymentSubject]
  #
  #   @param payment_subject_industry_details [Array<Yoomoney::Models::IndustryDetails>]
  #
  #   @param planned_status [Integer]
  #
  #   @param product_code [String]
end

Instance Attribute Details

#amountYoomoney::Models::MonetaryAmount

Сумма.



55
# File 'lib/yoomoney/models/receipt_data.rb', line 55

required :amount, -> { Yoomoney::MonetaryAmount }

#country_of_origin_codeString?

Returns:

  • (String, nil)


78
# File 'lib/yoomoney/models/receipt_data.rb', line 78

optional :country_of_origin_code, String

#customs_declaration_numberString?

Returns:

  • (String, nil)


83
# File 'lib/yoomoney/models/receipt_data.rb', line 83

optional :customs_declaration_number, String

#descriptionString

Название товара.

Returns:

  • (String)


61
# File 'lib/yoomoney/models/receipt_data.rb', line 61

required :description, String

#exciseString?

Returns:

  • (String, nil)


88
# File 'lib/yoomoney/models/receipt_data.rb', line 88

optional :excise, String

#mark_code_infoYoomoney::Models::MarkCodeInfo?



93
# File 'lib/yoomoney/models/receipt_data.rb', line 93

optional :mark_code_info, -> { Yoomoney::MarkCodeInfo }

#mark_modeString?

Returns:

  • (String, nil)


98
# File 'lib/yoomoney/models/receipt_data.rb', line 98

optional :mark_mode, String

#mark_quantityYoomoney::Models::MarkQuantity?



103
# File 'lib/yoomoney/models/receipt_data.rb', line 103

optional :mark_quantity, -> { Yoomoney::MarkQuantity }

#measureSymbol, ...

Returns:



108
# File 'lib/yoomoney/models/receipt_data.rb', line 108

optional :measure, enum: -> { Yoomoney::ReceiptItemMeasure }

#payment_modeSymbol, ...



113
# File 'lib/yoomoney/models/receipt_data.rb', line 113

optional :payment_mode, enum: -> { Yoomoney::ReceiptItemPaymentMode }

#payment_subjectSymbol, ...



118
# File 'lib/yoomoney/models/receipt_data.rb', line 118

optional :payment_subject, enum: -> { Yoomoney::ReceiptItemPaymentSubject }

#payment_subject_industry_detailsArray<Yoomoney::Models::IndustryDetails>?

Returns:



123
124
# File 'lib/yoomoney/models/receipt_data.rb', line 123

optional :payment_subject_industry_details,
-> { Yoomoney::Internal::Type::ArrayOf[Yoomoney::IndustryDetails] }

#planned_statusInteger?

Returns:

  • (Integer, nil)


129
# File 'lib/yoomoney/models/receipt_data.rb', line 129

optional :planned_status, Integer

#product_codeString?

Returns:

  • (String, nil)


134
# File 'lib/yoomoney/models/receipt_data.rb', line 134

optional :product_code, String

#quantityFloat

Количество.

Returns:

  • (Float)


67
# File 'lib/yoomoney/models/receipt_data.rb', line 67

required :quantity, Float

#vat_codeInteger

Ставка НДС.

Returns:

  • (Integer)


73
# File 'lib/yoomoney/models/receipt_data.rb', line 73

required :vat_code, Integer