Class: Yoomoney::Models::PaymentCreateParams::PaymentMethodData::PaymentMethodDataElectronicCertificate::Article

Inherits:
Internal::Type::BaseModel
  • Object
show all
Defined in:
lib/yoomoney/models/payment_create_params.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(articles: nil, electronic_certificate: nil) ⇒ Object



369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
# File 'lib/yoomoney/models/payment_create_params.rb', line 369

class Article < Yoomoney::Internal::Type::BaseModel
  # @!attribute article_name
  #
  #   @return [String]
  required :article_name, String

  # @!attribute article_number
  #
  #   @return [Integer]
  required :article_number, Integer

  # @!attribute price
  #
  #   @return [Yoomoney::Models::MonetaryAmount]
  required :price, -> { Yoomoney::MonetaryAmount }

  # @!attribute quantity
  #
  #   @return [Integer]
  required :quantity, Integer

  # @!attribute tru_code
  #
  #   @return [String]
  required :tru_code, String

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

  # @!attribute metadata
  #   Любые дополнительные данные, которые нужны вам для работы (например, номер
  #   заказа). Передаются в виде набора пар «ключ-значение» и возвращаются в ответе от
  #   ЮKassa. Ограничения: максимум 16 ключей, имя ключа не больше 32 символов,
  #   значение ключа не больше 512 символов, тип данных — строка в формате UTF-8.
  #
  #   @return [Hash{Symbol=>String}, nil]
  optional :metadata, Yoomoney::Internal::Type::HashOf[String]

  # @!method initialize(article_name:, article_number:, price:, quantity:, tru_code:, article_code: nil, metadata: nil)
  #   Some parameter documentations has been truncated, see
  #   {Yoomoney::Models::PaymentCreateParams::PaymentMethodData::PaymentMethodDataElectronicCertificate::Article}
  #   for more details.
  #
  #   @param article_name [String]
  #
  #   @param article_number [Integer]
  #
  #   @param price [Yoomoney::Models::MonetaryAmount]
  #
  #   @param quantity [Integer]
  #
  #   @param tru_code [String]
  #
  #   @param article_code [String]
  #
  #   @param metadata [Hash{Symbol=>String}] Любые дополнительные данные, которые нужны вам для работы (например, номер заказ
end

Instance Attribute Details

#article_codeString?

Returns:

  • (String, nil)


398
# File 'lib/yoomoney/models/payment_create_params.rb', line 398

optional :article_code, String

#article_nameString

Returns:

  • (String)


373
# File 'lib/yoomoney/models/payment_create_params.rb', line 373

required :article_name, String

#article_numberInteger

Returns:

  • (Integer)


378
# File 'lib/yoomoney/models/payment_create_params.rb', line 378

required :article_number, Integer

#metadataHash{Symbol=>String}?

Любые дополнительные данные, которые нужны вам для работы (например, номер заказа). Передаются в виде набора пар «ключ-значение» и возвращаются в ответе от ЮKassa. Ограничения: максимум 16 ключей, имя ключа не больше 32 символов, значение ключа не больше 512 символов, тип данных — строка в формате UTF-8.

Returns:

  • (Hash{Symbol=>String}, nil)


407
# File 'lib/yoomoney/models/payment_create_params.rb', line 407

optional :metadata, Yoomoney::Internal::Type::HashOf[String]

#priceYoomoney::Models::MonetaryAmount



383
# File 'lib/yoomoney/models/payment_create_params.rb', line 383

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

#quantityInteger

Returns:

  • (Integer)


388
# File 'lib/yoomoney/models/payment_create_params.rb', line 388

required :quantity, Integer

#tru_codeString

Returns:

  • (String)


393
# File 'lib/yoomoney/models/payment_create_params.rb', line 393

required :tru_code, String