class Paycargo::Collection
Attributes
data[R]
Public Class Methods
from_response(response, type:)
click to toggle source
# File lib/paycargo/collection.rb, line 5 def self.from_response(response, type:) body = response.body new( data: body["data"].map{ |attrs| type.new(attrs) } ) end
new(data:)
click to toggle source
# File lib/paycargo/collection.rb, line 12 def initialize(data:) @data = data end