Class: Orb::Models::ChangedSubscriptionResources::CreatedInvoice
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Orb::Models::ChangedSubscriptionResources::CreatedInvoice
- Defined in:
- lib/orb/models/changed_subscription_resources.rb,
sig/orb/models/changed_subscription_resources.rbs
Defined Under Namespace
Modules: InvoiceSource, Status Classes: AutoCollection, CreditNote, CustomerBalanceTransaction, LineItem, PaymentAttempt
Instance Attribute Summary collapse
-
#amount_due ⇒ String
This is the final amount required to be charged to the customer and reflects the application of the customer balance to the
totalof the invoice. - #auto_collection ⇒ Orb::Models::ChangedSubscriptionResources::CreatedInvoice::AutoCollection
- #billing_address ⇒ Orb::Models::Address?
-
#created_at ⇒ Time
The creation time of the resource in Orb.
-
#credit_notes ⇒ Array<Orb::Models::ChangedSubscriptionResources::CreatedInvoice::CreditNote>
A list of credit notes associated with the invoice.
-
#currency ⇒ String
An ISO 4217 currency string or
credits. - #customer ⇒ Orb::Models::CustomerMinified
- #customer_balance_transactions ⇒ Array<Orb::Models::ChangedSubscriptionResources::CreatedInvoice::CustomerBalanceTransaction>
-
#customer_tax_id ⇒ Orb::Models::CustomerTaxID?
Tax IDs are commonly required to be displayed on customer invoices, which are added to the headers of invoices.
- #discount ⇒ Object deprecated Deprecated.
- #discounts ⇒ Array<Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount, Orb::Models::InvoiceLevelDiscount::TieredPercentage>
-
#due_date ⇒ Time?
When the invoice payment is due.
-
#eligible_to_issue_at ⇒ Time?
If the invoice has a status of
draft, this will be the time that the invoice will be eligible to be issued, otherwise it will benull. -
#hosted_invoice_url ⇒ String?
A URL for the customer-facing invoice portal.
- #id ⇒ String
-
#invoice_date ⇒ Time
The scheduled date of the invoice.
-
#invoice_number ⇒ String
Automatically generated invoice number to help track and reconcile invoices.
-
#invoice_pdf ⇒ String?
The link to download the PDF representation of the
Invoice. - #invoice_source ⇒ Symbol, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::InvoiceSource
-
#is_payable_now ⇒ Boolean
True if the invoice has only in-advance fixed fees and is payable now.
-
#issue_failed_at ⇒ Time?
If the invoice failed to issue, this will be the last time it failed to issue (even if it is now in a different state.).
-
#issued_at ⇒ Time?
If the invoice has been issued, this will be the time it transitioned to
issued(even if it is now in a different state.). -
#line_items ⇒ Array<Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem>
The breakdown of prices in this invoice.
- #maximum ⇒ Orb::Models::Maximum?
- #maximum_amount ⇒ String?
-
#memo ⇒ String?
Free-form text which is available on the invoice PDF and the Orb invoice portal.
-
#metadata ⇒ Hash{Symbol=>String}
User specified key-value pairs for the resource.
- #minimum ⇒ Orb::Models::Minimum?
- #minimum_amount ⇒ String?
-
#paid_at ⇒ Time?
If the invoice has a status of
paid, this gives a timestamp when the invoice was paid. -
#payment_attempts ⇒ Array<Orb::Models::ChangedSubscriptionResources::CreatedInvoice::PaymentAttempt>
A list of payment attempts associated with the invoice.
-
#payment_failed_at ⇒ Time?
If payment was attempted on this invoice but failed, this will be the time of the most recent attempt.
-
#payment_started_at ⇒ Time?
If payment was attempted on this invoice, this will be the start time of the most recent attempt.
-
#scheduled_issue_at ⇒ Time?
If the invoice is in draft, this timestamp will reflect when the invoice is scheduled to be issued.
- #shipping_address ⇒ Orb::Models::Address?
- #status ⇒ Symbol, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::Status
- #subscription ⇒ Orb::Models::SubscriptionMinified?
-
#subtotal ⇒ String
The total before any discounts and minimums are applied.
-
#sync_failed_at ⇒ Time?
If the invoice failed to sync, this will be the last time an external invoicing provider sync was attempted.
-
#total ⇒ String
The total after any minimums and discounts have been applied.
-
#voided_at ⇒ Time?
If the invoice has a status of
void, this gives a timestamp when the invoice was voided. -
#will_auto_issue ⇒ Boolean
This is true if the invoice will be automatically issued in the future, and false otherwise.
Class Method Summary collapse
- .values ⇒ Array<Symbol>
- .variants ⇒ Array(Orb::Models::MatrixSubLineItem, Orb::Models::TierSubLineItem, Orb::Models::OtherSubLineItem)
Instance Method Summary collapse
-
#initialize(id:, credit_note_number:, memo:, reason:, total:, type:, voided_at:) ⇒ Object
constructor
Some parameter documentations has been truncated, see CreditNote for more details.
- #to_hash ⇒ {
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(id:, credit_note_number:, memo:, reason:, total:, type:, voided_at:) ⇒ Object
Some parameter documentations has been truncated, see CreditNote for more details.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 40 class CreatedInvoice < Orb::Internal::Type::BaseModel # @!attribute id # # @return [String] required :id, String # @!attribute amount_due # This is the final amount required to be charged to the customer and reflects the # application of the customer balance to the `total` of the invoice. # # @return [String] required :amount_due, String # @!attribute auto_collection # # @return [Orb::Models::ChangedSubscriptionResources::CreatedInvoice::AutoCollection] required :auto_collection, -> { Orb::ChangedSubscriptionResources::CreatedInvoice::AutoCollection } # @!attribute billing_address # # @return [Orb::Models::Address, nil] required :billing_address, -> { Orb::Address }, nil?: true # @!attribute created_at # The creation time of the resource in Orb. # # @return [Time] required :created_at, Time # @!attribute credit_notes # A list of credit notes associated with the invoice # # @return [Array<Orb::Models::ChangedSubscriptionResources::CreatedInvoice::CreditNote>] required :credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::ChangedSubscriptionResources::CreatedInvoice::CreditNote] } # @!attribute currency # An ISO 4217 currency string or `credits` # # @return [String] required :currency, String # @!attribute customer # # @return [Orb::Models::CustomerMinified] required :customer, -> { Orb::CustomerMinified } # @!attribute customer_balance_transactions # # @return [Array<Orb::Models::ChangedSubscriptionResources::CreatedInvoice::CustomerBalanceTransaction>] required :customer_balance_transactions, -> { Orb::Internal::Type::ArrayOf[Orb::ChangedSubscriptionResources::CreatedInvoice::CustomerBalanceTransaction] } # @!attribute customer_tax_id # Tax IDs are commonly required to be displayed on customer invoices, which are # added to the headers of invoices. # # ### Supported Tax ID Countries and Types # # | Country | Type | Description | # | ---------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | # | Albania | `al_tin` | Albania Tax Identification Number | # | Andorra | `ad_nrt` | Andorran NRT Number | # | Angola | `ao_tin` | Angola Tax Identification Number | # | Argentina | `ar_cuit` | Argentinian Tax ID Number | # | Armenia | `am_tin` | Armenia Tax Identification Number | # | Aruba | `aw_tin` | Aruba Tax Identification Number | # | Australia | `au_abn` | Australian Business Number (AU ABN) | # | Australia | `au_arn` | Australian Taxation Office Reference Number | # | Austria | `eu_vat` | European VAT Number | # | Azerbaijan | `az_tin` | Azerbaijan Tax Identification Number | # | Bahamas | `bs_tin` | Bahamas Tax Identification Number | # | Bahrain | `bh_vat` | Bahraini VAT Number | # | Bangladesh | `bd_bin` | Bangladesh Business Identification Number | # | Barbados | `bb_tin` | Barbados Tax Identification Number | # | Belarus | `by_tin` | Belarus TIN Number | # | Belgium | `eu_vat` | European VAT Number | # | Benin | `bj_ifu` | Benin Tax Identification Number (Identifiant Fiscal Unique) | # | Bolivia | `bo_tin` | Bolivian Tax ID | # | Bosnia and Herzegovina | `ba_tin` | Bosnia and Herzegovina Tax Identification Number | # | Brazil | `br_cnpj` | Brazilian CNPJ Number | # | Brazil | `br_cpf` | Brazilian CPF Number | # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | # | Bulgaria | `eu_vat` | European VAT Number | # | Burkina Faso | `bf_ifu` | Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique) | # | Cambodia | `kh_tin` | Cambodia Tax Identification Number | # | Cameroon | `cm_niu` | Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique) | # | Canada | `ca_bn` | Canadian BN | # | Canada | `ca_gst_hst` | Canadian GST/HST Number | # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | # | Canada | `ca_qst` | Canadian QST Number (Québec) | # | Cape Verde | `cv_nif` | Cape Verde Tax Identification Number (Número de Identificação Fiscal) | # | Chile | `cl_tin` | Chilean TIN | # | China | `cn_tin` | Chinese Tax ID | # | Colombia | `co_nit` | Colombian NIT Number | # | Congo-Kinshasa | `cd_nif` | Congo (DR) Tax Identification Number (Número de Identificação Fiscal) | # | Costa Rica | `cr_tin` | Costa Rican Tax ID | # | Croatia | `eu_vat` | European VAT Number | # | Croatia | `hr_oib` | Croatian Personal Identification Number (OIB) | # | Cyprus | `eu_vat` | European VAT Number | # | Czech Republic | `eu_vat` | European VAT Number | # | Denmark | `eu_vat` | European VAT Number | # | Dominican Republic | `do_rcn` | Dominican RCN Number | # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | # | Egypt | `eg_tin` | Egyptian Tax Identification Number | # | El Salvador | `sv_nit` | El Salvadorian NIT Number | # | Estonia | `eu_vat` | European VAT Number | # | Ethiopia | `et_tin` | Ethiopia Tax Identification Number | # | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | # | Faroe Islands | `fo_vat` | Faroe Islands VAT Number | # | Finland | `eu_vat` | European VAT Number | # | France | `eu_vat` | European VAT Number | # | Georgia | `ge_vat` | Georgian VAT | # | Germany | `de_stn` | German Tax Number (Steuernummer) | # | Germany | `eu_vat` | European VAT Number | # | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number | # | Greece | `eu_vat` | European VAT Number | # | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) | # | Hong Kong | `hk_br` | Hong Kong BR Number | # | Hungary | `eu_vat` | European VAT Number | # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | # | Iceland | `is_vat` | Icelandic VAT | # | India | `in_gst` | Indian GST Number | # | Indonesia | `id_npwp` | Indonesian NPWP Number | # | Ireland | `eu_vat` | European VAT Number | # | Israel | `il_vat` | Israel VAT | # | Italy | `eu_vat` | European VAT Number | # | Italy | `it_cf` | Italian Codice Fiscale Number | # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | # | Kyrgyzstan | `kg_tin` | Kyrgyzstan Tax Identification Number | # | Laos | `la_tin` | Laos Tax Identification Number | # | Latvia | `eu_vat` | European VAT Number | # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | # | Liechtenstein | `li_vat` | Liechtenstein VAT Number | # | Lithuania | `eu_vat` | European VAT Number | # | Luxembourg | `eu_vat` | European VAT Number | # | Malaysia | `my_frp` | Malaysian FRP Number | # | Malaysia | `my_itn` | Malaysian ITN | # | Malaysia | `my_sst` | Malaysian SST Number | # | Malta | `eu_vat` | European VAT Number | # | Mauritania | `mr_nif` | Mauritania Tax Identification Number (Número de Identificação Fiscal) | # | Mexico | `mx_rfc` | Mexican RFC Number | # | Moldova | `md_vat` | Moldova VAT Number | # | Montenegro | `me_pib` | Montenegro PIB Number | # | Morocco | `ma_vat` | Morocco VAT Number | # | Nepal | `np_pan` | Nepal PAN Number | # | Netherlands | `eu_vat` | European VAT Number | # | New Zealand | `nz_gst` | New Zealand GST Number | # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | # | North Macedonia | `mk_vat` | North Macedonia VAT Number | # | Northern Ireland | `eu_vat` | Northern Ireland VAT Number | # | Norway | `no_vat` | Norwegian VAT Number | # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | # | Oman | `om_vat` | Omani VAT Number | # | Paraguay | `py_ruc` | Paraguayan RUC Number | # | Peru | `pe_ruc` | Peruvian RUC Number | # | Philippines | `ph_tin` | Philippines Tax Identification Number | # | Poland | `eu_vat` | European VAT Number | # | Poland | `pl_nip` | Polish Tax ID Number | # | Portugal | `eu_vat` | European VAT Number | # | Romania | `eu_vat` | European VAT Number | # | Romania | `ro_tin` | Romanian Tax ID Number | # | Russia | `ru_inn` | Russian INN | # | Russia | `ru_kpp` | Russian KPP | # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | # | Senegal | `sn_ninea` | Senegal NINEA Number | # | Serbia | `rs_pib` | Serbian PIB Number | # | Singapore | `sg_gst` | Singaporean GST | # | Singapore | `sg_uen` | Singaporean UEN | # | Slovakia | `eu_vat` | European VAT Number | # | Slovenia | `eu_vat` | European VAT Number | # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | # | South Africa | `za_vat` | South African VAT Number | # | South Korea | `kr_brn` | Korean BRN | # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | # | Spain | `eu_vat` | European VAT Number | # | Sri Lanka | `lk_vat` | Sri Lanka VAT Number | # | Suriname | `sr_fin` | Suriname FIN Number | # | Sweden | `eu_vat` | European VAT Number | # | Switzerland | `ch_uid` | Switzerland UID Number | # | Switzerland | `ch_vat` | Switzerland VAT Number | # | Taiwan | `tw_vat` | Taiwanese VAT | # | Tajikistan | `tj_tin` | Tajikistan Tax Identification Number | # | Tanzania | `tz_vat` | Tanzania VAT Number | # | Thailand | `th_vat` | Thai VAT | # | Turkey | `tr_tin` | Turkish Tax Identification Number | # | Uganda | `ug_tin` | Uganda Tax Identification Number | # | Ukraine | `ua_vat` | Ukrainian VAT | # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | # | United Kingdom | `gb_vat` | United Kingdom VAT Number | # | United States | `us_ein` | United States EIN | # | Uruguay | `uy_ruc` | Uruguayan RUC Number | # | Uzbekistan | `uz_tin` | Uzbekistan TIN Number | # | Uzbekistan | `uz_vat` | Uzbekistan VAT Number | # | Venezuela | `ve_rif` | Venezuelan RIF Number | # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | # | Zambia | `zm_tin` | Zambia Tax Identification Number | # | Zimbabwe | `zw_tin` | Zimbabwe Tax Identification Number | # # @return [Orb::Models::CustomerTaxID, nil] required :customer_tax_id, -> { Orb::CustomerTaxID }, nil?: true # @!attribute discount # @deprecated # # This field is deprecated in favor of `discounts`. If a `discounts` list is # provided, the first discount in the list will be returned. If the list is empty, # `None` will be returned. # # @return [Object] required :discount, Orb::Internal::Type::Unknown # @!attribute discounts # # @return [Array<Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount, Orb::Models::InvoiceLevelDiscount::TieredPercentage>] required :discounts, -> { Orb::Internal::Type::ArrayOf[union: Orb::InvoiceLevelDiscount] } # @!attribute due_date # When the invoice payment is due. The due date is null if the invoice is not yet # finalized. # # @return [Time, nil] required :due_date, Time, nil?: true # @!attribute eligible_to_issue_at # If the invoice has a status of `draft`, this will be the time that the invoice # will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is # true, the invoice will automatically begin issuing at this time. # # @return [Time, nil] required :eligible_to_issue_at, Time, nil?: true # @!attribute hosted_invoice_url # A URL for the customer-facing invoice portal. This URL expires 60 days after the # link is generated, or 30 days after the invoice's due date — whichever is later. # # @return [String, nil] required :hosted_invoice_url, String, nil?: true # @!attribute invoice_date # The scheduled date of the invoice # # @return [Time] required :invoice_date, Time # @!attribute invoice_number # Automatically generated invoice number to help track and reconcile invoices. # Invoice numbers have a prefix such as `RFOBWG`. These can be sequential per # account or customer. # # @return [String] required :invoice_number, String # @!attribute invoice_pdf # The link to download the PDF representation of the `Invoice`. # # @return [String, nil] required :invoice_pdf, String, nil?: true # @!attribute invoice_source # # @return [Symbol, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::InvoiceSource] required :invoice_source, enum: -> { Orb::ChangedSubscriptionResources::CreatedInvoice::InvoiceSource } # @!attribute is_payable_now # True if the invoice has only in-advance fixed fees and is payable now # # @return [Boolean] required :is_payable_now, Orb::Internal::Type::Boolean # @!attribute issue_failed_at # If the invoice failed to issue, this will be the last time it failed to issue # (even if it is now in a different state.) # # @return [Time, nil] required :issue_failed_at, Time, nil?: true # @!attribute issued_at # If the invoice has been issued, this will be the time it transitioned to # `issued` (even if it is now in a different state.) # # @return [Time, nil] required :issued_at, Time, nil?: true # @!attribute line_items # The breakdown of prices in this invoice. # # @return [Array<Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem>] required :line_items, -> { Orb::Internal::Type::ArrayOf[Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem] } # @!attribute maximum # # @return [Orb::Models::Maximum, nil] required :maximum, -> { Orb::Maximum }, nil?: true # @!attribute maximum_amount # # @return [String, nil] required :maximum_amount, String, nil?: true # @!attribute memo # Free-form text which is available on the invoice PDF and the Orb invoice portal. # # @return [String, nil] required :memo, String, nil?: true # @!attribute metadata # User specified key-value pairs for the resource. If not present, this defaults # to an empty dictionary. Individual keys can be removed by setting the value to # `null`, and the entire metadata mapping can be cleared by setting `metadata` to # `null`. # # @return [Hash{Symbol=>String}] required :metadata, Orb::Internal::Type::HashOf[String] # @!attribute minimum # # @return [Orb::Models::Minimum, nil] required :minimum, -> { Orb::Minimum }, nil?: true # @!attribute minimum_amount # # @return [String, nil] required :minimum_amount, String, nil?: true # @!attribute paid_at # If the invoice has a status of `paid`, this gives a timestamp when the invoice # was paid. # # @return [Time, nil] required :paid_at, Time, nil?: true # @!attribute payment_attempts # A list of payment attempts associated with the invoice # # @return [Array<Orb::Models::ChangedSubscriptionResources::CreatedInvoice::PaymentAttempt>] required :payment_attempts, -> { Orb::Internal::Type::ArrayOf[Orb::ChangedSubscriptionResources::CreatedInvoice::PaymentAttempt] } # @!attribute payment_failed_at # If payment was attempted on this invoice but failed, this will be the time of # the most recent attempt. # # @return [Time, nil] required :payment_failed_at, Time, nil?: true # @!attribute payment_started_at # If payment was attempted on this invoice, this will be the start time of the # most recent attempt. This field is especially useful for delayed-notification # payment mechanisms (like bank transfers), where payment can take 3 days or more. # # @return [Time, nil] required :payment_started_at, Time, nil?: true # @!attribute scheduled_issue_at # If the invoice is in draft, this timestamp will reflect when the invoice is # scheduled to be issued. # # @return [Time, nil] required :scheduled_issue_at, Time, nil?: true # @!attribute shipping_address # # @return [Orb::Models::Address, nil] required :shipping_address, -> { Orb::Address }, nil?: true # @!attribute status # # @return [Symbol, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::Status] required :status, enum: -> { Orb::ChangedSubscriptionResources::CreatedInvoice::Status } # @!attribute subscription # # @return [Orb::Models::SubscriptionMinified, nil] required :subscription, -> { Orb::SubscriptionMinified }, nil?: true # @!attribute subtotal # The total before any discounts and minimums are applied. # # @return [String] required :subtotal, String # @!attribute sync_failed_at # If the invoice failed to sync, this will be the last time an external invoicing # provider sync was attempted. This field will always be `null` for invoices using # Orb Invoicing. # # @return [Time, nil] required :sync_failed_at, Time, nil?: true # @!attribute total # The total after any minimums and discounts have been applied. # # @return [String] required :total, String # @!attribute voided_at # If the invoice has a status of `void`, this gives a timestamp when the invoice # was voided. # # @return [Time, nil] required :voided_at, Time, nil?: true # @!attribute will_auto_issue # This is true if the invoice will be automatically issued in the future, and # false otherwise. # # @return [Boolean] required :will_auto_issue, Orb::Internal::Type::Boolean # @!method initialize(id:, amount_due:, auto_collection:, billing_address:, created_at:, credit_notes:, currency:, customer:, customer_balance_transactions:, customer_tax_id:, discount:, discounts:, due_date:, eligible_to_issue_at:, hosted_invoice_url:, invoice_date:, invoice_number:, invoice_pdf:, invoice_source:, is_payable_now:, issue_failed_at:, issued_at:, line_items:, maximum:, maximum_amount:, memo:, metadata:, minimum:, minimum_amount:, paid_at:, payment_attempts:, payment_failed_at:, payment_started_at:, scheduled_issue_at:, shipping_address:, status:, subscription:, subtotal:, sync_failed_at:, total:, voided_at:, will_auto_issue:) # Some parameter documentations has been truncated, see # {Orb::Models::ChangedSubscriptionResources::CreatedInvoice} for more details. # # @param id [String] # # @param amount_due [String] This is the final amount required to be charged to the customer and reflects the # # @param auto_collection [Orb::Models::ChangedSubscriptionResources::CreatedInvoice::AutoCollection] # # @param billing_address [Orb::Models::Address, nil] # # @param created_at [Time] The creation time of the resource in Orb. # # @param credit_notes [Array<Orb::Models::ChangedSubscriptionResources::CreatedInvoice::CreditNote>] A list of credit notes associated with the invoice # # @param currency [String] An ISO 4217 currency string or `credits` # # @param customer [Orb::Models::CustomerMinified] # # @param customer_balance_transactions [Array<Orb::Models::ChangedSubscriptionResources::CreatedInvoice::CustomerBalanceTransaction>] # # @param customer_tax_id [Orb::Models::CustomerTaxID, nil] Tax IDs are commonly required to be displayed on customer invoices, which are ad # # @param discount [Object] This field is deprecated in favor of `discounts`. If a `discounts` list is provi # # @param discounts [Array<Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount, Orb::Models::InvoiceLevelDiscount::TieredPercentage>] # # @param due_date [Time, nil] When the invoice payment is due. The due date is null if the invoice is not yet # # @param eligible_to_issue_at [Time, nil] If the invoice has a status of `draft`, this will be the time that the invoice w # # @param hosted_invoice_url [String, nil] A URL for the customer-facing invoice portal. This URL expires 60 days after the # # @param invoice_date [Time] The scheduled date of the invoice # # @param invoice_number [String] Automatically generated invoice number to help track and reconcile invoices. Inv # # @param invoice_pdf [String, nil] The link to download the PDF representation of the `Invoice`. # # @param invoice_source [Symbol, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::InvoiceSource] # # @param is_payable_now [Boolean] True if the invoice has only in-advance fixed fees and is payable now # # @param issue_failed_at [Time, nil] If the invoice failed to issue, this will be the last time it failed to issue (e # # @param issued_at [Time, nil] If the invoice has been issued, this will be the time it transitioned to `issued # # @param line_items [Array<Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem>] The breakdown of prices in this invoice. # # @param maximum [Orb::Models::Maximum, nil] # # @param maximum_amount [String, nil] # # @param memo [String, nil] Free-form text which is available on the invoice PDF and the Orb invoice portal. # # @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t # # @param minimum [Orb::Models::Minimum, nil] # # @param minimum_amount [String, nil] # # @param paid_at [Time, nil] If the invoice has a status of `paid`, this gives a timestamp when the invoice w # # @param payment_attempts [Array<Orb::Models::ChangedSubscriptionResources::CreatedInvoice::PaymentAttempt>] A list of payment attempts associated with the invoice # # @param payment_failed_at [Time, nil] If payment was attempted on this invoice but failed, this will be the time of th # # @param payment_started_at [Time, nil] If payment was attempted on this invoice, this will be the start time of the mos # # @param scheduled_issue_at [Time, nil] If the invoice is in draft, this timestamp will reflect when the invoice is sche # # @param shipping_address [Orb::Models::Address, nil] # # @param status [Symbol, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::Status] # # @param subscription [Orb::Models::SubscriptionMinified, nil] # # @param subtotal [String] The total before any discounts and minimums are applied. # # @param sync_failed_at [Time, nil] If the invoice failed to sync, this will be the last time an external invoicing # # @param total [String] The total after any minimums and discounts have been applied. # # @param voided_at [Time, nil] If the invoice has a status of `void`, this gives a timestamp when the invoice w # # @param will_auto_issue [Boolean] This is true if the invoice will be automatically issued in the future, and fals # @see Orb::Models::ChangedSubscriptionResources::CreatedInvoice#auto_collection class AutoCollection < Orb::Internal::Type::BaseModel # @!attribute enabled # True only if auto-collection is enabled for this invoice. # # @return [Boolean, nil] required :enabled, Orb::Internal::Type::Boolean, nil?: true # @!attribute next_attempt_at # If the invoice is scheduled for auto-collection, this field will reflect when # the next attempt will occur. If dunning has been exhausted, or auto-collection # is not enabled for this invoice, this field will be `null`. # # @return [Time, nil] required :next_attempt_at, Time, nil?: true # @!attribute num_attempts # Number of auto-collection payment attempts. # # @return [Integer, nil] required :num_attempts, Integer, nil?: true # @!attribute previously_attempted_at # If Orb has ever attempted payment auto-collection for this invoice, this field # will reflect when that attempt occurred. In conjunction with `next_attempt_at`, # this can be used to tell whether the invoice is currently in dunning (that is, # `previously_attempted_at` is non-null, and `next_attempt_time` is non-null), or # if dunning has been exhausted (`previously_attempted_at` is non-null, but # `next_attempt_time` is null). # # @return [Time, nil] required :previously_attempted_at, Time, nil?: true # @!method initialize(enabled:, next_attempt_at:, num_attempts:, previously_attempted_at:) # Some parameter documentations has been truncated, see # {Orb::Models::ChangedSubscriptionResources::CreatedInvoice::AutoCollection} for # more details. # # @param enabled [Boolean, nil] True only if auto-collection is enabled for this invoice. # # @param next_attempt_at [Time, nil] If the invoice is scheduled for auto-collection, this field will reflect when th # # @param num_attempts [Integer, nil] Number of auto-collection payment attempts. # # @param previously_attempted_at [Time, nil] If Orb has ever attempted payment auto-collection for this invoice, this field w end class CreditNote < Orb::Internal::Type::BaseModel # @!attribute id # # @return [String] required :id, String # @!attribute credit_note_number # # @return [String] required :credit_note_number, String # @!attribute memo # An optional memo supplied on the credit note. # # @return [String, nil] required :memo, String, nil?: true # @!attribute reason # # @return [String] required :reason, String # @!attribute total # # @return [String] required :total, String # @!attribute type # # @return [String] required :type, String # @!attribute voided_at # If the credit note has a status of `void`, this gives a timestamp when the # credit note was voided. # # @return [Time, nil] required :voided_at, Time, nil?: true # @!method initialize(id:, credit_note_number:, memo:, reason:, total:, type:, voided_at:) # Some parameter documentations has been truncated, see # {Orb::Models::ChangedSubscriptionResources::CreatedInvoice::CreditNote} for more # details. # # @param id [String] # # @param credit_note_number [String] # # @param memo [String, nil] An optional memo supplied on the credit note. # # @param reason [String] # # @param total [String] # # @param type [String] # # @param voided_at [Time, nil] If the credit note has a status of `void`, this gives a timestamp when the credi end class CustomerBalanceTransaction < Orb::Internal::Type::BaseModel # @!attribute id # A unique id for this transaction. # # @return [String] required :id, String # @!attribute action # # @return [Symbol, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::CustomerBalanceTransaction::Action] required :action, enum: -> { Orb::ChangedSubscriptionResources::CreatedInvoice::CustomerBalanceTransaction::Action } # @!attribute amount # The value of the amount changed in the transaction. # # @return [String] required :amount, String # @!attribute created_at # The creation time of this transaction. # # @return [Time] required :created_at, Time # @!attribute credit_note # # @return [Orb::Models::CreditNoteTiny, nil] required :credit_note, -> { Orb::CreditNoteTiny }, nil?: true # @!attribute description # An optional description provided for manual customer balance adjustments. # # @return [String, nil] required :description, String, nil?: true # @!attribute ending_balance # The new value of the customer's balance prior to the transaction, in the # customer's currency. # # @return [String] required :ending_balance, String # @!attribute invoice # # @return [Orb::Models::InvoiceTiny, nil] required :invoice, -> { Orb::InvoiceTiny }, nil?: true # @!attribute starting_balance # The original value of the customer's balance prior to the transaction, in the # customer's currency. # # @return [String] required :starting_balance, String # @!attribute type # # @return [Symbol, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::CustomerBalanceTransaction::Type] required :type, enum: -> { Orb::ChangedSubscriptionResources::CreatedInvoice::CustomerBalanceTransaction::Type } # @!method initialize(id:, action:, amount:, created_at:, credit_note:, description:, ending_balance:, invoice:, starting_balance:, type:) # Some parameter documentations has been truncated, see # {Orb::Models::ChangedSubscriptionResources::CreatedInvoice::CustomerBalanceTransaction} # for more details. # # @param id [String] A unique id for this transaction. # # @param action [Symbol, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::CustomerBalanceTransaction::Action] # # @param amount [String] The value of the amount changed in the transaction. # # @param created_at [Time] The creation time of this transaction. # # @param credit_note [Orb::Models::CreditNoteTiny, nil] # # @param description [String, nil] An optional description provided for manual customer balance adjustments. # # @param ending_balance [String] The new value of the customer's balance prior to the transaction, in the custome # # @param invoice [Orb::Models::InvoiceTiny, nil] # # @param starting_balance [String] The original value of the customer's balance prior to the transaction, in the cu # # @param type [Symbol, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::CustomerBalanceTransaction::Type] # @see Orb::Models::ChangedSubscriptionResources::CreatedInvoice::CustomerBalanceTransaction#action module Action extend Orb::Internal::Type::Enum APPLIED_TO_INVOICE = :applied_to_invoice MANUAL_ADJUSTMENT = :manual_adjustment PRORATED_REFUND = :prorated_refund REVERT_PRORATED_REFUND = :revert_prorated_refund RETURN_FROM_VOIDING = :return_from_voiding CREDIT_NOTE_APPLIED = :credit_note_applied CREDIT_NOTE_VOIDED = :credit_note_voided OVERPAYMENT_REFUND = :overpayment_refund EXTERNAL_PAYMENT = :external_payment SMALL_INVOICE_CARRYOVER = :small_invoice_carryover # @!method self.values # @return [Array<Symbol>] end # @see Orb::Models::ChangedSubscriptionResources::CreatedInvoice::CustomerBalanceTransaction#type module Type extend Orb::Internal::Type::Enum INCREMENT = :increment DECREMENT = :decrement # @!method self.values # @return [Array<Symbol>] end end # @see Orb::Models::ChangedSubscriptionResources::CreatedInvoice#invoice_source module InvoiceSource extend Orb::Internal::Type::Enum SUBSCRIPTION = :subscription PARTIAL = :partial ONE_OFF = :one_off # @!method self.values # @return [Array<Symbol>] end class LineItem < Orb::Internal::Type::BaseModel # @!attribute id # A unique ID for this line item. # # @return [String] required :id, String # @!attribute adjusted_subtotal # The line amount after any adjustments and before overage conversion, credits and # partial invoicing. # # @return [String] required :adjusted_subtotal, String # @!attribute adjustments # All adjustments applied to the line item in the order they were applied based on # invoice calculations (ie. usage discounts -> amount discounts -> percentage # discounts -> minimums -> maximums). # # @return [Array<Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount, Orb::Models::MonetaryMinimumAdjustment, Orb::Models::MonetaryMaximumAdjustment>] required :adjustments, -> { Orb::Internal::Type::ArrayOf[union: Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment] } # @!attribute amount # The final amount for a line item after all adjustments and pre paid credits have # been applied. # # @return [String] required :amount, String # @!attribute credits_applied # The number of prepaid credits applied. # # @return [String] required :credits_applied, String # @!attribute end_date # The end date of the range of time applied for this line item's price. # # @return [Time] required :end_date, Time # @!attribute filter # An additional filter that was used to calculate the usage for this line item. # # @return [String, nil] required :filter, String, nil?: true # @!attribute grouping # [DEPRECATED] For configured prices that are split by a grouping key, this will # be populated with the key and a value. The `amount` and `subtotal` will be the # values for this particular grouping. # # @return [String, nil] required :grouping, String, nil?: true # @!attribute name # The name of the price associated with this line item. # # @return [String] required :name, String # @!attribute partially_invoiced_amount # Any amount applied from a partial invoice # # @return [String] required :partially_invoiced_amount, String # @!attribute price # The Price resource represents a price that can be billed on a subscription, # resulting in a charge on an invoice in the form of an invoice line item. Prices # take a quantity and determine an amount to bill. # # Orb supports a few different pricing models out of the box. Each of these models # is serialized differently in a given Price object. The model_type field # determines the key for the configuration object that is present. # # For more on the types of prices, see # [the core concepts documentation](/core-concepts#plan-and-price) # # @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] required :price, union: -> { Orb::Price } # @!attribute quantity # Either the fixed fee quantity or the usage during the service period. # # @return [Float] required :quantity, Float # @!attribute start_date # The start date of the range of time applied for this line item's price. # # @return [Time] required :start_date, Time # @!attribute sub_line_items # For complex pricing structures, the line item can be broken down further in # `sub_line_items`. # # @return [Array<Orb::Models::MatrixSubLineItem, Orb::Models::TierSubLineItem, Orb::Models::OtherSubLineItem>] required :sub_line_items, -> { Orb::Internal::Type::ArrayOf[union: Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::SubLineItem] } # @!attribute subtotal # The line amount before any adjustments. # # @return [String] required :subtotal, String # @!attribute tax_amounts # An array of tax rates and their incurred tax amounts. Empty if no tax # integration is configured. # # @return [Array<Orb::Models::TaxAmount>] required :tax_amounts, -> { Orb::Internal::Type::ArrayOf[Orb::TaxAmount] } # @!attribute usage_customer_ids # A list of customer ids that were used to calculate the usage for this line item. # # @return [Array<String>, nil] required :usage_customer_ids, Orb::Internal::Type::ArrayOf[String], nil?: true # @!method initialize(id:, adjusted_subtotal:, adjustments:, amount:, credits_applied:, end_date:, filter:, grouping:, name:, partially_invoiced_amount:, price:, quantity:, start_date:, sub_line_items:, subtotal:, tax_amounts:, usage_customer_ids:) # Some parameter documentations has been truncated, see # {Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem} for more # details. # # @param id [String] A unique ID for this line item. # # @param adjusted_subtotal [String] The line amount after any adjustments and before overage conversion, credits and # # @param adjustments [Array<Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount, Orb::Models::MonetaryMinimumAdjustment, Orb::Models::MonetaryMaximumAdjustment>] All adjustments applied to the line item in the order they were applied based on # # @param amount [String] The final amount for a line item after all adjustments and pre paid credits have # # @param credits_applied [String] The number of prepaid credits applied. # # @param end_date [Time] The end date of the range of time applied for this line item's price. # # @param filter [String, nil] An additional filter that was used to calculate the usage for this line item. # # @param grouping [String, nil] [DEPRECATED] For configured prices that are split by a grouping key, this will b # # @param name [String] The name of the price associated with this line item. # # @param partially_invoiced_amount [String] Any amount applied from a partial invoice # # @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu # # @param quantity [Float] Either the fixed fee quantity or the usage during the service period. # # @param start_date [Time] The start date of the range of time applied for this line item's price. # # @param sub_line_items [Array<Orb::Models::MatrixSubLineItem, Orb::Models::TierSubLineItem, Orb::Models::OtherSubLineItem>] For complex pricing structures, the line item can be broken down further in `sub # # @param subtotal [String] The line amount before any adjustments. # # @param tax_amounts [Array<Orb::Models::TaxAmount>] An array of tax rates and their incurred tax amounts. Empty if no tax integratio # # @param usage_customer_ids [Array<String>, nil] A list of customer ids that were used to calculate the usage for this line item. module Adjustment extend Orb::Internal::Type::Union discriminator :adjustment_type variant :usage_discount, -> { Orb::MonetaryUsageDiscountAdjustment } variant :amount_discount, -> { Orb::MonetaryAmountDiscountAdjustment } variant :percentage_discount, -> { Orb::MonetaryPercentageDiscountAdjustment } variant :tiered_percentage_discount, -> { Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount } variant :minimum, -> { Orb::MonetaryMinimumAdjustment } variant :maximum, -> { Orb::MonetaryMaximumAdjustment } class TieredPercentageDiscount < Orb::Internal::Type::BaseModel # @!attribute id # # @return [String] required :id, String # @!attribute adjustment_type # # @return [Symbol, :tiered_percentage_discount] required :adjustment_type, const: :tiered_percentage_discount # @!attribute amount # The value applied by an adjustment. # # @return [String] required :amount, String # @!attribute applies_to_price_ids # @deprecated # # The price IDs that this adjustment applies to. # # @return [Array<String>] required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String] # @!attribute filters # The filters that determine which prices to apply this adjustment to. # # @return [Array<Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter>] required :filters, -> { Orb::Internal::Type::ArrayOf[Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter] } # @!attribute is_invoice_level # True for adjustments that apply to an entire invoice, false for adjustments that # apply to only one price. # # @return [Boolean] required :is_invoice_level, Orb::Internal::Type::Boolean # @!attribute reason # The reason for the adjustment. # # @return [String, nil] required :reason, String, nil?: true # @!attribute replaces_adjustment_id # The adjustment id this adjustment replaces. This adjustment will take the place # of the replaced adjustment in plan version migrations. # # @return [String, nil] required :replaces_adjustment_id, String, nil?: true # @!attribute tiers # The ordered, contiguous bands of cumulative eligible spend, each discounted at # its own percentage (progressive fill-a-tier), applied to the prices this # adjustment covers in a given billing period. # # @return [Array<Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Tier>] required :tiers, -> { Orb::Internal::Type::ArrayOf[Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Tier] } # @!method initialize(id:, amount:, applies_to_price_ids:, filters:, is_invoice_level:, reason:, replaces_adjustment_id:, tiers:, adjustment_type: :tiered_percentage_discount) # Some parameter documentations has been truncated, see # {Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount} # for more details. # # @param id [String] # # @param amount [String] The value applied by an adjustment. # # @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to. # # @param filters [Array<Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter>] The filters that determine which prices to apply this adjustment to. # # @param is_invoice_level [Boolean] True for adjustments that apply to an entire invoice, false for adjustments that # # @param reason [String, nil] The reason for the adjustment. # # @param replaces_adjustment_id [String, nil] The adjustment id this adjustment replaces. This adjustment will take the place # # @param tiers [Array<Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Tier>] The ordered, contiguous bands of cumulative eligible spend, each discounted at i # # @param adjustment_type [Symbol, :tiered_percentage_discount] class Filter < Orb::Internal::Type::BaseModel # @!attribute field # The property of the price to filter on. # # @return [Symbol, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field] required :field, enum: -> { Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field } # @!attribute operator # Should prices that match the filter be included or excluded. # # @return [Symbol, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator] required :operator, enum: -> { Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator } # @!attribute values # The IDs or values that match this filter. # # @return [Array<String>] required :values, Orb::Internal::Type::ArrayOf[String] # @!method initialize(field:, operator:, values:) # @param field [Symbol, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field] The property of the price to filter on. # # @param operator [Symbol, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded. # # @param values [Array<String>] The IDs or values that match this filter. # The property of the price to filter on. # # @see Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter#field module Field extend Orb::Internal::Type::Enum PRICE_ID = :price_id ITEM_ID = :item_id PRICE_TYPE = :price_type CURRENCY = :currency PRICING_UNIT_ID = :pricing_unit_id # @!method self.values # @return [Array<Symbol>] end # Should prices that match the filter be included or excluded. # # @see Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter#operator module Operator extend Orb::Internal::Type::Enum INCLUDES = :includes EXCLUDES = :excludes # @!method self.values # @return [Array<Symbol>] end end class Tier < Orb::Internal::Type::BaseModel # @!attribute lower_bound # Exclusive lower bound of cumulative spend for this tier. # # @return [Float] required :lower_bound, Float # @!attribute percentage # The percentage (between 0 and 1) discounted from spend that falls within this # tier. # # @return [Float] required :percentage, Float # @!attribute upper_bound # Inclusive upper bound of cumulative spend for this tier; null for the final # open-ended tier. # # @return [Float, nil] optional :upper_bound, Float, nil?: true # @!method initialize(lower_bound:, percentage:, upper_bound: nil) # Some parameter documentations has been truncated, see # {Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Tier} # for more details. # # One band of a tiered percentage discount. Bounds are denominated in the # discount's currency. `lower_bound` is the exclusive start of the band and # `upper_bound` is the inclusive end; `upper_bound` is null only for the # open-ended final tier. # # @param lower_bound [Float] Exclusive lower bound of cumulative spend for this tier. # # @param percentage [Float] The percentage (between 0 and 1) discounted from spend that falls within this ti # # @param upper_bound [Float, nil] Inclusive upper bound of cumulative spend for this tier; null for the final open end end # @!method self.variants # @return [Array(Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount, Orb::Models::MonetaryMinimumAdjustment, Orb::Models::MonetaryMaximumAdjustment)] end module SubLineItem extend Orb::Internal::Type::Union discriminator :type variant :matrix, -> { Orb::MatrixSubLineItem } variant :tier, -> { Orb::TierSubLineItem } variant :"'null'", -> { Orb::OtherSubLineItem } # @!method self.variants # @return [Array(Orb::Models::MatrixSubLineItem, Orb::Models::TierSubLineItem, Orb::Models::OtherSubLineItem)] end end class PaymentAttempt < Orb::Internal::Type::BaseModel # @!attribute id # The ID of the payment attempt. # # @return [String] required :id, String # @!attribute amount # The amount of the payment attempt. # # @return [String] required :amount, String # @!attribute created_at # The time at which the payment attempt was created. # # @return [Time] required :created_at, Time # @!attribute payment_provider # The payment provider that attempted to collect the payment. # # @return [Symbol, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::PaymentAttempt::PaymentProvider, nil] required :payment_provider, enum: -> { Orb::ChangedSubscriptionResources::CreatedInvoice::PaymentAttempt::PaymentProvider }, nil?: true # @!attribute payment_provider_id # The ID of the payment attempt in the payment provider. # # @return [String, nil] required :payment_provider_id, String, nil?: true # @!attribute receipt_pdf # URL to the downloadable PDF version of the receipt. This field will be `null` # for payment attempts that did not succeed. # # @return [String, nil] required :receipt_pdf, String, nil?: true # @!attribute succeeded # Whether the payment attempt succeeded. # # @return [Boolean] required :succeeded, Orb::Internal::Type::Boolean # @!method initialize(id:, amount:, created_at:, payment_provider:, payment_provider_id:, receipt_pdf:, succeeded:) # Some parameter documentations has been truncated, see # {Orb::Models::ChangedSubscriptionResources::CreatedInvoice::PaymentAttempt} for # more details. # # @param id [String] The ID of the payment attempt. # # @param amount [String] The amount of the payment attempt. # # @param created_at [Time] The time at which the payment attempt was created. # # @param payment_provider [Symbol, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::PaymentAttempt::PaymentProvider, nil] The payment provider that attempted to collect the payment. # # @param payment_provider_id [String, nil] The ID of the payment attempt in the payment provider. # # @param receipt_pdf [String, nil] URL to the downloadable PDF version of the receipt. This field will be `null` fo # # @param succeeded [Boolean] Whether the payment attempt succeeded. # The payment provider that attempted to collect the payment. # # @see Orb::Models::ChangedSubscriptionResources::CreatedInvoice::PaymentAttempt#payment_provider module PaymentProvider extend Orb::Internal::Type::Enum STRIPE = :stripe ADYEN = :adyen # @!method self.values # @return [Array<Symbol>] end end # @see Orb::Models::ChangedSubscriptionResources::CreatedInvoice#status module Status extend Orb::Internal::Type::Enum ISSUED = :issued PAID = :paid SYNCED = :synced VOID = :void DRAFT = :draft # @!method self.values # @return [Array<Symbol>] end end |
Instance Attribute Details
#amount_due ⇒ String
This is the final amount required to be charged to the customer and reflects the
application of the customer balance to the total of the invoice.
51 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 51 required :amount_due, String |
#auto_collection ⇒ Orb::Models::ChangedSubscriptionResources::CreatedInvoice::AutoCollection
56 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 56 required :auto_collection, -> { Orb::ChangedSubscriptionResources::CreatedInvoice::AutoCollection } |
#billing_address ⇒ Orb::Models::Address?
61 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 61 required :billing_address, -> { Orb::Address }, nil?: true |
#created_at ⇒ Time
The creation time of the resource in Orb.
67 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 67 required :created_at, Time |
#credit_notes ⇒ Array<Orb::Models::ChangedSubscriptionResources::CreatedInvoice::CreditNote>
A list of credit notes associated with the invoice
73 74 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 73 required :credit_notes, -> { Orb::Internal::Type::ArrayOf[Orb::ChangedSubscriptionResources::CreatedInvoice::CreditNote] } |
#currency ⇒ String
An ISO 4217 currency string or credits
80 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 80 required :currency, String |
#customer ⇒ Orb::Models::CustomerMinified
85 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 85 required :customer, -> { Orb::CustomerMinified } |
#customer_balance_transactions ⇒ Array<Orb::Models::ChangedSubscriptionResources::CreatedInvoice::CustomerBalanceTransaction>
90 91 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 90 required :customer_balance_transactions, -> { Orb::Internal::Type::ArrayOf[Orb::ChangedSubscriptionResources::CreatedInvoice::CustomerBalanceTransaction] } |
#customer_tax_id ⇒ Orb::Models::CustomerTaxID?
Tax IDs are commonly required to be displayed on customer invoices, which are added to the headers of invoices.
Supported Tax ID Countries and Types
| Country | Type | Description |
|---|---|---|
| Albania | al_tin |
Albania Tax Identification Number |
| Andorra | ad_nrt |
Andorran NRT Number |
| Angola | ao_tin |
Angola Tax Identification Number |
| Argentina | ar_cuit |
Argentinian Tax ID Number |
| Armenia | am_tin |
Armenia Tax Identification Number |
| Aruba | aw_tin |
Aruba Tax Identification Number |
| Australia | au_abn |
Australian Business Number (AU ABN) |
| Australia | au_arn |
Australian Taxation Office Reference Number |
| Austria | eu_vat |
European VAT Number |
| Azerbaijan | az_tin |
Azerbaijan Tax Identification Number |
| Bahamas | bs_tin |
Bahamas Tax Identification Number |
| Bahrain | bh_vat |
Bahraini VAT Number |
| Bangladesh | bd_bin |
Bangladesh Business Identification Number |
| Barbados | bb_tin |
Barbados Tax Identification Number |
| Belarus | by_tin |
Belarus TIN Number |
| Belgium | eu_vat |
European VAT Number |
| Benin | bj_ifu |
Benin Tax Identification Number (Identifiant Fiscal Unique) |
| Bolivia | bo_tin |
Bolivian Tax ID |
| Bosnia and Herzegovina | ba_tin |
Bosnia and Herzegovina Tax Identification Number |
| Brazil | br_cnpj |
Brazilian CNPJ Number |
| Brazil | br_cpf |
Brazilian CPF Number |
| Bulgaria | bg_uic |
Bulgaria Unified Identification Code |
| Bulgaria | eu_vat |
European VAT Number |
| Burkina Faso | bf_ifu |
Burkina Faso Tax Identification Number (Numéro d'Identifiant Fiscal Unique) |
| Cambodia | kh_tin |
Cambodia Tax Identification Number |
| Cameroon | cm_niu |
Cameroon Tax Identification Number (Numéro d'Identifiant fiscal Unique) |
| Canada | ca_bn |
Canadian BN |
| Canada | ca_gst_hst |
Canadian GST/HST Number |
| Canada | ca_pst_bc |
Canadian PST Number (British Columbia) |
| Canada | ca_pst_mb |
Canadian PST Number (Manitoba) |
| Canada | ca_pst_sk |
Canadian PST Number (Saskatchewan) |
| Canada | ca_qst |
Canadian QST Number (Québec) |
| Cape Verde | cv_nif |
Cape Verde Tax Identification Number (Número de Identificação Fiscal) |
| Chile | cl_tin |
Chilean TIN |
| China | cn_tin |
Chinese Tax ID |
| Colombia | co_nit |
Colombian NIT Number |
| Congo-Kinshasa | cd_nif |
Congo (DR) Tax Identification Number (Número de Identificação Fiscal) |
| Costa Rica | cr_tin |
Costa Rican Tax ID |
| Croatia | eu_vat |
European VAT Number |
| Croatia | hr_oib |
Croatian Personal Identification Number (OIB) |
| Cyprus | eu_vat |
European VAT Number |
| Czech Republic | eu_vat |
European VAT Number |
| Denmark | eu_vat |
European VAT Number |
| Dominican Republic | do_rcn |
Dominican RCN Number |
| Ecuador | ec_ruc |
Ecuadorian RUC Number |
| Egypt | eg_tin |
Egyptian Tax Identification Number |
| El Salvador | sv_nit |
El Salvadorian NIT Number |
| Estonia | eu_vat |
European VAT Number |
| Ethiopia | et_tin |
Ethiopia Tax Identification Number |
| European Union | eu_oss_vat |
European One Stop Shop VAT Number for non-Union scheme |
| Faroe Islands | fo_vat |
Faroe Islands VAT Number |
| Finland | eu_vat |
European VAT Number |
| France | eu_vat |
European VAT Number |
| Georgia | ge_vat |
Georgian VAT |
| Germany | de_stn |
German Tax Number (Steuernummer) |
| Germany | eu_vat |
European VAT Number |
| Gibraltar | gi_tin |
Gibraltar Tax Identification Number |
| Greece | eu_vat |
European VAT Number |
| Guinea | gn_nif |
Guinea Tax Identification Number (Número de Identificação Fiscal) |
| Hong Kong | hk_br |
Hong Kong BR Number |
| Hungary | eu_vat |
European VAT Number |
| Hungary | hu_tin |
Hungary Tax Number (adószám) |
| Iceland | is_vat |
Icelandic VAT |
| India | in_gst |
Indian GST Number |
| Indonesia | id_npwp |
Indonesian NPWP Number |
| Ireland | eu_vat |
European VAT Number |
| Israel | il_vat |
Israel VAT |
| Italy | eu_vat |
European VAT Number |
| Italy | it_cf |
Italian Codice Fiscale Number |
| Japan | jp_cn |
Japanese Corporate Number (Hōjin Bangō) |
| Japan | jp_rn |
Japanese Registered Foreign Businesses' Registration Number (Tōroku Kokugai Jigyōsha no Tōroku Bangō) |
| Japan | jp_trn |
Japanese Tax Registration Number (Tōroku Bangō) |
| Kazakhstan | kz_bin |
Kazakhstani Business Identification Number |
| Kenya | ke_pin |
Kenya Revenue Authority Personal Identification Number |
| Kyrgyzstan | kg_tin |
Kyrgyzstan Tax Identification Number |
| Laos | la_tin |
Laos Tax Identification Number |
| Latvia | eu_vat |
European VAT Number |
| Liechtenstein | li_uid |
Liechtensteinian UID Number |
| Liechtenstein | li_vat |
Liechtenstein VAT Number |
| Lithuania | eu_vat |
European VAT Number |
| Luxembourg | eu_vat |
European VAT Number |
| Malaysia | my_frp |
Malaysian FRP Number |
| Malaysia | my_itn |
Malaysian ITN |
| Malaysia | my_sst |
Malaysian SST Number |
| Malta | eu_vat |
European VAT Number |
| Mauritania | mr_nif |
Mauritania Tax Identification Number (Número de Identificação Fiscal) |
| Mexico | mx_rfc |
Mexican RFC Number |
| Moldova | md_vat |
Moldova VAT Number |
| Montenegro | me_pib |
Montenegro PIB Number |
| Morocco | ma_vat |
Morocco VAT Number |
| Nepal | np_pan |
Nepal PAN Number |
| Netherlands | eu_vat |
European VAT Number |
| New Zealand | nz_gst |
New Zealand GST Number |
| Nigeria | ng_tin |
Nigerian Tax Identification Number |
| North Macedonia | mk_vat |
North Macedonia VAT Number |
| Northern Ireland | eu_vat |
Northern Ireland VAT Number |
| Norway | no_vat |
Norwegian VAT Number |
| Norway | no_voec |
Norwegian VAT on e-commerce Number |
| Oman | om_vat |
Omani VAT Number |
| Paraguay | py_ruc |
Paraguayan RUC Number |
| Peru | pe_ruc |
Peruvian RUC Number |
| Philippines | ph_tin |
Philippines Tax Identification Number |
| Poland | eu_vat |
European VAT Number |
| Poland | pl_nip |
Polish Tax ID Number |
| Portugal | eu_vat |
European VAT Number |
| Romania | eu_vat |
European VAT Number |
| Romania | ro_tin |
Romanian Tax ID Number |
| Russia | ru_inn |
Russian INN |
| Russia | ru_kpp |
Russian KPP |
| Saudi Arabia | sa_vat |
Saudi Arabia VAT |
| Senegal | sn_ninea |
Senegal NINEA Number |
| Serbia | rs_pib |
Serbian PIB Number |
| Singapore | sg_gst |
Singaporean GST |
| Singapore | sg_uen |
Singaporean UEN |
| Slovakia | eu_vat |
European VAT Number |
| Slovenia | eu_vat |
European VAT Number |
| Slovenia | si_tin |
Slovenia Tax Number (davčna številka) |
| South Africa | za_vat |
South African VAT Number |
| South Korea | kr_brn |
Korean BRN |
| Spain | es_cif |
Spanish NIF Number (previously Spanish CIF Number) |
| Spain | eu_vat |
European VAT Number |
| Sri Lanka | lk_vat |
Sri Lanka VAT Number |
| Suriname | sr_fin |
Suriname FIN Number |
| Sweden | eu_vat |
European VAT Number |
| Switzerland | ch_uid |
Switzerland UID Number |
| Switzerland | ch_vat |
Switzerland VAT Number |
| Taiwan | tw_vat |
Taiwanese VAT |
| Tajikistan | tj_tin |
Tajikistan Tax Identification Number |
| Tanzania | tz_vat |
Tanzania VAT Number |
| Thailand | th_vat |
Thai VAT |
| Turkey | tr_tin |
Turkish Tax Identification Number |
| Uganda | ug_tin |
Uganda Tax Identification Number |
| Ukraine | ua_vat |
Ukrainian VAT |
| United Arab Emirates | ae_trn |
United Arab Emirates TRN |
| United Kingdom | gb_vat |
United Kingdom VAT Number |
| United States | us_ein |
United States EIN |
| Uruguay | uy_ruc |
Uruguayan RUC Number |
| Uzbekistan | uz_tin |
Uzbekistan TIN Number |
| Uzbekistan | uz_vat |
Uzbekistan VAT Number |
| Venezuela | ve_rif |
Venezuelan RIF Number |
| Vietnam | vn_tin |
Vietnamese Tax ID Number |
| Zambia | zm_tin |
Zambia Tax Identification Number |
| Zimbabwe | zw_tin |
Zimbabwe Tax Identification Number |
246 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 246 required :customer_tax_id, -> { Orb::CustomerTaxID }, nil?: true |
#discount ⇒ Object
This field is deprecated in favor of discounts. If a discounts list is
provided, the first discount in the list will be returned. If the list is empty,
None will be returned.
256 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 256 required :discount, Orb::Internal::Type::Unknown |
#discounts ⇒ Array<Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount, Orb::Models::InvoiceLevelDiscount::TieredPercentage>
261 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 261 required :discounts, -> { Orb::Internal::Type::ArrayOf[union: Orb::InvoiceLevelDiscount] } |
#due_date ⇒ Time?
When the invoice payment is due. The due date is null if the invoice is not yet finalized.
268 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 268 required :due_date, Time, nil?: true |
#eligible_to_issue_at ⇒ Time?
If the invoice has a status of draft, this will be the time that the invoice
will be eligible to be issued, otherwise it will be null. If auto-issue is
true, the invoice will automatically begin issuing at this time.
276 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 276 required :eligible_to_issue_at, Time, nil?: true |
#hosted_invoice_url ⇒ String?
A URL for the customer-facing invoice portal. This URL expires 60 days after the link is generated, or 30 days after the invoice's due date — whichever is later.
283 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 283 required :hosted_invoice_url, String, nil?: true |
#id ⇒ String
44 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 44 required :id, String |
#invoice_date ⇒ Time
The scheduled date of the invoice
289 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 289 required :invoice_date, Time |
#invoice_number ⇒ String
Automatically generated invoice number to help track and reconcile invoices.
Invoice numbers have a prefix such as RFOBWG. These can be sequential per
account or customer.
297 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 297 required :invoice_number, String |
#invoice_pdf ⇒ String?
The link to download the PDF representation of the Invoice.
303 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 303 required :invoice_pdf, String, nil?: true |
#invoice_source ⇒ Symbol, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::InvoiceSource
308 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 308 required :invoice_source, enum: -> { Orb::ChangedSubscriptionResources::CreatedInvoice::InvoiceSource } |
#is_payable_now ⇒ Boolean
True if the invoice has only in-advance fixed fees and is payable now
314 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 314 required :is_payable_now, Orb::Internal::Type::Boolean |
#issue_failed_at ⇒ Time?
If the invoice failed to issue, this will be the last time it failed to issue (even if it is now in a different state.)
321 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 321 required :issue_failed_at, Time, nil?: true |
#issued_at ⇒ Time?
If the invoice has been issued, this will be the time it transitioned to
issued (even if it is now in a different state.)
328 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 328 required :issued_at, Time, nil?: true |
#line_items ⇒ Array<Orb::Models::ChangedSubscriptionResources::CreatedInvoice::LineItem>
The breakdown of prices in this invoice.
334 335 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 334 required :line_items, -> { Orb::Internal::Type::ArrayOf[Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem] } |
#maximum ⇒ Orb::Models::Maximum?
340 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 340 required :maximum, -> { Orb::Maximum }, nil?: true |
#maximum_amount ⇒ String?
345 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 345 required :maximum_amount, String, nil?: true |
#memo ⇒ String?
Free-form text which is available on the invoice PDF and the Orb invoice portal.
351 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 351 required :memo, String, nil?: true |
#metadata ⇒ Hash{Symbol=>String}
User specified key-value pairs for the resource. If not present, this defaults
to an empty dictionary. Individual keys can be removed by setting the value to
null, and the entire metadata mapping can be cleared by setting metadata to
null.
360 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 360 required :metadata, Orb::Internal::Type::HashOf[String] |
#minimum ⇒ Orb::Models::Minimum?
365 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 365 required :minimum, -> { Orb::Minimum }, nil?: true |
#minimum_amount ⇒ String?
370 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 370 required :minimum_amount, String, nil?: true |
#paid_at ⇒ Time?
If the invoice has a status of paid, this gives a timestamp when the invoice
was paid.
377 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 377 required :paid_at, Time, nil?: true |
#payment_attempts ⇒ Array<Orb::Models::ChangedSubscriptionResources::CreatedInvoice::PaymentAttempt>
A list of payment attempts associated with the invoice
383 384 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 383 required :payment_attempts, -> { Orb::Internal::Type::ArrayOf[Orb::ChangedSubscriptionResources::CreatedInvoice::PaymentAttempt] } |
#payment_failed_at ⇒ Time?
If payment was attempted on this invoice but failed, this will be the time of the most recent attempt.
391 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 391 required :payment_failed_at, Time, nil?: true |
#payment_started_at ⇒ Time?
If payment was attempted on this invoice, this will be the start time of the most recent attempt. This field is especially useful for delayed-notification payment mechanisms (like bank transfers), where payment can take 3 days or more.
399 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 399 required :payment_started_at, Time, nil?: true |
#scheduled_issue_at ⇒ Time?
If the invoice is in draft, this timestamp will reflect when the invoice is scheduled to be issued.
406 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 406 required :scheduled_issue_at, Time, nil?: true |
#shipping_address ⇒ Orb::Models::Address?
411 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 411 required :shipping_address, -> { Orb::Address }, nil?: true |
#status ⇒ Symbol, Orb::Models::ChangedSubscriptionResources::CreatedInvoice::Status
416 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 416 required :status, enum: -> { Orb::ChangedSubscriptionResources::CreatedInvoice::Status } |
#subscription ⇒ Orb::Models::SubscriptionMinified?
421 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 421 required :subscription, -> { Orb::SubscriptionMinified }, nil?: true |
#subtotal ⇒ String
The total before any discounts and minimums are applied.
427 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 427 required :subtotal, String |
#sync_failed_at ⇒ Time?
If the invoice failed to sync, this will be the last time an external invoicing
provider sync was attempted. This field will always be null for invoices using
Orb Invoicing.
435 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 435 required :sync_failed_at, Time, nil?: true |
#total ⇒ String
The total after any minimums and discounts have been applied.
441 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 441 required :total, String |
#voided_at ⇒ Time?
If the invoice has a status of void, this gives a timestamp when the invoice
was voided.
448 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 448 required :voided_at, Time, nil?: true |
#will_auto_issue ⇒ Boolean
This is true if the invoice will be automatically issued in the future, and false otherwise.
455 |
# File 'lib/orb/models/changed_subscription_resources.rb', line 455 required :will_auto_issue, Orb::Internal::Type::Boolean |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/orb/models/changed_subscription_resources.rb', line 763
|
.variants ⇒ Array(Orb::Models::MatrixSubLineItem, Orb::Models::TierSubLineItem, Orb::Models::OtherSubLineItem)
|
|
# File 'lib/orb/models/changed_subscription_resources.rb', line 1155
|
Instance Method Details
#to_hash ⇒ {
210 |
# File 'sig/orb/models/changed_subscription_resources.rbs', line 210
def to_hash: -> {
|