class Afterpay::ShippingCourier
Attributes
name[RW]
priority[RW]
shipped_at[RW]
tracking[RW]
Public Class Methods
from_response(response)
click to toggle source
Builds ShippingCourier
from response
# File lib/afterpay/shipping_courier.rb, line 15 def self.from_response(response) return nil if response.nil? new( shipped_at: response[:shippedAt], name: response[:name], tracking: response[:tracking], priority: response[:priority], error: Error.new(response) ) end
new(attributes = {})
click to toggle source
# File lib/afterpay/shipping_courier.rb, line 7 def initialize(attributes = {}) @shipped_at = attributes[:shipped_at] || "" @name = attributes[:name] || "" @tracking = attributes[:tracking] || "" @priority = attributes[:priority] || "" end