Class: Pago::V2026_04::Models::BalanceDisputeMetadata

Inherits:
Model
  • Object
show all
Defined in:
lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs

Constant Summary collapse

JSON_KEYS =

Returns:

  • (Hash[Symbol, String])
{
  transaction_id: "transaction_id",
  dispute_id: "dispute_id",
  order_id: "order_id",
  order_created_at: "order_created_at",
  product_id: "product_id",
  subscription_id: "subscription_id",
  amount: "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 =

Returns:

  • (Array[String])
["transaction_id", "dispute_id", "amount", "currency", "presentment_amount", "presentment_currency", "tax_amount", "fee"].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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:, dispute_id:, order_id: ::Pago::UNSET, order_created_at: ::Pago::UNSET, product_id: ::Pago::UNSET, subscription_id: ::Pago::UNSET, amount:, currency:, presentment_amount:, presentment_currency:, tax_amount:, tax_state: ::Pago::UNSET, tax_country: ::Pago::UNSET, fee:, exchange_rate: ::Pago::UNSET) ⇒ BalanceDisputeMetadata

Returns a new instance of BalanceDisputeMetadata.

Parameters:

  • transaction_id: (String)
  • dispute_id: (String)
  • order_id: (String, nil) (defaults to: ::Pago::UNSET)
  • order_created_at: (String, nil) (defaults to: ::Pago::UNSET)
  • product_id: (String, nil) (defaults to: ::Pago::UNSET)
  • subscription_id: (String, nil) (defaults to: ::Pago::UNSET)
  • amount: (Integer)
  • currency: (String)
  • presentment_amount: (Integer)
  • presentment_currency: (String)
  • tax_amount: (Integer)
  • tax_state: (String, nil) (defaults to: ::Pago::UNSET)
  • tax_country: (String, nil) (defaults to: ::Pago::UNSET)
  • fee: (Integer)
  • exchange_rate: (Float, nil) (defaults to: ::Pago::UNSET)


1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
# File 'lib/pago/v2026_04/models.rb', line 1101

def initialize(
  transaction_id:,
  dispute_id:,
  order_id: ::Pago::UNSET,
  order_created_at: ::Pago::UNSET,
  product_id: ::Pago::UNSET,
  subscription_id: ::Pago::UNSET,
  amount:,
  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(:dispute_id, dispute_id)
  assign(:order_id, order_id)
  assign(:order_created_at, order_created_at)
  assign(:product_id, product_id)
  assign(:subscription_id, subscription_id)
  assign(:amount, 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

#amountInteger (readonly)

Returns:

  • (Integer)


1075
1076
1077
# File 'lib/pago/v2026_04/models.rb', line 1075

def amount
  @amount
end

#currencyString (readonly)

Returns:

  • (String)


1078
1079
1080
# File 'lib/pago/v2026_04/models.rb', line 1078

def currency
  @currency
end

#dispute_idString (readonly)

Returns:

  • (String)


1060
1061
1062
# File 'lib/pago/v2026_04/models.rb', line 1060

def dispute_id
  @dispute_id
end

#exchange_rateFloat (readonly)

Returns:

  • (Float)


1099
1100
1101
# File 'lib/pago/v2026_04/models.rb', line 1099

def exchange_rate
  @exchange_rate
end

#feeInteger (readonly)

Returns:

  • (Integer)


1096
1097
1098
# File 'lib/pago/v2026_04/models.rb', line 1096

def fee
  @fee
end

#order_created_atString (readonly)

Returns:

  • (String)


1066
1067
1068
# File 'lib/pago/v2026_04/models.rb', line 1066

def order_created_at
  @order_created_at
end

#order_idString (readonly)

Returns:

  • (String)


1063
1064
1065
# File 'lib/pago/v2026_04/models.rb', line 1063

def order_id
  @order_id
end

#presentment_amountInteger (readonly)

Returns:

  • (Integer)


1081
1082
1083
# File 'lib/pago/v2026_04/models.rb', line 1081

def presentment_amount
  @presentment_amount
end

#presentment_currencyString (readonly)

Returns:

  • (String)


1084
1085
1086
# File 'lib/pago/v2026_04/models.rb', line 1084

def presentment_currency
  @presentment_currency
end

#product_idString (readonly)

Returns:

  • (String)


1069
1070
1071
# File 'lib/pago/v2026_04/models.rb', line 1069

def product_id
  @product_id
end

#subscription_idString (readonly)

Returns:

  • (String)


1072
1073
1074
# File 'lib/pago/v2026_04/models.rb', line 1072

def subscription_id
  @subscription_id
end

#tax_amountInteger (readonly)

Returns:

  • (Integer)


1087
1088
1089
# File 'lib/pago/v2026_04/models.rb', line 1087

def tax_amount
  @tax_amount
end

#tax_countryString? (readonly)

Returns:

  • (String, nil)


1093
1094
1095
# File 'lib/pago/v2026_04/models.rb', line 1093

def tax_country
  @tax_country
end

#tax_stateString? (readonly)

Returns:

  • (String, nil)


1090
1091
1092
# File 'lib/pago/v2026_04/models.rb', line 1090

def tax_state
  @tax_state
end

#transaction_idString (readonly)

Returns:

  • (String)


1057
1058
1059
# File 'lib/pago/v2026_04/models.rb', line 1057

def transaction_id
  @transaction_id
end

Class Method Details

.from_json(data) ⇒ BalanceDisputeMetadata?

Parameters:

  • data (Hash, String, nil)

Returns:



1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
# File 'lib/pago/v2026_04/models.rb', line 1138

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),
      dispute_id: (data.key?("dispute_id") ? data["dispute_id"] : ::Pago::UNSET),
      order_id: (data.key?("order_id") ? data["order_id"] : ::Pago::UNSET),
      order_created_at: (data.key?("order_created_at") ? data["order_created_at"] : ::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),
      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