Class: Stigg::Models::V1::SubscriptionProvisionParams::AppliedCoupon::Discount::AmountsOff

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/stigg/models/v1/subscription_provision_params.rb

Defined Under Namespace

Modules: Currency

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:, currency:) ⇒ Object

Parameters:



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
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'lib/stigg/models/v1/subscription_provision_params.rb', line 369

class AmountsOff < Stigg::Internal::Type::BaseModel
  # @!attribute amount
  #   The price amount
  #
  #   @return [Float]
  required :amount, Float

  # @!attribute currency
  #   ISO 4217 currency code
  #
  #   @return [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::AppliedCoupon::Discount::AmountsOff::Currency]
  required :currency,
           enum: -> { Stigg::V1::SubscriptionProvisionParams::AppliedCoupon::Discount::AmountsOff::Currency }

  # @!method initialize(amount:, currency:)
  #   @param amount [Float] The price amount
  #
  #   @param currency [Symbol, Stigg::Models::V1::SubscriptionProvisionParams::AppliedCoupon::Discount::AmountsOff::Currency] ISO 4217 currency code

  # ISO 4217 currency code
  #
  # @see Stigg::Models::V1::SubscriptionProvisionParams::AppliedCoupon::Discount::AmountsOff#currency
  module Currency
    extend Stigg::Internal::Type::Enum

    USD = :usd
    AED = :aed
    ALL = :all
    AMD = :amd
    ANG = :ang
    AUD = :aud
    AWG = :awg
    AZN = :azn
    BAM = :bam
    BBD = :bbd
    BDT = :bdt
    BGN = :bgn
    BIF = :bif
    BMD = :bmd
    BND = :bnd
    BSD = :bsd
    BWP = :bwp
    BYN = :byn
    BZD = :bzd
    BRL = :brl
    CAD = :cad
    CDF = :cdf
    CHF = :chf
    CNY = :cny
    CZK = :czk
    DKK = :dkk
    DOP = :dop
    DZD = :dzd
    EGP = :egp
    ETB = :etb
    EUR = :eur
    FJD = :fjd
    GBP = :gbp
    GEL = :gel
    GIP = :gip
    GMD = :gmd
    GYD = :gyd
    HKD = :hkd
    HRK = :hrk
    HTG = :htg
    IDR = :idr
    ILS = :ils
    INR = :inr
    ISK = :isk
    JMD = :jmd
    JPY = :jpy
    KES = :kes
    KGS = :kgs
    KHR = :khr
    KMF = :kmf
    KRW = :krw
    KYD = :kyd
    KZT = :kzt
    LBP = :lbp
    LKR = :lkr
    LRD = :lrd
    LSL = :lsl
    MAD = :mad
    MDL = :mdl
    MGA = :mga
    MKD = :mkd
    MMK = :mmk
    MNT = :mnt
    MOP = :mop
    MRO = :mro
    MVR = :mvr
    MWK = :mwk
    MXN = :mxn
    MYR = :myr
    MZN = :mzn
    NAD = :nad
    NGN = :ngn
    NOK = :nok
    NPR = :npr
    NZD = :nzd
    PGK = :pgk
    PHP = :php
    PKR = :pkr
    PLN = :pln
    QAR = :qar
    RON = :ron
    RSD = :rsd
    RUB = :rub
    RWF = :rwf
    SAR = :sar
    SBD = :sbd
    SCR = :scr
    SEK = :sek
    SGD = :sgd
    SLE = :sle
    SLL = :sll
    SOS = :sos
    SZL = :szl
    THB = :thb
    TJS = :tjs
    TOP = :top
    TRY = :try
    TTD = :ttd
    TZS = :tzs
    UAH = :uah
    UZS = :uzs
    VND = :vnd
    VUV = :vuv
    WST = :wst
    XAF = :xaf
    XCD = :xcd
    YER = :yer
    ZAR = :zar
    ZMW = :zmw
    CLP = :clp
    DJF = :djf
    GNF = :gnf
    UGX = :ugx
    PYG = :pyg
    XOF = :xof
    XPF = :xpf

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#amountFloat

The price amount

Returns:

  • (Float)


374
# File 'lib/stigg/models/v1/subscription_provision_params.rb', line 374

required :amount, Float

#currencySymbol, Stigg::Models::V1::SubscriptionProvisionParams::AppliedCoupon::Discount::AmountsOff::Currency

ISO 4217 currency code



380
381
# File 'lib/stigg/models/v1/subscription_provision_params.rb', line 380

required :currency,
enum: -> { Stigg::V1::SubscriptionProvisionParams::AppliedCoupon::Discount::AmountsOff::Currency }