class TreezorClient::Payin

Attributes

amount[RW]
cart_id[RW]
code_status[RW]
created_date[RW]

Date YYYY-MM-DD HH:MM:SS

created_ip[RW]
creditor_address_line[RW]
creditor_bic[RW]
creditor_country[RW]
creditor_iban[RW]
creditor_name[RW]
currency[RW]
dbtr_iban[RW]
distributor_fee[RW]
forward_url[RW]
iban_bic[RW]
iban_fullname[RW]
iban_id[RW]
iban_tx_end_to_end_id[RW]
iban_tx_id[RW]
information_status[RW]
mandate_id[RW]
message_to_user[RW]
payin_date[RW]

Date YYYY-MM-DD

payin_id[RW]
payin_status[RW]
payin_tag[RW]
payment_accepted_url[RW]
payment_canceled_url[RW]
payment_exception_url[RW]
payment_html[RW]
payment_language[RW]
payment_method_id[RW]
payment_post_data_url[RW]
payment_post_url[RW]
payment_refused_url[RW]
payment_waiting_url[RW]
refund_amount[RW]
subtotal_items[RW]
subtotal_services[RW]
subtotal_tax[RW]
total_rows[RW]
user_firstname[RW]
user_id[RW]
user_lastname[RW]
virtual_iban_id[RW]
virtual_iban_reference[RW]
wallet_alias[RW]
wallet_event_name[RW]
wallet_id[RW]

Public Class Methods

attribute_map() click to toggle source

Attribute mapping from ruby-style variable name to JSON key.

# File lib/treezor_client/models/payin.rb, line 140
def self.attribute_map
  {
    :'payin_id' => :'payinId',
    :'payin_tag' => :'payinTag',
    :'payin_status' => :'payinStatus',
    :'code_status' => :'codeStatus',
    :'information_status' => :'informationStatus',
    :'wallet_id' => :'walletId',
    :'user_id' => :'userId',
    :'cart_id' => :'cartId',
    :'wallet_event_name' => :'walletEventName',
    :'wallet_alias' => :'walletAlias',
    :'user_firstname' => :'userFirstname',
    :'user_lastname' => :'userLastname',
    :'message_to_user' => :'messageToUser',
    :'payment_method_id' => :'paymentMethodId',
    :'subtotal_items' => :'subtotalItems',
    :'subtotal_services' => :'subtotalServices',
    :'subtotal_tax' => :'subtotalTax',
    :'amount' => :'amount',
    :'currency' => :'currency',
    :'distributor_fee' => :'distributorFee',
    :'created_date' => :'createdDate',
    :'created_ip' => :'createdIp',
    :'payment_html' => :'paymentHtml',
    :'payment_language' => :'paymentLanguage',
    :'payment_post_url' => :'paymentPostUrl',
    :'payment_post_data_url' => :'paymentPostDataUrl',
    :'payment_accepted_url' => :'paymentAcceptedUrl',
    :'payment_waiting_url' => :'paymentWaitingUrl',
    :'payment_refused_url' => :'paymentRefusedUrl',
    :'payment_canceled_url' => :'paymentCanceledUrl',
    :'payment_exception_url' => :'paymentExceptionUrl',
    :'iban_fullname' => :'ibanFullname',
    :'iban_id' => :'ibanId',
    :'iban_bic' => :'ibanBic',
    :'iban_tx_end_to_end_id' => :'ibanTxEndToEndId',
    :'iban_tx_id' => :'ibanTxId',
    :'refund_amount' => :'refundAmount',
    :'total_rows' => :'totalRows',
    :'forward_url' => :'forwardUrl',
    :'payin_date' => :'payinDate',
    :'mandate_id' => :'mandateId',
    :'creditor_name' => :'creditorName',
    :'creditor_address_line' => :'creditorAddressLine',
    :'creditor_country' => :'creditorCountry',
    :'creditor_iban' => :'creditorIban',
    :'creditor_bic' => :'creditorBIC',
    :'virtual_iban_id' => :'virtualIbanId',
    :'virtual_iban_reference' => :'virtualIbanReference',
    :'dbtr_iban' => :'DbtrIBAN'
  }
end
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

