Class: GustoEmbedded::Models::Shared::ContractorPaymentBody

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/gusto_embedded/models/shared/contractor_payment_body.rb

Overview

Request body for creating a contractor payment.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(contractor_uuid:, date:, wage: nil, hours: nil, bonus: nil, reimbursement: nil, payment_method: Models::Shared::ContractorPaymentBodyPaymentMethod::DIRECT_DEPOSIT) ⇒ ContractorPaymentBody

Returns a new instance of ContractorPaymentBody.



31
32
33
34
35
36
37
38
39
# File 'lib/gusto_embedded/models/shared/contractor_payment_body.rb', line 31

def initialize(contractor_uuid:, date:, wage: nil, hours: nil, bonus: nil, reimbursement: nil, payment_method: Models::Shared::ContractorPaymentBodyPaymentMethod::DIRECT_DEPOSIT)
  @contractor_uuid = contractor_uuid
  @date = date
  @wage = wage
  @hours = hours
  @bonus = bonus
  @reimbursement = reimbursement
  @payment_method = payment_method
end

Instance Method Details

#==(other) ⇒ Object



42
43
44
45
46
47
48
49
50
51
52
# File 'lib/gusto_embedded/models/shared/contractor_payment_body.rb', line 42

def ==(other)
  return false unless other.is_a? self.class
  return false unless @contractor_uuid == other.contractor_uuid
  return false unless @date == other.date
  return false unless @wage == other.wage
  return false unless @hours == other.hours
  return false unless @bonus == other.bonus
  return false unless @reimbursement == other.reimbursement
  return false unless @payment_method == other.payment_method
  true
end