Class: Pago::V2026_04::Models::BalanceOrderMetadata
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ transaction_id: "transaction_id", order_id: "order_id", product_id: "product_id", subscription_id: "subscription_id", amount: "amount", net_amount: "net_amount", currency: "currency", presentment_amount: "presentment_amount", presentment_currency: "presentment_currency", tax_amount: "tax_amount", tax_state: "tax_state", tax_country: "tax_country", fee: "fee", exchange_rate: "exchange_rate" }.freeze
- REQUIRED_KEYS =
["transaction_id", "order_id", "amount", "currency", "presentment_amount", "presentment_currency", "tax_amount", "fee"].freeze
Instance Attribute Summary collapse
- #amount ⇒ Integer readonly
- #currency ⇒ String readonly
- #exchange_rate ⇒ Float readonly
- #fee ⇒ Integer readonly
- #net_amount ⇒ Integer readonly
- #order_id ⇒ String readonly
- #presentment_amount ⇒ Integer readonly
- #presentment_currency ⇒ String readonly
- #product_id ⇒ String readonly
- #subscription_id ⇒ String readonly
- #tax_amount ⇒ Integer readonly
- #tax_country ⇒ String? readonly
- #tax_state ⇒ String? readonly
- #transaction_id ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(transaction_id:, order_id:, product_id: ::Pago::UNSET, subscription_id: ::Pago::UNSET, amount:, net_amount: ::Pago::UNSET, currency:, presentment_amount:, presentment_currency:, tax_amount:, tax_state: ::Pago::UNSET, tax_country: ::Pago::UNSET, fee:, exchange_rate: ::Pago::UNSET) ⇒ BalanceOrderMetadata
constructor
A new instance of BalanceOrderMetadata.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(transaction_id:, order_id:, product_id: ::Pago::UNSET, subscription_id: ::Pago::UNSET, amount:, net_amount: ::Pago::UNSET, currency:, presentment_amount:, presentment_currency:, tax_amount:, tax_state: ::Pago::UNSET, tax_country: ::Pago::UNSET, fee:, exchange_rate: ::Pago::UNSET) ⇒ BalanceOrderMetadata
Returns a new instance of BalanceOrderMetadata.
1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 |
# File 'lib/pago/v2026_04/models.rb', line 1501 def initialize( transaction_id:, order_id:, product_id: ::Pago::UNSET, subscription_id: ::Pago::UNSET, amount:, net_amount: ::Pago::UNSET, currency:, presentment_amount:, presentment_currency:, tax_amount:, tax_state: ::Pago::UNSET, tax_country: ::Pago::UNSET, fee:, exchange_rate: ::Pago::UNSET ) super() assign(:transaction_id, transaction_id) assign(:order_id, order_id) assign(:product_id, product_id) assign(:subscription_id, subscription_id) assign(:amount, amount) assign(:net_amount, net_amount) assign(:currency, currency) assign(:presentment_amount, presentment_amount) assign(:presentment_currency, presentment_currency) assign(:tax_amount, tax_amount) assign(:tax_state, tax_state) assign(:tax_country, tax_country) assign(:fee, fee) assign(:exchange_rate, exchange_rate) end |
Instance Attribute Details
#amount ⇒ Integer (readonly)
1472 1473 1474 |
# File 'lib/pago/v2026_04/models.rb', line 1472 def amount @amount end |
#currency ⇒ String (readonly)
1478 1479 1480 |
# File 'lib/pago/v2026_04/models.rb', line 1478 def currency @currency end |
#exchange_rate ⇒ Float (readonly)
1499 1500 1501 |
# File 'lib/pago/v2026_04/models.rb', line 1499 def exchange_rate @exchange_rate end |
#fee ⇒ Integer (readonly)
1496 1497 1498 |
# File 'lib/pago/v2026_04/models.rb', line 1496 def fee @fee end |
#net_amount ⇒ Integer (readonly)
1475 1476 1477 |
# File 'lib/pago/v2026_04/models.rb', line 1475 def net_amount @net_amount end |
#order_id ⇒ String (readonly)
1463 1464 1465 |
# File 'lib/pago/v2026_04/models.rb', line 1463 def order_id @order_id end |
#presentment_amount ⇒ Integer (readonly)
1481 1482 1483 |
# File 'lib/pago/v2026_04/models.rb', line 1481 def presentment_amount @presentment_amount end |
#presentment_currency ⇒ String (readonly)
1484 1485 1486 |
# File 'lib/pago/v2026_04/models.rb', line 1484 def presentment_currency @presentment_currency end |
#product_id ⇒ String (readonly)
1466 1467 1468 |
# File 'lib/pago/v2026_04/models.rb', line 1466 def product_id @product_id end |
#subscription_id ⇒ String (readonly)
1469 1470 1471 |
# File 'lib/pago/v2026_04/models.rb', line 1469 def subscription_id @subscription_id end |
#tax_amount ⇒ Integer (readonly)
1487 1488 1489 |
# File 'lib/pago/v2026_04/models.rb', line 1487 def tax_amount @tax_amount end |
#tax_country ⇒ String? (readonly)
1493 1494 1495 |
# File 'lib/pago/v2026_04/models.rb', line 1493 def tax_country @tax_country end |
#tax_state ⇒ String? (readonly)
1490 1491 1492 |
# File 'lib/pago/v2026_04/models.rb', line 1490 def tax_state @tax_state end |
#transaction_id ⇒ String (readonly)
1460 1461 1462 |
# File 'lib/pago/v2026_04/models.rb', line 1460 def transaction_id @transaction_id end |
Class Method Details
.from_json(data) ⇒ BalanceOrderMetadata?
1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 |
# File 'lib/pago/v2026_04/models.rb', line 1536 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( transaction_id: (data.key?("transaction_id") ? data["transaction_id"] : ::Pago::UNSET), order_id: (data.key?("order_id") ? data["order_id"] : ::Pago::UNSET), product_id: (data.key?("product_id") ? data["product_id"] : ::Pago::UNSET), subscription_id: (data.key?("subscription_id") ? data["subscription_id"] : ::Pago::UNSET), amount: (data.key?("amount") ? data["amount"] : ::Pago::UNSET), net_amount: (data.key?("net_amount") ? data["net_amount"] : ::Pago::UNSET), currency: (data.key?("currency") ? data["currency"] : ::Pago::UNSET), presentment_amount: (data.key?("presentment_amount") ? data["presentment_amount"] : ::Pago::UNSET), presentment_currency: (data.key?("presentment_currency") ? data["presentment_currency"] : ::Pago::UNSET), tax_amount: (data.key?("tax_amount") ? data["tax_amount"] : ::Pago::UNSET), tax_state: (data.key?("tax_state") ? data["tax_state"] : ::Pago::UNSET), tax_country: (data.key?("tax_country") ? data["tax_country"] : ::Pago::UNSET), fee: (data.key?("fee") ? data["fee"] : ::Pago::UNSET), exchange_rate: (data.key?("exchange_rate") ? data["exchange_rate"] : ::Pago::UNSET) ), data ) end |