Method: PaypalServerSdk::SellerProtection.from_hash
- Defined in:
- lib/paypal_server_sdk/models/seller_protection.rb
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/paypal_server_sdk/models/seller_protection.rb', line 52 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. status = hash.key?('status') ? hash['status'] : SKIP dispute_categories = hash.key?('dispute_categories') ? hash['dispute_categories'] : SKIP # Create object from extracted values. SellerProtection.new(status: status, dispute_categories: dispute_categories) end |