Sha256: 7c7311ae61f3020b3daa640f41ad21df141c1df9bb526f989fca196f09e8315a
Contents?: true
Size: 1.02 KB
Versions: 10
Compression:
Stored size: 1.02 KB
Contents
# typed: strict # frozen_string_literal: true module WhatsappSdk module Resource class Currency extend T::Sig # Returns default text if localization fails. # # @returns fallback_value [String]. sig { returns(String) } attr_accessor :fallback_value # Currency code as defined in ISO 4217. # # @returns code [String]. sig { returns(String) } attr_accessor :code # Amount multiplied by 1000. # # @returns code [Float]. sig { returns(T.any(Float, Integer)) } attr_accessor :amount sig { params(fallback_value: String, code: String, amount: T.any(Float, Integer)).void } def initialize(fallback_value:, code:, amount:) @fallback_value = fallback_value @code = code @amount = amount end sig { returns(T::Hash[T.untyped, T.untyped]) } def to_json { fallback_value: fallback_value, code: code, amount_1000: amount } end end end end
Version data entries
10 entries across 10 versions & 1 rubygems