Class: Gusto::ContractorPaymentReceiptLicensee

Inherits:
Object
  • Object
show all
Defined in:
lib/fern_gusto/types/contractor_payment_receipt_licensee.rb

Overview

The licensed payroll processor

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name: OMIT, address: OMIT, city: OMIT, state: OMIT, postal_code: OMIT, phone_number: OMIT, additional_properties: nil) ⇒ Gusto::ContractorPaymentReceiptLicensee

Parameters:

  • name (String) (defaults to: OMIT)

    Always the fixed string “Gusto, Zenpayroll Inc.”

  • address (String) (defaults to: OMIT)

    Always the fixed string “525 20th St”

  • city (String) (defaults to: OMIT)

    Always the fixed string “San Francisco”

  • state (String) (defaults to: OMIT)

    Always the fixed string “CA”

  • postal_code (String) (defaults to: OMIT)

    Always the fixed string “94107”

  • phone_number (String) (defaults to: OMIT)

    Always the fixed string “4157778888”

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 36

def initialize(name: OMIT, address: OMIT, city: OMIT, state: OMIT, postal_code: OMIT, phone_number: OMIT, additional_properties: nil)
  @name = name if name != OMIT
  @address = address if address != OMIT
  @city = city if city != OMIT
  @state = state if state != OMIT
  @postal_code = postal_code if postal_code != OMIT
  @phone_number = phone_number if phone_number != OMIT
  @additional_properties = additional_properties
  @_field_set = { "name": name, "address": address, "city": city, "state": state, "postal_code": postal_code, "phone_number": phone_number }.reject do | _k, v |
  v == OMIT
end
end

Instance Attribute Details

#additional_propertiesOpenStruct (readonly)

Returns Additional properties unmapped to the current class definition.

Returns:

  • (OpenStruct)

    Additional properties unmapped to the current class definition



21
22
23
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 21

def additional_properties
  @additional_properties
end

#addressString (readonly)

Returns Always the fixed string “525 20th St”.

Returns:

  • (String)

    Always the fixed string “525 20th St”



11
12
13
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 11

def address
  @address
end

#cityString (readonly)

Returns Always the fixed string “San Francisco”.

Returns:

  • (String)

    Always the fixed string “San Francisco”



13
14
15
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 13

def city
  @city
end

#nameString (readonly)

Returns Always the fixed string “Gusto, Zenpayroll Inc.”.

Returns:

  • (String)

    Always the fixed string “Gusto, Zenpayroll Inc.”



9
10
11
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 9

def name
  @name
end

#phone_numberString (readonly)

Returns Always the fixed string “4157778888”.

Returns:

  • (String)

    Always the fixed string “4157778888”



19
20
21
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 19

def phone_number
  @phone_number
end

#postal_codeString (readonly)

Returns Always the fixed string “94107”.

Returns:

  • (String)

    Always the fixed string “94107”



17
18
19
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 17

def postal_code
  @postal_code
end

#stateString (readonly)

Returns Always the fixed string “CA”.

Returns:

  • (String)

    Always the fixed string “CA”



15
16
17
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 15

def state
  @state
end

Class Method Details

.from_json(json_object:) ⇒ Gusto::ContractorPaymentReceiptLicensee

Parameters:

  • json_object (String)

Returns:



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 52

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  name = parsed_json["name"]
  address = parsed_json["address"]
  city = parsed_json["city"]
  state = parsed_json["state"]
  postal_code = parsed_json["postal_code"]
  phone_number = parsed_json["phone_number"]
  new(
    name: name,
    address: address,
    city: city,
    state: state,
    postal_code: postal_code,
    phone_number: phone_number,
    additional_properties: struct
  )
end

.validate_raw(obj:) ⇒ Void

Parameters:

  • obj (Object)

Returns:

  • (Void)


83
84
85
86
87
88
89
90
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 83

def self.validate_raw(obj:)
  obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
  obj.address&.is_a?(String) != false || raise("Passed value for field obj.address is not the expected type, validation failed.")
  obj.city&.is_a?(String) != false || raise("Passed value for field obj.city is not the expected type, validation failed.")
  obj.state&.is_a?(String) != false || raise("Passed value for field obj.state is not the expected type, validation failed.")
  obj.postal_code&.is_a?(String) != false || raise("Passed value for field obj.postal_code is not the expected type, validation failed.")
  obj.phone_number&.is_a?(String) != false || raise("Passed value for field obj.phone_number is not the expected type, validation failed.")
end

Instance Method Details

#to_jsonString

Returns:

  • (String)


74
75
76
# File 'lib/fern_gusto/types/contractor_payment_receipt_licensee.rb', line 74

def to_json
  @_field_set&.to_json
end