Method: ProcessOut::CardInformation#fill_with_data
- Defined in:
- lib/processout/card_information.rb
#fill_with_data(data) ⇒ Object
Fills the object with data coming from the API Params:
data-
Hashof data coming from the API
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/processout/card_information.rb', line 87 def fill_with_data(data) if data.nil? return self end if data.include? "iin" self.iin = data["iin"] end if data.include? "scheme" self.scheme = data["scheme"] end if data.include? "type" self.type = data["type"] end if data.include? "bank_name" self.bank_name = data["bank_name"] end if data.include? "brand" self.brand = data["brand"] end if data.include? "category" self.category = data["category"] end if data.include? "country" self.country = data["country"] end self end |