Class: LockstepSdk::InvoiceAddressModel

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/models/invoice_address_model.rb

Overview

Represents a single address for an invoice

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ InvoiceAddressModel

Initialize the InvoiceAddressModel using the provided prototype



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/lockstep_sdk/models/invoice_address_model.rb', line 27

def initialize(params = {})
    @invoice_address_id = params.dig(:invoice_address_id)
    @group_key = params.dig(:group_key)
    @invoice_id = params.dig(:invoice_id)
    @line1 = params.dig(:line1)
    @line2 = params.dig(:line2)
    @line3 = params.dig(:line3)
    @city = params.dig(:city)
    @region = params.dig(:region)
    @postal_code = params.dig(:postal_code)
    @country = params.dig(:country)
    @latitude = params.dig(:latitude)
    @longitude = params.dig(:longitude)
    @created = params.dig(:created)
    @created_user_id = params.dig(:created_user_id)
    @modified = params.dig(:modified)
    @modified_user_id = params.dig(:modified_user_id)
    @app_enrollment_id = params.dig(:app_enrollment_id)
end

Instance Attribute Details

#app_enrollment_idUuid



113
114
115
# File 'lib/lockstep_sdk/models/invoice_address_model.rb', line 113

def app_enrollment_id
  @app_enrollment_id
end

#cityString



73
74
75
# File 'lib/lockstep_sdk/models/invoice_address_model.rb', line 73

def city
  @city
end

#countryString



85
86
87
# File 'lib/lockstep_sdk/models/invoice_address_model.rb', line 85

def country
  @country
end

#createdDate-time



97
98
99
# File 'lib/lockstep_sdk/models/invoice_address_model.rb', line 97

def created
  @created
end

#created_user_idUuid



101
102
103
# File 'lib/lockstep_sdk/models/invoice_address_model.rb', line 101

def created_user_id
  @created_user_id
end

#group_keyUuid



53
54
55
# File 'lib/lockstep_sdk/models/invoice_address_model.rb', line 53

def group_key
  @group_key
end

#invoice_address_idUuid



49
50
51
# File 'lib/lockstep_sdk/models/invoice_address_model.rb', line 49

def invoice_address_id
  @invoice_address_id
end

#invoice_idUuid



57
58
59
# File 'lib/lockstep_sdk/models/invoice_address_model.rb', line 57

def invoice_id
  @invoice_id
end

#latitudeFloat



89
90
91
# File 'lib/lockstep_sdk/models/invoice_address_model.rb', line 89

def latitude
  @latitude
end

#line1String



61
62
63
# File 'lib/lockstep_sdk/models/invoice_address_model.rb', line 61

def line1
  @line1
end

#line2String



65
66
67
# File 'lib/lockstep_sdk/models/invoice_address_model.rb', line 65

def line2
  @line2
end

#line3String



69
70
71
# File 'lib/lockstep_sdk/models/invoice_address_model.rb', line 69

def line3
  @line3
end

#longitudeFloat



93
94
95
# File 'lib/lockstep_sdk/models/invoice_address_model.rb', line 93

def longitude
  @longitude
end

#modifiedDate-time



105
106
107
# File 'lib/lockstep_sdk/models/invoice_address_model.rb', line 105

def modified
  @modified
end

#modified_user_idUuid



109
110
111
# File 'lib/lockstep_sdk/models/invoice_address_model.rb', line 109

def modified_user_id
  @modified_user_id
end

#postal_codeString



81
82
83
# File 'lib/lockstep_sdk/models/invoice_address_model.rb', line 81

def postal_code
  @postal_code
end

#regionString



77
78
79
# File 'lib/lockstep_sdk/models/invoice_address_model.rb', line 77

def region
  @region
end

Instance Method Details

#as_json(options = {}) ⇒ object



117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/lockstep_sdk/models/invoice_address_model.rb', line 117

def as_json(options={})
    {
        'invoiceAddressId' => @invoice_address_id,
        'groupKey' => @group_key,
        'invoiceId' => @invoice_id,
        'line1' => @line1,
        'line2' => @line2,
        'line3' => @line3,
        'city' => @city,
        'region' => @region,
        'postalCode' => @postal_code,
        'country' => @country,
        'latitude' => @latitude,
        'longitude' => @longitude,
        'created' => @created,
        'createdUserId' => @created_user_id,
        'modified' => @modified,
        'modifiedUserId' => @modified_user_id,
        'appEnrollmentId' => @app_enrollment_id,
    }
end

#to_json(*options) ⇒ String



141
142
143
# File 'lib/lockstep_sdk/models/invoice_address_model.rb', line 141

def to_json(*options)
    "[#{as_json(*options).to_json(*options)}]"
end