# File lib/treezor_client/models/payin.rb, line 251
def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'payinId')
    self.payin_id = attributes[:'payinId']
  end

  if attributes.has_key?(:'payinTag')
    self.payin_tag = attributes[:'payinTag']
  end

  if attributes.has_key?(:'payinStatus')
    self.payin_status = attributes[:'payinStatus']
  end

  if attributes.has_key?(:'codeStatus')
    self.code_status = attributes[:'codeStatus']
  end

  if attributes.has_key?(:'informationStatus')
    self.information_status = attributes[:'informationStatus']
  end

  if attributes.has_key?(:'walletId')
    self.wallet_id = attributes[:'walletId']
  end

  if attributes.has_key?(:'userId')
    self.user_id = attributes[:'userId']
  end

  if attributes.has_key?(:'cartId')
    self.cart_id = attributes[:'cartId']
  end

  if attributes.has_key?(:'walletEventName')
    self.wallet_event_name = attributes[:'walletEventName']
  end

  if attributes.has_key?(:'walletAlias')
    self.wallet_alias = attributes[:'walletAlias']
  end

  if attributes.has_key?(:'userFirstname')
    self.user_firstname = attributes[:'userFirstname']
  end

  if attributes.has_key?(:'userLastname')
    self.user_lastname = attributes[:'userLastname']
  end

  if attributes.has_key?(:'messageToUser')
    self.message_to_user = attributes[:'messageToUser']
  end

  if attributes.has_key?(:'paymentMethodId')
    self.payment_method_id = attributes[:'paymentMethodId']
  end

  if attributes.has_key?(:'subtotalItems')
    self.subtotal_items = attributes[:'subtotalItems']
  end

  if attributes.has_key?(:'subtotalServices')
    self.subtotal_services = attributes[:'subtotalServices']
  end

  if attributes.has_key?(:'subtotalTax')
    self.subtotal_tax = attributes[:'subtotalTax']
  end

  if attributes.has_key?(:'amount')
    self.amount = attributes[:'amount']
  end

  if attributes.has_key?(:'currency')
    self.currency = attributes[:'currency']
  end

  if attributes.has_key?(:'distributorFee')
    self.distributor_fee = attributes[:'distributorFee']
  end

  if attributes.has_key?(:'createdDate')
    self.created_date = attributes[:'createdDate']
  end

  if attributes.has_key?(:'createdIp')
    self.created_ip = attributes[:'createdIp']
  end

  if attributes.has_key?(:'paymentHtml')
    self.payment_html = attributes[:'paymentHtml']
  end

  if attributes.has_key?(:'paymentLanguage')
    self.payment_language = attributes[:'paymentLanguage']
  end

  if attributes.has_key?(:'paymentPostUrl')
    self.payment_post_url = attributes[:'paymentPostUrl']
  end

  if attributes.has_key?(:'paymentPostDataUrl')
    self.payment_post_data_url = attributes[:'paymentPostDataUrl']
  end

  if attributes.has_key?(:'paymentAcceptedUrl')
    self.payment_accepted_url = attributes[:'paymentAcceptedUrl']
  end

  if attributes.has_key?(:'paymentWaitingUrl')
    self.payment_waiting_url = attributes[:'paymentWaitingUrl']
  end

  if attributes.has_key?(:'paymentRefusedUrl')
    self.payment_refused_url = attributes[:'paymentRefusedUrl']
  end

  if attributes.has_key?(:'paymentCanceledUrl')
    self.payment_canceled_url = attributes[:'paymentCanceledUrl']
  end

  if attributes.has_key?(:'paymentExceptionUrl')
    self.payment_exception_url = attributes[:'paymentExceptionUrl']
  end

  if attributes.has_key?(:'ibanFullname')
    self.iban_fullname = attributes[:'ibanFullname']
  end

  if attributes.has_key?(:'ibanId')
    self.iban_id = attributes[:'ibanId']
  end

  if attributes.has_key?(:'ibanBic')
    self.iban_bic = attributes[:'ibanBic']
  end

  if attributes.has_key?(:'ibanTxEndToEndId')
    self.iban_tx_end_to_end_id = attributes[:'ibanTxEndToEndId']
  end

  if attributes.has_key?(:'ibanTxId')
    self.iban_tx_id = attributes[:'ibanTxId']
  end

  if attributes.has_key?(:'refundAmount')
    self.refund_amount = attributes[:'refundAmount']
  end

  if attributes.has_key?(:'totalRows')
    self.total_rows = attributes[:'totalRows']
  end

  if attributes.has_key?(:'forwardUrl')
    self.forward_url = attributes[:'forwardUrl']
  end

  if attributes.has_key?(:'payinDate')
    self.payin_date = attributes[:'payinDate']
  end

  if attributes.has_key?(:'mandateId')
    self.mandate_id = attributes[:'mandateId']
  end

  if attributes.has_key?(:'creditorName')
    self.creditor_name = attributes[:'creditorName']
  end

  if attributes.has_key?(:'creditorAddressLine')
    self.creditor_address_line = attributes[:'creditorAddressLine']
  end

  if attributes.has_key?(:'creditorCountry')
    self.creditor_country = attributes[:'creditorCountry']
  end

  if attributes.has_key?(:'creditorIban')
    self.creditor_iban = attributes[:'creditorIban']
  end

  if attributes.has_key?(:'creditorBIC')
    self.creditor_bic = attributes[:'creditorBIC']
  end

  if attributes.has_key?(:'virtualIbanId')
    self.virtual_iban_id = attributes[:'virtualIbanId']
  end

  if attributes.has_key?(:'virtualIbanReference')
    self.virtual_iban_reference = attributes[:'virtualIbanReference']
  end

  if attributes.has_key?(:'DbtrIBAN')
    self.dbtr_iban = attributes[:'DbtrIBAN']
  end
