Class: Pago::V2026_04::Models::OrderPaidMetadata
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ order_id: "order_id", product_id: "product_id", billing_type: "billing_type", amount: "amount", currency: "currency", net_amount: "net_amount", tax_amount: "tax_amount", applied_balance_amount: "applied_balance_amount", discount_amount: "discount_amount", discount_id: "discount_id", platform_fee: "platform_fee", subscription_id: "subscription_id", recurring_interval: "recurring_interval", recurring_interval_count: "recurring_interval_count" }.freeze
- REQUIRED_KEYS =
["order_id", "amount"].freeze
Instance Attribute Summary collapse
- #amount ⇒ Integer readonly
- #applied_balance_amount ⇒ Integer readonly
- #billing_type ⇒ String readonly
- #currency ⇒ String readonly
- #discount_amount ⇒ Integer readonly
- #discount_id ⇒ String readonly
- #net_amount ⇒ Integer readonly
- #order_id ⇒ String readonly
- #platform_fee ⇒ Integer readonly
- #product_id ⇒ String readonly
- #recurring_interval ⇒ String readonly
- #recurring_interval_count ⇒ Integer readonly
- #subscription_id ⇒ String readonly
- #tax_amount ⇒ Integer readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(order_id:, product_id: ::Pago::UNSET, billing_type: ::Pago::UNSET, amount:, currency: ::Pago::UNSET, net_amount: ::Pago::UNSET, tax_amount: ::Pago::UNSET, applied_balance_amount: ::Pago::UNSET, discount_amount: ::Pago::UNSET, discount_id: ::Pago::UNSET, platform_fee: ::Pago::UNSET, subscription_id: ::Pago::UNSET, recurring_interval: ::Pago::UNSET, recurring_interval_count: ::Pago::UNSET) ⇒ OrderPaidMetadata
constructor
A new instance of OrderPaidMetadata.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(order_id:, product_id: ::Pago::UNSET, billing_type: ::Pago::UNSET, amount:, currency: ::Pago::UNSET, net_amount: ::Pago::UNSET, tax_amount: ::Pago::UNSET, applied_balance_amount: ::Pago::UNSET, discount_amount: ::Pago::UNSET, discount_id: ::Pago::UNSET, platform_fee: ::Pago::UNSET, subscription_id: ::Pago::UNSET, recurring_interval: ::Pago::UNSET, recurring_interval_count: ::Pago::UNSET) ⇒ OrderPaidMetadata
Returns a new instance of OrderPaidMetadata.
32906 32907 32908 32909 32910 32911 32912 32913 32914 32915 32916 32917 32918 32919 32920 32921 32922 32923 32924 32925 32926 32927 32928 32929 32930 32931 32932 32933 32934 32935 32936 32937 |
# File 'lib/pago/v2026_04/models.rb', line 32906 def initialize( order_id:, product_id: ::Pago::UNSET, billing_type: ::Pago::UNSET, amount:, currency: ::Pago::UNSET, net_amount: ::Pago::UNSET, tax_amount: ::Pago::UNSET, applied_balance_amount: ::Pago::UNSET, discount_amount: ::Pago::UNSET, discount_id: ::Pago::UNSET, platform_fee: ::Pago::UNSET, subscription_id: ::Pago::UNSET, recurring_interval: ::Pago::UNSET, recurring_interval_count: ::Pago::UNSET ) super() assign(:order_id, order_id) assign(:product_id, product_id) assign(:billing_type, billing_type) assign(:amount, amount) assign(:currency, currency) assign(:net_amount, net_amount) assign(:tax_amount, tax_amount) assign(:applied_balance_amount, applied_balance_amount) assign(:discount_amount, discount_amount) assign(:discount_id, discount_id) assign(:platform_fee, platform_fee) assign(:subscription_id, subscription_id) assign(:recurring_interval, recurring_interval) assign(:recurring_interval_count, recurring_interval_count) end |
Instance Attribute Details
#amount ⇒ Integer (readonly)
32874 32875 32876 |
# File 'lib/pago/v2026_04/models.rb', line 32874 def amount @amount end |
#applied_balance_amount ⇒ Integer (readonly)
32886 32887 32888 |
# File 'lib/pago/v2026_04/models.rb', line 32886 def applied_balance_amount @applied_balance_amount end |
#billing_type ⇒ String (readonly)
32871 32872 32873 |
# File 'lib/pago/v2026_04/models.rb', line 32871 def billing_type @billing_type end |
#currency ⇒ String (readonly)
32877 32878 32879 |
# File 'lib/pago/v2026_04/models.rb', line 32877 def currency @currency end |
#discount_amount ⇒ Integer (readonly)
32889 32890 32891 |
# File 'lib/pago/v2026_04/models.rb', line 32889 def discount_amount @discount_amount end |
#discount_id ⇒ String (readonly)
32892 32893 32894 |
# File 'lib/pago/v2026_04/models.rb', line 32892 def discount_id @discount_id end |
#net_amount ⇒ Integer (readonly)
32880 32881 32882 |
# File 'lib/pago/v2026_04/models.rb', line 32880 def net_amount @net_amount end |
#order_id ⇒ String (readonly)
32865 32866 32867 |
# File 'lib/pago/v2026_04/models.rb', line 32865 def order_id @order_id end |
#platform_fee ⇒ Integer (readonly)
32895 32896 32897 |
# File 'lib/pago/v2026_04/models.rb', line 32895 def platform_fee @platform_fee end |
#product_id ⇒ String (readonly)
32868 32869 32870 |
# File 'lib/pago/v2026_04/models.rb', line 32868 def product_id @product_id end |
#recurring_interval ⇒ String (readonly)
32901 32902 32903 |
# File 'lib/pago/v2026_04/models.rb', line 32901 def recurring_interval @recurring_interval end |
#recurring_interval_count ⇒ Integer (readonly)
32904 32905 32906 |
# File 'lib/pago/v2026_04/models.rb', line 32904 def recurring_interval_count @recurring_interval_count end |
#subscription_id ⇒ String (readonly)
32898 32899 32900 |
# File 'lib/pago/v2026_04/models.rb', line 32898 def subscription_id @subscription_id end |
#tax_amount ⇒ Integer (readonly)
32883 32884 32885 |
# File 'lib/pago/v2026_04/models.rb', line 32883 def tax_amount @tax_amount end |
Class Method Details
.from_json(data) ⇒ OrderPaidMetadata?
32941 32942 32943 32944 32945 32946 32947 32948 32949 32950 32951 32952 32953 32954 32955 32956 32957 32958 32959 32960 32961 32962 32963 32964 32965 |
# File 'lib/pago/v2026_04/models.rb', line 32941 def self.from_json(data) data = ::JSON.parse(data) if data.is_a?(String) data = ::Pago::Serde.object(data) return nil if data.nil? wrap_raw( new( order_id: (data.key?("order_id") ? data["order_id"] : ::Pago::UNSET), product_id: (data.key?("product_id") ? data["product_id"] : ::Pago::UNSET), billing_type: (data.key?("billing_type") ? data["billing_type"] : ::Pago::UNSET), amount: (data.key?("amount") ? data["amount"] : ::Pago::UNSET), currency: (data.key?("currency") ? data["currency"] : ::Pago::UNSET), net_amount: (data.key?("net_amount") ? data["net_amount"] : ::Pago::UNSET), tax_amount: (data.key?("tax_amount") ? data["tax_amount"] : ::Pago::UNSET), applied_balance_amount: (data.key?("applied_balance_amount") ? data["applied_balance_amount"] : ::Pago::UNSET), discount_amount: (data.key?("discount_amount") ? data["discount_amount"] : ::Pago::UNSET), discount_id: (data.key?("discount_id") ? data["discount_id"] : ::Pago::UNSET), platform_fee: (data.key?("platform_fee") ? data["platform_fee"] : ::Pago::UNSET), subscription_id: (data.key?("subscription_id") ? data["subscription_id"] : ::Pago::UNSET), recurring_interval: (data.key?("recurring_interval") ? data["recurring_interval"] : ::Pago::UNSET), recurring_interval_count: (data.key?("recurring_interval_count") ? data["recurring_interval_count"] : ::Pago::UNSET) ), data ) end |