end
swagger_types() click to toggle source

Attribute type mapping.

# File lib/treezor_client/models/payin.rb, line 195
def self.swagger_types
  {
    :'payin_id' => :'Integer',
    :'payin_tag' => :'String',
    :'payin_status' => :'String',
    :'code_status' => :'Integer',
    :'information_status' => :'String',
    :'wallet_id' => :'Integer',
    :'user_id' => :'Integer',
    :'cart_id' => :'Integer',
    :'wallet_event_name' => :'String',
    :'wallet_alias' => :'String',
    :'user_firstname' => :'String',
    :'user_lastname' => :'String',
    :'message_to_user' => :'String',
    :'payment_method_id' => :'Integer',
    :'subtotal_items' => :'String',
    :'subtotal_services' => :'String',
    :'subtotal_tax' => :'String',
    :'amount' => :'String',
    :'currency' => :'String',
    :'distributor_fee' => :'String',
    :'created_date' => :'String',
    :'created_ip' => :'String',
    :'payment_html' => :'String',
    :'payment_language' => :'String',
    :'payment_post_url' => :'String',
    :'payment_post_data_url' => :'String',
    :'payment_accepted_url' => :'String',
    :'payment_waiting_url' => :'String',
    :'payment_refused_url' => :'String',
    :'payment_canceled_url' => :'String',
    :'payment_exception_url' => :'String',
    :'iban_fullname' => :'String',
    :'iban_id' => :'String',
    :'iban_bic' => :'String',
    :'iban_tx_end_to_end_id' => :'String',
    :'iban_tx_id' => :'String',
    :'refund_amount' => :'String',
    :'total_rows' => :'Integer',
    :'forward_url' => :'String',
    :'payin_date' => :'String',
    :'mandate_id' => :'Integer',
    :'creditor_name' => :'String',
    :'creditor_address_line' => :'String',
    :'creditor_country' => :'String',
    :'creditor_iban' => :'String',
    :'creditor_bic' => :'String',
    :'virtual_iban_id' => :'Integer',
    :'virtual_iban_reference' => :'String',
    :'dbtr_iban' => :'String'
  }
end

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# File lib/treezor_client/models/payin.rb, line 481
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      payin_id == o.payin_id &&
      payin_tag == o.payin_tag &&
      payin_status == o.payin_status &&
      code_status == o.code_status &&
      information_status == o.information_status &&
      wallet_id == o.wallet_id &&
      user_id == o.user_id &&
      cart_id == o.cart_id &&
      wallet_event_name == o.wallet_event_name &&
      wallet_alias == o.wallet_alias &&
      user_firstname == o.user_firstname &&
      user_lastname == o.user_lastname &&
      message_to_user == o.message_to_user &&
      payment_method_id == o.payment_method_id &&
      subtotal_items == o.subtotal_items &&
      subtotal_services == o.subtotal_services &&
      subtotal_tax == o.subtotal_tax &&
      amount == o.amount &&
      currency == o.currency &&
      distributor_fee == o.distributor_fee &&
      created_date == o.created_date &&
      created_ip == o.created_ip &&
      payment_html == o.payment_html &&
      payment_language == o.payment_language &&
      payment_post_url == o.payment_post_url &&
      payment_post_data_url == o.payment_post_data_url &&
      payment_accepted_url == o.payment_accepted_url &&
      payment_waiting_url == o.payment_waiting_url &&
      payment_refused_url == o.payment_refused_url &&
      payment_canceled_url == o.payment_canceled_url &&
      payment_exception_url == o.payment_exception_url &&
      iban_fullname == o.iban_fullname &&
      iban_id == o.iban_id &&
      iban_bic == o.iban_bic &&
      iban_tx_end_to_end_id == o.iban_tx_end_to_end_id &&
      iban_tx_id == o.iban_tx_id &&
      refund_amount == o.refund_amount &&
      total_rows == o.total_rows &&
      forward_url == o.forward_url &&
      payin_date == o.payin_date &&
      mandate_id == o.mandate_id &&
      creditor_name == o.creditor_name &&
      creditor_address_line == o.creditor_address_line &&
      creditor_country == o.creditor_country &&
      creditor_iban == o.creditor_iban &&
      creditor_bic == o.creditor_bic &&
      virtual_iban_id == o.virtual_iban_id &&
      virtual_iban_reference == o.virtual_iban_reference &&
      dbtr_iban == o.dbtr_iban
end
_deserialize(type, value) click to toggle source

Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data

# File lib/treezor_client/models/payin.rb, line 571
def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = TreezorClient.const_get(type).new
    temp_model.build_from_hash(value)
  end
end
_to_hash(value) click to toggle source

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash

# File lib/treezor_client/models/payin.rb, line 637
def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end
build_from_hash(attributes) click to toggle source

Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself

# File lib/treezor_client/models/payin.rb, line 550
def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end
eql?(o) click to toggle source

@see the `==` method @param [Object] Object to be compared

# File lib/treezor_client/models/payin.rb, line 537
def eql?(o)
  self == o
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Fixnum] Hash code

# File lib/treezor_client/models/payin.rb, line 543
def hash
  [payin_id, payin_tag, payin_status, code_status, information_status, wallet_id, user_id, cart_id, wallet_event_name, wallet_alias, user_firstname, user_lastname, message_to_user, payment_method_id, subtotal_items, subtotal_services, subtotal_tax, amount, currency, distributor_fee, created_date, created_ip, payment_html, payment_language, payment_post_url, payment_post_data_url, payment_accepted_url, payment_waiting_url, payment_refused_url, payment_canceled_url, payment_exception_url, iban_fullname, iban_id, iban_bic, iban_tx_end_to_end_id, iban_tx_id, refund_amount, total_rows, forward_url, payin_date, mandate_id, creditor_name, creditor_address_line, creditor_country, creditor_iban, creditor_bic, virtual_iban_id, virtual_iban_reference, dbtr_iban].hash
end
list_invalid_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

# File lib/treezor_client/models/payin.rb, line 456
def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end
payin_status=(payin_status) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] payin_status Object to be assigned

# File lib/treezor_client/models/payin.rb, line 471
def payin_status=(payin_status)
  validator = EnumAttributeValidator.new('String', ['PENDING', 'CANCELED', 'CANCELLED', 'VALIDATED'])
  unless validator.valid?(payin_status)
    fail ArgumentError, 'invalid value for "payin_status", must be one of #{validator.allowable_values}.'
  end
  @payin_status = payin_status
end
to_body() click to toggle source

to_body is an alias to to_hash (backward compatibility) @return [Hash] Returns the object in the form of hash

# File lib/treezor_client/models/payin.rb, line 617
def to_body
  to_hash
end
to_hash() click to toggle source

Returns the object in the form of hash @return [Hash] Returns the object in the form of hash

# File lib/treezor_client/models/payin.rb, line 623
def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end
to_s() click to toggle source

Returns the string representation of the object @return [String] String presentation of the object

# File lib/treezor_client/models/payin.rb, line 611
def to_s
  to_hash.to_s
end
valid?() click to toggle source

Check to see if the all the properties in the model are valid @return true if the model is valid

# File lib/treezor_client/models/payin.rb, line 463
def valid?
  payin_status_validator = EnumAttributeValidator.new('String', ['PENDING', 'CANCELED', 'CANCELLED', 'VALIDATED'])
  return false unless payin_status_validator.valid?(@payin_status)
  true
end